The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Set setting during product install based with value from query
Hi,
For the installation of a product I can write install code. In this install code I can run a query which inserts a record in a table and get the identifier back by using the $db->insert_id() statement. I also create a setting for my product in the product xml file. Now I want to insert the value from the identifier inserted as default in that setting during installation. Is this possible and how? Thanks in advance for any help! - ZexTasy |
#2
|
||||
|
||||
I think you would have to do a query to get that id.
|
#3
|
|||
|
|||
The ID I can get during the installation phase where the I run the installation query for the insert. The problem is that I don't know how to put it in the field, because the fields for the settings are created in a later phase and I don't know how to start a new query after that ...
|
#4
|
|||
|
|||
I have the same problem. With installcode, I create a custom userfiled. Its always have name filedNN where NN incremently added number. It can be field6 or field154 who knows..... Anyway, then I import my product, I also add option field in setting, in which I want to insert value of ID from new added field from userfield table(for use it in my plugins).
Problem in what when I do this with installcode, I dont have yet field in option, and further, then I already HAVE field in option I can`t run installcode. Ofcause, I always can use another product file to insert new userfield and then fill the needed value to my option field... but I think its inconveniently.... How I can interchange the order of execution: 1) Installcode from my product and 2)Import options from my product during single installation process? Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|