hello users welcome to gamer-avenue.net this site is up agian . don't be shy and start contribute agian . for any help msg Mroreniko or any other admin . thanks and have a great time !

Need help with vBulletin style tags

Styles and templates for various content management systems.
Post Reply
User avatar
noodniko
Posts: 10
Joined: Wed Jan 21, 2015 3:43 pm

Need help with vBulletin style tags

Post by noodniko » Wed Jan 21, 2015 4:10 pm

Hello,
I'm currently 'trying' to create a new theme and I'm starting with the header. Within the header, I've added the login/register link but I don't fully understand these:
HTML Code:

<vb:if condition="$show['member']">
</vb:if>

<vb:if condition="$show['guest']">
</vb:if>

I thought it would be as easy as wrapping the profile and the login parts with these tags (as seen in the code below) but I've obviously misunderstood. If someone could take a look at the code below and point me in the right direction, that'd be awesome!

My code:
HTML Code:

<vb:if condition="$show['member']">
<li class="dropdown active userinfo-carat" style="float: right;">
<a href="{vb:link member, {vb:raw bbuserinfo}}" style="padding-right: 0px;" class="dropdown-toggle">{vb:raw bbuserinfo.username}</a>
<ul class="dropdown-menu" style="left: -52px;" role="menu">
<center>
<img class="img-circle" src="{vb:raw avatarurl}" alt="{vb:raw bbuserinfo.username}" style="width: 80px; height: 100px; padding-top: 10px; padding-bottom: 10px; margin-left: 40px; margin-right: 40px;" title="{vb:raw bbuserinfo.username}">
</center>
<li class="divider"></li>
<li><a href="{vb:link member, {vb:raw bbuserinfo}}">Profile</a></li>
<li><a href="usercp.php{vb:raw session.sessionurl_q}">Control Panel</a></li>
<li><a rel="nofollow" href="login.php?{vb:raw session.sessionurl}do=logout&logouthash={vb:raw bbuserinfo.logouthash}">Logout</a></li>
</ul>
</li>
</vb:if>

<vb:else />

<vb:if condition="$show['guest']">
<li class="dropdown active" style="float: right;">
<a href="#" style="padding-right: 0px;" class="dropdown-toggle" data-toggle="dropdown">Login / Register</a>
<ul class="dropdown-menu" style="left: -10%" role="menu">
<li><script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
<form style="margin-top: 10px; margin-left: 10px; margin-right: -5px;" class="form-horizontal" id="navbar_loginform" action="login.php?{vb:raw session.sessionurl}do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, {vb:raw show.nopasswordempty})">
<div class="form-group">
<div class="col-sm-11">
<input type="text" class="form-control<vb:if condition="!$username"> default-value</vb:if>" id="username" placeholder="username" accesskey="u" name="vb_login_username">
</div>
</div>
<div class="form-group">
<div class="col-sm-11">
<input type="password" class="form-control" id="password" placeholder="password" name="vb_login_password">
</div>
</div>

User avatar
mottyboy
Posts: 9
Joined: Mon Jan 19, 2015 10:22 pm

Re: Need help with vBulletin style tags

Post by mottyboy » Wed Jan 21, 2015 4:10 pm

These are vbulletin conditionals.

<vb:if condition="$show['member']">
INSERT HERE THE CODES YOU WANT TO SHOW ONLY TO LOGGED-IN MEMBERS
</vb:if>

<vb:if condition="$show['guest']">
INSERT HERE THE CODES YOU WANT TO SHOW ONLY TO GUESTS
</vb:if>





Post Reply