Zelf registreren van gebruikers uitzetten [opgelost]
Geplaatst: 02 dec 2002, 21:05
Is er een mogelijkheid om het zelfregistreren van gebruikers uit te zetten?
Nederlandstalige phpBB Support
https://www.phpbb.nl/forums/
Code: Selecteer alles
#################################################################
## Mod Title: DISABLE REGISTRATION IN ACP
## Mod Version: 1.0
## Author: Sven < sven@e-sven.net > - http://www.e-sven.net
## Description: Mod to allow you to disable user registration
## via the [admin_board.php?mode=config] page.
## Installation Level: easy
## Installation Time: 5-10 Minutes
## Files To Edit: 4
## templates/xxx/admin/board_config_body.tpl
## language/lang_xxx/lang_admin.php
## admin/admin_board.php
## language/lang_xxx/lang_main.php
## profile.php
## Included Files: n/a
#################################################################
##
## Author Note:
## Uses the "allow_register" entry in the "phpbb_config" table... if this does not exist,
## or is blank, user registration will be disabled.
##
## The database insert line assumes you use phpbb_ as your table prefix - you will
## have to change this to whatever you actually use.
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ DATABASE ]--------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_register', 1)
#
#-----[ OPEN ]------------------------------------------
#
profile.php
#
#-----[ FIND ]------------------------------------------
#
#
if ( $mode == 'viewprofile' )
{
include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
exit;
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
else if ( !$board_config['allow_register'] && $mode=='register' )
{
message_die(GENERAL_MESSAGE, $lang['Registration_deactivated'], $lang['Not_Authorised']);
exit;
}
#
#-----[ CLOSE ]------------------------------------------
#
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
#
$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : "";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$allow_registration_yes = ( $new['allow_register'] ) ? "checked=\"checked\"" : "";
$allow_registration_no = ( !$new['allow_register'] ) ? "checked=\"checked\"" : "";
#
#-----[ FIND ]------------------------------------------
#
#
"ACTIVATION_ADMIN_CHECKED" => $activation_admin,
#
#-----[ AFTER, ADD ]------------------------------------------
#
"ALLOW_REGISTRATION_YES" => $allow_registration_yes,
"ALLOW_REGISTRATION_NO" => $allow_registration_no,
#
#-----[ FIND ]------------------------------------------
#
#
"L_ACCT_ACTIVATION" => $lang['Acct_activation'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"L_ALLOW_REGISTRATION" => $lang['Allow_Registration'],
#
#-----[ CLOSE ]------------------------------------------
#
#
#
#-----[ OPEN ]------------------------------------------
#
language/lang_your_lang/lang_admin.php
#
#-----[ AT THE END, ADD ]-------------------------------------
#
$lang['Allow_Registration'] = 'Benutzeranmeldung aktivieren';
#
#-----[ CLOSE ]------------------------------------------
#
#
#
#-----[ OPEN ]------------------------------------------
#
language/lang_your_lang/lang_main.php
#
#-----[ AT THE END, ADD ]-------------------------------------
#
$lang['Registration_deactivated'] = 'Die Registrierung für neue Benutzer wurde vorübergehend deaktiviert.';
#
#-----[ CLOSE ]------------------------------------------
#
#
#
#-----[ OPEN ]------------------------------------------
#
templates/your_template/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
#
<tr>
<td class="row1">{L_ACCT_ACTIVATION}</td>
<td class="row2"><input type="radio" name="require_activation" value="{ACTIVATION_NONE}" {ACTIVATION_NONE_CHECKED} />{L_NONE} <input type="radio" name="require_activation" value="{ACTIVATION_USER}" {ACTIVATION_USER_CHECKED} />{L_USER} <input type="radio" name="require_activation" value="{ACTIVATION_ADMIN}" {ACTIVATION_ADMIN_CHECKED} />{L_ADMIN}</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_ALLOW_REGISTRATION}</td>
<td class="row2"><input type="radio" name="allow_register" value="1" {ALLOW_REGISTRATION_YES} /> {L_YES} <input type="radio" name="allow_register" value="0" {ALLOW_REGISTRATION_NO} /> {L_NO}</td>
</tr>
#
#-----[ CLOSE ]------------------------------------------
#
#
#
#-----[ UPLOAD AND BE HAPPY ]--------------------------------
#
#