Anygma
09-04-2012, 07:31 AM
I want to put this on my sidebar block, but it wont work..
Can somebody revise the code to make it work on html/PHP sidebar block..
<vb:if condition="$show['guest']">
<form 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})">
<fieldset id="logindetails" class="logindetails">
<div>
<div>
<span class="leftusername">User Name:</span>
<input type="text" class="textbox<vb:if condition="!$username"> default-value</vb:if>" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="" />
<span class="leftpass">Password:</span>
<input type="password" class="textbox" tabindex="102" name="vb_login_password" id="navbar_password" size="10" />
<input type="text" class="textbox default-value" tabindex="102" name="vb_login_password_hint" id="navbar_password_hint" size="10" value="{vb:rawphrase password}" style="display:none;" />
<input type="submit" class="loginbutton" tabindex="104" value="{vb:rawphrase log_in}" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" />
</div>
</div>
</fieldset>
<div id="remember" class="remember">
<label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" tabindex="103" /> {vb:rawphrase remember_me}</label>
</div>
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
</div>
<vb:else />
<p class="usercpwelcome">Welcome back!</p><!-- Welcome back text -->
<p><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:raw bbuserinfo.username}</a></p>
<vb:if condition="$vboptions['profilepicenabled']">
<vb:if condition="$prepared['profilepicurl']">
<a href="{vb:link member, {vb:raw bbuserinfo}}">
<span class="avatarcontainer"><img src="{vb:raw prepared.profilepicurl}" alt="" /></span>
</a>
<vb:else />
<a href="{vb:link member, {vb:raw bbuserinfo}}">
<span class="avatarcontainer"><img src="{vb:stylevar imgdir_misc}/unknown.gif" alt="" /></span>
</a>
</vb:if>
</vb:if>
</vb:if>
Can somebody revise the code to make it work on html/PHP sidebar block..
<vb:if condition="$show['guest']">
<form 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})">
<fieldset id="logindetails" class="logindetails">
<div>
<div>
<span class="leftusername">User Name:</span>
<input type="text" class="textbox<vb:if condition="!$username"> default-value</vb:if>" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="" />
<span class="leftpass">Password:</span>
<input type="password" class="textbox" tabindex="102" name="vb_login_password" id="navbar_password" size="10" />
<input type="text" class="textbox default-value" tabindex="102" name="vb_login_password_hint" id="navbar_password_hint" size="10" value="{vb:rawphrase password}" style="display:none;" />
<input type="submit" class="loginbutton" tabindex="104" value="{vb:rawphrase log_in}" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" />
</div>
</div>
</fieldset>
<div id="remember" class="remember">
<label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" tabindex="103" /> {vb:rawphrase remember_me}</label>
</div>
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
</div>
<vb:else />
<p class="usercpwelcome">Welcome back!</p><!-- Welcome back text -->
<p><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:raw bbuserinfo.username}</a></p>
<vb:if condition="$vboptions['profilepicenabled']">
<vb:if condition="$prepared['profilepicurl']">
<a href="{vb:link member, {vb:raw bbuserinfo}}">
<span class="avatarcontainer"><img src="{vb:raw prepared.profilepicurl}" alt="" /></span>
</a>
<vb:else />
<a href="{vb:link member, {vb:raw bbuserinfo}}">
<span class="avatarcontainer"><img src="{vb:stylevar imgdir_misc}/unknown.gif" alt="" /></span>
</a>
</vb:if>
</vb:if>
</vb:if>