[ Príspevkov: 2 ] 
AutorSpráva
Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Disable Registration

Registrovaný: 01.05.05
Príspevky: 12424
Témy: 1447 | 1447
Bydlisko: Bratislava
Vek: 32
NapísalOffline : 14.10.2006 14:47 | Disable Registration

Kód:
##############################################################
## MOD Title :       Disable Registration
## MOD Author :    Poupoune < kristff@hotmail.com > (N/A) http://www.phpbb-fr.com
##
## MOD Description :    This MOD allows you to disable registrations to
##         your board, manageable in the ACP.
##          You can set an explanation that appears to the
##         users that would want to register. It can be set
##         in the ACP, if not, a default texte will appear.
##
## MOD Version : 1.1.0
##
## Installation Level : easy
## Installation Time :  5 minute(s)
## Files to edit :   5
##      admin/admin_board.php
##      includes/usercp_register.php
##      language/lang_english/lang_main.php
##   language/lang_english/lang_admin.php
##   templates/subSilver/admin/board_config_body.tpl
## 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 :
##
##############################################################
## MOD History :
##
##      24-07-2004
##   Version 1.1.0 - Add explanation text feature
##           
##   03-07-2004
##   Version 1.0.0 - First Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]----------------------------------------------
#

INSERT INTO `phpbb_config` VALUES ('registration_status', '0');
INSERT INTO `phpbb_config` VALUES ('registration_closed', '');

#
#-----[ OPEN ]----------------------------------------------
#

admin/admin_board.php

#
#-----[ FIND ]----------------------------------------------
#

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

#
#-----[ AFTER, ADD ]----------------------------------------------
#

// BEGIN Disable Registration MOD
$registration_status_yes = ( $new['registration_status'] ) ? "checked=\"checked\"" : "";
$registration_status_no = ( !$new['registration_status'] ) ? "checked=\"checked\"" : "";
// END Disable Registration MOD

#
#-----[ FIND ]----------------------------------------------
#

$new['sitename'] = str_replace('"', '&quot;', strip_tags($new['sitename']));

#
#-----[ AFTER, ADD ]----------------------------------------------
#

// BEGIN Disable Registration MOD
$new['registration_closed'] = str_replace('"', '&quot;', $new['registration_closed']);
// END Disable Registration MOD

#
#-----[ FIND ]----------------------------------------------
#

  "L_DISABLE_BOARD_EXPLAIN" => $lang['Board_disable_explain'],

#
#-----[ AFTER, ADD ]----------------------------------------------
#

  // BEGIN Disable Registration MOD
  "L_REGISTRATION_STATUS" => $lang['registration_status'],
  "L_REGISTRATION_STATUS_EXPLAIN" => $lang['registration_status_explain'],
  "L_REGISTRATION_CLOSED" => $lang['registration_closed'],
  "L_REGISTRATION_CLOSED_EXPLAIN" => $lang['registration_closed_explain'],
  // END Disable Registration MOD


#
#-----[ FIND ]----------------------------------------------
#

  "S_DISABLE_BOARD_NO" => $disable_board_no,

#
#-----[ AFTER, ADD ]----------------------------------------------
#

  // BEGIN Disable Registration MOD
  "S_REGISTRATION_STATUS_YES" => $registration_status_yes,
  "S_REGISTRATION_STATUS_NO" => $registration_status_no,
  "REGISTRATION_CLOSED" => $new['registration_closed'],
  // END Disable Registration MOD

#
#-----[ OPEN ]----------------------------------------------
#

includes/usercp_register.php

#
#-----[ FIND ]----------------------------------------------
#

// ---------------------------------------
// Load agreement template since user has not yet
// agreed to registration conditions/coppa
//

#
#-----[ AFTER, ADD ]----------------------------------------------
#

// BEGIN Disable Registration MOD
if( $board_config['registration_status'] && !$userdata['session_logged_in'] )
{
  if( $board_config['registration_closed'] == '' )
  {
    message_die(GENERAL_MESSAGE, 'registration_status', 'Information');
  }
  else
  {
    message_die(GENERAL_MESSAGE, $board_config['registration_closed'], 'Information');
  } 
}
// END Disable Registration MOD

#
#-----[ OPEN ]----------------------------------------------
#

language/lang_english/lang_admin.php

#
#-----[ FIND ]----------------------------------------------
#

?>

#
#-----[ BEFORE, ADD ]----------------------------------------------
#

// BEGIN Disable Registration MOD
$lang['registration_status'] = 'Disable registrations';
$lang['registration_status_explain'] = 'This will disable all new registrations to your board.';
$lang['registration_closed'] = 'Reason of closed registrations';
$lang['registration_closed_explain'] = 'Text that explain why are the registrations closed, that would appear if a user try to register. Leave blank to show default explanation text.';
// END Disable Registration MOD

#
#-----[ OPEN ]----------------------------------------------
#

language/lang_english/lang_main.php

#
#-----[ FIND ]----------------------------------------------
#

$lang['Board_disable'] = '

#
#-----[ AFTER, ADD ]----------------------------------------------
#

// BEGIN Disable Registration MOD
$lang['registration_status'] = 'Sorry, but registrations on this board are currently closed. Please try again later.';
// END Disable Registration MOD

#
#-----[ OPEN ]----------------------------------------------
#

templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]----------------------------------------------
#

  <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}&nbsp;&nbsp;<input type="radio" name="board_disable" value="0" {S_DISABLE_BOARD_NO} /> {L_NO}</td>
  </tr>

#
#-----[ AFTER, ADD ]----------------------------------------------
#

  <tr>
    <td class="row1">{L_REGISTRATION_STATUS}<br /><span class="gensmall">{L_REGISTRATION_STATUS_EXPLAIN}</span></td>
    <td class="row2"><input type="radio" name="registration_status" value="1" {S_REGISTRATION_STATUS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="registration_status" value="0" {S_REGISTRATION_STATUS_NO} /> {L_NO}</td>
  </tr>
  <tr>
    <td class="row1">{L_REGISTRATION_CLOSED}<br /><span class="gensmall">{L_REGISTRATION_CLOSED_EXPLAIN}</span></td>
    <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="registration_closed" value="{REGISTRATION_CLOSED}" /></td>
  </tr>

#
#-----[ SAUVEGARDER/FERMER TOUS LES FICHIERS ]------------------------------------------
#
# FdM


_________________
SilverStone SST CS01 | Corsair SF600 600W SFX | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 (16 Cores / 32 Threads) & Noctua NH-U9DX i4 | Kingston HyperX Savage 32 GB DDR4 2400 MHz | PNY NVIDIA Quadro K1200 DP 4 GB DDR5 | Intel SSD 750 1.2 TB NVMe & Intel SSD 730 240 GB SATA & Seagate BackUp Plus Portable 12 TB USB | 31.5" 4K LCD EIZO FlexScan EV3237 & 2 x 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech Wireless G700s | Harman Kardon Nova | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 - Intel Core i7 5600U, 8 GB DDR3 1600 MHz, Intel HD Graphics 5500, SanDisk SSD 512 GB, 12.5 FHD LED IPS, WWAN 3G 4G LTE, Microsoft Windows 7 Ultimate | Nintendo Classic Mini | BlackBerry Passport 96 GB
Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Disable Registration

Registrovaný: 01.05.05
Príspevky: 12424
Témy: 1447 | 1447
Bydlisko: Bratislava
Vek: 32
Napísal autor témyOffline : 14.10.2006 14:47 | Disable Registration

Kód:
##############################################################
## MOD Titre :       Disable Registration
## MOD Auteur :    Poupoune < kristff@hotmail.com > (N/A) http://www.phpbb-fr.com
##
## MOD Description :    Permet de désactiver les inscriptions momentanément sur
##         votre forum, via le panneau d'administration. Vous pouvez
##         ajouter un texte d'explication ŕ la raison de la fermeture
##         des inscriptions dans le panneau d'administration.
##         Sinon, un texte par défaut sera affiché.          
##
## MOD Version : 1.1.0
##
## Niveau d'installation : facile
## Temps d'installation :  5 minute(s)
## Fichier(s) ŕ éditer :   5
##      admin/admin_board.php
##      includes/usercp_register.php
##      language/lang_french/lang_main.php
##   language/lang_french/lang_admin.php
##   templates/subSilver/admin/board_config_body.tpl
## Fichier(s) inclu(s) :   0
##
##############################################################
## Pour des raisons de sécurité, vous ętes prier de consulter
## réguličrement http://forums.phpbb-fr.com afin d'obtenir la
## derničre version de ce MOD.
## Télécharger ce MOD ŕ partir des sites autres que phpBB-fr.com
## peut ętre dangereux pour votre forum phpBB.
## Par conséquent, phpBB-fr.com n'assurera aucun support pour
## les MODs absents de leur base de données, consultable sur:
## http://forums.phpbb-fr.com/
##############################################################
## Notes de l'auteur :
##
##############################################################
## Historique du MOD :
##
##      24-07-2004
##   Version 1.1.0 - Rajout du texte d'explication des fermetures
##           
##   03-07-2004
##   Version 1.0.0 - Premičre version
##
##############################################################
## Avant d'ajouter ce MOD ŕ votre forum, il vous est fortement conseillé
## d'effectuer une sauvegarde des éléments que vous allez modifier.
##############################################################

#
#-----[ SQL ]----------------------------------------------
#

INSERT INTO `phpbb_config` VALUES ('registration_status', '0');
INSERT INTO `phpbb_config` VALUES ('registration_closed', '');

#
#-----[ OUVRIR ]----------------------------------------------
#

admin/admin_board.php

#
#-----[ CHERCHER ]----------------------------------------------
#

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

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

// BEGIN Disable Registration MOD
$registration_status_yes = ( $new['registration_status'] ) ? "checked=\"checked\"" : "";
$registration_status_no = ( !$new['registration_status'] ) ? "checked=\"checked\"" : "";
// END Disable Registration MOD


#
#-----[ CHERCHER ]----------------------------------------------
#

$new['sitename'] = str_replace('"', '&quot;', strip_tags($new['sitename']));

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

// BEGIN Disable Registration MOD
$new['registration_closed'] = str_replace('"', '&quot;', $new['registration_closed']);
// END Disable Registration MOD

#
#-----[ CHERCHER ]----------------------------------------------
#

  "L_DISABLE_BOARD_EXPLAIN" => $lang['Board_disable_explain'],

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

  // BEGIN Disable Registration MOD
  "L_REGISTRATION_STATUS" => $lang['registration_status'],
  "L_REGISTRATION_STATUS_EXPLAIN" => $lang['registration_status_explain'],
  "L_REGISTRATION_CLOSED" => $lang['registration_closed'],
  "L_REGISTRATION_CLOSED_EXPLAIN" => $lang['registration_closed_explain'],
  // END Disable Registration MOD

#
#-----[ CHERCHER ]----------------------------------------------
#

  "S_DISABLE_BOARD_NO" => $disable_board_no,

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

  // BEGIN Disable Registration MOD
  "S_REGISTRATION_STATUS_YES" => $registration_status_yes,
  "S_REGISTRATION_STATUS_NO" => $registration_status_no,
  "REGISTRATION_CLOSED" => $new['registration_closed'],
  // END Disable Registration MOD

#
#-----[ OUVRIR ]----------------------------------------------
#

includes/usercp_register.php

#
#-----[ CHERCHER ]----------------------------------------------
#

// ---------------------------------------
// Load agreement template since user has not yet
// agreed to registration conditions/coppa
//

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

// BEGIN Disable Registration MOD
if( $board_config['registration_status'] && !$userdata['session_logged_in'] )
{
  if( $board_config['registration_closed'] == '' )
  {
    message_die(GENERAL_MESSAGE, 'registration_status', 'Information');
  }
  else
  {
    message_die(GENERAL_MESSAGE, $board_config['registration_closed'], 'Information');
  } 
}
// END Disable Registration MOD

#
#-----[ OUVRIR ]----------------------------------------------
#

language/lang_french/lang_admin.php

#
#-----[ CHERCHER ]----------------------------------------------
#

?>

#
#-----[ AVANT, AJOUTER ]----------------------------------------------
#

// BEGIN Disable Registration MOD
$lang['registration_status'] = 'Désactiver les inscriptions';
$lang['registration_status_explain'] = 'Ceci permet de désactiver momentanément les inscriptions ŕ votre forum.';
$lang['registration_closed'] = 'Raison de la clotűre des inscriptions';
$lang['registration_closed_explain'] = 'Texte expliquant la raison de la fermeture des inscriptions, qui s\'affichera lorsqu\'un utilisateur voudra s\'inscrire. Laisser blanc pour afficher le texte par défaut.';
// END Disable Registration MOD

#
#-----[ OUVRIR ]----------------------------------------------
#

language/lang_french/lang_main.php

#
#-----[ CHERCHER ]----------------------------------------------
#

$lang['Board_disable'] = 'Désolé, mais ce forum est actuellement indisponible. Veuillez réessayer ultérieurement.';

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

// BEGIN Disable Registration MOD
$lang['registration_status'] = 'Désolé, mais les inscriptions ŕ ce forum sont actuellement fermées. Veuillez réessayer ultérieurement.';
// END Disable Registration MOD

#
#-----[ OUVRIR ]----------------------------------------------
#

templates/subSilver/admin/board_config_body.tpl

#
#-----[ CHERCHER ]----------------------------------------------
#

  <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}&nbsp;&nbsp;<input type="radio" name="board_disable" value="0" {S_DISABLE_BOARD_NO} /> {L_NO}</td>
  </tr>

#
#-----[ APRES, AJOUTER ]----------------------------------------------
#

  <tr>
    <td class="row1">{L_REGISTRATION_STATUS}<br /><span class="gensmall">{L_REGISTRATION_STATUS_EXPLAIN}</span></td>
    <td class="row2"><input type="radio" name="registration_status" value="1" {S_REGISTRATION_STATUS_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="registration_status" value="0" {S_REGISTRATION_STATUS_NO} /> {L_NO}</td>
  </tr>
  <tr>
    <td class="row1">{L_REGISTRATION_CLOSED}<br /><span class="gensmall">{L_REGISTRATION_CLOSED_EXPLAIN}</span></td>
    <td class="row2"><input class="post" type="text" size="40" maxlength="255" name="registration_closed" value="{REGISTRATION_CLOSED}" /></td>
  </tr>

#
#-----[ SAUVEGARDER/FERMER TOUS LES FICHIERS ]------------------------------------------
#
# FdM


_________________
SilverStone SST CS01 | Corsair SF600 600W SFX | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 (16 Cores / 32 Threads) & Noctua NH-U9DX i4 | Kingston HyperX Savage 32 GB DDR4 2400 MHz | PNY NVIDIA Quadro K1200 DP 4 GB DDR5 | Intel SSD 750 1.2 TB NVMe & Intel SSD 730 240 GB SATA & Seagate BackUp Plus Portable 12 TB USB | 31.5" 4K LCD EIZO FlexScan EV3237 & 2 x 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech Wireless G700s | Harman Kardon Nova | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 - Intel Core i7 5600U, 8 GB DDR3 1600 MHz, Intel HD Graphics 5500, SanDisk SSD 512 GB, 12.5 FHD LED IPS, WWAN 3G 4G LTE, Microsoft Windows 7 Ultimate | Nintendo Classic Mini | BlackBerry Passport 96 GB
 [ Príspevkov: 2 ] 


Disable Registration



Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy.

registration script

v PHP, ASP

9

372

26.04.2010 0:09

kablik159

V tomto fóre nie sú ďalšie neprečítané témy.

Unique Registration Hash

[ Choď na stránku:Choď na stránku: 1, 2 ]

v Redakčné systémy

35

4402

05.07.2008 18:18

f0llower~

V tomto fóre nie sú ďalšie neprečítané témy.

Log IP Address on Registration

v Redakčné systémy

0

513

14.10.2006 15:04

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

Disable drive

v Operačné systémy Unix a Linux

0

130

25.04.2012 23:10

webkar

V tomto fóre nie sú ďalšie neprečítané témy.

Disable Board Message

v Redakčné systémy

0

3523

13.10.2006 9:23

JanoF

V tomto fóre nie sú ďalšie neprečítané témy.

FSCK Disable boot password????

v Operačné systémy Unix a Linux

1

257

04.11.2009 10:37

jararak

V tomto fóre nie sú ďalšie neprečítané témy.

JavaScript: mini problem s disable

v JavaScript, VBScript, Ajax

2

340

10.03.2009 10:48

max-m

V tomto fóre nie sú ďalšie neprečítané témy.

core 2 duo - jedno jadro disable

v Intel - Integrated Electronics

12

1127

11.12.2007 17:48

Zemla

V tomto fóre nie sú ďalšie neprečítané témy.

disable ALT text a image panel

v Ostatné

3

387

27.01.2009 16:05

Ďuri

V tomto fóre nie sú ďalšie neprečítané témy.

tlačidlo ovplivňujúce atribút disable a typ tlačidla

v JavaScript, VBScript, Ajax

4

239

01.11.2010 12:05

toma-mato



© 2005 - 2017 PCforum, edited by JanoF