TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 10:28:19 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 117
  • Total: 117

Is there a way to do this?

Started by pvcblue, May 19, 2007, 08:07:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pvcblue

I was wondering, in the Info Center where it shows Users Online if there was a way to seperate the regular users from the admins and mods, besides by color? Say put the Admins and Mods on one line and the regular users on the next?

Wasn't sure where this went exactly.  ::)

G6Cad

I think that is more of SMF question as the online members, staff members are made by them, TP more or less just fetch whats in the SMF codes allready.

pvcblue

Quote from: G6™ on May 19, 2007, 10:41:24 AM
I think that is more of SMF question as the online members, staff members are made by them, TP more or less just fetch whats in the SMF codes allready.

Oh sorry - I thought since the Info Center is titled "Tiny Portal Info Center" I would ask here. OOPS  :o

pvcblue

Well I posted over there, we all know how long it can take an answer - if you get one- to take, but when and if I get one I will post it here for anyone who also wanted to know.  ;)

G6Cad

I know it's confusing with blocks and whats in them :) Been there a lot of times my self  :2funny:


knat

Quote from: pvcblueÃ,© on May 19, 2007, 10:42:36 AM
Quote from: G6â„¢ on May 19, 2007, 10:41:24 AM
I think that is more of SMF question as the online members, staff members are made by them, TP more or less just fetch whats in the SMF codes allready.

Oh sorry - I thought since the Info Center is titled "Tiny Portal Info Center" I would ask here. OOPS  :o

If your forum is named Funny Faces then it will be Funny Faces Info Center :D

Anyway i bumped you topic over at smf because i want this also on my site ;)

IchBin

Certainly not an easy task. All the onlines users are put into an array $context['list_users_online'] which only holds a list of links for user profiles. I don't think it can be done straight out of the box, but with some modification I don't see why not. I'll take a look when I get a chance.

pvcblue

ANSWER FROM SMF -


Lol, at first I thought it wasn't, but it looks like it is possible. :)

In Sorces/BoardIndex.php find:


$context['list_users_online'] = array();



and above it add:



$context['list_mods_online'] = array();



then find this:



$context['list_users_online'][$row['logTime'] . $row['memberName']] = empty($row['showOnline']) ? '<i>' . $link . '</i>' : $link;



And replace it with:



if($context['users_online'][$row['logTime'] . $row['memberName']]['group'] == 1 || $context['users_online'][$row['logTime'] . $row['memberName']]['group'] == 2)
$context['list_mods_online'][$row['logTime'] . $row['memberName']] = empty($row['showOnline']) ? '<i>' . $link . '</i>' : $link;
else
$context['list_users_online'][$row['logTime'] . $row['memberName']] = empty($row['showOnline']) ? '<i>' . $link . '</i>' : $link;



This is assuming that your moderartors are group 2 (first line)

Now find this:



krsort($context['users_online']);



and above it add:


ksort($context['list_mods_online']);



Finally, in BoardIndex.template.php of the default theme and/or the theme your using find:



// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);



and replace it with:



// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_mods_online']), count($context['list_mods_online']) > 0 ? '<br />' : '', implode(', ', $context['list_users_online']);




thanks to Kays at SMF

pvcblue

I haven't treid this yet, as I am at work, but will give it a test run later when I am at home and let you guys know what happens. Hopefully it won't kill my forum LOL!!!

:laugh:

knat

#9
Ok so this will only make the mods stand out of the crowd ?

I wanted to use this for a particular membergroup can that be done ??


Ok just saw the replies on SMF.. i can use this.. great stuff  :D