The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Open Toggle - Automate Site Opening and Closing Details »» | |||||||||||||||||||||||||||||
Open Toggle - Automate Site Opening and Closing
Developer Last Online: May 2017
Open Toggle v1.0 BETA Advanced (ish) What this does Anybody who has read through the guidelines available at vbulletin.com will know that you should perform regular backups of your database. You may also know that it is best to use mysqldump via an operating system scheduled task as using vBulletin cron may result in backup failures, especially on large databases. It is also wise to lock all tables (to prevent inserts etc) that may corrupt your backup. Now this is all well and good, however if you have tried to do this on an active site you will have seen the site grind to a halt and on occasion spit out errors to the end user. If you have any interest in user experience you should really close the site down gracefully with a meaningful user message, for example "We are currently backing up, please check back in 10 minutes". The problem is that although you can do this through admincp there is no automated way to do this from an external process (i.e. your scheduled backup script). Most of us run backups during off time and most of us probably don't want to get up at 3am to gracefully close the site for 10 minutes. This modification fixes that problem and automates the entire thing. This is not a "real" modification rather a standalone PHP script that you can call from a shell script (using wget on similar) that will open or close the site. So before you start your script mysqldump back you call the script to close the site, once done you call the script to open the site. Simples Note: This script does not do any backups Installation There is no installation, all you need to do is:
Using the script This script is designed to be called from wget, as an example your backup script would look like this: Code:
wget "http://yoursite/forum/opentoggle.php?do=close" ... Do you mysqldump here wget "http://yoursite/forum/opentoggle.php?do=open" While this script isn't data destructive if somebody "malicious" was constantly calling it and closing/opening your site you would probably be a tad miffed. So the script has various inbuilt security mechanisms, so the script can be configured to:
Other Configuration There are a few other configuration values, I won't get into specifics here as the php script is well commented. In summary you can do the following:
Sample Output If you have configured the script to create outputs you will get something like this when you call it: Code:
<toggle timestamp="Mon, 28 Sep 09 15:40:20 +0100" requesturi="/forum/opentoggle.php?do=close&msg=2" testmode=""> <result code="0">closed</result> </toggle> All the text you see above is customisable. Other Information As mentioned above this script was primarily designed to be called from wget (or similar) however there is nothing to stop you from calling it in a browser or any other mechanism capable of performing http calls. Finally, for those that are more technical. You may have noticed the following line: Code:
define('THIS_SCRIPT', 'login'); Download Now
Show Your Support
|
Comments |
#12
|
||||
|
||||
am I the only one who's a little confused as to what this mod does? You have plenty of info on backing up the forum and closing it....but nothing on what this mod does or any screenshots.
just a thought. |
#13
|
|||
|
|||
seconds that
|
#14
|
||||
|
||||
It's a way to open/close your site without having to go into the AdminCP. More importantly, it's something you can call from another script. If you do not understand, then this will be of little use to you
|
#15
|
||||
|
||||
Quote:
:up: |
#16
|
|||
|
|||
This script is cool, but is there a way to have it create a notice in the forum say, 5 minutes before it is going to go offline?
|
#17
|
||||
|
||||
If you have a cron that performs backups at 3am, then create a notice in vBulletin that shows every night at 2:55am until 3:00am. Use the UTC time, and just figure out the difference between it and server time.
Cheers |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|