PDA

View Full Version : Change the look of the Login/Register in header



admin
24-01-2010, 04:16 PM
Before
http://i48.tinypic.com/sdcoll.png

After
http://i47.tinypic.com/53fco.png

Click Here (http://www.thewindows7site.com/) for Live preview.

Installation:

Upload images
Perform template edits below


-----------------------------------------------------
vB 4.0.1 Fix
Those of you who performed this mod on 4.0.0 and have upgraded to 4.0.1, all you have to do is revert the header template and perform the edits again. For some reason when the templates were merged with the new code it messed up the links when logged in.
-----------------------------------------------------

Open header template

Find:

<input type="text" class="textbox default-value" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" onfocus="if (this.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>'){this.value=''; this.style.color='black';}" onblur="if (this.value == '') {this.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>'; this.style.color='#828282';}"/>
<input type="password" class="textbox default-value" name="vb_login_password" id="navbar_password" size="10" tabindex="102" onfocus="this.style.color='black';" />
<input type="submit" class="loginbutton" value="{vb:rawphrase log_in}" tabindex="104" 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" tabindex="103" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" /> {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>
</vb:if>
</div>

Replace With:


<style type="text/css">
img {vertical-align:middle}
</style>

<img src="./images/icons/username.png" alt="Username" />



<input id="navbar_username" class="bginput" type="text" onblur="if (this.value == '') this.value = 'Username';" onfocus="if (this.value == 'Username') this.value = '';" value="Username" tabindex="101" accesskey="u" size="10" name="vb_login_username" style="font-size: 11px;"/>

<img src="./images/icons/password.png" alt="Password" />

<input id="navbar_password" class="bginput" type="password" onblur="if (this.value == '') this.value = '';" onfocus="if (this.value == 'Password') this.value = '';" value="Password" tabindex="102" accesskey="u" size="10" name="vb_login_password" style="font-size: 11px;/>




<label for="cb_cookieuser_navbar">
<input id="cb_cookieuser_navbar" type="checkbox" accesskey="c" tabindex="103" value="1" name="cookieuser"/>
</label>


<input type="submit" class="loginbutton" value="Login" tabindex="104" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" />
</div>
</div>
</fieldset>




<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>
</vb:if>
</div>

Save your changes

To have the "Remember Me" box always checked:

Find:


<input id="cb_cookieuser_navbar" type="checkbox" accesskey="c" tabindex="103" value="1" name="cookieuser"/>

Replace With:


<input id="cb_cookieuser_navbar" type="checkbox" accesskey="c" tabindex="103" value="1" name="cookieuser" checked="checked"/>