PDA

View Full Version : Need some php(maybe?) help with adding an option to my admincp


HMBeaty
03-14-2007, 11:23 PM
I'm working on adding an option to my admincp so certain usergroups can see a mod I have installed in the postbit. I have the options and everything there, but its not working. What do I need to add?

If possible, please contact me via instant messenger. (AIM, ICQ, MSN, YAHOO)

Thanks in advance :)

harmor19
03-14-2007, 11:31 PM
I'm assuming the option looks like this
"enter Usergroup ID's ... [3,6,7]"

The field name is "ug_postbit_mod" (Just for example).
In the template you would add

<if condition="is_member_of($bbuserinfo, $vboptions[ug_postbit_mod])">

HMBeaty
03-14-2007, 11:33 PM
Thanks, will test this now :)

No, sorry. That didn't work. I have my settings set like this:

Varname: manage_usergroups
Setting Group: My Product Menu
Product: My Product
Title: Allowed Usergroups?
Description: Enter your Usergroup ID/IDs to be able to use My Product. Separate groups by commas. (Default is 5,6,7.)
Option Code: (blank)
Default: 5,6,7
Data Validation Type: Free
Validation PHP Code: (blank)
Blacklist: No
vBulletin Default: Yes

I tried

<if condition="is_member_of($bbuserinfo, $vboptions[manage_usergroups])">

but that didn't work

harmor19
03-14-2007, 11:51 PM
Maybe

<if condition="is_member_of($bbuserinfo, array($vboptions[manage_usergroups]))">

HMBeaty
03-14-2007, 11:52 PM
Still didn't work :(

If this helps, it doesn't even show the code to me when my usergroup is entered in the field

Anybody?

Marco van Herwaarden
03-15-2007, 06:42 AM
Setting Group: My Product Menu

You seem to have created a custom settinggroup, are you loading this group in your script?

HMBeaty
03-15-2007, 09:55 PM
I would assume it already added it as I added the setting and everything through the debug mode options. If that doesn't do it, how would I go about doing this?

$10 USD via Paypal to whoever can get this to work.