The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How do I automatically turn on/off specific forums at a set time?
I looked for some cron hacks that would do this but couldn't find any.
Here's what I want to do: 1. Automatically turn off certain forums on Saturday night. 2. Automatically turn them back on on Monday AM. If I can't do it via the cron tab then could somebody give me an example of an SQL query that would turn off/on a forum so I could perform them all en masse at once if I have to do it manually? |
#2
|
|||
|
|||
If you use Linux, and have access to create local cron job to execute a script at said times.
With the forums offline, I dont think vBulletin Cron Jobs will still function, so you would have to look "external of vBulletin" I would imagine. |
#3
|
||||
|
||||
Quote:
All the forums would not be offline but just the few forums that I want to turn off. I have about 150 forums and would be turning off only about 8 of them during the period. My problem is not knowing that a cron job could be set up in Linux or vBulletin but how. |
#4
|
|||
|
|||
Read over the vBulletin Manual for scheduled tasks here: http://www.vbulletin.com/docs/html/scheduled_tasks
Looks like all you have to do is write a PHP Script to modify your database to make changes to the forum sections in question. |
#5
|
|||
|
|||
I spent about 30 minutes cracking this up:
PHP Code:
Set two Scheduled Tasks in AdminCP that call forumswitch.php?enable=0 and forumswitch.php?enable=1 respectively. |
#6
|
||||
|
||||
Thanks so much ReCom!
Just so I'm clear, it seems like this line is t[he one with the forumid: PHP Code:
I have about 10 forums to turn off, do I replace the '57' with something like '1,2,3,4,5,6,7,8,9,10'? |
#7
|
|||
|
|||
Quote:
PHP Code:
|
#8
|
||||
|
||||
I did a test run and get this error:
PHP Code:
|
#9
|
||||
|
||||
Did you save the script where suggested? Have you renamed your admincp? What path did you put for your Scheduled Task Filename?
|
#10
|
||||
|
||||
Lynne,
Are you ReCom? I saved it both in my vBulletin directory (same error) and in my includes/cron directory within my vBulletin directory (same error). I have not renamed admincp. --------------- Added [DATE]1227630218[/DATE] at [TIME]1227630218[/TIME] --------------- Here is the error when run from the vBulletin directory: PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|