The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Avatar before menu logout button

View previous topic View next topic Go down

In progress Avatar before menu logout button

Post by Luffy on January 3rd 2014, 9:52 pm

Hello. Is there any way i can add the avatar of each user before the word Logout [Guest] on the mainmenu of my forum?

To add the avatar to the welcome part on fm toolbar i used this in javascript:
Code:
$(function () {
            $(window).load(function () {
                var av = $('#fa_usermenu img:eq(0)').attr('src');
                $('#fa_welcome').prepend('<img src="' + av + '" class="toolbar_avatar" />');
            });
        });
and this in css:
Code:
.toolbar_avatar {
 height: 25px;
width: 25px;
margin-right: 3px;
position: relative;
top: -1px;
}

Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

In progress Re: Avatar before menu logout button

Post by SLGray on January 3rd 2014, 10:00 pm

This is the part of the CSS - margin-right: 3px; - would move the avatar. Try negative numbers.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35629
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Avatar before menu logout button

Post by Ange Tuteur on January 3rd 2014, 11:08 pm

Hello Marios94 ,

Just add the #logout ID to where we prepend the avatar :
Code:
$(function () {
  $(window).load(function () {
  var av = $('#fa_usermenu img:eq(0)').attr('src');
  $('#fa_welcome, #logout').prepend('<img src="' + av + '" class="toolbar_avatar" />');
  });
  });

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Avatar before menu logout button

Post by [SS] Illuminati on January 3rd 2014, 11:41 pm

Just a question why did you use my name lol.

[SS] Illuminati
Forumember

Male Posts : 92
Reputation : 3
Language : LUA, Java, Python, and, HTML

http://www.maliciousgaing.foruotion.com

Back to top Go down

In progress Re: Avatar before menu logout button

Post by Jophy on January 4th 2014, 4:33 am

@[SS] Illuminati wrote:Just a question why did you use my name lol.
He used this code:
Code:
{USERLINK}

@Marios94: Is the problem solved?

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

Back to top Go down

In progress Re: Avatar before menu logout button

Post by Luffy on January 4th 2014, 11:32 am

Ange its not working. It still appears on the welcome part.. i want it to go on the navbar logout.






Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum