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-13-2006 02:19 PM

Why don't you just update and be done with it? ;)

It's all done in the javascript now.

Code Monkey 08-13-2006 03:32 PM

Quote:

Originally Posted by bollie
Database error in vBulletin 3.6.0:

Invalid SQL:

SELECT usergroupid FROM icon AS icon
INNER JOIN imagecategorypermission USING (imagecategoryid)
WHERE icon.iconid = 1
AND usergroupid IN ();

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4
Error Number : 1064
Date : Saturday, August 12th 2006 @ 04:50:14 PM
Script : http://www.xxxxxxxxx/forum/ajax_cron.php?rand=50548
Referrer : http://www.xxxxxxxxxx/forum/arcade.php?&act=Arcade
IP Address : xxxxxxxxxxxxxxx
Username : Niet geregistreerd
Classname : vB_Database

Do you have any mods that have a plugin for the cron_start hook? I have never seen one that uses this hook but you never know.

bollie 08-13-2006 05:10 PM

vBulletin 3.6.0
Add Banner 1.6 Add banner on each forum.
Advanced Userbar Picture Hack for vB 1.0
DownloadsII 5.0.2 A Download Database for vB
Geek Auto
Google Bottom 1.0
ibProArcade for vBulletin 2.5.6 ibProArcade
inferno News Views 1.00
Last Seen Online (Postbit) (Brad) 1.6
Members who have read a thread. 3.13 Display members who have recently read a thread - Version 3.
Members who have visited the forum 4.21 Display members who have visited the forum.
Moderation Auto-PM 2.0.1 Automaticly PMs a user when their thread is moderated
Post Thank You Hack 5.0 Post Thank You Hack
psiStats 2006 1.3.2 Sophisticated forum statistics for your vBulletin board.
Reported post creates new thread 2.01 Disables the sending of e-mails when a post is reported, and instead creates a new thread of the report in a specified forum.
vB Category Icons 1.0.1 This will allow you to setup a icon to display by the title of each forum you have. The look of the icon depends on how you want to set it up in the templates. This will work for all levels of sub-forums.
VB image hosting 1.3.1a Image hosting sloution for VB
vBadvanced CMPS 2.1.0 vBadvanced Content Management & Portal System
vBSEO :: Sitemap Generator 1.6.1 Generate a Google & Yahoo Sitemap for your Forums
vBShout 2.0 AJAX Shoutbox for vBulletin
vBulletin AJAX Cron 1.1.1 This will change your vb cron to run using AJAX instead of an image link.

Code Monkey 08-13-2006 11:51 PM

What am I supposed to do with that? Just look in your plugins and see if one is using cron_start.

Paul M 08-13-2006 11:58 PM

Brollie, you first posted that error over a week ago (here) - long before this was even released. Please do not cross post and clutter up peoples modification threads with unrelated errors that clearly do not belong. Thanks.

Code Monkey 08-14-2006 01:12 AM

Ah, I see. No fishing in my mod thread Bollie. :D

ferrarislave 08-15-2006 02:12 AM

how do I import the feed?

Code Monkey 08-15-2006 03:32 AM

Import the feed?

You mean the product xml?

Just go into your plugin manager and click on products (not plugins) and then at the bottom of the product list click the add product link. Then use the browse button to find the file on your hard drive then click install/import or whatever its called.

Code Monkey 08-16-2006 03:42 PM

If anyone is using a plugin that needs the cron_start hook (I have never seen one) please let me know. This mod will break it if it does since it's not using cron.php where the hook exists. If this is a problem for anyone I will have to come up with a work around. I doubt it but you never know.

Revan 08-17-2006 10:32 PM

[high]* Revan clicks Install.[/high]

Thank you very much, not only is this cool in its own, but it also solved a problem I had to deal with which vBulletin Support was not able to figure out; why cron jobs didn't run on my particular setup.
This, however, runs them perfectly. Im going to vBulletin.com to petition this becoming a stock vB feature.

Edit: http://www.vbulletin.com/forum/showthread.php?t=196660

Code Monkey 08-17-2006 11:22 PM

Well, it only breaks the cron_start hook because I am using a different script than cron.php. I could always add my own hook.

I wonder if there is a way to divert vb to look there for cron_start. hmmm...

Code Monkey 08-17-2006 11:39 PM

New version 1.1.2

Added ajax_cron_start hook. Now if you should ever have a plugin that uses the cron_start hook simply change it to use the ajax_cron_start hook.

briansol 08-18-2006 03:07 AM

Thanks for the update :)

Revan 08-18-2006 10:03 AM

Quote:

Originally Posted by Code Monkey
Well, it only breaks the cron_start hook because I am using a different script than cron.php. I could always add my own hook.

I wonder if there is a way to divert vb to look there for cron_start. hmmm...

If that's the problem, why not just add cron_start instead of ajax_cron_start in your ajax_cron.php? :confused:
Since you are rendering the vB default cron.php useless, whatever code would be executed in cron_start would be executed in your file instead.
Or am I missing something?

Code Monkey 08-18-2006 01:18 PM

Is it that easy? I have never looked at how vb knows where the hooks are so I have no idea. I was planning on researching that this weekend.

libertylounge 08-18-2006 11:03 PM

Awesome. Installed.

Code Monkey 08-19-2006 01:24 AM

New Version 1.1.3

Now it will just use cron_start hook if you have a plugin that uses it. Aparently vb doesn't actually care where the hook is located.

Live and learn.

Code Monkey

Thanks go to Revan for the heads up.

Code Monkey 08-19-2006 03:11 PM

New Version 1.1.4

This will now degrade gracefully when browsers have javascript turned off. When a browser has javascript turned off the default vb method will be implemented to ensure the cron runs.

Code Monkey

derekivey 08-19-2006 05:06 PM

Nice hack Code Monkey :).

[high]* derekivey clicks install.[/high]

Code Monkey 08-19-2006 08:53 PM

Thank you very much.

Code Monkey 08-23-2006 02:19 AM

Anyone had any issues with this?

sickboy6ths 08-24-2006 08:38 AM

Somehow... my cron stopped working since a while...
I have tried everything, even tried using the default style with no template additions, but no luck...

Now, after installing your mod, my cron is working properly again. So big thanks..
altough I of coarse would've loved to figure out why the default cron image didnt work anymore :S

Code Monkey 08-24-2006 01:22 PM

I'm wondering if you had the same problem as Revan. I'm glad this fixed it for you. It is a better way to call the cron anyway.

Alcatraz 08-26-2006 05:31 PM

Quote:

Originally Posted by Code Monkey
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.


What about the other hacks that require cron? does this turn the reular cron off. I have RPG Inferno v3 and it requires over 3 cron scripts. To run to keep everything running ok. Do I have to know how to write java script to my it work or does it pick it off the cron task tabel and run it via ajax?

Thanks for the program though :-) I installed!

Alcatraz

Code Monkey 08-26-2006 07:02 PM

No. This runs all crons that are in your scheduled task list in your admincp.

As stated above. This does not change any internal cron functions whatesover. It only improves the method that runs the scripts on page load.

Alcatraz 08-26-2006 11:05 PM

Yeah I seen the .js scripts and I wasn't for sure if it was or not.

Alcatraz

Code Monkey 08-27-2006 04:09 AM

You should have no problems. Thanks for posting and thanks for clicking install.

Brandon Sheley 08-30-2006 09:06 PM

thanks for the mod Code Monkey, I'll give it a try :)

[high]* Brandon Sheley clicks install[/high]

Code Monkey 08-31-2006 04:30 AM

I am sure you will find it useful and beneficial.

Enjoy

DementedMindz 09-04-2006 07:52 AM

Code Monkey thank you very much and once again nice work. installed

Code Monkey 09-05-2006 01:37 AM

I'm glad you like it and find it useful.

WritersBeat 09-05-2006 06:41 AM

I shall give this a try :)

Code Monkey 09-06-2006 03:10 AM

Hope it worked for you. :D

Exitilus 09-06-2006 03:13 AM

There may be a bug with your ajax_cron.php ... I was getting a Database Error with the Cron. I contacted vbulletin support and they told me the error is actually a known bug in the /includes/cron/activate.php.

Can read about it here http://www.vbulletin.com/forum/bugs3...view&bugid=639

Well I found out that the error is actually coming from ajax_cron.php .... So I thought I'd come here and let you know. The error I'm getting is

Quote:

Database error in vBulletin 3.6.0:

Invalid SQL:

INSERT INTO useractivation
VALUES
(NULL , 945, 1157515374, 22491926, 0, 2);

MySQL Error : Column count doesn't match value count at row 1 Error Number : 1136
Date : Wednesday, September 6th 2006 @ 12:02:54 AM
Script : http://myforumlocation.com/ajax_cron.php?rand=711753
Referrer :
IP Address : xxx.xx.xxx.xx
Username : Unregistered
Classname : vb_database
I'm guessing this is related. Atleast I hope ..... :-s

(I did omit my site link and the ip address)

Code Monkey 09-06-2006 03:56 AM

No. vB AJAX Cron merely initiates the runing of the scripts. You would have gotten this error the old way too
As they said, it's a bug in activate.php

Do the fix they recomended.

rob30UK 09-06-2006 11:09 AM

instead of a small piece of html to show an image, we now have?

A bigger piece.... nice!

Code Monkey 09-06-2006 01:14 PM

And where would that be?

Exitilus 09-06-2006 05:57 PM

I've done the fix. But the error sems to be coming from ajax_cron.php

Code Monkey 09-07-2006 02:20 AM

That is just the main script that is including the one with the error. It is not coming from ajax_cron.php. You can have another coder look at it if you don't trust my judgement.

Exitilus 09-07-2006 07:00 PM

Nope :) I trust your judgement :)

I think I was half asleep when I made the previous reply *lol* :)


All times are GMT. The time now is 12:53 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.01281 seconds
  • Memory Usage 1,816KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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