Quote:
Originally Posted by kh99
If the field is already created and you have php code that's setting the other fields, you can set the menu options of your Main Player field like this:
Code:
$players = array();
$players[1] = "Rogue";
$players[2] = "Mage";
// etc
$menuid = ID; // Change ID to profile field id of menu
global $vbulletin;
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "profilefield
SET data = '" . $vbulletin->db->escape_string(serialize($players)) . "'
WHERE profilefieldid = $menuid");
Note that members won't have any value for this field until they set it themselves, unless you also update the userfield table.
|
Do i add this in one of the PHP files or can I put it in one of the hook plugins?
If I can use plugins, which hook do you think is best for this?
Quote:
Originally Posted by John Lester
I sure hope your members know what you are doing. I for one would never register on a site using the same password I use in a game, same name probably depending on the site, but never the pass.
|
the website makes sure your game account is correct using the password before you LINK your game account, because after LINKING your account you can change things that affect your in-game account..
Reminder, this is a private server not a global server (still not relevant to the case

)