News:

Wondering if this will always be free?  See why free is better.

Main Menu

Users Online Today Mod

Started by Nibogo, November 06, 2005, 01:42:31 AM

Previous topic - Next topic

Carceri

Quote from: cotdagoo on June 03, 2006, 03:05:44 PM
Is there not any way to filter banned users out of the list, much like the hidden users are? Seems kinda silly to include users that are banned in the list.. perhaps that's just my personal prefrence though.

I guess it's a personal preference. You might argue that they are active on the forum that day, even though they are banned. You can also argue that they are not valid users because they have been banned. Both points are valid IMO.

ghostfreak


http://www.xfilesforum.net - Dare To Believe?
http://www.idealforum.co.uk - The Green Blitz!

tzd

What do i have to edit in my croatian language to make this work?

WarBirD

I tried all that stuff and never got it to work  :(, I need it for the black22 Theme. Anyone can help me with that ?

WarBirD

DemonicInfluence

MANUALLY EDIT the boardindex.template.php in your black22 theme..

WarBirD

#365
Yeah, tried that, it ended this way.

Quote
Template Parse Error!
There was a problem loading the /Themes/black22_11rc2/BoardIndex.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: parse error, unexpected T_STRING in .../Themes/black22_11rc2/BoardIndex.template.php on line 435

426:
427:         echo '
428:                                 <br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
429:                                 <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
430:                         </span>
431:                 </td>
432:         </tr>';
433:
434:

435:                      ', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')

436:                   </span>
437:                </td>
438:             </tr>';
439: ]]></search>

I did it with the Code that was written at page 23 of this Thread.

Quote from: akulion on May 15, 2006, 01:05:45 PM
Quote from: scottws on May 14, 2006, 09:40:50 AM
Quote from: akulion on May 11, 2006, 11:47:05 PM
For users of 1.1RC2

I have a hell of a lot of themes installed on my forum and the easiest way to modify the boardindex.template.php file is to simply look for this line:

// If they are logged in, but SP1 style information is off... show a personal message bar.

it occurs in all the themes --- just place the code above it

it works A-OK
"Just place the code..."  What code are you referring to?  Beemer's code?

The code I am referring to is this:




', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
]]></search>
<add><![CDATA[
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today_title'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], ' ', $txt['uot_users_online_today_title'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';

echo '
<div class="smalltext">';

echo $context['num_users_online_today'], ' ', $context['num_users_online_today'] == 1 ? $txt['uot_user_online_today'] : $txt['uot_users_online_today'];

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

echo '
<br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</div>
</td>
</tr>';





Important Always remember to make a back-up of your original file before any modifications are made - that way EVEN if something goes wrong you dont have to worry because you can upload the old file and everything will be back to normal :)



perplexed

Quote from: cotdagoo on June 03, 2006, 03:05:44 PM
Quote from: Bigguy on June 03, 2006, 11:53:43 AM
You might see them online but I think all there viewing is a "You are banned" message.

Indeed.. however it's still somewhat confusing to regular members who don't have access to viewing error logs to see that it's just a ban message. I've litterally gotten about 10-15 PMs from people asking why banned names still show up (just in the past 2 days)

Is there not any way to filter banned users out of the list, much like the hidden users are? Seems kinda silly to include users that are banned in the list.. perhaps that's just my personal prefrence though.

cheers
you could always ban users from your entire .com via cpanel :)

perplexed

I'm not sure where we are with this but can someone explain this to me:


Users Online
Users Online    0 Guests, 1 User
Users active in past 15 minutes:
Perplexed
Most Online Today: 15. Most Online Ever: 85 (December 20, 2005, 05:43:09 AM)


Users Seen Today <----- the users online today mod
Users Online Users Seen Today    
26 users seen today:
*names removed*

If 26 users were seen today then why does it show most online today as 15. 

This is confusing

cotdagoo

@perplexed - yes.. I have resorted to banning the static IP from cpanel, but when a user changes their IP, it just creates more work.

regarding the users online today thing.. the "Most online today" refers the most people online at one time (default is within 15min) - so you had 26 users log in throughout the day, but 15 was the number of users online at the same time.

tinhyeuon

sorry!
I want hack it into my forum 1.0.7.
SO can i hack it ok?

Carceri

Quote from: tinhyeuon on June 11, 2006, 02:00:35 PM
sorry!
I want hack it into my forum 1.0.7.
SO can i hack it ok?

That depends on your skills :) I am sure it isn't too difficult to make it work with 1.0.7, but it doesn't out of the box

L.G.S

Sorry if this has been asked, but how do I let the mod show for guests instead of just the number of people who came on?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


tapirul

#372
regarding seeing users that are hidden on the "users online today," I don't think the problem is totally solved by changing the italics and not-showing-the-time-on-hover. It's very easy to figure out "who is the user that is hidden and connected right now". Let me tell you how:
- you see on "users online", say, "3 users online, (1 hidden)"
- on the list "users online today", the first three users shown are exactly the users online at the moment. Well, you just saw who's the "hidden" one (those unhidden appear on both list).
My point is that, by showing all users "online today" (includding those hidden), this mod actually cancels user's choice to post hidden.
It's a great mod though, and I wouldn't want to quit it. Is there any way to fix it by showing, to regular users, ONLY the users that are not hidden (on the "users onlyne today" list)? OR, another way would be to randomize the list on "online today" so the users connected at a moment do not appear first on the list. Alphabetic order maybe? In this case it would be impossible to do the trick I described.

PS sorry if the issue has been discussed further, I've read this topic only 'till page 5 or so - lack of free time...

It would be, also, wonderful if there were some settings in the admin panel you could control (turning int on or of for example, or giving permissions to see the list to specific groups). I understand that this takes a lot of codind, I am just dreaming :)

Carceri

#373
Quote from: tapirul on June 18, 2006, 01:18:09 PM
My point is that, by showing all users "online today" (includding those hidden), this mod actually cancels user's choice to post hidden.

The behaviour you want, is exactly how 1.4.0 Beta 2 handles things. Hidden users are not shown on the list to regular users, only admins.

Carceri

#374
Quote from: L.G.S on June 18, 2006, 06:34:03 AM
Sorry if this has been asked, but how do I let the mod show for guests instead of just the number of people who came on?

You modify the source code :) Look in BoardIndex.template.php for $context['user']['is_guest']. It occurs twice in the file.

I would really like to add a control panel at some point where you could change some options, since it is impossible to satisfy everyone this the same set of options. The problem is, as you all know, the lack of time.

tapirul

#375
thanks ceceri. I am still using 1.3.0 (afraid of betas..:))...
Anyway, I found a way around the issue I mentioned above. All credits go to Ştefan Tălpălaru, actually.
To show Users online today in alphabetical order rather than login time, you have to do some minor modifications in the BoardIndex.php file (Sources folder), as follows:
Delete "$row['lastLogin'] . " from here

$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
'id' => $row['ID_MEMBER'],
'username' => $row['memberName'],
'name' => $row['realName'],
'group' => $row['ID_GROUP'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => $link,
'is_buddy' => $is_buddy,
'hidden' => empty($row['showOnline']),
);

$context['list_users_online_today'][$row['lastLogin'] . $row['memberName']] = (empty($row['showOnline']) && allowedTo('moderate_forum')) ? '<i>' . $link . '</i>' : $link;


so it will look like

$context['users_online_today'][$row['memberName']] = array(
'id' => $row['ID_MEMBER'],
'username' => $row['memberName'],
'name' => $row['realName'],
'group' => $row['ID_GROUP'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => $link,
'is_buddy' => $is_buddy,
'hidden' => empty($row['showOnline']),
);

$context['list_users_online_today'][$row['memberName']] = (empty($row['showOnline']) && allowedTo('moderate_forum')) ? '<i>' . $link . '</i>' : $link;


and change "krsort" with "ksort"
  mysql_free_result($result);

   krsort($context['users_online_today']);
   krsort($context['list_users_online_today']);


Remeber, in ASCII capital letters come before small letters (I didn't know..), so all usernames starting with a capital letter will come first.
This works great if  you want your users to be able to see who was online today (regardless hidden/unhidden), without figuring out who's online at the moment


Carceri

Quote from: tapirul on June 19, 2006, 11:11:46 AM
thanks ceceri. I am still using 1.3.0 (afraid of betas..:))...
Anyway, I found a way around the issue I mentioned above. All credits go to Ştefan Tălpălaru, actually.

Well, I posted a similar solution somewhere in this thread when someone wanted the list sorted by usernames instead of last logged in :)

By the way... I actually think that 1.4.0 beta 2 has less bugs than 1.3.0 as it has been around for a long time without any problems. It would have been called 1.4.0 final when SMF 1.1 was released as final, but that seems to take a long time.

tapirul

 :)
I didn't have the patience to read 25 pages.. :P
Is there any way I can upgrade to 1.4, or I have to uninstall first?

Carceri

You need to uninstall the old version first. Somewhere in these 26 pages are descriptions of bad things that can happen if you just install it op top of an old version :)

tapirul

okay, i'l read an uninstall

Advertisement: