Включена/Изключена РЕГИСТРАЦИЯ

Автор: XTYLING

MOD: Включена/Изключена РЕГИСТРАЦИЯ
MOD Author: XTYLING < xtyling@gmail.com >
MOD Description: С този мод може да забраниш регистрацията от АДМИН ПАНЕЛА/Обща конфигорация.
MOD Version: 1.0.0
Инсталация – Лесна
Инсталация – 5 минути
Файлове за единване: includes/usercp_register.php
admin/admin_board.php
language/lang_english/lang_main.php
templates/*/admin/board_config_body.tpl
Included Files: n/a

#-----[ SQL ]---------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('reg_disable','0');
#
#-----[ Отвори ]---------------------------------------------
#
includes/usercp_register.php
#
#-----[ Намери ]---------------------------------------------
#
if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) )
{
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

show_coppa();

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
#
#-----[ Добави преди това ]---------------------------------------------
#
if ( $mode == 'register' && $board_config['reg_disable'] == '1' )
{
message_die(GENERAL_MESSAGE, $lang['Reg_disable_message']);
}
#
#-----[ Отвори ]---------------------------------------------
#
#
admin/admin_board.php
#
#-----[ Намери ]---------------------------------------------
#
$disable_board_yes = ( $new['board_disable'] ) ? "checked=\"checked\"" : "";
$disable_board_no = ( !$new['board_disable'] ) ? "checked=\"checked\"" : "";
#
#-----[ Добави след това ]---------------------------------------------
#
//Disable Registration
$disable_reg_yes = ( $new['reg_disable'] ) ? "checked=\"checked\"" : "";
$disable_reg_no = ( !$new['reg_disable'] ) ? "checked=\"checked\"" : "";
#
#-----[ Намери ]---------------------------------------------
#
"L_SUBMIT" => $lang['Submit'],
"L_RESET" => $lang['Reset'],
#
#-----[ Добави след това ]---------------------------------------------
#
//Disable Registration
"L_DISABLE_REG" => $lang['Reg_disable'],
"L_DISABLE_REG_EXPLAIN" => $lang['Reg_disable_explain'],
"S_DISABLE_REG_YES" => $disable_reg_yes,
"S_DISABLE_REG_NO" => $disable_reg_no,
#
#-----[ Отвори ]---------------------------------------------
#
#
language/lang_english/lang_main.php
#
#-----[ Намери ]---------------------------------------------
#
//
// That's all, Folks!
#
#-----[ Добави преди това ]---------------------------------------------
#
//Disable Registration
$lang['Reg_disable'] = 'Disable Registration';
$lang['Reg_disable_explain'] = 'Here you can disable the registration of users.';
$lang['Reg_disable_message'] = 'Sorry, but the Administrator has disabled registration to this forum.';
#
#-----[ Отвори ]---------------------------------------------
#
#
templates/*/admin/board_config_body.tpl
#
#-----[ Намери ]---------------------------------------------
#
<tr>
<td class="row1">{L_DISABLE_BOARD}<br /><span class="gensmall">{L_DISABLE_BOARD_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="board_disable" value="1" {S_DISABLE_BOARD_YES} /> {L_YES} <input type="radio" name="board_disable" value="0" {S_DISABLE_BOARD_NO} /> {L_NO}</td>
</tr>
#
#-----[ Добави след това ]---------------------------------------------
#
<tr>
<td class="row1">{L_DISABLE_REG}<br /><span class="gensmall">{L_DISABLE_REG_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="reg_disable" value="1" {S_DISABLE_REG_YES} /> {L_YES} <input type="radio" name="reg_disable" value="0" {S_DISABLE_REG_NO} /> {L_NO}</td>
</tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#


Вашият коментар