Disable Registration Link ohne Wirkung

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Karsti83
Mitglied
Beiträge: 12
Registriert: 08.03.2007 21:31

Disable Registration Link ohne Wirkung

Beitrag von Karsti83 »

Hi,

ich habe mir von hier:
http://www.phpbbhacks.com/download/4458
oben genannten Mod runtergeladen und meiner Meinung nach korrekt eingebaut.

Im ACP ist die entsprechende Option verfügbar und kann von mir ausgeschaltet werden. In der Datenbank verändert sich daraufhin auch der Eintrag. Das funktioniert also soweit. Das Problem ist allerdings, dass der Link zur Registrierung weiterhin auf der Startseite angezeigt wird.

Liegt das daran, dass der Mod schon relativ alt ist und eventuell mit der aktuellen Version von phpbb nicht mehr funktioniert oder habt ihr eine andere Idee wo der Fehler liegen könnte? Wenn ich die modifizierten Dateien hochladen soll, bitte bescheid geben.

Vielen Dank im voraus.

Hier ist der Code des Mods:

Code: Alles auswählen

################################################################# 
## MOD Title: Disable Registration mod
## MOD Author: Phydeaux <no@public.email> (Phydeaux) http://www.phpbbhacks.com
## MOD Author email: Phydeaux@zhq2.com // please use the forum at phpbbhacks
## MOD Description: 
##		This mod simply *Toggles* User Registration from the ACP. If you disable registration, 
##		the registration icon and link stay hidden permanently. Allowing registration 
##		returns the icon and link. Of course it has no effect when the user is logged in,
##		and it has no effect on registered user logon.
##
## MOD Version: 1.0.0
##
## Installation Level:	Easy
## Installation Time:	5 Minutes
## Files To Edit (4):
##			/admin/admin_board.php
##			/includes/page_header.php
##			/language/*/lang_admin.php  {/lang_english/ included}
##			/templates/*/admin/board_config_body.tpl {subSilver tested... but no worries}
##
## Included Files (0): 
##
##
############################################################## 
## 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: 
##
## If you've ever admin'd a private board and been frustrated with unwanted registrations...
## "This Mod's For You!" Some may find it helpful when they need to simply slow down or
## temp-halt registration. If this helps you, I'm happy...
##
## Phydeaux
##
##
##  /***************************************************************************
##  *
##  *   This program is free software; you can redistribute it and/or modify
##  *   it under the terms of the GNU General Public License as published by
##  *   the Free Software Foundation; either version 2 of the License, or
##  *   (at your option) any later version.
##  *
##  ***************************************************************************/
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD!!! 
############################################################## 

#-----[ SQL ]--------------------------------------------
#
# Your table prefix may be different... edit this accordingly
# I have used the default table prefix 
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('register_disable',0);

# 
#-----[ OPEN ]------------------------------------------ 
# 
admin/admin_board.php

# 
#-----[ FIND ]------------------------------------------ 
# 
$disable_board_no = ( !$new['board_disable'] ) ? "checked=\"checked\"" : "";

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
// Disable Registration Mod
$disable_registration_yes = ( $new['register_disable'] ) ? "checked=\"checked\"" : "";
$disable_registration_no = ( !$new['register_disable'] ) ? "checked=\"checked\"" : "";
// End Disable Registration Mod

# 
#-----[ FIND ]------------------------------------------ 
# 
	"L_DISABLE_BOARD_EXPLAIN" => $lang['Board_disable_explain'], 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
// Disable Registration Mod
	"L_DISABLE_REGISTRATION" => $lang['Registration_disable'], 
	"L_DISABLE_REGISTRATION_EXPLAIN" => $lang['Registration_disable_explain'], 
// End Disable Registration Mod

# 
#-----[ FIND ]------------------------------------------ 
# 
	"S_DISABLE_BOARD_NO" => $disable_board_no,

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
// Disable Registration Mod
	"S_DISABLE_REGISTRATION_YES" => $disable_registration_yes,
	"S_DISABLE_REGISTRATION_NO" => $disable_registration_no,
//End Disable Registration Mod	

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/page_header.php

# 
#-----[ FIND ]------------------------------------------ 
# 
	$template->assign_block_vars('switch_user_logged_out', array());

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
//
// Do we allow registration?
// Disable Registration Mod
	if ( !$board_config['disable_register'] )
	{
	$template->assign_block_vars('switch_user_logged_out', array());
	}
//End Disable Registration Mod

# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_admin.php

# 
#-----[ FIND ]------------------------------------------ 
# 
//
// That's all Folks!

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
// Disable Registration Mod
$lang['Registration_disable'] = 'Disable User Registration';
$lang['Registration_disable_explain'] = 'This will remove the Register icon and link from the board. It is useful for private boards and where Admins prefer to pre-register their users.';
//End Disable Registration

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/admin/board_config_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
#  this line is looong... this is the end of the line
name="board_disable" value="0" {S_DISABLE_BOARD_NO} /> {L_NO}</td>

# 
#-----[ FIND ]------------------------------------------ 
#  this is the following line
	</tr>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	<tr>
		<td class="row1">{L_DISABLE_REGISTRATION}<br /><span class="gensmall">{L_DISABLE_REGISTRATION_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="register_disable" value="1" {S_DISABLE_REGISTRATION_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="register_disable" value="0" {S_DISABLE_REGISTRATION_NO} /> {L_NO}</td>
	</tr>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
Karsti83
Mitglied
Beiträge: 12
Registriert: 08.03.2007 21:31

Re: Disable Registration Link ohne Wirkung

Beitrag von Karsti83 »

Gerne dürft ihr mir auch Alternativen zu dem ausprobierten Mod vorschlagen, wenn ihr zu dem Problem nichts beitragen könnt. :)
Benutzeravatar
S2B
Ehemaliges Teammitglied
Beiträge: 3258
Registriert: 10.08.2004 22:48
Wohnort: Aachen
Kontaktdaten:

Re: Disable Registration Link ohne Wirkung

Beitrag von S2B »

Um was geht es dir denn? Soll die Registrierung komplett deaktiviert werden? Wenn ja, dann ist dieser MOD dafür ungeeignet, denn er blendet lediglich den Link zur Registrierungsseite aus. Die eigentliche Funktion ist weiterhin verfügbar.

Der MOD scheint außerdem nicht wirklich durchdacht zu sein. Es wird nämlich der Template-Block switch_user_logged_out überschrieben, welcher von vielen Leuten auch in anderen Dateien verwendet wird. Besser wäre es, dafür einen neuen Block anzulegen, etwa switch_register_link.
Gruß, S2B
Keinen Support per ICQ/PM!
Hier kann man meine PHP-Skripte und meine MODs für phpBB runterladen.
Karsti83
Mitglied
Beiträge: 12
Registriert: 08.03.2007 21:31

Re: Disable Registration Link ohne Wirkung

Beitrag von Karsti83 »

Ich will die Anmeldung temporär deaktivieren können und das möglichst einfach. Der Grund ist, dass ich kein Viagra brauche und demnach auch die entsprechenden Anmeldungen von irgendwelchen Anbietern nicht möchte. :wink:
Benutzeravatar
S2B
Ehemaliges Teammitglied
Beiträge: 3258
Registriert: 10.08.2004 22:48
Wohnort: Aachen
Kontaktdaten:

Re: Disable Registration Link ohne Wirkung

Beitrag von S2B »

Dann würde ich mal diesen MOD ausprobieren: Disable Registration
Gruß, S2B
Keinen Support per ICQ/PM!
Hier kann man meine PHP-Skripte und meine MODs für phpBB runterladen.
Karsti83
Mitglied
Beiträge: 12
Registriert: 08.03.2007 21:31

Re: Disable Registration Link ohne Wirkung

Beitrag von Karsti83 »

S2B hat geschrieben:Dann würde ich mal diesen MOD ausprobieren: Disable Registration

Vielen Dank, der funktioniert sehr gut.
Antworten

Zurück zu „phpBB 2.0: Mod Support“