vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Board Optimization - vB AJAX Cron (https://vborg.vbsupport.ru/showthread.php?t=123719)

Code Monkey 08-11-2006 10:00 PM

vB 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 vb or custom script in any directory.
Full support will only be given at vbmodder.com

I will support it here as time permits.


Enjoy

Don't forget to click install if you use it.




******************************************
Do not use this with vb 3.5x! There is a difference in the cron table.
The 3.5x version can be found here






Code:

ekd12x0002w#rt2200cmvbm

alraqee 08-12-2006 01:17 AM

Oops

first replay

i will try it soon

ArabSQuad 08-12-2006 03:41 AM

didn't really get what does the hack do ......

but thnx anyway .... :/

Code Monkey 08-12-2006 03:49 AM

Quote:

Originally Posted by ArabSQuad
didn't really get what does the hack do ......

but thnx anyway .... :/

Currently, when vb needs to run a sheduled task, it loads image code at the bottom of your forum page. Except it has a php file as the src of the img tag. This causes the php file to run which in turn runs the next scheduled task. This can, depending on the cron to run and the size of the site, cause a browser to seemingly hang until the script is finished running. This happens because this is a syncronous event. Meaning, it's waiting for the page to finish loading the image.

This mod replaces that with an asyncronous AJAX call to the cron script.

The image code has served vb well but with the advent of AJAX type methods there is a cleaner way to do it. That's what this does.

Cole2026 08-12-2006 03:50 AM

vBCron is run by a simple link to cron.php in an img tag. This link will activate cron and do updates, then output back to the img tags blank.gif. This mod eliminates that, and instead, uses AJAX processing to activate cron.

x3sphere 08-12-2006 04:01 AM

Great work, thanks! :)

bollie 08-12-2006 04:52 AM

where upload ajax_cron.php ?

Code Monkey 08-12-2006 05:49 AM

Quote:

Originally Posted by bollie
where upload ajax_cron.php ?

Notice that it's in a directory called "upload_the_contents_of_this_directory_to_forumhom e".

So just upload the contents of that, subdirectories intact, to your forumhome directory.

bollie 08-12-2006 06:01 AM

Thx ;)

Code Monkey 08-12-2006 01:04 PM

26 downloads and only 8 installs?

The button must be stuck! :D


All times are GMT. The time now is 03:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01115 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete