Avatar added to Navbar "Welcome"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jasonyetter
    New Member
    • Jun 2007
    • 29
    • 3.6.x

    Avatar added to Navbar "Welcome"

    I modified the Navbar template to show the User's avatar.
    Please look at the attached screen shot.
    How do I get a 1/2 inch space between the right side of the avatar and the text: "Welcome"
    Please keep it simple if you can, as I have zero talent with this.
    Thanks, J
    -----------------------------------------------------------------

    The code is:

    <if condition="$show['member']">
    <td class="alt2" valign="top" nowrap="nowrap">

    <!-- LINE BELOW ADDED TO SHOW AVATAR -->
    <img src="image.php?u=$bbuserinfo[userid]" alt="$vbphrase[avatar]" border="0" align="left" />

    <div class="smallfont">
    <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
    <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox
    Attached Files
    Last edited by jasonyetter; Sun 22 Jul '07, 10:52am.
  • DelphiVillage
    Senior Member
    • Apr 2002
    • 1051
    • 4.1.x

    #2
    you can insert a space with a special character in htmlcoding it is

    HTML Code:
    &nbsp; &nbsp;
    that would insert two spaces so after the img line ..... did it work ?

    Comment

    • jasonyetter
      New Member
      • Jun 2007
      • 29
      • 3.6.x

      #3
      Could you tell me where I would put the "space" code to get the separation desired separation between the image and the Welcome username text. J

      Comment

      • Xodus
        Member
        • Feb 2007
        • 68
        • 3.6.x

        #4
        <div class="smallfont">
        <strong>&nbsp; &nbsp;<phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
        <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox

        Comment

        • jasonyetter
          New Member
          • Jun 2007
          • 29
          • 3.6.x

          #5
          Thanks for the help. That's the best solution.
          I didn't want to add pre spaces in the welcome_x phrase, since it might effect something else. J

          Comment

          • bestmilan
            Senior Member
            • May 2007
            • 153
            • 3.8.x

            #6
            Originally posted by Xodus
            <div class="smallfont">
            <strong>&nbsp; &nbsp;<phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
            <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox

            That didn't work form me... but adding this piece of code "style="margin-right:7px" seems to work...

            <!-- LINE BELOW ADDED TO SHOW AVATAR -->
            <img src="image.php?u=$bbuserinfo[userid]" alt="$vbphrase[avatar]" border="0" align="left" style="margin-right:7px" />
            www.legaljunkies.com

            Comment

            • bestmilan
              Senior Member
              • May 2007
              • 153
              • 3.8.x

              #7
              Update...

              The code has to be slightly modified to make it work also in Firefox (and Explorer).


              The code should look like this:



              <if condition="$show['member']">
              <td class="alt2" valign="top" nowrap="nowrap">

              <!-- LINE BELOW ADDED TO SHOW AVATAR -->
              <img src="image.php?u=$bbuserinfo[userid]" alt="$vbphrase[avatar]" border="0" /></td>


              <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
              www.legaljunkies.com

              Comment

              • RVM
                Member
                • May 2007
                • 56
                • 3.6.x

                #8
                Originally posted by bradhaskins
                Update...

                The code has to be slightly modified to make it work also in Firefox (and Explorer).

                The code should look like this:



                <if condition="$show['member']">
                <td class="alt2" valign="top" nowrap="nowrap">

                <!-- LINE BELOW ADDED TO SHOW AVATAR -->
                <img src="image.php?u=$bbuserinfo[userid]" alt="$vbphrase[avatar]" border="0" /></td>

                <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
                Is this the whole and only code I need to add? Where do I add it in the navbar template please? I would LOVE to use this on my board!

                Comment

                • bestmilan
                  Senior Member
                  • May 2007
                  • 153
                  • 3.8.x

                  #9
                  IMPORTANT NOTICE:

                  There is a little bug in the code listed below (the problem shows when changing the existing avatar -- the new avatar doesn't display immediately in navbar after a change -- probably a cache issue).

                  Use the "Avatar On Navbar Mod" instead. It works flawlessly on 3.6.x

                  Avatar On Navbar Mod





                  Edit this template:

                  Admin CP -> Styles & Templates -> Style Manager -> « » -> Navigation / Breadcrumb Templates -> navbar


                  Find this line in navbar template:

                  Code:
                  <if condition="$show['member']">
                  <td class="alt2" valign="top" nowrap="nowrap">
                  And add this code below it:

                  Code:
                  [B][COLOR=#ff0000]<!-- LINE(S) BELOW ADDED TO SHOW AVATAR -->[/COLOR][/B]
                  [B][COLOR=#ff0000]<img src="image.php?u=$bbuserinfo[userid]" alt="$vbphrase[avatar]" border="0" /></td>[/COLOR][/B]
                   
                  [B][COLOR=#ff0000]<td class="alt2" valign="top" nowrap="nowrap">[/COLOR][/B]

                  This will make the user's avatar show on the left side next to the Navbar "Welcome (username)" field.
                  Last edited by bestmilan; Mon 22 Sep '08, 4:56pm.
                  www.legaljunkies.com

                  Comment

                  • RVM
                    Member
                    • May 2007
                    • 56
                    • 3.6.x

                    #10
                    Yay!! Thanks so much!

                    Comment

                    • RVM
                      Member
                      • May 2007
                      • 56
                      • 3.6.x

                      #11
                      Any way to make it a custom size?

                      Comment

                      • Alibi
                        New Member
                        • Jul 2007
                        • 11
                        • 3.6.x

                        #12
                        yeah i want to do this but we allow 200x200 avatars at our site
                        i need a way to automatically resize the avatars so they show no larger than say 150x150 on the navbar

                        Comment

                        • Jose Amaral Rego
                          Senior Member
                          • Feb 2005
                          • 11058
                          • 1.1.x

                          #13
                          Originally posted by Alibi
                          yeah i want to do this but we allow 200x200 avatars at our site
                          i need a way to automatically resize the avatars so they show no larger than say 150x150 on the navbar
                          just add attributes width and height to your code to resize avatar over navbar.

                          Comment

                          • princeedward
                            Senior Member
                            • Jan 2007
                            • 180

                            #14
                            Avatar On Navbar?

                            This might help also...

                            Avatar On Navbar Mod

                            simply do/add this: auto-resize (your size choice) and clickable direct to usercp:

                            <!-- LINE BELOW ADDED TO SHOW AVATAR -->
                            <a href="$vboptions[bburl]/profile.php?">
                            <img src="image.php?u=$bbuserinfo[userid]" alt="$vbphrase[avatar]" width= "75" height= "75" border="0" /></td>

                            <td class="alt2" valign="top" nowrap="nowrap">


                            Last edited by princeedward; Fri 24 Aug '07, 10:17am.

                            Comment

                            • RVM
                              Member
                              • May 2007
                              • 56
                              • 3.6.x

                              #15
                              Sweeeeeet. Thanks lots!

                              Comment

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