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 [Twitter Style] (https://vborg.vbsupport.ru/showthread.php?t=238152)

StarBuG 09-28-2010 05:50 AM

Hi

I am using your mod since for a long time now.

However in IE 7 and IE 6 the login buttons are not shown with background color which makes them invisible to guests with IE6 and IE7.

Is there a way to fix this?

Skyrider 09-28-2010 09:01 PM

Multiple issues with template changes..

In the header changes that are needed, I have found:

<input type="hidden" name="vb_login_md5password_utf" />

But after that,
Code:

                                </li>
                        </ul>
                </vb:if>
        </div>

I never found this.. there's a bunch of yahoo and facebook code after it.

And in navbar changes:
<div class="body_wrapper">

not found.

Is this made for vb4.0.7?

swiftor 10-02-2010 01:40 PM

I have to same situation. There's a lot of Yahoo related statements near the end, including a reference to Facebook. How should we handle this?

Quote:

Originally Posted by FF|Skyrider (Post 2104396)
Multiple issues with template changes..

In the header changes that are needed, I have found:

<input type="hidden" name="vb_login_md5password_utf" />

But after that,
Code:

                                </li>
                        </ul>
                </vb:if>
        </div>

I never found this.. there's a bunch of yahoo and facebook code after it.

And in navbar changes:
<div class="body_wrapper">

not found.

Is this made for vb4.0.7?


Winter Sonata 10-02-2010 11:48 PM

The same :( 406

Alteran Ancient 10-24-2010 10:41 AM

Okay, I have a fix for this mod. It's a little bit hacky, but I've tried it and it works. Here's what you need to do...

The only changes I have made here are to include the Facebook connect elements in with the login box and logged-in top links. I've tried this on vB 4.0.8 and it works for me - it should work with your forum, but I'm going to apply the usual disclaimer and wash my hands of any damage that may come to your forum as a result of you performing this installation incorrectly.

If you have already pasted the original code for this mod, you will need to replace that code with the code changes made here. This only requires a few brain cells to be performed properly. If in doubt, revert your templates, and follow these instructions as though you were installing the mod afresh.

Find in header template:
HTML Code:

        <div id="toplinks" class="toplinks">
                <vb:if condition="$show['member']">
                        <ul class="isuser">
                                <li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
                                <vb:if condition="$show['registerbutton']">
                                <li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
                                </vb:if>
                                <li><a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase control_panel}</a></li>
                                <li><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:rawphrase your_profile}</a></li>
                                <vb:if condition="$notifications_total">
                                <li class="popupmenu notifications" id="notifications">
                                        <a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
                                        <ul class="popupbody popuphover">
                                                {vb:raw notifications_menubits}
                                        </ul>
                                </li>
                                <vb:else />
                                <li class="popupmenu nonotifications" id="nonotifications">
                                        <a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
                                        <ul class="popupbody popuphover">
                                                <li>{vb:rawphrase no_new_messages}</li>
                                                <li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
                                        </ul>
                                </li>
                                </vb:if>
                                <li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
                                <vb:if condition="$vboptions['enablefacebookconnect']">
                                        {vb:raw facebook_header}
                                </vb:if>
                        </ul>
            {vb:raw template_hook.header_userinfo}
                        <vb:comment><p>{vb:rawphrase last_visited_x_at_y, {vb:raw pmbox.lastvisitdate}, {vb:raw pmbox.lastvisittime}}</p></vb:comment>
                <vb:else />
                        <ul class="nouser">
                        <vb:if condition="$show['registerbutton']">
                                <li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
                        </vb:if>
                                <li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}">{vb:rawphrase help}</a></li>
                                <li>
                        <script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
                        <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>
                                        <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="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" />
                                        <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>
                        <script type="text/javascript">
                        YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
                        YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
                        vB_XHTML_Ready.subscribe(function()
                        {
                        //
                                YAHOO.util.Event.on('navbar_username', "focus", navbar_username_focus);
                                YAHOO.util.Event.on('navbar_username', "blur", navbar_username_blur);
                                YAHOO.util.Event.on('navbar_password_hint', "focus", navbar_password_hint);
                                YAHOO.util.Event.on('navbar_password', "blur", navbar_password);
                        });
                       
                        function navbar_username_focus(e)
                        {
                        //
                                var textbox = YAHOO.util.Event.getTarget(e);
                                if (textbox.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>')
                                {
                                //
                                        textbox.value='';
                                        textbox.style.color='{vb:stylevar toplinks_form_input.color}';
                                }
                        }

                        function navbar_username_blur(e)
                        {
                        //
                                var textbox = YAHOO.util.Event.getTarget(e);
                                if (textbox.value == '')
                                {
                                //
                                        textbox.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>';
                                        textbox.style.color='{vb:stylevar toplinks_form_input_defaultValue.color}';
                                }
                        }
                       
                        function navbar_password_hint(e)
                        {
                        //
                                var textbox = YAHOO.util.Event.getTarget(e);
                               
                                YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "none");
                                YAHOO.util.Dom.setStyle('navbar_password', "display", "inline");
                                YAHOO.util.Dom.get('navbar_password').focus();
                        }

                        function navbar_password(e)
                        {
                        //
                                var textbox = YAHOO.util.Event.getTarget(e);
                               
                                if (textbox.value == '')
                                {
                                        YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
                                        YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
                                }
                        }
                        </script>
                                </li>
                                <vb:if condition="$vboptions['enablefacebookconnect']">
                                        {vb:raw facebook_header}
                                </vb:if>
                        </ul>
                </vb:if>
        </div>

REPLACE with the following:
HTML Code:

<div id="toplinks" class="toplinks">
                <vb:if condition="$show['member']">
                        <ul class="isuser">
                                <li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
                                <vb:if condition="$show['registerbutton']">
                                <li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
                                </vb:if>
                                <li><a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase control_panel}</a></li>
                                <li><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:rawphrase your_profile}</a></li>
                                <vb:if condition="$notifications_total">
                                <li class="popupmenu notifications" id="notifications">
                                        <a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
                                        <ul class="popupbody popuphover">
                                                {vb:raw notifications_menubits}
                                        </ul>
                                </li>
                                <vb:else />
                                <li class="popupmenu nonotifications" id="nonotifications">
                                        <a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
                                        <ul class="popupbody popuphover">
                                                <li>{vb:rawphrase no_new_messages}</li>
                                                <li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
                                        </ul>
                                </li>
                                </vb:if>
                                <li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
                                <vb:if condition="$vboptions['enablefacebookconnect']">
                                        {vb:raw facebook_header}
                                </vb:if>
                        </ul>
            {vb:raw template_hook.header_userinfo}
                        <vb:comment><p>{vb:rawphrase last_visited_x_at_y, {vb:raw pmbox.lastvisitdate}, {vb:raw pmbox.lastvisittime}}</p></vb:comment>
                </vb:if>
        </div>


Find in navbar template:
HTML Code:

<div class="body_wrapper">

Add BELOW:
HTML Code:

<!-- TheWindows7Site Custom Login -->
<vb:if condition="$show['guest']">
<script src="login/javascripts/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
        $(document).ready(function() {

            $(".signin").click(function(e) {
                e.preventDefault();
                $("fieldset#signin_menu").toggle();
                $(".signin").toggleClass("menu-open");
            });

            $("fieldset#signin_menu").mouseup(function() {
                return false
            });
            $(document).mouseup(function(e) {
                if($(e.target).parent("a.signin").length==0) {
                    $(".signin").removeClass("menu-open");
                    $("fieldset#signin_menu").hide();
                }
            });           

        });
</script>

<script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>

<div id="container">
  <div id="topnav" class="topnav"> Have an account? <a href="login" class="signin"><span>Login</span></a> <a href="./register.php" class="register"><span>Register</span></a> </div>
  <fieldset id="signin_menu"><p class="forgot">Login to forums:</p>
    <form method="post" id="signin" action="login.php?{vb:raw session.sessionurl}do=login" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, {vb:raw show.nopasswordempty})">
      <label for="username">Username</label>

<input id="navbar_username" type="text" value="" tabindex="101" accesskey="u" name="vb_login_username" />

      </p>
      <p>
        <label for="password">Password</label>

<input id="navbar_password" type="password" value="" tabindex="102" accesskey="u" name="vb_login_password" />

      </p>
      <p class="remember">
        <input type="submit" id="signin_submit" value="Login" tabindex="104" title="Login" accesskey="s" />
        <input id="cb_cookieuser_navbar" type="checkbox" accesskey="c" tabindex="103" value="1" name="cookieuser" checked="checked"/>
        <label for="cb_cookieuser_navbar">Remember me?</label>
      </p>
      <p class="forgot"> <a href="./login.php?do=lostpw">Forgot your password?</a> </p>
      <p class="forgot-username"> <A title="Include your e-mail in the support message."
href="./sendmessage.php">
Forgot your username?</A> </p>
<vb:if condition="$vboptions['enablefacebookconnect']">
<br />
<p class="forgot">Login via Facebook:</p>
<ul class="nouser">
<li id="fb_headerbox">
<a id="fb_loginbtn" href="#"><img src="images/misc/facebook_login.gif" alt="The Facebook Platform" /></a>
</li>
</ul>
</vb:if>

                <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>
  </fieldset>
</div>
</vb:if>
<!-- TheWindows7Site Custom Login -->


Skyrider 10-27-2010 02:18 PM

Quote:

Originally Posted by Alteran Ancient (Post 2113545)
Okay, I have a fix for this mod. It's a little bit hacky, but I've tried it and it works. Here's what you need to do...

The only changes I have made here are to include the Facebook connect elements in with the login box and logged-in top links. I've tried this on vB 4.0.8 and it works for me - it should work with your forum, but I'm going to apply the usual disclaimer and wash my hands of any damage that may come to your forum as a result of you performing this installation incorrectly.

If you have already pasted the original code for this mod, you will need to replace that code with the code changes made here. This only requires a few brain cells to be performed properly. If in doubt, revert your templates, and follow these instructions as though you were installing the mod afresh.

I've done as you mentioned, but the login/register seems to be displayed below the navbar, and not at the top right of the forums. It works fine though.

EDIT:
I've moved your navbar code to the header, that works just fine.

Clement7 10-31-2010 05:01 AM

It looks really great. But, I have an issue with it.

It appears all good when the " Forums " tab is selected , like this :

http://img821.imageshack.us/img821/1989/37660545.jpg

But, when the " Home " tab is selected , the input bars kinda look weird , like this :

http://img214.imageshack.us/img214/8155/70366221.jpg

Any help would be highly appreciated.

Thanks :)

blake247 11-14-2010 02:10 PM

Same here

horussjr 11-17-2010 04:00 PM

how to move it in the header man? from navbar. done as you said on 4.0.8 and not having any error. seen in mozilla firefox (the best browser:D)

LE: DONE!
Great mod, thx:)

Popa Andrei 11-26-2010 12:41 AM

did anyone encoutered problems with facebook login with this mode installed?


All times are GMT. The time now is 12:50 PM.

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.01532 seconds
  • Memory Usage 1,870KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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