The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Need script to close forum by cron job
Hi
Looking for someone to make a small script to close forum by cron job Check this thread : ( check post #4 ) https://vborg.vbsupport.ru/showthread.php?t=207069 Best Regards |
#2
|
|||
|
|||
The forum open/close is controlled by $vbulletin->options['bbactive'], so I started looking at how you might set that using a script. But since it's saved in the datastore it gets pretty complicated. But then I realized you could just override it in a plugin using the init_startup hook. Setting $vbulletin->options['bbactive'] to false will close the forum, so you could add whatever other check you wanted, like
Code:
if (check something outside vbulletin) { $vbulletin->options['bbactive'] = false; } Someone else recently asked about having banners appear/disappear based on the time of day (https://vborg.vbsupport.ru/showthrea...31#post2163631), so another option might be to use that and make the forum automatically close between certain hours. I guess in that case you'd want it to just use the server time so it would match up with the cron job, so it could be something like: Code:
$thishour = date("G"); if ($thishour >= 1 && $thishour < 3) { $vbulletin->options['bbactive'] = false; } Anyway, I know it's not exactly what you asked for, but maybe some of it will be useful. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|