Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Website Design/Showcase (http://www.chiefdelphi.com/forums/forumdisplay.php?f=64)
-   -   A question to all you Forum Gurus (http://www.chiefdelphi.com/forums/showthread.php?t=28409)

team384_pat 04-05-2004 22:33

A question to all you Forum Gurus
 
Do you guys know how to make phpBB or vBulletin turn inactive or closed during specific times of the day.. I'm sure there is a hack to do it.. or if someone could write one.. that would be awesome.. Our school system does not allow us to view forums during specific times of the day during the school year. We would like to use a forum system to post messages rather than mass-email everyone..

So i'm wonding if it can be done or not.. :ahh:

Thanks

Elgin Clock 04-05-2004 23:39

Re: A question to all you Forum Gurus
 
Not that I am familiar with.. But wouldn't the easiest way to follow the school policies be to just not look at it during those times??

For example, our team forum is just for messages.
I'm not sure as to what you mean "mass e-mail" people through team forums.

The basic use of a forum system is to act as a bulletin board, or post messages and reply to these messages.

I know that "mass e-mailing" is possible through certain forum systems, like this one for example, but if you just want post messages and also adhere to school policies, just do not visit the forums. Simple.

Brandon Martus 05-05-2004 08:26

Re: A question to all you Forum Gurus
 
If you use phpBB or vBulletin, they have the ability to be shut off. You can write a script that runs whenever you need to turn the site on & off. I use one for the backups. You'll notice, if you are on chiefdelphi at 5:47am EST, the forums are off. That is all automagic.

Jack 05-05-2004 15:23

Re: A question to all you Forum Gurus
 
in phpBB you'd need to run the MySQL query to disable your forums:
Code:

UPDATE `phpbb_config` SET `config_value` = '1' WHERE `config_name` = 'board_disable'
you'd need to then run another query to turn the forms back on:
Code:

UPDATE `phpbb_config` SET `config_value` = '0' WHERE `config_name` = 'board_disable'
A little script i just threw together that i *think* would work...
Make a file called formonoff.php Place this file in your main forums directory (That's the one with the files like index.php, posting.php, etc..)
Even though the script does use some simple security to prevent people from using their web browser to use the script, you might want to edit your .htaccess file, or set the permissions in such a way that your web server can't execute it. Place the following code in the file:

PHP Code:

<?php
define
('IN_PHPBB'true);
$phpbb_root_path './';
include(
$phpbb_root_path 'extension.inc');
include(
$phpbb_root_path 'common.'.$phpEx);
$userdata session_pagestart($user_ipPAGE_INDEX);
init_userprefs($userdata);

$action $argv['1'];
$key $argv['2'];

if (
$key != 'e7YMe8')
{
    die(
'Not allowed to run script!');
}

if(
$action == 'off')
{
    
$sql "UPDATE `phpbb_config` SET `config_value` = '1' WHERE `config_name` = 'board_disable'";
} else if (
$action == 'on')
{
    
$sql "UPDATE `phpbb_config` SET `config_value` = '0' WHERE `config_name` = 'board_disable'";
} else {
    die(
'No action given!');
}
if (!(
$db->sql_query($sql)))
{
    die(
'SQL Error!');
}
?>

You'll then need to make a cron tab to run the following command to turn off your forums:
Code:

php -f /PATH_TO_FORUMS_HOME/formonoff.php off e7YMe8
... and then this one to turn them back on:
Code:

php -f /PATH_TO_FORUMS_HOME/formonoff.php on e7YMe8
fyi.. you can change the key if you'd like.. just be sure to change it both in the cron tab thingie and in the script :)

hope this helps ya :)

(ps: I'm not really sure why you'd want them to turn off/on at times of the day.. but.. heh. whatever works for ya :))

Jack

Ryan M. 05-05-2004 18:44

Re: A question to all you Forum Gurus
 
Quote:

Originally Posted by Brandon Martus
If you use phpBB or vBulletin, they have the ability to be shut off. You can write a script that runs whenever you need to turn the site on & off. I use one for the backups. You'll notice, if you are on chiefdelphi at 5:47am EST, the forums are off. That is all automagic.

Yeah... I'm on then a lot... For a couple of seconds, then I leave and come back in a bit. :) (Sorry, slightly off topic.)

But yeah, if the forums are disabled by the school, doesn't that mean you aren't supposed to access them? :)

team384_pat 05-05-2004 20:49

Re: A question to all you Forum Gurus
 
Well yes.. but they are ways around it.. but i'm not sure if we will actually use a forum system.. it was just brought up and I was thinking of a way to do it without getting in trouble.. but thanks guys.. that's some good scripts..

Thanks

Billfred 05-05-2004 21:06

Re: A question to all you Forum Gurus
 
Quote:

Originally Posted by Brandon Martus
If you use phpBB or vBulletin, they have the ability to be shut off. You can write a script that runs whenever you need to turn the site on & off. I use one for the backups. You'll notice, if you are on chiefdelphi at 5:47am EST, the forums are off. That is all automagic.

...does the fact that it's done at 5:47 have any significance, or am I just becoming one of my english teachers where everything is a symbol, regardless of the insignificance the author meant? :D

Brandon Martus 05-05-2004 21:19

Re: A question to all you Forum Gurus
 
I don't know... does 47 have any special significance? Hmmmmm. :D


All times are GMT -5. The time now is 02:53.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi