This is such a small but useful mod that I decided to give it away free. This mod will replace your sheduled task image code at the bottom of your pages and run your sheduled tasks via an AJAX call.
AJAX is asyncronous and offers true background running of sheduled tasks. This does not change anything with the actual tasks or the scripts that run them. It merely replaces the method that initiates the running of those scripts.
There are no template edits of any kind. Simply upload the files to your forumhome directory and import the product xml file.
This should work in any vb or custom script in any directory.
Full support will only be given at vbmodder.com
Installed but i didnt get what that mean " This works at vbModder.com with vba in a directory above forum home. Make sure you have your home and forumhome path info acp options filled in or it may not work on vba.
"
Installed but i didnt get what that mean " This works at vbModder.com with vba in a directory above forum home. Make sure you have your home and forumhome path info acp options filled in or it may not work on vba.
"
thank you
Regards,
Mohamed Ashraf
On my site my vbadvanced is in the root directory and vBulletin is in the /forums directory below that.
in vBulettin Options->Site Name / URL / Contact Details there are two settings. Forum Url and Homepage Url. These must both be set or it will not function on your vba home page if you have it in a different directory.
The reason being is that AJAX (and for good security reasons) does not work on remote sites. It can only access files on the site your visiting. So the path has to be set to the file using /dir/dir/file type structure instead of http://site.ext/dir/dir/file. To accomplish this I had to compare the two settings above in order to change the path to cron.php when on a vba page that is in another directory.
Where is there any image used when using a cron? Crons are made to run automatic, aren't they?
It's only there if a cron is scheduled to run at time of page load.
In the footer of your page you should see this.
Code:
<!-- Do not remove or your scheduled tasks will cease to function -->
<!-- Do not remove or your scheduled tasks will cease to function -->
When vb needs to run a task it inserts the image code there. When it does not need to run a task it leaves it blank. This mod elimates that mess and runs the task in the background with an XHR (AJAX) call to the file. Much cleaner.
I should add that just as vb does not insert the image code when there is no task to run. Likewise, this script does nothing, and inserts nothing, not even the link to the javascript file, when there is no task to run.
If your site is busy it is unlikely that you will often win the "load the cron" lottery.
There are several ways to view what is happening and if it is happening.
Use Firefox, if you don't already, and get the wonderful Firebug extension. This extension allows you to see many things including all AJAX calls and their responces on any site you visit. Then if you are the lucky one that vb decides will cause the next cron to run, you will see it happen in Firebug.
Another way is to go into your scheduled task log setting in your ACP and empty the log by deleting any logs over 0 days old. Then you can come back later and see if those crons that are set to record a log have run.
Ultimately this is one of those mods that does a wonderful thing but it does it behind the scenes. It's not glamorous, it's functional.
Use that baby on a site that missuses AJAX to auto refresh data, such as AJAX chat, and you will see why they are a resource hog. That is if you can keep up with the scrolling.