Users Online Today Mod

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

Previous topic - Next topic

Carceri

Quote from: Spoogs on July 02, 2011, 02:23:14 AM
Version 2.0RC1 of this mod duplicates the group key on the board index... not sure if this was intended.

It was intended, but since my test forum has one user and no groups I have never seen what it looks like. I'll remove it if it looks weird, which it probably does.

Actually I think it has been like this since the very first version of this mod :)

Carceri

Oh and by the way...

There is a much better chance of getting a bug fixed by contacting me directly (e.g. by PM) than by posting it here, where I might not notice it among all the other posts.

Inti31

Included the German language files - thx, works fine
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

DasVON

I want to make a person or group not to be seen in the Users Online Today MOD at all ( I tried the invisible option)

Reason: I am using the Auto Respond Mod and I made a member called PR Bot I don't want him showing in the Group Key in the Users Online Today MOD


Can this be Done ?

khamseen

Quote from: DasVON on July 05, 2011, 10:38:17 PM
I want to make a person or group not to be seen in the Users Online Today MOD at all ( I tried the invisible option)

Reason: I am using the Auto Respond Mod and I made a member called PR Bot I don't want him showing in the Group Key in the Users Online Today MOD


Can this be Done ?

If it's set up to be a member account, you could always just set it's profile to hide online status.
"In hope we find despair and in despair we find truth." - Myself

live627

That hides a member from the online list, maybe not this mod. Certainly won't hide a membergroup from the key, either.

khamseen

Quote from: live627 on July 06, 2011, 08:06:35 PM
That hides a member from the online list, maybe not this mod. Certainly won't hide a membergroup from the key, either.

To hide a membergroup from the key, you just set it's visibility to either invisible or "visible- except in group key"... A member hiding their online status should only be visible to admins in the online list or in the users online today list too.
"In hope we find despair and in despair we find truth." - Myself

hcfwesker

#1707
That information isn't for this MOD, that's a built in feature for SMF2

But, I'll share the edits, but a staff member may split & move theses posts elsewhere.


Under  Themes/YOUR THEME/BoardIndex.template.php


Find

// "Users online" - in order of activity.
echo '
<div class="title_barIC" style="margin-top: -6px;">
<h4 class="catbg">
<span class="ie6_header floatleft">
<div class="floatleft" style="margin-top: 5px; width: 16px;">', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '</div><div class="floatleft" style="margin-left: 6px;">
', $txt['online_users'], '</div><br class="clear" />
</span>
</h4>
</div>
<p class="windowbg inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];

if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';

echo $context['show_who'] ? '</a>' : '', '
</p>
<p class="windowbg inline smalltext">';

// 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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);

// Showing membergroups?


      
Replace with

// "Users online" - in order of activity.
echo '
<div class="title_barIC" style="margin-top: -6px;">
<h4 class="catbg">
<span class="ie6_header floatleft">
<div class="floatleft" style="margin-top: 5px; width: 16px;">', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '</div><div class="floatleft" style="margin-left: 6px;">
', $txt['online_users'], '</div><br class="clear" />
</span>
</h4>
</div>

<p class="windowbg inline smalltext">';

// 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 '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':  ', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];

if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';

echo $context['show_who'] ? '</a>': '', '<br />', implode(', ', $context['list_users_online']);

// Showing membergroups?



It's what you asked for, if not, then you can just revrrt the changes made.  It will appear as below ...

Users active in past 30 minutes:  1,231 Guests, 73 Users (5 Hidden)


Quote from: Kaitlyn on July 07, 2011, 04:48:32 AM
also wondering is it possible to completely remove (Visible: 0, Hidden: 0)

For your second question, in the SAME exact file as listed above.

Find
echo
$txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';

if ($context['viewing_allowed'])
echo
' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_users_hidden_today']), ', ', $txt['uot_hidden'], ': ', $context['num_users_hidden_today'], ')';



Replace with

echo
$txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';


Inti31

#1708
ups... I deinstalled the previous version (RC1) and installed the new version - it works but the forum layout (not the portal) become corrupt.... (see my testforum)


it is just the forum page - when I click on administrate, moderate, gallery or the contact page the layout looks fine again..

Addition:
strange - in Firefox the layout looks better than IE - IE7 /IE9 look worse.
Firefox makes the size bigger of all topics

Addition1: I removed RC3 - now it looks fine again...
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

luuuciano

#1709
Quote from: Inti31 on July 12, 2011, 08:39:58 AM
Firefox makes the size bigger of all topics

That behavior is happening to me too... any idea about how to resolve it?
It looks too uggly that way... maybe its an unclosed tag or something?
I can not find anything in the code... neither looking at the parse... :(

edit: something is adding an string that shows before the DOCTYPE... where is generated that? it is affecting the mod admin section too... that is why the looks gets mad I guess

btw, here Im attaching spanish language files
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Carceri

Quote from: luuuciano on July 15, 2011, 01:36:45 PM
edit: something is adding an string that shows before the DOCTYPE... where is generated that? it is affecting the mod admin section too... that is why the looks gets mad I guess

Could you post that string here?

luuuciano

#1711
Quote from: Carceri on July 15, 2011, 04:54:58 PM
Quote from: luuuciano on July 15, 2011, 01:36:45 PM
edit: something is adding an string that shows before the DOCTYPE... where is generated that? it is affecting the mod admin section too... that is why the looks gets mad I guess

Could you post that string here?

Well, in this windows machine I have no properly way to do it, I can not "see it", etc (I guess), but you can see it here: http://cba.b.ikes.com.ar/
(until its fixed heheh)
The w3c validator reports a utf BOM there (but it do not looks like it....)... and I can not find where it is generated...

I think that because that string the browser go to quirksmode

I have checked the modified files, new files, erased spaces after ?>, no BOM found... (anyway, Ill check it at my linux box later...)

btw, what is for the xslt directory? it is needed/used?
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Carceri

Quote from: luuuciano on July 16, 2011, 02:52:17 PMbtw, what is for the xslt directory? it is needed/used?

It's used (or at least was at some point) for helping applying the mod to unsupported themes.

Regarding the issue, I am unable to reproduce it on my installation.

BTC

All I can say is: great mod!!! :D

I attached a dutch language file.
Doorzetten is de sleutel tot succes!!!

live627

QuoteIt's used (or at least was at some point) for helping applying the mod to unsupported themes.
XML style sheets don't do that.

Individul

Quote from: luuuciano on July 15, 2011, 01:36:45 PM
Quote from: Inti31 on July 12, 2011, 08:39:58 AM
Firefox makes the size bigger of all topics

That behavior is happening to me too... any idea about how to resolve it?
It looks too uggly that way... maybe its an unclosed tag or something?
I can not find anything in the code... neither looking at the parse... :(

edit: something is adding an string that shows before the DOCTYPE... where is generated that? it is affecting the mod admin section too... that is why the looks gets mad I guess

btw, here Im attaching spanish language files


Well ist a great mod, but this problem make me to uninstall him.

If anybody find a solution for this problem, pls report here.

luuuciano

#1716
Quote from: Individul on July 20, 2011, 12:29:03 PM
Well ist a great mod, but this problem make me to uninstall him.
If anybody find a solution for this problem, pls report here.

Its something odd... I have installed it in a test curve forum 2.0 and did not happened... no idea whats happening

Ok, I asked a way to find this stuff, and SlammedDime pointed me to file_check: http://www.simplemachines.org/community/index.php?topic=329069.0
So...

I have changed it in each file to utf8 without BOM, then uploaded, and all works great! :)
FC is reporting this:
/Themes/default/languages/UsersOnlineToday.english-utf8.php
    UTF-8 BOM found
/Themes/default/languages/UsersOnlineToday.spanish_latin-utf8.php
    UTF-8 BOM found
/Themes/default/languages/Modifications.spanish_latin-utf8.php
    UTF-8 BOM found

Im checking the files...

Carceri, it looks like all your *.utf8 files have a BOM beggining (the ones I uploaded a few days ago too, lol)
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Carceri

Quote from: luuuciano on July 20, 2011, 01:26:28 PM
Carceri, it looks like all your *.utf8 files have a BOM beggining

Thanks for troubleshooting this issue! They should now be removed in RC4.

Raffoz

thanks for the mod

could be possible to sort the users by using their display name and not their username?
MacOsX (last)
SMF 2.0.15 and 2.1.2 (different forums)
Chrome (last) or Safari (last)

Martine M

I'm running SMF 2.0 and have Users online today 1.6.0 installed
I just installed the Bloc's theme Argentum enhanced on my life forum today.
Now I see the Mod Users Online today doesn't show anymore. although setting screen is still in admin panel
And I really want that mod back.
can someone help me out here please

I tried removing it so I could try and install again but it gave errors for removing so I didn't.
I tried installing it manually but can't find in the boardindex.template.php

And I don't know if I have to do anything els.

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

were before I have to put this

// Users Online Today
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $txt['uot_users_online_'.$modSettings['uot_setting_period']], '
</span>
</h4>
</div>
<p class="inline smalltext">';
echo
$txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';

if ($context['viewing_allowed'])
echo
' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_users_hidden_today']), ', ', $txt['uot_hidden'], ': ', $context['num_users_hidden_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']) && $context['viewing_allowed'])
{
echo
'<br />', implode(', ', $context['list_users_online_today']);
}
echo '
</p>';



Running SMF 2.09 - Diego Andrés Theme Elegant Mind - TP 1.0 - Main Forum language English - Browser Firefox 33


Advertisement: