vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Adding an executionorder order in vb_plugin table for 3.5.x vBulletin forums (https://vborg.vbsupport.ru/showthread.php?t=133505)

Quarterbore 12-08-2006 02:01 PM

Adding an executionorder order in vb_plugin table for 3.5.x vBulletin forums
 
Brought over here from vBulletin.com as they don't seem to want to do this:

See: http://www.vbulletin.com/forum/showthread.php?t=210931

It is well known that the only reason some vBuletin products and pluggins will not work in 3.5.x. that were written or exported out of 3.6.x. forums is because of the new execution order field.

If you take a pluggin from a 3.6.x. and try to import it into a 3.5.x. forum you will get the following error:

Quote:

Database error in vBulletin 3.5.3:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO vb_plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'Cache The Templates', 'cache_templates', 'if (THIS_SCRIPT == \"index\")\r\n{global $globaltemplates;\r\n$globaltemplates= array_merge($globaltemplates, array(\'vbclassified_categorybit_lastpostby\', \'vbclassified_level1_nopost\', \'vbclassified_level2_post\', \'vbclassified_subforumbit_nopost\'));\r\n}', 'vbclassified');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date : Friday, December 8th 2006 @ 09:53:08 AM
Script : http://MYDEVWEBSITE.com/forums/admincp/plugin.php
Referrer : http://MYDEVWEBSITE.com/forums/admin...?do=productadd
IP Address : XXXX.XXXX.XXXX
Username : Quarterbore
Classname : vb_database
What would the negative side to just adding to any product that works in 3.5.x. and 3.6.x. the code to add the 'executionorder' field to the plugin table?

The execution order would not work in 3.5.x, but for scripts where the execution order does not matter, who cares?

Following should be the install code needed to do this:

PHP Code:

$vbulletin->db->query_write("
ALTER TABLE "
TABLE_PREFIX ."plugin ADD
`executionorder` smallint(5) UNSIGNED NOT NULL default '5'
"
); 

EDIT:

OK, I tried adding the code above to the install script of a product I am working on and this was not adequate to allow my product to install in a 3.5.3. developmental site I have. I need to look at this more later but when I tried to do this I got an "XML Error Line 1"

EDIT 2:

I am trying again, this time I manually added the table:

SQL query:

Quote:

ALTER TABLE `plugin` ADD `executionorder` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '5';
Edit 3:

Once I manually added the above field into my vBulletin version 3.5.3. developmental forum I was able to install my prduct which was programed and exported in 3.6.3. but I programed it so that it was supposed to be compliant with both 3.5.x and 3.6.x.

Now I can test my script in 3.5.x. to see what bugs I need to fix!

Quarterbore 02-08-2007 10:15 PM

I got asked about this thread...

Fix is posted here:

https://vborg.vbsupport.ru/showthread.php?t=134603


All times are GMT. The time now is 08:16 AM.

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.01057 seconds
  • Memory Usage 1,719KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete