vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - TW7S - Change the look of the Login/Register in header (https://vborg.vbsupport.ru/showthread.php?t=231916)

LifesGreatestGift 01-01-2010 10:00 PM

TW7S - Change the look of the Login/Register in header
 
1 Attachment(s)
Before
https://vborg.vbsupport.ru/external/2010/01/76.png

After
https://vborg.vbsupport.ru/external/2010/08/166.png

Click Here 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:
PHP Code:

<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:
PHP Code:

<style type="text/css">
.
toplinks form img {
        
position:relative;  
        
top3px;        

</
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:
PHP Code:

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


Replace With:
PHP Code:

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


LifesGreatestGift 01-02-2010 12:11 PM

**Reserved**

phonexpo 01-02-2010 12:39 PM

Looks good thanks. :)

Installed

Robru 01-02-2010 02:49 PM

thanks :)

sisterhood 01-02-2010 03:30 PM

Really good

saqibnpt 01-02-2010 04:35 PM

thanks for this great work keep it up. check here

LifesGreatestGift 01-02-2010 05:15 PM

Quote:

Originally Posted by saqibnpt (Post 1945104)
thanks for this great work keep it up. check here

Very nice forum color scheme. May I make a suggestion?

Go into your templates, open up vbulletin-chrome.css

Do a search for .toplinks form input.loginbutton

and change the attributes to read the following

PHP Code:

.toplinks form input.loginbutton {
    
font-size: {vb:math {vb:stylevar font.fontSize}-2}px;
    
padding{vb:math {vb:stylevar padding}/2};
    
background-color:  #186400;
    
border:solid 1px #ffffff;
        
color#ffffff;



And your login area will be perfect :) (I matched the green for the background color)

https://vborg.vbsupport.ru/external/2011/03/28.png

Dr.osamA 01-03-2010 03:07 AM

Installed

thanxxxx
________
Scottish Recipes

Kolbi 01-03-2010 07:35 AM

Thank you :)

Nice and little :)

eTiKeT? 01-03-2010 07:43 AM

ThanK You
İnstalled

shane943 01-03-2010 09:26 AM

Installed and looks good! thanks!

Charlie98902 01-03-2010 02:04 PM

Installed and thanks.

UpFriends 01-03-2010 02:18 PM

Installed on my dating website. Looks Good! Thank you.

Deviant K1 01-03-2010 03:29 PM

Thanks!!

INSTALLED!!!

Ranger375 01-03-2010 03:43 PM

This is great. Before I couldnt even see the password box on my cell phone. This mod makes it visible :D

LifesGreatestGift 01-03-2010 03:53 PM

If you use, click install please :)

tazattitude 01-03-2010 06:03 PM

Nice!

Installed!

Thank you

jahna 01-06-2010 11:18 AM

Would be nice if a girls stands beside the man....

tazattitude 01-06-2010 11:27 AM

Quote:

Originally Posted by jahna (Post 1948655)
Would be nice if a girls stands beside the man....

What gives you the idea that's not a female?
There is no face on the icon
I've seen girls in suits and short hair.

:D

phonexpo 01-06-2010 12:08 PM

1 Attachment(s)
Quote:

Originally Posted by jahna (Post 1948655)
Would be nice if a girls stands beside the man....

Here you go;

steve1966 01-06-2010 01:13 PM

thanks

jahna 01-06-2010 02:18 PM

Thanks for the couple!
As I'm new with vbulletin, can someone write down how I can find the place to put in the new codes? I couldn't find the file yet....

phonexpo 01-06-2010 02:30 PM

You just need to replace the image to this path;

forum/images/icons/

just drag & drop into the icons folder.

BR's

-Patrick

LifesGreatestGift 01-06-2010 06:46 PM

Quote:

Originally Posted by jahna (Post 1948655)
Would be nice if a girls stands beside the man....

LoLLL I knew sooner or later someone would bring it up ;)

Hornstar 01-07-2010 03:36 AM

This is a zillion times better! Hope this can just become default.

Sador 01-07-2010 11:21 AM

I like it! Installed.

cloferba 01-07-2010 05:33 PM

thanks!

but...how to keep remember me button as default locate?

ShadowTurk 01-08-2010 01:33 AM

It works great. Thanks a bunch! =)

ndut 01-08-2010 04:22 AM

nice.. thanks

RonH. 01-08-2010 11:16 AM

**Reserved** for release of vB 4.0.1 tonight. :up:

Sador 01-08-2010 12:24 PM

Quote:

Originally Posted by phonexpo (Post 1948691)
Here you go;

Meh, too bad this one is bigger than the original, it doesn't fit.

cloferba 01-08-2010 02:33 PM

Quote:

Originally Posted by RonH. (Post 1950306)
**Reserved** for release of vB 4.0.1 tonight. :up:

sure is tonight?:confused:

Bouncer222 01-09-2010 09:34 PM

Nice Mod, but one question....

How can I leave the checkbox under the login with the words "Remember me?" and the checkbox checked?

I want to do everything this mod offers, except leave it under and not make words disappear because users might not understand what the checkbox is for.

Thanks.

TandyServices 01-09-2010 10:03 PM

Quote:

Originally Posted by Bouncer222 (Post 1951492)
Nice Mod, but one question....

How can I leave the checkbox under the login with the words "Remember me?" and the checkbox checked?

I want to do everything this mod offers, except leave it under and not make words disappear because users might not understand what the checkbox is for.

Thanks.

You could try something like this:

Code:

<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;/>
                <input type="submit" class="loginbutton" value="Login" 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" checked="checked" /> {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>


Bouncer222 01-10-2010 01:50 AM

I did it all, showed up as I wanted, but now I cannot login? No login button and even when trying to hit enter after typing it all nothing happens???

LifesGreatestGift 01-10-2010 11:55 AM

Quote:

Originally Posted by Bouncer222 (Post 1951621)
I did it all, showed up as I wanted, but now I cannot login? No login button and even when trying to hit enter after typing it all nothing happens???

Revert template, start over. Code works fine. Unless you're talking about the custom code listed above this post, then IDK. Click Installed and I will look into it :)

Bouncer222 01-10-2010 01:10 PM

Yes the code above your post, there is no more login that you can click to login, only register instead.

jahna 01-12-2010 05:40 AM

...still searching for the header template in my vbulletin files to do the modifications.... can anyone help me to find it please.... thanks a lot!

LifesGreatestGift 01-12-2010 08:05 PM

Quote:

Originally Posted by Bouncer222 (Post 1951492)
Nice Mod, but one question....

How can I leave the checkbox under the login with the words "Remember me?" and the checkbox checked?

I want to do everything this mod offers, except leave it under and not make words disappear because users might not understand what the checkbox is for.

Thanks.

https://vborg.vbsupport.ru/external/2010/01/91.jpg


Change the login part of your header to look like this (make sure you compare what you already have)
PHP Code:

<script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
            <
form 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>
<
style type="text/css">
img {vertical-align:bottom
</
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;/>
                

                    <input type="
submit" class="loginbutton" value="Login" 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> 




https://vborg.vbsupport.ru/external/2010/01/92.jpg
To make the Remember Me checked by default change this part of the code above:
PHP Code:

<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


To look like this:
PHP Code:

<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" checked="checked" /> {vb:rawphrase remember_me}</label>
                </
div


Enjoy! :)

Bouncer222 01-12-2010 09:26 PM

Like I said in my previous post.....

The LOGIN and REGISTER button is GONE so therefore, you CANNOT login at all, it all appears like I wanted to, but what happened to the login button??


All times are GMT. The time now is 08:01 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03589 seconds
  • Memory Usage 1,916KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (8)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete