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



efish

#502
Hey. My site uses 1.1.1 and we installed the mod but we are using a custom theme (Mercury), so can someone please tell us how to edit the file, etc.... to get the mod running on our site? Thanks for this, it looks great...excited to add it to my site!

Webrunner

Quote from: mcalan2001 on December 13, 2006, 02:39:52 PM
Quote from: akabugeyes on September 24, 2006, 10:57:01 AM
It is not random. It is by the time they last logged in.
This is untested, but you can try changing in Sources/BoardIndex.php

$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(

to

$context['users_online_today'][$row['memberName']] = array(

I think that needs to be much the same edit, but about ten lines down. However I'm no expert and it put the members in reverse alphabetic order. I couldn't see why. So I'll leave it to somebody who knows what they are doing. Please.  :D

Find:

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


change into:

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


and the reverse sorting is over ;)
There is a difference between knowing the path and walking the path.

=========================================
Vrouwen Power! | Sprintweb: No nonsense e-Business consultancy

mariz26

Im using RC 3 1.1 here in my forum hxxp:www.monetaryjournal.com [nonactive]
I have downloaded twice this mod and yet its giving a test failed on 2 files so I didn't continue to install.  Please help

veldfire

I am using a few other mods as well and am running into an issue as these two parts are duplicated but not identical

Other Mod:
// 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']);

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


Users Online Today Mod:
// 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['user']['is_guest'])
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>';


Any idea how I can rectify this ?

TIA,
Veldfire

njoker555

well im trying to get this working with aa new damage by m3talc0re, and what do i have to edit to fix this?  http://www.gamers-forum.com is the link, and i cant read through 34 pages of posts to find out, i have no time for that right now :(
Gamers Forum << PR3 forum WebZ Junk Blog << PR3 Blog ZenPix Blog

nitins60

Quote from: nitins60 on December 18, 2006, 06:41:02 PM
can you add a feature of displaying small icon next to username? That icon refers to the browser they used. It's already available in vB. So can you add it as an extra option. It looks cool with small browser icons!

Lord_Haart

I've installed this mod and works fine on default Theme with version 1.1.1, but I want it works with dilbermc Theme... how can I make it if dilbermc doesn't have a stats.template.php file??

Thanks ;)

kriskd

Quote from: Lord_Haart on December 30, 2006, 08:02:17 AM
I've installed this mod and works fine on default Theme with version 1.1.1, but I want it works with dilbermc Theme... how can I make it if dilbermc doesn't have a stats.template.php file??

Thanks ;)

I don't have a stats.template.php file with my custom template (basically the classic template) and it works fine.  As far as I understand, you only need to edit what theme files you have for your custom theme.  In my case, that was only BoardIndex.template.php.
SMF 2.0.2

Carceri

Quote from: nitins60 on December 29, 2006, 11:30:47 PM
can you add a feature of displaying small icon next to username? That icon refers to the browser they used. It's already available in vB. So can you add it as an extra option. It looks cool with small browser icons!

I haven't seen it in vB, but it sounds like it will just clutter the user interface. I like things simple, and I also like to have the list looking exactly like the "currenly online" users list.

njoker555

how do i make this to show on a custom template?  is there a read me for it so i can maybe configure the template files or something?
Gamers Forum << PR3 forum WebZ Junk Blog << PR3 Blog ZenPix Blog

Gobo

AFTER you install the mod using package manager

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





// 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>';




IF required then in Modifications.english.php right before the ?> place this code:



$txt['uot_users_online_today_title']='Users Seen Today';
$txt['uot_user_online_today']='user seen today';
$txt['uot_users_online_today']='users seen today';
$txt['uot_total_users_online_today']='Users Seen Today';
$txt['uot_yesterday']='Yesterday at ';


nitins60

Quote from: Carceri on December 30, 2006, 08:18:29 AM
Quote from: nitins60 on December 29, 2006, 11:30:47 PM
can you add a feature of displaying small icon next to username? That icon refers to the browser they used. It's already available in vB. So can you add it as an extra option. It looks cool with small browser icons!

I haven't seen it in vB, but it sounds like it will just clutter the user interface. I like things simple, and I also like to have the list looking exactly like the "currenly online" users list.
it's not the basic feature! But a mod is available, many of them are using! Looks pretty good!
www.danya-mobile.com
you can see it, but it's non english site!

Gobo

well it may look good bur remember one thing - each extra icon, each extra line added is more queries for ur server.

Scripts which display a lot of things may 'look good' but they are usually very hard on the server

nitins60

Atleast for ppl who are online, it's not gonna kill server! I always want to see the browsers ppl use mostly!

nitins60

Atleast for ppl who are online, it's not gonna kill server! I always want to see the browsers ppl use mostly!

Gobo

try the k-description mod it shows the browsers on peoples posts

also u can use the custom who.template (posted somewhere around) which shows peoples browsers

Dejan

Is it possible to show a number of visitors online today, and not just number of users?


Webby

I saw there was a spider (Google bot) online on my board just now, but could these spiders / bots also be counted so you can see someting like :

total: 5 (Visible: 3, Hidden: 0, Spiders: 2)

Or something like that ??

Advertisement: