[2.0.19] Admins can Use a Disabled Board

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
9
64%
Very Good
3
21%
Good
0
No votes
Fair
0
No votes
Poor
2
14%
 
Total votes: 14

Prent
Registered User
Posts: 24
Joined: Tue Jan 18, 2005 4:36 pm

Post by Prent » Tue Feb 07, 2006 10:01 pm

Arglwydd wrote: The author is different, and you seem to have made a point of specifically mentioning Sko22. So does this affect things at all?
Yes. The main reason is that Dmitry Shechtman's mod didn't exist when I created this mod.

Arglwydd
Registered User
Posts: 133
Joined: Tue Dec 06, 2005 7:58 pm
Location: Wales, UK
Contact:

Post by Arglwydd » Tue Feb 07, 2006 10:07 pm

Cheers. I just wanted to make sure.
MythicalRealmRPG.net! A roleplaying site for adult writers!
LCNA - A mafia-themed text-based roleplaying game for all ages!

0uK^-
Registered User
Posts: 6
Joined: Sun May 22, 2005 4:29 pm

Post by 0uK^- » Sun Feb 12, 2006 10:19 pm

Hi there i install this mod and have the Disabled Board Message MOD ( Sko22 ) and dont work :?

I think the problem is the mod Guest Sessions -> http://www.phpbbstyles.com/viewtopic.php?t=357

The problem is when i disable, the guests see the forum and dont see the message :?

Sorry for my english :oops:

Prent
Registered User
Posts: 24
Joined: Tue Jan 18, 2005 4:36 pm

Post by Prent » Tue Feb 14, 2006 9:57 pm

0uK^- wrote: Hi there i install this mod and have the Disabled Board Message MOD ( Sko22 ) and dont work :?

I think the problem is the mod Guest Sessions -> http://www.phpbbstyles.com/viewtopic.php?t=357

The problem is when i disable, the guests see the forum and dont see the message :?

Sorry for my english :oops:

It appears to be that way because that mod messes with $sid. I'll try to come up with a solution in a few days here.

Tuxedo_Sat
Registered User
Posts: 21
Joined: Wed Oct 12, 2005 12:43 pm

Post by Tuxedo_Sat » Wed Feb 22, 2006 12:58 am

I would need this to works for moderators also. What do I need to change?

User avatar
Lobo_UU
Registered User
Posts: 39
Joined: Sat Dec 31, 2005 6:37 am
Location: Earth
Contact:

Post by Lobo_UU » Tue Feb 28, 2006 1:32 am

Code: Select all

Critical Error

FIND FAILED: In file [common.php] could not find:

if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") ) 
I believe I made an uh-oh! during this perhaps... some help would be great I really because I have to disable my forum often for backups and MOD's and such so I need to know if MOD's work and such which makes it so I have to open the forums and people come back in!

It is tres annoying.. THANK YOU!

Prent
Registered User
Posts: 24
Joined: Tue Jan 18, 2005 4:36 pm

Post by Prent » Tue Feb 28, 2006 5:24 am

Lobo_UU: I really don't know why you can't find it. It's the very last if statement in common.php, unless you've already modified it before.

User avatar
Lobo_UU
Registered User
Posts: 39
Joined: Sat Dec 31, 2005 6:37 am
Location: Earth
Contact:

Post by Lobo_UU » Tue Feb 28, 2006 7:36 am

Ah yes, but the question is that I don't know what to do with that though. I am very very new at this.

User avatar
damnian
Registered User
Posts: 801
Joined: Sat Nov 19, 2005 4:43 pm

Post by damnian » Mon Mar 06, 2006 3:40 pm

Arglwydd wrote:
MOD Title: Disable Board Message
MOD Author: damnian < damnian-no-spam at damnian dot com > (Dmitry Shechtman) http://damnian.com/dev


The author is different, and you seem to have made a point of specifically mentioning Sko22. So does this affect things at all? Which one of the files should I update with?
Prent wrote: Yes. The main reason is that Dmitry Shechtman's mod didn't exist when I created this mod.

Who the hell is this Dmitry Shechtman guy anyway? :x Next time, try at the very least to contact me!

Anyway, a few days ago this has been finally brought to my attention (see discussion), so I've put up a new version of my MOD, which includes a modified version of this one as a patch in the contrib directory.

Download

Note: If you're using an old version of the MOD (1.2.0 or earlier), use the upgrade script before installing the patch.

Edit 2006-03-07: Changed to v1.3.1 (contains an upgrade script).
Edit 2006-03-15: Changed to v1.4.0 (MODDB).
Last edited by damnian on Wed Mar 15, 2006 11:31 am, edited 2 times in total.
I no longer develop for phpBB. Check out my .NET blog!

User avatar
damnian
Registered User
Posts: 801
Joined: Sat Nov 19, 2005 4:43 pm

Post by damnian » Wed Mar 15, 2006 11:26 am

My Disable Board Message MOD v1.4.0 with this MOD as a patch has been accepted by the MOD team (thanks ycl6 ;)).
Updated the previous post.
I no longer develop for phpBB. Check out my .NET blog!

padmanaba
Registered User
Posts: 45
Joined: Tue Feb 21, 2006 4:41 am

Post by padmanaba » Thu Mar 16, 2006 8:55 am

How to change the disabled board message?
Thanks for the great mod anyway =)

User avatar
damnian
Registered User
Posts: 801
Joined: Sat Nov 19, 2005 4:43 pm

Post by damnian » Thu Mar 16, 2006 11:20 am

padmanaba wrote: How to change the disabled board message?

You may choose between two Disable Board Message mods that are currently compatible with this one - Sko22's (look for the separate install.txt in this mod) or mine (look for the separate install.txt in my mod).

Please keep in mind that you will have to uninstall this mod first.
I no longer develop for phpBB. Check out my .NET blog!

User avatar
Makc666
Registered User
Posts: 358
Joined: Fri Mar 07, 2003 12:03 pm
Location: MSK-RU
Name: Maxim
Contact:

Post by Makc666 » Thu Apr 27, 2006 9:39 pm

There is an Error in this MOD.
How to reproduce it.

1. Switch of your forum.
2. Enter any disable message, let it be: "Closed for 15 minutes"
3. Go to main forum's page.
4. You will see your message up to the top.
5. Go to any topic.
6. Press edit button on any message.
7. When edit windows will open you will see that the text of that message have the same text as your disable forum message.

The reason is because disable message and that edit message have the same variable -->> $message

How to fix:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
// If disabled and admin, show Reminder Box below header.
if ( $board_config['board_disable'] && $userdata['user_level'] == ADMIN )
{
	$template->set_filenames(array('board_disabled_box' => 'error_body.tpl'));
	$message = $board_config['board_disable_text'] ? $board_config['board_disable_text'] : $lang['Board_disable'];
	$template->assign_vars(array('ERROR_MESSAGE' => $message));
	$template->assign_var_from_handle('BOARD_DISABLE_MSG', 'board_disabled_box');
}
#
#-----[ REPLACE WITH ]------------------------------------------ 
#
// If disabled and admin, show Reminder Box below header.
if ( $board_config['board_disable'] && $userdata['user_level'] == ADMIN )
{
	$template->set_filenames(array('board_disabled_box' => 'error_body.tpl'));
	$message_disable = $board_config['board_disable_text'] ? $board_config['board_disable_text'] : $lang['Board_disable'];
	$template->assign_vars(array('ERROR_MESSAGE' => $message_disable));
	$template->assign_var_from_handle('BOARD_DISABLE_MSG', 'board_disabled_box');
}
That it.

Prent
Registered User
Posts: 24
Joined: Tue Jan 18, 2005 4:36 pm

Post by Prent » Thu Apr 27, 2006 10:54 pm

Makc666 wrote:

I couldn't find this exact code. Are you sure you are using the latest version of this mod, and that you haven't modified it yourself?

User avatar
Makc666
Registered User
Posts: 358
Joined: Fri Mar 07, 2003 12:03 pm
Location: MSK-RU
Name: Maxim
Contact:

Post by Makc666 » Thu Apr 27, 2006 11:00 pm

Prent wrote:
Makc666 wrote:

I couldn't find this exact code. Are you sure you are using the latest version of this mod, and that you haven't modified it yourself?

Sorry. I was not 100% punctual.

My above post was for version 1.0.3c.

## This file is for users have installed the Disable Board Message MOD by damnian (http://www.phpbb.com/phpBB/viewtopic.php?t=347451)
## and are installing this mod for the first time.

You can find version 1.0.3c in archive of this mode:
http://www.phpbb.com/phpBB/viewtopic.php?t=347451

Here it is:

Code: Select all

##############################################################
## MOD Title: Admins can Use a Disabled Board
## MOD Author: Prent < prent@milkohol.net > (N/A) N/A
## MOD Author: damnian < damnian-no-spam at damnian dot com > (Dmitry Shechtman) http://damnian.com/dev
## MOD Description: Admins can still use a board that is disabled to users.
## MOD Version: 1.0.3c
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 4
##	 common.php
##	 includes/sessions.php
##	 includes/page_header.php
##	 templates/subSilver/overall_header.tpl
##
## Included Files: N/A
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##	This file is for users have installed the Disable Board Message MOD by damnian (http://www.phpbb.com/phpBB/viewtopic.php?t=347451)
##   	and are installing this mod for the first time.
##
##  If you have version 1.2.0 or earlier of Disable Board Message MOD, upgrade to version 1.4.1 before installing this mod.
##
##############################################################
## MOD History:
##
##   2006-03-26 - Version 1.0.3c
##      - Fixed upgrade notes
##   2006-03-07 - Version 1.0.3b
##      - Added upgrade note
##   2006-03-06 - Version 1.0.3
##      - Included version for users of Disable Board Message MOD by damnian
##   2006-01-02 - Version 1.0.2
##      - Fixed for installation with phpBB 2.0.18/19
##   2005-07-06 - Version 1.0.1
##      - Fixed bug where users and guests could see the board when starting a session.
##      - Included version for users of Disabled Board Message MOD (thanks Fountain of Apples)
##      - Fixed syntax of this file for common.php
##   2005-06-30 - Version 1.0.0
##      - Initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
common.php
#
#-----[ FIND ]------------------------------------------
#
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*
#
#-----[ FIND ]------------------------------------------
#
	message_die(GENERAL_MESSAGE, $message, $board_config['board_disable_caption']);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
*/
#
#-----[ OPEN ]------------------------------------------
#
includes/sessions.php
#
#-----[ FIND ]------------------------------------------
#

	//
	// Initial ban check against user id, IP and email address
	//
#
#-----[ BEFORE, ADD ]------------------------------------------
#

	//
	// Show 'Board is disabled' message if needed.
	//
	if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") && !defined("HAS_DIED") && ($userdata['user_level'] != ADMIN) )
	{
		$message = $board_config['board_disable_text'] ? $board_config['board_disable_text'] : 'Board_disable';
		message_die(GENERAL_MESSAGE, $message, $board_config['board_disable_caption']);
		}
#
#-----[ FIND ]------------------------------------------
#

		//
		// Did the session exist in the DB?
		//
#
#-----[ BEFORE, ADD ]------------------------------------------
#

		//
		// Show 'Board is disabled' message if needed, if not in admin panel, if not logging in, 
		// if message_die() hasn't been called yet, and if user is not an admin
		//
		if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") && !defined("HAS_DIED") && ($userdata['user_level'] != ADMIN) )
		{
			$message = $board_config['board_disable_text'] ? $board_config['board_disable_text'] : 'Board_disable';
					message_die(GENERAL_MESSAGE, $message, $board_config['board_disable_caption']);
			}
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
		$template->assign_block_vars('switch_enable_pm_popup', array());
	}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#

// If disabled and admin, show Reminder Box below header.
if ( $board_config['board_disable'] && $userdata['user_level'] == ADMIN )
{
	$template->set_filenames(array('board_disabled_box' => 'error_body.tpl'));
	$message_disable = $board_config['board_disable_text'] ? $board_config['board_disable_text'] : $lang['Board_disable'];
	$template->assign_vars(array('ERROR_MESSAGE' => $message_disable));
	$template->assign_var_from_handle('BOARD_DISABLE_MSG', 'board_disabled_box');
}

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
		<br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
{BOARD_DISABLE_MSG}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM 

Post Reply

Return to “[2.0.x] MOD Database Releases”