Announcement

Collapse
No announcement yet.

Avatar added to Navbar "Welcome"

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

  • 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 22nd Jul '07, 11:52am.

  • #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


    • #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


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

        Comment


        • #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


          • #6
            Originally posted by Xodus View Post
            <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


            • #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


              • #8
                Originally posted by bradhaskins View Post
                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


                • #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:
                  <!-- LINE(S) 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">

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

                  Comment


                  • #10
                    Yay!! Thanks so much!

                    Comment


                    • #11
                      Any way to make it a custom size?

                      Comment


                      • #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


                        • #13
                          Originally posted by Alibi View Post
                          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


                          • #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 24th Aug '07, 11:17am.

                            Comment


                            • #15
                              Sweeeeeet. Thanks lots!

                              Comment

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