The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Avatar before menu logout button

5 posters

Go down

In progress Avatar before menu logout button

Post by TheCrow 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;
}
TheCrow
TheCrow
Manager
Manager

Male Posts : 6897
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

In progress Re: Avatar before menu logout button

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

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


Avatar before menu logout button Slgray10

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

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Avatar before menu logout button

Post by Ange Tuteur 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
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Avatar before menu logout button

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

Just a question why did you use my name lol.
[SS] Illuminati
[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 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
Jophy
ForumGuru

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

Back to top Go down

In progress Re: Avatar before menu logout button

Post by TheCrow 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.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6897
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Back to top

- Similar topics

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