The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
How could I set up a plugin to be automagically enabled/disabled in certain days/times?
|
|
#2
|
|||
|
|||
|
Anyone? Bueller?
|
|
#3
|
|||
|
|||
|
I've come back to this. I'm still looking for a way to schedule the activation of a plugin..
I've tried creating a PHP file which toggles the "active" status of a plugin directly in the database - but this seems to have no effect. Any other suggestions where I may look would be appreciated. Thanks |
|
#4
|
|||
|
|||
|
did you also update the datastore?
|
|
#5
|
|||
|
|||
|
um, no - I didn't. I'll go see if I can work it out now - any further guidance appreciated
Thanks! --------------- Added [DATE]1193489532[/DATE] at [TIME]1193489532[/TIME] --------------- OK- I had a look, and on the face of it - it seems too hard for my puny intellect to grasp. I guess I could go with modifying the plugin so it's execution is dependent on say the existence of a flag file and cron the creation/deletion of the flag file as opposed to enabling/disabling the plugin itself... Edit: works a treat! |
|
#6
|
||||
|
||||
|
Quote:
|
|
#7
|
|||
|
|||
|
What I did was this:
Edit the plugin code and add the following: Code:
$filename = "/path/to/forum/plugin.go";
if (file_exists($filename)) {
PLUGIN CODE
}
1. Code:
date>/path/to/forum/plugin.go 2. Code:
rm /path/to/forum/plugin.go You could probably create a php file and use vBulletin's Scheduled Tasks to do the CRON for you. It ain't pretty, but t works |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|