How can i add icon like crown for admin? How can i context user profile and put icon image after their name in this code?
// add online users
echo '<hr /><img src="'.$settings['images_url'].'/icons/bullet11.gif" style="margin: 0;" align="bottom" alt="" />
<a href="'.$scripturl.'?action=who"><b>'.$txt[158].'</b></a><br />';
$online = ssi_whosOnline('array');
echo $bullet.$txt['tp-users'].': '.$online['num_users'];
echo '<br />'.$bullet.$txt['tp-guests'].': '.$online['guests'];
echo '<br />'.$bullet.$txt['tp-total'].': '.$online['total_users'].'<hr />
<div style="width: 100%; ' , $online['num_users']>5 ? 'height: 30ex;overflow: auto;' : '' ,'">';
foreach($online['users'] as $user){
echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];
echo '<br />';
}
echo '</div>';
}
echo '</div>';
}
i have find the mod for that.. but dont know how to put it running in tp side online users block.
http://custom.simplemachines.org/mods/index.php?mod=1801
I am working on this Mrcare :)
Ok this should work with the code you posted above and with the TP side block.
You need to make a few changes to your SSI.php which is in your forum root (next to index.php).
Please make a backup of SSI.php before you do anything.
Find (around line 652) :
global $scripturl, $db_prefix, $user_info, $txt;
Change to :
global $scripturl, $db_prefix, $user_info, $txt, $boardurl;
Find (around line 656 - 658) :
SELECT
lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP
Change to :
SELECT
lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.crown
Find (around line 681 - 686) :
// Bold any buddies.
if ($show_buddies && in_array($row['ID_MEMBER'], $user_info['buddies']))
{
$return['buddies']++;
$link = '<b>' . $link . '</b>';
}
Add AFTER :
// Do they have a crown ?
if (!empty($row['crown']))
$link = '<img src="' . $boardurl . '/Themes/default/images/' . $row['crown'] . '" alt="" />' . $link;
I think that is all you should need. Let me know how that goes.
heyyyy/// :up: :up: :up:
soo niceeee... tq soo much.. ;D
You are welcome ;D