View Full Version : forums open only in some hour of the day
Follie Folli
09-01-2006, 06:25 PM
I need a mod for my Vbullettin 3.6.0 forum to create a forum open only in some hours of the day.
For example: the forum automatically opens at 11.00PM and automatically closes at 5.00AM everyday.
Does this mod exists? If it doesn't, can you create this mod?
Follie Folli
09-09-2006, 09:56 PM
can you help me?
Adrian Schneider
09-09-2006, 11:18 PM
Something like this (in global_start plugin) would work: $hour = date('G');
if ($hour < 23 or $hour >= 5)
{
standard_error('Some message to display when the board is closed.');
}
This is your server time, let me know if you want it user time instead (though, they could technically keep altering the time before their time is up...)
a big nevermind if you mean an actual forum and not your site, though the same method can be applied...
Follie Folli
09-30-2006, 03:51 PM
Hello,
You didn't understand what I want.
You didn't understand what i want. I don't need the entire board to open and close, but only one forum. I need that this forum automatically opens at 11.00PM and automatically closes at 5.00 AM, while all the other forums in my board have to stay open all the day.
Bodwin
10-03-2006, 06:02 AM
Is anyone able to help with this? I've been trying to find a solution for a long time!
Follie Folli
10-06-2006, 07:52 AM
Is there a coder can help me and create this modification for my community ?
Masiello
10-06-2006, 10:39 AM
Post it here: https://vborg.vbsupport.ru/forumdisplay.php?f=30
and surely you have your mod's ;)
Have Fun
LLcoolMP
10-06-2006, 02:18 PM
I need this modification too... anyone have got some ideas?
Quarterbore
10-06-2006, 03:22 PM
You do realize what you ask for is complicated if you want it so that the forum (forumdisplay) as well as any threads and posts inside that forum will give this error, right?
Or, do you only need this for the forum view itself (not impact threads or posts inside the forum)?
If you only care about the forum itself...
Just open the forumdisplay.php file and hardcode:
FIND:
// ############################### start enter password ###############################
ABOVE ADD
if ($foruminfo['forumid'] == '1')
{
standard_error('Some message to display when the forum is closed.');
}
Now, I think this issue has potential to be an interesting hack...
It would not be too hard to add to the forum table rows for "OPEN" and "CLOSE" and then modify the Forum Options to allow for an OPEN and CLOSE time for each forum. Then use conditionals so that if ($foruminfo['open'] AND $foruminfo['close']) exist, then we know if ($foruminfo['open'] < NOW < $foruminfo['close']) that the forum is open (ASSUMING OPEN < CLOSE) if not then we would use ($foruminfo['close'] < NOW < $foruminfo['open']) to see the forum is open.
I have all the projects I can handle and I don't need this myself but it would be interesting especually if it could work with the pluggin system so no file edits!
Now, I tried to figure out how to do this with a pluggin but I couldn't get it to work...
Perhaps if nobody else codes this I may try...
LLcoolMP
10-11-2006, 03:12 PM
Thank you for your interest
It would be a very interesting and useful hack to develop, i hope that you will realize it soon!
Let us know how the work goes on!
LLcoolMP
01-26-2007, 11:39 AM
News?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.