Zelf registreren van gebruikers uitzetten [opgelost]

Installatie lukt niet? Plotseling een foutmelding. Of weet je niet hoe iets werkt. Problemen met phpBB2 kun je in dit archief opzoeken.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
baretta

Zelf registreren van gebruikers uitzetten [opgelost]

Bericht door baretta » 02 dec 2002, 21:05

Is er een mogelijkheid om het zelfregistreren van gebruikers uit te zetten?

Admiral Rob

Bericht door Admiral Rob » 02 dec 2002, 21:10

Ik denk dat je dat kunt doen in het admin paneel, bij account activatie.

Spikey
Berichten: 1361
Lid geworden op: 21 dec 2002, 23:08

Bericht door Spikey » 02 dec 2002, 21:11

Je wil dat niemand zich meer kan registreren...

Hier is een mod voor..... even zoeken......

Gevonden, helaas wel volledig Engelstalig.

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}&nbsp; &nbsp;<input type="radio" name="require_activation" value="{ACTIVATION_USER}" {ACTIVATION_USER_CHECKED} />{L_USER}&nbsp; &nbsp;<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}&nbsp;&nbsp;<input type="radio" name="allow_register" value="0" {ALLOW_REGISTRATION_NO} /> {L_NO}</td>
	</tr>

# 
#-----[ CLOSE ]------------------------------------------ 
#
#

# 
#-----[ UPLOAD AND BE HAPPY ]--------------------------------
#
#

Hoop dat je er wat aan hebt.
gr. Spikey

Geen support via pb, email, msn, uw vragen worden niet beantwoord !

baretta

Bericht door baretta » 02 dec 2002, 23:47

bedankt voor je antwoord,

Ik probeer het direct even uit!

baretta

Zelfregistratie activeren werkt

Bericht door baretta » 03 dec 2002, 19:40

De MOD zoals je mij hebt aangegeven werkt.
Bedankt voor je code!

Spikey
Berichten: 1361
Lid geworden op: 21 dec 2002, 23:08

Bericht door Spikey » 03 dec 2002, 20:23

Graag gedaan :!:
gr. Spikey

Geen support via pb, email, msn, uw vragen worden niet beantwoord !

Gesloten