The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
is_member_of issue, need some help
So I'm doing a really simple check to see if a member has a specific usergroup, but it's failing. Here's the code I'm using:
Code:
<if condition="is_member_of($vbulletin->userinfo, $vbulletin->options['gm_ugl_view_chars'])"> If the value contains only a single number, it works fine. If the value has more than one group, the condition fails for all groups. So, using "6" works fine, using "6, 15" fails. Seems to work ok if I hardcode the values 6, 15 however. So I'm not really sure where my problem is. Since this is an array, I'm not sure how to print out the value of $vbulletin->options['gm_ugl_view_chars'] to test it (even though the value is good in the settings). Thanks for your help! |
#2
|
||||
|
||||
If you're trying to add this to add a custom page, you could add the following code to your php file...
PHP Code:
|
#3
|
|||
|
|||
Quote:
|
#4
|
||||
|
||||
Is this supposed to check the user browsing the site, or the persons whos post it is?
$bbuserinfo for person viewing the site $post for the person who the post belongs to,. |
#5
|
|||
|
|||
Quote:
I just tried two different things and each failed (didn't fire the condition): <if condition="is_member_of($bbuserinfo, $vbulletin->options[gm_ugl_view_chars])"> and <if condition="is_member_of($bbuserinfo, $vbulletin->options['gm_ugl_view_chars'])"> Only difference was the single quotes around the option name. I checked my options and gm_ugl_view_chars is set to "6, 15" no quotes. |
#6
|
||||
|
||||
$vboptions should be used in templates, not $vbulletin->options. Also, if it is an array, then you need to explode it prior to use which means you may need a plugin to do so.
|
#7
|
|||
|
|||
Ok, I finally got this working thanks to the help from everyone. Thank you all. =)
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|