Login form on all pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Addicted2HD
    Member
    • Dec 2007
    • 39

    Login form on all pages

    Hi,

    I had a custom skin made for my forum and now the login form only appears on the forum homepage. I have asked for help from the skin company and am not getting any support and I am running up against a deadline.

    Can anyone point me to the template I need to edit to accomplish the following? (I have been searching the different templates in the template manager without any luck finding what I think I should be looking for).

    I want the form you see on this page:


    to appear on this page as well (forumdisplay page):


    I don't mind if it shows throughout, even at the post level, but I at least need to have it on the forumdisplay page because I will link directly to those pages at times.

    TIA,
    Scott
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    To find the template, do this: vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.

    Then, take a look at that template and see if there is some sort of conditional around the login part of the template and try removing it (remember to remove both the <if> and the </if>).

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment

    • Addicted2HD
      Member
      • Dec 2007
      • 39

      #3
      Thanks!

      I have it narrowed down to this code:

      Code:
      <if condition="is_array($navbits)">
      <div style="padding-top:40px;">
                  <table cellpadding="0" cellspacing="0" border="0">
                  <tr valign="bottom">
                      <td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
                      <td>&nbsp;</td>
                      <td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a> $navbits[breadcrumb]</span></td>
                  </tr>
                  <tr>
                      <td style="padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td>
                  </tr>
                  </table>
      </div>
              <else />
      <div class="bcMain" style="padding-top:45px;">
                  <a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong>
      </div>    
              </if>    
      
      
              <if condition="!is_array($navbits)">
      <if condition="$show['member']">    
              <div class="memberBox2">
          <div class="smallfont">
              <strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
              <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
      
              <if condition="$show['notifications'] AND $show['popups']">
                  <div><span id="notifications"><a href="usercp.php$session[sessionurl_q]">$vbphrase[your_notifications]:</a> <strong>$notifications_total</strong></span></div>
                  <script type="text/javascript"> vBmenu.register("notifications"); </script>
              <else /><if condition="$show['pmstats']">
                  <div><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></div>
              </if></if>
      
              <if condition="$show['pmwarning']"><div><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></div></if>
          </div>
              </div>    
      <else />
              <div class="memberBox">
                  <!-- login form -->
                  <form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
                  <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
                              <span class="memberInfo">Username:</span>
                              <div class="loginBox"><input type="text" class="bginput2" name="vb_login_username" id="navbar_username" style="width:130px;" accesskey="u" tabindex="101" value="" /></div>
                              <span class="memberInfo">Password:</span>
                              <div class="loginBox"><input type="password" class="bginput2" name="vb_login_password" id="navbar_password" style="width:130px;" accesskey="u" tabindex="101" value="" /></div>
                              <div class="rememberMe">
                                      <input name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" type="checkbox" class="verticalAlign" /> <span class="verticalAlign">Remember Me?</span>
                              </div>
                              <div class="loginButton">
                                  <input class="verticalAlign" type="image" src="images/styles/addiction/style/loginButton.gif" value="Submit" alt="Submit" tabindex="104" />
                              </div>
                  <a href="register.php"><img src="images/styles/addiction/style/registerNow.gif" alt="Register Now" /></a>    
                  <input type="hidden" name="s" value="$session[sessionhash]" />
                  <input type="hidden" name="securitytoken" value="$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>
                  <!-- / login form -->
              </div>
      </if>
              </if>
      Just not sure what to change now.

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74123

        #4
        As a guest user to your forums, I see a login form on every page of your site. It doesn't show if you are already logged in. This is represented by the code that you posted above.

        If you look at the code there is a line that says:
        <if condition="$show['member']">

        This means, "If the person browsing is a member and logged in then show". It will show the "welcome back username, you last visited at XYZ time, your notifications".

        After that there is an <else />

        This is where the login form starts. So if the person browsing is not a member (meaning they aren't logged in), then it will show the form automatically.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • Addicted2HD
          Member
          • Dec 2007
          • 39

          #5
          Originally posted by Wayne Luke
          As a guest user to your forums, I see a login form on every page of your site. It doesn't show if you are already logged in. This is represented by the code that you posted above.

          If you look at the code there is a line that says:
          <if condition="$show['member']">

          This means, "If the person browsing is a member and logged in then show". It will show the "welcome back username, you last visited at XYZ time, your notifications".

          After that there is an <else />

          This is where the login form starts. So if the person browsing is not a member (meaning they aren't logged in), then it will show the form automatically.
          Wayne,

          Thanks, I think you stumbled upon me continuing to update the code. I think I have it all set now. There didn't used to be a login form on all pages so I think it's all set.

          Thanks again for the help.

          -Scott

          Comment

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