Display primary membergroup when hover over username

Started by TopNotchGaming, June 30, 2014, 08:22:52 AM

Previous topic - Next topic

TopNotchGaming

I'm looking for something that will add this feature to my forums. I want to be able to see a user's primary membergroup when I hover over their name. See attached image.

Any help would be highly appreciated.

margarett

Hi and welcome to SMF ;)

Do you want someone to do this for you? If so, please add "FREE" or "PAID" to your topic's subject, according the rules for this board.

If you want to learn how to do it and have some help in it, let us know so that we can move this to a proper board ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

TopNotchGaming

Quote from: margarett on June 30, 2014, 09:40:18 AM
Hi and welcome to SMF ;)

Do you want someone to do this for you? If so, please add "FREE" or "PAID" to your topic's subject, according the rules for this board.

If you want to learn how to do it and have some help in it, let us know so that we can move this to a proper board ;)

Hello and thank you for your response. I would like to learn how to do it but I am only a beginner so would require a quick walkthrough.

leroymcqy

this sounds like a cool idea. i would like learn how to do this as well.

if anyone could help would be thankful.

margarett

#4
Hum, I forgot this. Let me have a look, see if something comes up :)

edit: here we go, nice and easy :)

Sources/Subs-MembersOnline.php
Find:
lo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name, mem.show_online,
Replace with:
lo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name, mem.show_online, mem.id_group AS mem_id_group,

Find:
// Some basic color coding...
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';

Replace with:
// Some basic color coding...
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';" title="' . (empty($row['mem_id_group']) ? '' : $row['group_name']) . '">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" title="' . (empty($row['mem_id_group']) ? '' : $row['group_name']) . '">' . $row['real_name'] . '</a>';


And there 'ya go ;)

(You don't see the mouse pointer, but it's there :P )
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

leroymcqy

Quote from: margarett on July 07, 2014, 07:01:19 PM
Hum, I forgot this. Let me have a look, see if something comes up :)

edit: here we go, nice and easy :)

Sources/Subs-MembersOnline.php
Find:
lo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name, mem.show_online,
Replace with:
lo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name, mem.show_online, mem.id_group AS mem_id_group,

Find:
// Some basic color coding...
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';

Replace with:
// Some basic color coding...
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';" title="' . (empty($row['mem_id_group']) ? '' : $row['group_name']) . '">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" title="' . (empty($row['mem_id_group']) ? '' : $row['group_name']) . '">' . $row['real_name'] . '</a>';


And there 'ya go ;)

(You don't see the mouse pointer, but it's there :P )

thanks will take a look at it when i have time and get back to you with the results.


TopNotchGaming

Thank you so much! I completely forgot about this thread. It works, marked as solved. Cheers.

Quote from: margarett on July 07, 2014, 07:01:19 PM
Hum, I forgot this. Let me have a look, see if something comes up :)

edit: here we go, nice and easy :)

Sources/Subs-MembersOnline.php
Find:
lo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name, mem.show_online,
Replace with:
lo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name, mem.show_online, mem.id_group AS mem_id_group,

Find:
// Some basic color coding...
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>';

Replace with:
// Some basic color coding...
if (!empty($row['online_color']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" style="color: ' . $row['online_color'] . ';" title="' . (empty($row['mem_id_group']) ? '' : $row['group_name']) . '">' . $row['real_name'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '" title="' . (empty($row['mem_id_group']) ? '' : $row['group_name']) . '">' . $row['real_name'] . '</a>';


And there 'ya go ;)

(You don't see the mouse pointer, but it's there :P )

Advertisement: