Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
Toggle Admin CP Login 2.1.0
Post new topic   Reply to topic View previous topic :: View next topic
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
Toggle Admin CP Login 2.1.0
PostPosted: 04/06/2007 7:55 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 8:02 PM
Location: Birmingham, UK.
greatbrE.gif
I managed to install this with easymod earlier although I had edit the install.txt file and do a bit of DIM  Applause

Code:
##############################################################
## MOD Title:           Toggle Admin CP Login
## MOD Author:          MarcuS < > (MarcuS) http://www.phobbia.net/mods
## MOD Description:     This mod allows a choice of disabling the ACP login introduced in phpBB 2.0.15
## MOD Version:         2.1.0
##
## Installation Level:  Easy
## Installation Time:   5 Minutes
## Files To Edit:       4
##                      admin/admin_board.php
##                      admin/pagestart.php
##                      language/lang_english/lang_admin.php
##                      templates/subSilver/admin/board_config_body.tpl
##
## Included Files:      n/a
##
##############################################################
## For the latest version of this MOD, please check: http://www.phobbia.net/mods/
##############################################################
## Author Notes:        Many people find the Admin CP login annoying, especially if they are the only
##                      Administrator for that board.  This mod allows you to disable it.
##
##                      Tested on phpBB 2.0.16 - 2.0.22
##
##############################################################
## MOD History:
##
##   2006-12-30 - Version 2.1.0
##   - Checked for phpBB 2.0.22
##   - Improved for EasyMod users
##   - Minor tweaks
##
##   2005-09-13 - Version 2.0.0
##      - Release 3: Rewrite of pagestart.php edits due to security issue
##      - Thanks to NightriderXP for noticing the problem
##
##   2005-07-30 - Version 1.0.1
##      - Release 2: Changed default for the ACP login as being required
##   - Toggle ACP Login works on phpBB 2.0.17 also
##
##   2005-07-18 - Version 1.0.0
##      - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config VALUES ('admin_login', '1');
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
$smtp_yes = ( $new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
$smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
#
#-----[ AFTER, ADD ]------------------------------------------
#

// Toggle ACP Login
$admin_login_yes = ( $new['admin_login'] ) ? "checked=\"checked\"" : "";
$admin_login_no = ( !$new['admin_login'] ) ? "checked=\"checked\"" : "";

#
#-----[ FIND ]------------------------------------------
#
   "L_SMTP_PASSWORD" => $lang['SMTP_password'],
   "L_SMTP_PASSWORD_EXPLAIN" => $lang['SMTP_password_explain'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
   // Toggle ACP Login
   'L_ADMIN_LOGIN' => $lang['admin_login'],
   'L_ADMIN_LOGIN_EXPLAIN' => $lang['admin_login_explain'],

#
#-----[ FIND ]------------------------------------------
#
   "SMTP_USERNAME" => $new['smtp_username'],
   "SMTP_PASSWORD" => $new['smtp_password'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
   // Toggle ACP Login
   'ADMIN_LOGIN_YES' => $admin_login_yes,
   'ADMIN_LOGIN_NO' => $admin_login_no,

#
#-----[ OPEN ]------------------------------------------
#
admin/pagestart.php
#
#-----[ FIND ]------------------------------------------
#
if (!$userdata['session_admin'])
{
   redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1 ", true));
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($board_config['admin_login'])
{
   if (!$userdata['session_admin'])
   {
      redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1 ", true));
   }
}
#
#-----[ 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_ADMIN_LOGIN}<br /><span class="gensmall">{L_ADMIN_LOGIN_EXPLAIN}</span></td>
            <td class="row2"><input type="radio" name="admin_login" value="1" {ADMIN_LOGIN_YES} />{L_YES}&nbsp;&nbsp;<input type="radio" name="admin_login" value="0" {ADMIN_LOGIN_NO} />{L_NO}</td>
      </tr>
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Toggle ACP Login
$lang['admin_login'] = "Admin CP Login";
$lang['admin_login_explain'] = "This allows you to determine whether the Admin CP re-authentication login requirement is necessary";

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


I had to changed the above to

Code:
##############################################################
## MOD Title:           Toggle Admin CP Login
## MOD Author:          MarcuS < > (MarcuS) http://www.phobbia.net/mods
## MOD Description:     This mod allows a choice of disabling the ACP login introduced in phpBB 2.0.15
## MOD Version:         2.1.0
##
## Installation Level:  Easy
## Installation Time:   5 Minutes
## Files To Edit:       4
##                      admin/admin_board.php
##                      admin/pagestart.php
##                      language/lang_english/lang_admin.php
##                      templates/subSilver/admin/board_config_body.tpl
##
## Included Files:      n/a
##
##############################################################
## For the latest version of this MOD, please check: http://www.phobbia.net/mods/
##############################################################
## Author Notes:        Many people find the Admin CP login annoying, especially if they are the only
##                      Administrator for that board.  This mod allows you to disable it.
##
##                      Tested on phpBB 2.0.16 - 2.0.22
##
##############################################################
## MOD History:
##
##   2006-12-30 - Version 2.1.0
##   - Checked for phpBB 2.0.22
##   - Improved for EasyMod users
##   - Minor tweaks
##
##   2005-09-13 - Version 2.0.0
##      - Release 3: Rewrite of pagestart.php edits due to security issue
##      - Thanks to NightriderXP for noticing the problem
##
##   2005-07-30 - Version 1.0.1
##      - Release 2: Changed default for the ACP login as being required
##   - Toggle ACP Login works on phpBB 2.0.17 also
##
##   2005-07-18 - Version 1.0.0
##      - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config VALUES ('admin_login', '1');
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
$smtp_yes = ( $new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
$smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : "";
#
#-----[ AFTER, ADD ]------------------------------------------
#

// Toggle ACP Login
$admin_login_yes = ( $new['admin_login'] ) ? "checked=\"checked\"" : "";
$admin_login_no = ( !$new['admin_login'] ) ? "checked=\"checked\"" : "";

#
#-----[ FIND ]------------------------------------------
#
   "L_SMTP_PASSWORD" => $lang['SMTP_password'],
   "L_SMTP_PASSWORD_EXPLAIN" => $lang['SMTP_password_explain'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
   // Toggle ACP Login
   'L_ADMIN_LOGIN' => $lang['admin_login'],
   'L_ADMIN_LOGIN_EXPLAIN' => $lang['admin_login_explain'],

#
#-----[ FIND ]------------------------------------------
#
   "SMTP_USERNAME" => $new['smtp_username'],
   "SMTP_PASSWORD" => $new['smtp_password'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
   // Toggle ACP Login
   'ADMIN_LOGIN_YES' => $admin_login_yes,
   'ADMIN_LOGIN_NO' => $admin_login_no,

#
#-----[ OPEN ]------------------------------------------
#
admin/pagestart.php
#
#-----[ FIND ]------------------------------------------
#
if (!$userdata['session_admin'])
{
   redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1 ", true));
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($board_config['admin_login'])
{
   if (!$userdata['session_admin'])
   {
      redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1 ", true));
   }
}
#
#-----[ 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_ADMIN_LOGIN}<br /><span class="gensmall">{L_ADMIN_LOGIN_EXPLAIN}</span></td>
            <td class="row2"><input type="radio" name="admin_login" value="1" {ADMIN_LOGIN_YES} />{L_YES}&nbsp;&nbsp;<input type="radio" name="admin_login" value="0" {ADMIN_LOGIN_NO} />{L_NO}</td>
      </tr>

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


Then do this bit manually

Code:
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Toggle ACP Login
$lang['admin_login'] = "Admin CP Login";
$lang['admin_login_explain'] = "This allows you to determine whether the Admin CP re-authentication login requirement is necessary";

#


by adding this to the lang_main.php

Code:
//
// That's all Folks!
// Toggle ACP Login
$lang['admin_login'] = "Admin CP Login";
$lang['admin_login_explain'] = "This allows you to determine whether the Admin CP re-authentication login requirement is necessary";


because
Code:
//
// That's all Folks!
wasn't even in the lang_admin.php file

After that though JD = Job Done  Dancing
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: Toggle Admin CP Login 2.1.0
PostPosted: 04/06/2007 8:40 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:02 PM
Location: St Pete, FL
peace.gif
Why not just modify the MOD script so that EM can do all the work for you?  This is how you do it for the language files whenever a MOD author uses That's all Folks! in the FIND, which is pretty dumb for international software:

OPEN
Toggle ACP Login 2.1.0.txt

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

REPLACE WITH
Code:
#
#-----[ FIND ]------------------------------------------
#
?>

Save, upload, and try again using EM...

This is guaranteed to work for EVERY language...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Toggle Admin CP Login 2.1.0
PostPosted: 04/06/2007 8:48 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 8:02 PM
Location: Birmingham, UK.
greatbrE.gif
Cool, thanks for that. I'll try that in future  Applause
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
Re: Toggle Admin CP Login 2.1.0
PostPosted: 04/06/2007 8:55 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 3:02 PM
Location: St Pete, FL
peace.gif
If you remember that, you should never have a conflict between the MOD script or any of your langage files again and you should never be manually applying the MOD code to your phpBB files if you can avoid it and allow EM to do all the work...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Toggle Admin CP Login 2.1.0
PostPosted: 04/06/2007 9:03 AM Reply with quote
Citation
Chris Powell
Citation
Posts 1332
Word Cnt. 86,126
BDay Feb 11
Sign Aquarius
Sex Sex:Male
Joined: Mar 31, 2007
Local time: 8:02 PM
Location: Birmingham, UK.
greatbrE.gif
Ok cheers
Back to Top
View user's profile Find all posts by Chris Powell Send private message   Visit poster's website
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
All times are GMT - 5 Hours

Page 1 of 1


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.0863s (PHP: 79% - SQL: 21%) - SQL queries: 42 - GZIP disabled - Debug on