![]() |
Conditional image in postbit, viewable only to moderators?
Hi all, simple question I think,
I want an image to show in one particular user's postbit; and Only moderator usergroup should be able to see that image. |
Use template conditionals.....
<if condition="is_moderator() and $post[userid]==TheUsersUserId"> <img src=yourimage.gif/> </if> Im pretty sure thats what it would be off the top of my head. |
Error:
HTML Code:
The following template conditional expression contains function calls: The postbit code: HTML Code:
<if condition="is_moderator() and $post[userid]==107"><img src="images/buttons/edit.gif"></if> |
I would not use is_moderator (I think he meant can_moderate). I'd do it by usergroup id.
HTML Code:
<if condition="is_member_of($bbuserinfo, 5, 6, 7) and $post[userid]==107"> |
That'll work, but keep in mind that not all moderators are added to a usergroup (whether primary or secondary). Depends on the setup.
|
So would you suggest using can_moderate() instead? I've always put my moderators in moderator groups, so that is why I would use the method I suggested if I were to do something like this.
|
Quote:
|
All times are GMT. The time now is 08:36 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|