View Full Version : Automatic Open and Closing of Forum
tinkerbell
07-12-2008, 08:55 PM
Is there any mod out there where you can set your board to close and open at set times automatically.
If there isnt a mod does anyone have any suggestions?
I have searched the forum here and the net generally, I found one thread but it didnt hold much information on the 'how to' part. https://vborg.vbsupport.ru/showthread.php?t=118570
Can anyone help please.:erm:
Tinks
tinkerbell
07-16-2008, 04:19 PM
I think a reasonable length of time has passed since i posted for me to bump this topic.
Its still relevent and I still need some help please.
Thank you
Tinks
You'd basically have to make either make one PHP file and have it run say, at the top of the hour and check the time to decide if it should open or not. Or you could two two and make one open and one close. An example file would work like this...
One file for closing...
// Close the Forums
$close_SQL = "UPDATE tableprefix_setting SET value = 0 WHERE varname = \"bbactive\"";
$close = mysql_query($close_SQL);
$close_txt_SQL = "UPDATE tableprefix_setting SET value = \"Our forums are currently closed but will reopen at 8:00am EST. Thank yoU!\" WHERE varname = \"bbclosedreason\"";
$close_txt = mysql_query($close_txt_SQL);Another for opening...
// Open the Forums
$open_SQL = "UPDATE tableprefix_setting SET value = 1 WHERE varname = \"bbactive\"";
$open = mysql_query($open_SQL);You would then go into your vB admin panel and, after uploading these, run them at the times you would like to open and close the boards respectively. Of course, this is extremely rough (you have to change the "tableprefix" to whatever your tables start with, and you'd also have to do the database connections, etc), but this should work.
You could probably setup some hooks to check if the time fell two times when the page loads too and just refuse the user.
tinkerbell
07-19-2008, 03:27 PM
Thank you Cryo I will have a play around with it and see what happens.
Tinks:D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.