sabri ünal 19.09.2006, 21:18
üyelerin e-posta adreslerini değiştirip değiştiremeyeceğini yönetim panelinden ayarlamaya izin verir.
- Kod: Tümünü seç
##################################
## MOD Title: Allow Email Address changes
## MOD Author: Useless < no.public@email.com > ( N/A ) http://forum.custombuiltsoftware.co.uk
## MOD Description: Adds an option to the ACP (General Config) to allow/disallow the changing
## of users email addresses via the user profile.
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 15 Minutes
## Files To Edit: 5
##
## admin/admin_board.php
## language/lang_english/lang_admin.php
## includes/usercp_register.php
## templates/<style>/profile_add_body.tpl
## templates/<style>/admin/board_config_body.tpl
##
## Included Files: db_update.php
##
###########################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the latest version
## of this MOD. Downloading this MOD from other sites could cause malicious code to enter
## into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered in
## our MOD-Database, located at: http://www.phpbb.com/mods/
############################################
## Author Notes: With this mod installed and set to 'No' and account activation is set to
## user when a user registers and supplies an email address for the
## comfirmation email to be delivered to, they will not be allowed to change
## it, possibly to an incorrect one...
##
#############################################
## MOD History:
##
## 2005-04-26 - Version 1.0.1
## - Initial release
##
#############################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################
#
#-----[ SQL ]------------------------------------------
#
# Execute the following or you can upload and run the supplied 'db_update.php' script
# which should be located in the root dir and deleted once the db is updated
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailchange', '0');
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
$namechange_no = ( !$new['allow_namechange'] ) ? "checked=\"checked\"" : "";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$emailchange_yes = ( $new['allow_emailchange'] ) ? "checked=\"checked\"" : "";
$emailchange_no = ( !$new['allow_emailchange'] ) ? "checked=\"checked\"" : "";
#
#-----[ FIND ]------------------------------------------
#
"L_ALLOW_NAME_CHANGE" => $lang['Allow_name_change'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"L_ALLOW_EMAIL_CHANGE" => $lang['Allow_email_change'],
#
#-----[ FIND ]------------------------------------------
#
"NAMECHANGE_NO" => $namechange_no,
#
#-----[ AFTER, ADD ]------------------------------------------
#
"EMAILCHANGE_YES" => $emailchange_yes,
"EMAILCHANGE_NO" => $emailchange_no,
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Allow_name_change'] = 'Allow Username changes';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Allow_email_change'] = 'Allow email address changes';
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
else
{
$template->assign_block_vars('switch_namechange_disallowed', array());
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( ($mode == 'register') || ($board_config['allow_emailchange']) )
{
$template->assign_block_vars('switch_emailchange_allowed', array());
}
else
{
$template->assign_block_vars('switch_emailchange_disallowed', array());
}
#
#-----[ OPEN ]------------------------------------------
#
# This file will need to be edited for all installed styles
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</span></td>
<td class="row2"><input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" /></td>
</tr>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- BEGIN switch_emailchange_disallowed -->
<tr>
<td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: </span></td>
<td class="row2"><input type="hidden" name="email" value="{EMAIL}" /><span class="gen"><b>{EMAIL}</b></span></td>
</tr>
<!-- END switch_emailchange_disallowed -->
<!-- BEGIN switch_emailchange_allowed -->
<tr>
<td class="row1"><span class="gen">{L_EMAIL_ADDRESS}: *</span></td>
<td class="row2"><input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" /></td>
</tr>
<!-- END switch_emailchange_allowed -->
#
#-----[ OPEN ]------------------------------------------
#
# This file will need to be edited for all installed styles
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_ALLOW_NAME_CHANGE}</td>
<td class="row2"><input type="radio" name="allow_namechange" value="1" {NAMECHANGE_YES} /> {L_YES} <input type="radio" name="allow_namechange" value="0" {NAMECHANGE_NO} /> {L_NO}</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_ALLOW_EMAIL_CHANGE}</td>
<td class="row2"><input type="radio" name="allow_emailchange" value="1" {EMAILCHANGE_YES} /> {L_YES} <input type="radio" name="allow_emailchange" value="0" {EMAILCHANGE_NO} /> {L_NO}</td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Mutluyum, biraz komedi takılıyorum! sakın kızmayın yakında geçer, sebebini ben de bilmiyorum! yeni bir aşk da bulmuş değilim!