The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
i made a little product that requires custom user fields to be entered. since userfields are not associated with a product, is there a way i can just execute a script when the product is installed? i'm thinking this script could just progromatically add the userfields.
or possibly might there be a hook for on (this) product install? i didn't see one. |
#2
|
|||
|
|||
![]()
Are you asking how to create a new table in the database or add fields in an existing table with the product or something else?
|
#3
|
|||
|
|||
![]()
no, i'm good with php/mysql. it is the vb product creation that i'm a little new at.
i'm asking if there is a way to execute a php script at the time the product is installed. for my case, i would have this script i want executed create the additional userfield so the user won't have to. if there was a hook for "on_this_plugin_install" or something like that, then i could just add this script as a plugin, and it would be executed immediately after the product is installed. or maybe there is another way to do this i'm not thinking of. |
#4
|
||||
|
||||
![]()
Install Code?
|
#5
|
|||
|
|||
![]()
In the product xml under the "version" tags put
Code:
<codes> <code version="1.0.0"> <installcode><![CDATA[ //create, update, alter table(s) here $db->show_errors(); ]]></installcode> <uninstallcode><![CDATA[$db->hide_errors(); //Reverse the install code above. //So instead of "Create" use "drop $db->show_errors();]]></uninstallcode> </code> </codes> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|