Adding "Forgot Password" to top NavBar of forum/CMS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cknott2243
    New Member
    • Nov 2010
    • 1
    • 4.0.x

    [CMS] Adding "Forgot Password" to top NavBar of forum/CMS

    Hello,

    I am new to vbulletin and so far love it after coming from a very old and legacy system running ASPplayground. I have a few bumps during the setup process which I chalk up to the learning curve of a new product.

    The problem I am having now is the imp-ex migration does not provide the users with working passwords. This is not a huge ordeal but I cannot see an easy way to have the "lost/reset password " link added to the top navbar so users can easily change or reset their passwords when accessing the new system.

    I went through a number of posts where they stated it was under edit templates -> show thread options and to use Suspended or Unlicensed... but this is not something I see as they reference the "header" template which is not in this location.

    I do have a header template in the main template menu but I don't see how to add this forgot password link and I have also checked the navbar. I am not a real good mod guy but can follow directions well, is there something someone can point me to or maybe tell me exactly what I need to do, what file to do it in, etc. to have this displayed on the navbar properly without messing something else up.

    I am on 4.1 patch level 2.

    I will be sending an email out to all users with the direct link but with spam boxes, etc. I really need to have this option available on the front page before I can roll this out live.

    Thanks for any assistance, great product.
  • ENF
    Senior Member
    • Apr 2002
    • 2677
    • 3.8.11

    #2
    Here's the easiest way to do it via the header template:

    Add the line of code in red. (Shown here with a default copy of the header template in v4.1.0)

    Code:
    <div class="above_body"> <!-- closing tag is in template navbar -->
    <div id="header" class="floatcontainer doc_header">
        <div><a name="top" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}" class="logo-image"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></div>
        <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>
                    [B][/B][COLOR=red][B]<li><a href="login.php?do=lostpw{vb:raw session.sessionurl_q}">{vb:rawphrase forgotten_your_password}</a></li>[/B][/COLOR]
                    <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>
        <div class="ad_global_header">
            {vb:raw ad_location.global_header1}
            {vb:raw ad_location.global_header2}
        </div>
        <hr />
    </div>
    To be updated...

    Comment

    • Trevor Hannant
      vBulletin Support
      • Aug 2002
      • 24358
      • 5.7.X

      #3
      Also answered your ticket.
      Vote for:

      - Admin Settable Paid Subscription Reminder Timeframe (vB6)
      - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

      Comment

      • ximcix
        Senior Member
        • May 2004
        • 115

        #4
        can't believe this isn't standard.
        I get tired of manually sending password reset info to users through the Admin CP

        I couldn't believe it was so difficult until I logged out myself & tried to log in with an incorrect password just to see if everyone else is blind.
        Turns out that there is a reset password link in the vBulletin Message:
        You have entered an invalid username or password. Please enter the correct details and try again.
        Don't forget that the password is case sensitive. Forgotten your password? Click here!

        You have used 1 out of 5 login attempts. After all 5 have been used, you will be unable to login for 15 minutes.
        But its just so inconspicuous that its easily over-looked.

        It should be bolded, highlighted or something to make it more conspicuous.

        Comment

        • Trevor Hannant
          vBulletin Support
          • Aug 2002
          • 24358
          • 5.7.X

          #5
          You can always edit the following phrases to make it more obvious for your own users:

          - badlogin
          - badlogin_strikes
          - badlogin_passthru
          - badlogin_strikes_passthru
          - badpassword
          - strikes
          Vote for:

          - Admin Settable Paid Subscription Reminder Timeframe (vB6)
          - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...