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.

How to display a users user group when hovered over?

2 posters

Go down

Solved How to display a users user group when hovered over?

Post by Ramdaman August 30th 2014, 11:38 pm

Is there a way if you hover over a users name, that the displayed group that user is in will show in text by your cursor? Thanks.


Last edited by Ramdaman on August 31st 2014, 1:03 am; edited 1 time in total
Ramdaman
Ramdaman
Active Poster

Male Posts : 1615
Reputation : 99
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: How to display a users user group when hovered over?

Post by Ange Tuteur August 30th 2014, 11:51 pm

Hello Ramdaman,

You can use the following trick with CSS :
Display > Colors > CSS stylesheet
Code:
a span[style="color:#990099"] strong:hover:after {
  content:"Moderator";
  font-size:10px;
  color:#000;
  background:#FFF;
  border:1px solid #EEE;
  box-shadow:1px 1px 2px #000;
  border-radius:4px;
  padding:3px;
  position:absolute;
  bottom:5px;
  right:0px;
  display:inline-block;
  white-space:nowrap;
  z-index:1;
  margin:-25px;
}
a span[style="color:#990099"] strong { position:relative }

So it applies to the group you want it to, you must change #990099 to the color of your group. You can see the hex color of your groups here :
Administration Panel > Users & Groups > Groups > Group Administration

How to display a users user group when hovered over? Captu183

The last thing to change is the texts displayed : content:"Moderator"; Change Moderator to the texts you want to display.

To have it for multiple groups simply repeat the steps above.
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to display a users user group when hovered over?

Post by Ramdaman August 31st 2014, 12:47 am

Ah solved, so I must keep every group color different for this to work?
Ramdaman
Ramdaman
Active Poster

Male Posts : 1615
Reputation : 99
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: How to display a users user group when hovered over?

Post by Ange Tuteur August 31st 2014, 12:55 am

Correct, you will need multiple codes. You can also put the content in its own rule and add the selectors to the popup style so it takes less space. However, I think multiple codes will be easier if you're not familiar with CSS.
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to display a users user group when hovered over?

Post by Ramdaman August 31st 2014, 1:02 am

Not familiar with CSS, so this will do. Thanks again mam. Smile
Ramdaman
Ramdaman
Active Poster

Male Posts : 1615
Reputation : 99
Language : English, Albanian, Macedonian, Russian | HTML, CSS
Location : New York City

http://ndihme.forumotion.com/forum

Back to top Go down

Solved Re: How to display a users user group when hovered over?

Post by Ange Tuteur August 31st 2014, 1:24 am

You're welcome ^^

Topic archived

With multiple codes you can also personalize the style of each group tooltip. ( e.g. background color, font color.. )
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

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