The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I am running 3.5.0 RC 2 and I am having problems writing a conditional. I have made a template change to my forum home page but only want certain user groups to be able to see it.
How do I enclose the html in a conditional so that it is only visable to specified user groups? At the moment I am using this code that I found on here Code:
<if condition="!is_member_of($userinfo, 25)"> Your ad code </if> |
#2
|
||||
|
||||
![]()
That looks fine, just note that the ! means NOT. If you only want to show it to group 25, and show it to all but 25, remove the !.
|
#3
|
||||
|
||||
![]() Quote:
array_merge error in in "function.array-merge" /includes/functions.php (1033) : eval()'d code in line 2 and the same thing error but in line 4 also. Clearly I am doing somehing wrong. |
#4
|
|||
|
|||
![]()
Try replacing $userinfo in the conditional itself to $vbulletin->userinfo. (And you will have to be a member of group 25 for it to work even if you are an administrator)
|
#5
|
||||
|
||||
![]()
Many thanks. That has done the trick. Though, I am still getting the array_merge error.
|
#6
|
|||
|
|||
![]()
Have you added any other conditionals with "$userinfo" in them?
If you remove the conditional does the array merge error go away? |
#7
|
||||
|
||||
![]()
Where are you using this? $userinfo is only available (AFAIK) when viewing a user's profile.
$bbuserinfo / $vbulletin->userinfo = current user |
#8
|
||||
|
||||
![]() Quote:
https://vborg.vbsupport.ru/showthread.php?t=95494 |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|