Quarterbore
12-08-2006, 02:01 PM
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:
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/admincp/plugin.php?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:
$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:
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!
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:
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/admincp/plugin.php?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:
$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:
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!