vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Need some php(maybe?) help with adding an option to my admincp (https://vborg.vbsupport.ru/showthread.php?t=142088)

HMBeaty 03-14-2007 11:23 PM

Need some php(maybe?) help with adding an option to my admincp
 
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

HTML Code:

<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
HTML Code:

<if condition="is_member_of($bbuserinfo, $vboptions[manage_usergroups])">
but that didn't work

harmor19 03-14-2007 11:51 PM

Maybe

HTML Code:

<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.


All times are GMT. The time now is 03:30 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01159 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete