The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
how to create custom user fields with code?
I've created a product that requires the admin to create two text box custom user fields before installing this plugin. So to make it easier to install it for everybody, is the their a way to create custom user field with code in the plugin it self without the need to create it manually?
If yes how? Thanks in advance --------------- Added [DATE]1255606581[/DATE] at [TIME]1255606581[/TIME] --------------- 12 views with no reply. Does this mean it is not possible! |
#2
|
|||
|
|||
Add the fields with an ALTER table query. I have yet to make a plugin, but there should be a way to create the tables or fields that you need.
|
#3
|
||||
|
||||
Don't take this to the bank or anything, but it might be able to point you in the right direction. I think it should look something like this....
$vbulletin->db->query_write("INSERT INTO `". TABLE_PREFIX ."user` `EXTRA_FIELD_NAME`"); |
#4
|
|||
|
|||
Thanks guys that is really a great input..
I think this should work for a text box field <<not sure though $vbulletin->db->query("ALTER TABLE " . TABLE_PREFIX . "user ADD mynewfield MEDIUMTEXT DEFAULT 'mytxt' NOT NULL"); If that is not correct please advice.. But my real need is to add a single select dropdown list as a custom userfield in the install code. Anybody can help on this? Regards, |
#5
|
||||
|
||||
I would find a hack that alters SQL tables and edit it in Cute FTP and see how they did it.
|
#6
|
|||
|
|||
thnx for ur help Warlord....
looking forward to see how it is done |
#7
|
|||
|
|||
===========================
Anybody can help !! I looked to see how it is done in profilefield.php but could not understand how it is done.. Regards, |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|