View Full Version : vBulletin If Tag?
Dan321
08-02-2013, 07:45 PM
on a page, how do I add an if for example
I want members to see a image saying staff only. but staff seeing a page with lets say a movie.
If you're writing a php script, you can use something like:
if (!is_member_of($vbulletin->userinfo, 1, 2, 3)
{
// display no permission
}
else
{
// display movie
}
If you're using a template you can do something like:
<vb:if condition="!is_memebr_of($bbuserinfo, 1, 2, 3)">
Members only.
<vb:else />
Movie
</vb:if>
Dan321
08-03-2013, 03:11 PM
neither are working on Logicians WebTemplates :/
--------------- Added 1375557503 at 1375557503 ---------------
bump
Sorry, I don't know what Logicians WebTemplates is. The second thing I posted will only work in a vbulletin template.
The first is php code so it will work if you're writing your own php script. Does WebTemplates allow you to insert php code? Then something like the above might work if you're including the vbulletin files (like global.php).
Of course you'd have to change the 1, 2, 3 in my examples to the actual usergroups you want.
Dan321
08-03-2013, 06:49 PM
anyway of HTML ?
Skivey
08-03-2013, 07:27 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=289090" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=289090</a>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.