1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Add avatar in navigation_visitor_tab

Discussion in 'Styling and Customization Questions' started by luutruong, Sep 21, 2012.

  1. luutruong

    luutruong Active Member

    How to add mini avatar (user) in navigation_visitor_tab...I tried some way but not work
    And i dont want use Addon
     
  2. Steve F

    Steve F Well-Known Member

    Here you go

    In template navigation_visitor_tab

    Find:
    Code:
    <a href="{xen:link account}" class="navLink accountPopup" rel="Menu"><strong>{$visitor.username}</strong></a>
    Replace with:
    Code:
    <a href="{xen:link account}" class="navLink accountPopup" rel="Menu"><img src="{xen:helper avatar, $visitor, s}" class="miniMe" /><strong>{$visitor.username}</strong></a>
    Add this to EXTRA.css:
    Code:
    .navTab .accountPopup img
    {
    float: left;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    margin-top: 3px;
    border-radius: 2px;
    }
    Result

    avatar-in-tab.png


    Added to the Resource Manager: http://xenforo.com/community/resources/add-avatar-to-visitor-tabs.1032/
     
    rafass, patrick91, Jake Bunce and 2 others like this.
  3. Steve F

    Steve F Well-Known Member

    Also, if your navTabs has a height higher than the default you can adjust the width and height of the image to suite.
     
  4. luutruong

    luutruong Active Member

    thanks...you
     
    Steve F likes this.

Share This Page