Announcement

Collapse
No announcement yet.

moving the user logged in info

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • moving the user logged in info

    Hi, i would like to place the the user logged in info e.g:

    Welcome, WayneD-SR-Sitemanager.
    You last visited: Today at 03:29 PM
    Private Messages: Unread 0, Total 0.

    at the top of my page above the header/logo as part of the table in a seperate cell. IF that makes sense.

    I have tried everything that i thought usally works, but i have had no luck.

    Please can someone advise me of what to do, as i am new to vBulletin and dont really know much about editing it yet.

    Thanks alot in advance,

    Wayne

  • #2
    You need to edit the header template to do this

    This info is inside the navbar, you can cut it from there and paste it in the header template. It just depends where exactly. Is this all the way on the top right, with the logo on the left, or even above the logo?

    Comment


    • #3
      thanks for getting back to me, i want it to go above the logo, if that is possible?

      Comment


      • #4
        Yes, that's possible. I will write the code now for you.

        Comment


        • #5
          Admin Control Panel > Styles & Templates > Style Manager > dropdown: edite templates > Expand the 'navigation & breadcrumb' templates group and select the navbar template > click on the customize button.

          Now find this code and delete it:
          Code:
          <if condition="$show['member']">
           
            <td class="alt2" valign="top" nowrap="nowrap">
            <div class="smallfont">
             <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
             <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
             <if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
            </div>
            </td>
           
           <else />
           
            <td class="alt2" nowrap="nowrap" style="padding:0px">
           
            <!-- login form -->
            <form action="login.php" 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"></script>
            <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
            <tr>
             <td class="smallfont"><label for="navbar_username">$vbphrase[username]</label></td>
             <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
             <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
            </tr>
            <tr>
             <td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
             <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" accesskey="p" tabindex="102" /></td>
             <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
            </tr>
            </table>
            <input type="hidden" name="s" value="$session[sessionhash]" />
            <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 -->
           
            </td>
           
           </if>
          Save the template and continue to the next step.


          Admin Control Panel > Styles & Templates > Style Manager > dropdown: edit templates > select the template 'header' and click on the customize button.

          Find this code:
          Code:
          <a name="top"></a>
          and BELOW it, on a NEW LINE, add this code:
          Code:
          <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
          <tr>
          <if condition="$show['member']">
           
            <td class="alt2" valign="top" nowrap="nowrap">
            <div class="smallfont">
             <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
             <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
             <if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
            </div>
            </td>
           
           <else />
           
            <td class="alt2" nowrap="nowrap" style="padding:0px">
           
            <!-- login form -->
            <form action="login.php" 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"></script>
            <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
            <tr>
             <td class="smallfont"><label for="navbar_username">$vbphrase[username]</label></td>
             <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
             <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
            </tr>
            <tr>
             <td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
             <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" accesskey="p" tabindex="102" /></td>
             <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
            </tr>
            </table>
            <input type="hidden" name="s" value="$session[sessionhash]" />
            <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 -->
           
            </td>
           
           </if> 
          </tr>
          </table>
          Now save the template and you're done.
          Attached Files

          Comment


          • #6
            thanks so much, your were fast. I have got some other probs but i will post them in new thread later.

            Thanks Again

            Comment


            • #7
              Yep, new thread per problem is easiest way of working, either me or someone else from staff can reply and we won't confuse eachother

              Glad I could help and looking forward to your final design / layout on your site. Looks like a nice site.

              Here's some more info which you could look into before asking questions.
              Of course. Our search feature
              And www.vbulletin.com/docs/html online manual.
              And www.vbulletin.com/go/customize

              Comment

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