Go Back   vBulletin Modification Discussions > Free vBulletin Modification Releases > vBulletin Add-ons
Home Register FAQ Members List Calendar Mark Forums Read
vBSEO Info Tags

About This Page: This is a discussion on vBulletin AJAX Cron within the vBulletin Add-ons forums, part of the Free vBulletin Modification Releases category, at vBulletin Modification Discussions. 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.


Comment
 
LinkBack Release Tools
Code Monkey
Administrator
Code Monkey's Avatar

vBulletin Version: 3.6x
 

Mod Version: 1.14
 

Released: 08-06-2006
 

Installs: 110
 

Last Update: 11-11-2006
 

Rating: Release Rating: 2 votes, 5.00 average.
 
Supported
DB Changes
Installer Included
Uses Plugins
Manual Template Changes
Automated Template Changes
Code Changes
Additional Files
Is a Beta!
Release
Attached Files
You must click install to download the files.

Release Tools
vBulletin AJAX Cron

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 vBulletin or custom script in any directory. Though it may fail in subdomains. Not a big deal and rare for vBulletin sites.

I have always found the vbcron bit to be annoying. So I fixed it.

Give it a try.

Just import the product xml and upload the files. One xml is included for both 3.5x and 3.6x.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-06-2006, 10:50 PM   #2 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
Ok, I think I have come up with a solution for vba. At least it works here.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 02:16 AM   #3 (permalink)
Junior Member
 
Oblivion Knight's Avatar
 
Join Date: Jul 2006
Location: England, UK
Posts: 13
Oblivion Knight is on a distinguished road
Send a message via AIM to Oblivion Knight Send a message via MSN to Oblivion Knight
I'm somewhat pensive about installing this for some reason..

How does it compare to the default method with the image? Server loads and such?
Oblivion Knight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 08:06 AM   #4 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
It's just a cleaner way to do it. It's asyncronous so the page viewer will get control of their browser without having to wait for the cron to finish. It will now truly be in the backround.

I don't know why you would be leary to try it. It is still going to run the exact same scripts and the same intervals. It just eliminates it from the surface level of the browsers experience. It is running here now. Though, that is the next version that uses a replacement cron.php script. The default one redirects to clear.gif which is useless with this one.

If you are using Firefox I would suggest you get the Firbug extension. Then you can view any AJAX callls and their returns on any site you visit.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 08:29 AM   #5 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
Re-reading your post I am thinking you are under the impresion this is some sort of interval refresh mechanism. IT IS NOT. If you have read any of my responses to those on the other sites you would know I am extremely positioned against such nonsence. That is not within the scope of what AJAX is designed for. Those kinds of apps are not good for anyone.

This still only makes a single call when the user loads the page, if and only if, there is a cron to be run. Same as now but a cleaner experience for the end user.

If fact, currently, when no cron is to be run, the image code doesn't even get loaded in the html. Likewise, with this, when there is no cron to run, the code is not loaded and even the link to the javascript page is not inserted.

Last edited by Code Monkey : 08-10-2006 at 08:31 AM.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 09:48 AM   #6 (permalink)
Junior Member
 
Oblivion Knight's Avatar
 
Join Date: Jul 2006
Location: England, UK
Posts: 13
Oblivion Knight is on a distinguished road
Send a message via AIM to Oblivion Knight Send a message via MSN to Oblivion Knight
Sounds good.! You mentioned the next version using a replacement cron.php script because the default one redirects to clear.gif? Do you plan on releasing that soon, and could I potentially run into any issues by running the current release?

Thanks.


---EDIT---
*points to typo in plugins*
Code:
$vbulletin->settings['disalbe_ajax']

Last edited by Oblivion Knight : 08-10-2006 at 09:55 AM.
Oblivion Knight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 11:24 AM   #7 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
heh, I'll fix that.

No there are no issues currently. It just returns the clear.gif code instead of something like "Attachment Views Completed."

means nothing and the script doesn't even use the return data. I just can't sleep at night knowing it returns image code instead of useful-useless info.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 12:07 PM   #8 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
Ok, latest version 1.1 uploaded.

I can verify now that the new version check in products works as well.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 03:34 PM   #9 (permalink)
Junior Member
 
Oblivion Knight's Avatar
 
Join Date: Jul 2006
Location: England, UK
Posts: 13
Oblivion Knight is on a distinguished road
Send a message via AIM to Oblivion Knight Send a message via MSN to Oblivion Knight
Awesome stuff.! I'll probably install this tomorrow.

Last edited by Oblivion Knight : 08-10-2006 at 03:36 PM. Reason: Ignore what I put before.. I'm a moron.
Oblivion Knight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 03:38 PM   #10 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
Like I said Nothing is inserted when there is no cron to run. So that is what you see when there is no cron to run. The default vBulletin template code. Whether it be with the default vBulletin image or this one. I just threw the notice in there for curious minds like me.

Basically I don't even use that area at all. There would be no need to remove it so there it is.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 03:40 PM   #11 (permalink)
Junior Member
 
Oblivion Knight's Avatar
 
Join Date: Jul 2006
Location: England, UK
Posts: 13
Oblivion Knight is on a distinguished road
Send a message via AIM to Oblivion Knight Send a message via MSN to Oblivion Knight
Yeah, sorry I realised my mistake shortly after posting.

I blame this frickin' cold I've got.. ;__;
Oblivion Knight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 03:43 PM   #12 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
I've been feeling a bit under the weather myself. That heatwave and the sudden drop afterward sent my imune system scrambling.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 03:49 PM   #13 (permalink)
Junior Member
 
Oblivion Knight's Avatar
 
Join Date: Jul 2006
Location: England, UK
Posts: 13
Oblivion Knight is on a distinguished road
Send a message via AIM to Oblivion Knight Send a message via MSN to Oblivion Knight
Hmm, so I went ahead and installed it, and it seems to be running on every page load right now.?

Also, I'd advise making some kind of change with $cronimage, as the comments go rather screwy.. On the footer of my forums I'm getting:
HTML Code:
or your scheduled tasks will cease to function --> or your scheduled tasks will cease to function -->
Oblivion Knight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 03:53 PM   #14 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
Hmm... Doesn't do that for me.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 03:56 PM   #15 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
This is what I get.
Code:
    <!-- Do not remove <!-- vBulletin Cron replaced by vBulletin AJAX Cron from http://vbmodder.com --> or your scheduled tasks will cease to function -->
    <!-- vBulletin Cron replaced by vB AJAX Cron from http://vbmodder.com -->
    <!-- Do not remove <!-- vBulletin Cron replaced by vB AJAX Cron from http://vbmodder.com --> or your scheduled tasks will cease to function -->
I wonder if it's an IE thing for you.

As far as running on every page load. That would mean you have several crons ready to go.

Last edited by Code Monkey : 08-10-2006 at 03:59 PM.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 04:10 PM   #16 (permalink)
Junior Member
 
Oblivion Knight's Avatar
 
Join Date: Jul 2006
Location: England, UK
Posts: 13
Oblivion Knight is on a distinguished road
Send a message via AIM to Oblivion Knight Send a message via MSN to Oblivion Knight
Quote:
Originally Posted by Code Monkey
This is what I get.
Code:
    <!-- Do not remove <!-- vBulletin Cron replaced by vBulletin AJAX Cron from http://vbmodder.com --> or your scheduled tasks will cease to function -->
    <!-- vBulletin Cron replaced by vB AJAX Cron from http://vbmodder.com -->
    <!-- Do not remove <!-- vBulletin Cron replaced by vB AJAX Cron from http://vbmodder.com --> or your scheduled tasks will cease to function -->
I wonder if it's an IE thing for you.
Probably.. I just removed $cronimage from the 2 comments.


Quote:
Originally Posted by Code Monkey
As far as running on every page load. That would mean you have several crons ready to go.
It doesn't seem to be, when I disable the product there's a blank line between the 2 default comments.

When I enable it, the additional "vBulletin AJAX Cron" comment is always there.
Oblivion Knight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 04:15 PM   #17 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
Ahh, you mean the comment. Yes, that is always there. THe crons however only run when they need to. Maybe I will just dump the comment bit since it seems to cause issues.

You should really use Firefox for web dev. It has so many extensions that help you see what's going on in the background.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 04:18 PM   #18 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
There, I uploaded a new one with the comment bit removed.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 04:21 PM   #19 (permalink)
Junior Member
 
Oblivion Knight's Avatar
 
Join Date: Jul 2006
Location: England, UK
Posts: 13
Oblivion Knight is on a distinguished road
Send a message via AIM to Oblivion Knight Send a message via MSN to Oblivion Knight
Ahh.. Sorry, because it wasn't doing it here I got kinda nervous and thought it was doing something wrong.

>__>;;
Oblivion Knight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2006, 04:24 PM   #20 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
The problem with the $cronimage bit is that it puts in in both hidden and non hidden code. So it has to be hidden so it doesn't show up on page and then may cause problems for certain browsers.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2006, 06:08 PM   #21 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,194
Code Monkey is on a distinguished road
I have decided that since this is such a tiny but useful mod, that it will be available for free to non-subscribers. I will post it on other mod sites. However, support will only be offered here.
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-12-2006, 02:34 AM   #