Helpful Information
 
 
Category: vBulletin 3 Articles
[How-To]Using Array conditionals with $vboptions

I've seen a couple of people making this mistake (including me a couple of months ago), so I though I'd make a How-To.

Here we go:

Add a new setting (and optionally a new settinggroup).
You may choose which settings you use, aslong as you remember the variable you use. (In this case we're using $pmembergroups).

After you're added the setting, you can add this code as your conditional:


$pmembergroups = $vboptions['pmembergroups'];
$pmembergroups = explode(",", $pmembergroups);

if (in_array($bbuserinfo['usergroupid'], $pmembergroups)){
TEXT_TO_BE_DISPLAYED
}

That's it!

EDIT: If you want a guide on how to add a setting, just ask.

Yes, this is what I search for: How to add a Custom Settinggroup and a Setting
Could you please make such Howto?

If you want a guide on how to add a setting, just ask.

Yes, this is what I search for: How to add a Custom Settinggroup and a Setting
Could you please make such Howto?

that's easy but you only see that options if debug mode is enabled.To enable debug mode edit /includes/config.php


$config['Misc']['debug'] = true;


right after the <?php

then goto admincp vbulletin options and there will be a link to add a new settingsgroup each with it's own settings if so desired

Thanks... really.










privacy (GDPR)