PDA

View Full Version : Execution Order Installer -> Stops Errors when installing 3.6.x Pluggins & Products


Quarterbore
12-21-2006, 10:00 PM
Background:

I am almost ashamed to submit what is likely the smallest product ever released here on vBulletin.org. I created this very simple product file as I am about to release a major addition to vBulletin and because I wrote the script in 3.6.x. it was not going to be installable in 3.5.x. forums.

Now, there was nothing in my plugins or code that would make this not work in 3.5.x. forums other then the fact that my 3.6.x forums added the execution order to all of my plugins.

So, What does this do?

This will add a single field to your 3.5.x forums "plugin" table. This field is used in 3.6.x forums to allow 3.6.x forums to assign a specific order for plugins attached to the same hook to be executed.

Now, as long as the hack you are installing does not use any special 3.6.x code, adding this program will allow you to install SOME 3.6.x plugins and products on your 3.5.x forums without error.

I have tested this on three separate 3.5.x forums of my own and installed plugins and products exported from 3.6.x and it worked fie for me. Feedback is welcomed and again, I am embarrassed to have uploaded the smallest Product file to ever have been uploaded!

UPDATES
23-Dec-2006 8:00PM EST - Uploaded new product file that includes UNINSTALL code!

23-Dec-2006 9:15PM EST - Removed the uninstall code per advise having code to remove the execution order may do more harm then not having it in the code.

Ziki
12-22-2006, 07:32 PM
LOL :D

(Outta words)

Kungfu
12-23-2006, 03:52 AM
whatever gets the job done right.

Shazz
12-23-2006, 04:11 AM
Smallest plugin made in history -.-

Kirk Y
12-23-2006, 04:57 AM
Size doesn't matter. :)

Good idea, though.

PoetJA-1975
12-23-2006, 07:32 AM
tehehehe - sounds nice actually... But why not just instruct 3.5.x users like myself to comment out the execution code??? LOL - also records have to be made for something = Congrats on the modification ;)

Jacquii.

ps - just curious... What's the "major addition" modification going to be - Sounds kinda exciting :P

Milad
12-23-2006, 07:52 AM
What may it occur if one upgrade his 3.5 forum to 3.6?
he will face a MySQL error 'field already exists'.

Kungfu
12-23-2006, 04:58 PM
tehehehe - sounds nice actually... But why not just instruct 3.5.x users like myself to comment out the execution code??? LOL - also records have to be made for something = Congrats on the modification ;)

Jacquii.

ps - just curious... What's the "major addition" modification going to be - Sounds kinda exciting :P
He took over sr_classifieds and basically reworked it and came out with a new product.

He has a few other gadgets hes going release too probably, but this is basically what its for is vbclassifieds.

What may it occur if one upgrade his 3.5 forum to 3.6?
he will face a MySQL error 'field already exists'.

It shouldnt, because it wont try to create it unless it doesnt exist or it shouldnt at least. Basically if you were to upgrade it would skip that step.

Quarterbore
12-23-2006, 05:02 PM
What may it occur if one upgrade his 3.5 forum to 3.6?
he will face a MySQL error 'field already exists'.

If that happens, just delete the field. I should have included an uninstall code and I will get that added to the product file when I get a chance tonight.

As for the product, I call it vbclassified and the link is in my sig.

Quarterbore
12-23-2006, 11:00 PM
Product is updated to include the uninstall code. This was tested on two of my sites (3.5.3. and 3.5.5. forums).

I have also posted directions on how to add the uninstall code if you already have added the product file.

Enjoy!

Paul M
12-23-2006, 11:59 PM
Just a note of warning, if someone installs this on 3.5, and then upgrades to 3.6 and then decides to uninstall it, it will delete the required executionorder field and break the forum.

I would suggest you take out the uninstall code - there is no reason I can think of that anyone would ever need to drop that field, once you upgrade to 3.6 it is a standard part of vb, in 3.5 leaving it there will not harm or affect anything.

As far as I'm aware (tested in the past) the vb 3.6 upgrade scripts will silently ignore the fact that the field already exists.

Quarterbore
12-24-2006, 12:16 AM
Just a note of warning, if someone installs this on 3.5, and then upgrades to 3.6 and then decides to uninstall it, it will delete the required executionorder field and break the forum.

I would suggest you take out the uninstall code - there is no reason I can think of that anyone would ever need to drop that field, once you upgrade to 3.6 it is a standard part of vb, in 3.5 leaving it there will not harm or affect anything.

As far as I'm aware (tested in the past) the vb 3.6 upgrade scripts will silently ignore the fact that the field already exists.


You know better then I... and it shrinks my code back to where it was before for the smallest hack ever! I will reupload the hack now without the uninstall!

fishhub
12-25-2006, 03:18 PM
how is the response? anyone tested in it in 3.5.x and uploaded any 3.6.x mods without and probs?:)

Quarterbore
02-04-2007, 01:39 PM
I have been providing this to customers using my vBClassified script (this is a huge add-on) and without this little product these customers would always get the same error as follows:


Database error in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'some script', 'online_location_process', 'if ($filename == \'somescript.php\')\r\n{\r\n$bbuserinfo[\'activity\'] = \'somescript\';\r\n}', 'name');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date : Tuesday, January 30th 2007 @ 08:42:30 PM



With this installed, NO ONE has had a problem...

I am not sure why this only has four installs but hey... I just care that my customers are running...

Chicago_VLNU_4s
03-11-2007, 06:27 AM
nice.. thanks

ArchangelX
04-18-2007, 07:04 AM
I bumped this because it should be. Greatest hack ever! :D

serhat_kk
05-11-2007, 06:15 AM
I bumped this because it should be. Greatest hack ever! :D

Yesss, you are right! Thanks Quarterbore.

xTerMn8R
06-29-2007, 01:48 AM
Excellent Job .... Man I wasted 8 hrs tring to install a mod beofre I found this. I wish I had found this page 8 1/2 hrs ago... after installing this the other mod went in in 2 minutes...

Thank you VERY VERY Much.... :up::up::up:

Quarterbore
09-09-2007, 09:13 PM
Back up... I see people with this issue still...

bada_bing
07-22-2008, 07:20 PM
This is awesome thank you much

Quarterbore
07-25-2008, 07:50 PM
I am seeing a lot of threads where people with 3.5.x forums are reporting issues because of the 'executionorder' field. This is the only fix they need!

bwack
09-08-2009, 01:48 AM
Dude! You saved me trouble! with this little thing - THANK YOU