The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
HTML/PHP sidebar block help
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.. Code:
<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> |
#2
|
|||
|
|||
Yeah, one problem is that there is no "template" type for a custom forum block. You can get around that putting the code you posted into a new template (if you haven't done that already). Then make the "Content Type" php and insert code to render your template. That's only a couple of lines of code.
But the bigger problem is that it seems to depend on a $prepared variable - I assume you took it from the profile page or something like that. So you would have to do whatever needs to be done to set up the $prepared variable (it looks like you're just using $prepared[profilepicurl], so that's all you need to set). That's a bit harder, but if you search the code for it you can probably find how it's set. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|