PDA

View Full Version : Let users choose between postbit+legacy


Dark Navi
04-24-2012, 01:15 PM
I'm trying to find a way to let users have the option between postbit+legacy in their usercp, I'm pretty sure it can be done as there are mods for older versions.

Does anybody know this one?

kh99
04-24-2012, 02:30 PM
Someone just asked about having a setting per forum, so maybe the same solution will work. Try creating a custom profile field with two choices, then create a new plugin using hook global_setup_complete and code like:

if ($vbulletin->userinfo['fieldX'] == 'somevalue')
{
$vbulletin->options['legacypostbit'] = 0;
}


where you'd replace 'X' with the id of the profile field you created, and 'somevalue' with the choice that represents postbit. This assumes you have "use legacy" set to yes in your options, otherwise your plugin would check for the value that represents legacy and set the option to 1.