$context['users_online_today'] = array();
$context['list_users_online_today'] = array();
$context['num_buddies'] = array();
Quote from: thetzfreak on November 06, 2005, 09:55:34 PMIf you have a file called 'BoardIndex.template.php' in your theme dir, then you need to edit it manually. This mod only edits it for the default theme.
Do I have to do the custom editing thing for my theme even after you updated it now?
$context['list_users_online_today'][$row['lastLogin'] . $row['memberName']] = empty($row['showOnline']) ? ' <i>' . $link . ' </i>' : $link;
and removed the <i> tags to normalize the font.
Quote from: Carceri on November 07, 2005, 05:04:30 PM
My confusion comes from your answer to my comment where I said that I needed to investigate this, because from looking at the code my first impression is that everything works as it should, and I understood that you said that I should't look at the code because everything works ok. Now I understand again :)
While removing the <i> might work, I don't think this is the correct fix. Something else is wrong here, and I am hesistant to make a fix before I really understand what I am fixing :)
Quote from: Tippmaster on November 07, 2005, 05:06:07 PMNot really, because the usernames should be in italic to the administrators and hidden from everyone else. Also the same code hides the users from non-administrators in the current online list, but shows them to everyone in the online today list.
since the problem is that their names are italicised, then removeing <i></i> will work..it's like the only fix.
Quote from: Libo on November 07, 2005, 07:19:30 PMIt's on my TODO list :)
I have a question. All the last on times are the normal forum time. COuld you make it so it adjusts to each person's local time?
Quote from: 1948Pal on November 07, 2005, 10:39:11 PMI wouldn't know. I just converted my forum from phpBB and was missing this feature, and since I couldn't find a mod like this I made one myself.
This is a nice mod, but isn't this exactly the same mod made by FaSan, I think, who's mod was removed from SMF for some reason?
Quote from: Libo on November 08, 2005, 11:38:38 AMThe original didn't that's true, but with the new version, when I change my timeoffset from 0 to, say -1, then the online times are all shown as being one hour earlier than forum time. So to answer your last line, yes I did it and it does work :)
There is a problem. You see. It doesn't use the forum time. even the original version doesn't use the forum time...
It is 3 hours behind my forum time..
You can test by going to profile and changing your default time to something and see if it works.
Quote from: Hachi on November 08, 2005, 03:27:58 PMI'm sorry I can't help you there, since your BoardIndex.php is apparently not the same as a patched one from the original version of SMF 1.1 RC1. Line 271 in BoardIndex.php should be a comment added by my mod, and nothing related to in_array(). Are you sure you are patching an unmodified version of BoardIndex.php?
2: in_array(): Wrong datatype for second argument
File: /home/fearncou/public_html/forum/Sources/BoardIndex.php
Line: 271
Quote from: 1948Pal on November 07, 2005, 10:39:11 PMfasan took his mod off the list
This is a nice mod, but isn't this exactly the same mod made by FaSan, I think, who's mod was removed from SMF for some reason?
Quote from: galgoz on November 09, 2005, 06:14:54 PMCould you sent me your entire BoardIndex.php file? Line 271 in my patched file is not this line, so I need to check what the differences between our files are in order to see what is wrong.
$is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
$is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
if ($is_buddy)
{
$link = '<b>' . $link . '</b>';
}
'is_buddy' => $is_buddy,
Quote from: 1948Pal on November 07, 2005, 10:39:11 PM
This is a nice mod, but isn't this exactly the same mod made by FaSan, I think, who's mod was removed from SMF for some reason?
Quote from: electrohome88 on November 11, 2005, 03:40:16 PMSure, the question is how to do it. All the other stats that relate to 'today' are using as today, the forum time and does not take into account the other users' timezones, so I guess that this "most online users today" should do the same, otherwise it will be confusing, right?
think you could make it possible for this to appear on the [stats] page as "most online users today" ?
$frag = explode('-', strftime('%Y-%m-%d', forum_time(false)));
$midnight = mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]);
$frag = explode('-', strftime('%Y-%m-%d', time()));
$midnight = forum_time(false, mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]));
Quote from: Carceri on November 15, 2005, 01:58:09 AM
Libo: Have you copied BoardIndex.template.php and Stats.template.php from the default theme to your custom theme or modified your themefiles accordingly?
jonc: Thans for the info (finally someone provided a concrete example where it doesn't work). Still I would like to know what doesn't work. What does the time show and what should it show. If you click the username, what does "Last Active:" say?
Quote from: jonc on November 16, 2005, 12:14:13 AMOkay, so we try again. I only have a few minutes now, so this is just an idea, but it can't work any worse than it already does :)
Sorry bout my last post, it's working this morning but since 13:00 local time (GMT+8) it doesn't work. Nothing shows up!
Quote from: Juggler on November 16, 2005, 05:21:41 AMIt is back in the latest RC version as "Total Users Online Today"
Have to agree it's a nice mod but I really would like the "Stats Centre" Users Online Today column back. It's more of a cosmetic thing and not vital to the mod but it would be nice to have it in there if at all possible!
Quote from: Libo on November 16, 2005, 04:46:44 PMThen help me fix it by giving me useful information :) For example, does the suggested fix above work? It works for me and I have done some limited testing by changing the forum timezone and it seems to work. That said, I made this for myself and later thought that others might be able to use it which is the reason I added it here. Unfortunately I don't have much time to do a thorough test, sorry.
fix the forum time difference between server time. in next version plz
Quote from: Carceri on November 16, 2005, 06:10:33 PM
I don't know what "used to have" means. I have never seen that feature before. It is probably related to another users online today mod, but I have never seen that one, so...
Quote from: Libo on November 17, 2005, 06:00:40 PMStill doesn't work... LIke, i changed my forum time and everything. It didn't work...You need to be more specific. I find it hard to believe that the time on the popup is different from the "Last Active" on a users profile, since the mod uses the exact same code to display the time. If that is not the problem, then what is. Has you changed the forum time offset, user time offset, does this happen to all users, what if you are not logged in, what does the forum time says compared to the time on the server itself?, etc...
Quote from: jonc on November 17, 2005, 08:54:30 PMI watched your forum as midnight passed (your time) and it started a new day after that as it should. I have also experimented more with timezones with a negative offset here, and it seems to work fine as well.
It's almost 24hrs since I installed RC3, everything's running smoothly! I can say that timezone has been fixed! Mod has been working for the last 23h24m. On mouseover, It popups the "last online" time of the user w/ correct time offsetting.
Quote from: Carceri on November 18, 2005, 02:12:34 AMQuote from: Libo on November 17, 2005, 06:00:40 PMStill doesn't work... LIke, i changed my forum time and everything. It didn't work...You need to be more specific. I find it hard to believe that the time on the popup is different from the "Last Active" on a users profile, since the mod uses the exact same code to display the time. If that is not the problem, then what is. Has you changed the forum time offset, user time offset, does this happen to all users, what if you are not logged in, what does the forum time says compared to the time on the server itself?, etc...
QuoteAlso that you are patching the files that are actually served by the webserver.
Quote from: Libo on November 18, 2005, 11:49:05 AMIf you have multiple forums, then that you are patching the right one :) Yes, a longshot, but the behaviour you are experiencing are not consistent with 1.3.0 RC3.QuoteAlso that you are patching the files that are actually served by the webserver.What does that mean?
Quote from: Libo on November 18, 2005, 02:57:50 PM
very long shot. I only have one forum...
Ah, i see. it was because I had multiple edits. I must have had one from 1.0 and frogot to uninstall.
It works perfectly now...
Only question when is stats center gonna be working?
Quote from: Libo on November 18, 2005, 02:57:50 PMOne short answer: I don't know :) Right now things are working and the added functionality to the stats center is a feature for a future release. I have looked at it briefly and it doesn't seem to be that hard to implement, but it will require changes to the database. When I have some time to do it, I will do it, but I can't promise a date.
Only question when is stats center gonna be working?
Quote// Load the users online today.
$nowdate = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $nowdate['mon'], $nowdate['mday'], $nowdate['year']) - ($modSettings['time_offset'] * 3600);
$s = strpos($user_info['time_format'], '%S') === false ? '' : ':%S';
if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false)
$time_fmt = '%I:%M' . $s . ' %p';
else
$time_fmt = '%H:%M' . $s;
$result = db_query("
SELECT
mem.ID_MEMBER, mem.lastLogin, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.groupName
FROM {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) WHERE mem.lastLogin >= $midnight", __FILE__, __LINE__);
$context['users_online_today'] = array();
$context['list_users_online_today'] = array();
while ($row = mysql_fetch_assoc($result))
{
$userday = strftime('%d', forum_time(true));
$loginday = strftime('%d', forum_time(true, $row['lastLogin']));
$yesterday = $userday == $loginday ? '' : $txt['uot_yesterday'];
$lastLogin = $yesterday . strftime($time_fmt, forum_time(true, $row['lastLogin']));
$title = (allowedTo('moderate_forum') || !empty($row['showOnline'])) ? ' title="' . $lastLogin . '"' : '';
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = ' $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')) ? '' . $link . '' : $link;
}
mysql_free_result($result);
krsort($context['users_online_today']);
krsort($context['list_users_online_today']);
$context['num_users_online_today'] = count($context['users_online_today']);
// Load the users online today.
$frag = explode('-', strftime('%Y-%m-%d', time()));
$midnight = forum_time(false, mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]));
$s = strpos($user_info['time_format'], '%S') === false ? '' : ':%S';
if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false)
$time_fmt = '%I:%M' . $s . ' %p';
else
$time_fmt = '%H:%M' . $s;
$result = db_query("
SELECT
mem.ID_MEMBER, mem.lastLogin, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.groupName
FROM {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) WHERE mem.lastLogin >= $midnight", __FILE__, __LINE__);
$context['users_online_today'] = array();
$context['list_users_online_today'] = array();
while ($row = mysql_fetch_assoc($result))
{
$lastLogin = strftime($time_fmt, forum_time(true, $row['lastLogin']));
$title = (allowedTo('moderate_forum') || !empty($row['showOnline'])) ? ' title="' . $lastLogin . '"' : '';
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = ' $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')) ? '' . $link . '' : $link;
}
mysql_free_result($result);
krsort($context['users_online_today']);
krsort($context['list_users_online_today']);
$context['num_users_online_today'] = count($context['users_online_today']);
// Load the users online right now.
$result = db_query("
SELECT
lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.groupName
FROM {$db_prefix}log_online AS lo
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__);
$context['users_online'] = array();
$context['list_users_online'] = array();
$context['online_groups'] = array();
$context['num_guests'] = 0;
$context['num_buddies'] = 0;
$context['num_users_hidden'] = 0;
$context['show_buddies'] = !empty($user_info['buddies']);
while ($row = mysql_fetch_assoc($result))
{
if (empty($row['realName']))
{
$context['num_guests']++;
continue;
}
elseif (empty($row['showOnline']) && !allowedTo('moderate_forum'))
{
$context['num_users_hidden']++;
continue;
}
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '' . $row['realName'] . '';
else
$link = '' . $row['realName'] . '';
$is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
if ($is_buddy)
{
$context['num_buddies']++;
$link = '' . $link . '';
}
$context['users_online'][$row['logTime'] . $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'][$row['logTime'] . $row['memberName']] = empty($row['showOnline']) ? '' . $link . '' : $link;
if (!isset($context['online_groups'][$row['ID_GROUP']]))
$context['online_groups'][$row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => $row['groupName'],
'color' => $row['onlineColor']
);
}
mysql_free_result($result);
krsort($context['users_online']);
krsort($context['list_users_online']);
ksort($context['online_groups']);
$context['num_users_online'] = count($context['users_online']) + $context['num_users_hidden'];
Quote from: Juggler on November 19, 2005, 06:54:57 AM
OK, managed to access the file via my cpanel so here's all the Online Today stuff from it :-
Quote from: Jorg40 on November 19, 2005, 11:01:48 AMApparently something has changed BoardIndex.template.php and my mod is only tested agains the original file. You can probably still apply the mod manually.
I have a small problem
"2. Execute Modification ./Themes/default/BoardIndex.template.php Failure"
What is the cause to this? I'm using a skin, can that be the problem?
Quote from: Jorg40 on November 19, 2005, 01:59:15 PMhttp://www.simplemachines.org/community/index.php?topic=34526.0
How to install it manually?
Quote from: Jorg40 on November 19, 2005, 01:59:15 PMThis mod does not support SMF 1.0.5
I use SMF 1.0.5
Quote from: Jorg40 on November 19, 2005, 03:57:52 PMIt is written on the download page for the mod... 1.1 RC1
What version does it support then?
Quote from: Jorg40 on November 19, 2005, 04:51:03 PMYou can change the file section of the mod, but I would suggest to install it manually as it might not even work on some themes.
How does I change the path of the install to anther skin?
Or do I have to install it manually then?
Quote from: Carceri on November 19, 2005, 12:05:03 PMQuote from: Juggler on November 19, 2005, 06:54:57 AM
OK, managed to access the file via my cpanel so here's all the Online Today stuff from it :-
You have both the old and the new version installed.
Quote from: FaSan on November 28, 2005, 03:12:19 AMThanks :P I had no idea that you had done a similar mod. I got the idea from http://www.phpbb.com/phpBB/viewtopic.php?t=253650 and looked here but found nothing of that sort.
Great Mod ! and Great idea :P :P :P
Quote from: Carceri on November 28, 2005, 05:02:33 AMQuote from: FaSan on November 28, 2005, 03:12:19 AMThanks :P I had no idea that you had done a similar mod. I got the idea from http://www.phpbb.com/phpBB/viewtopic.php?t=253650 and looked here but found nothing of that sort.
Great Mod ! and Great idea :P :P :P
Quote from: Carceri on November 28, 2005, 04:39:02 PM
I know it's a joke, but actually I am a little curious. Why did you delete your mod? It could have saved me the trouble of doing this myself :P
Quote from: diegolyanky on December 04, 2005, 03:27:27 PM
Good mod, but:
I installed, and I modified files of my theme helios_multi manually and doesn't work ...
I uninstalled old User Online Today mod ...
<input type="submit" value="', $txt[34], '" /&g
Quote from: Libo on December 04, 2005, 04:45:11 PM
Helios Multi premod doesn't work with rc1....
Quote from: Maycomb on December 11, 2005, 10:29:57 PM
This may sound stupid, but where do you install this to?
Quote from: electrohome88 on December 12, 2005, 11:40:20 AM
i would like to go about removing myself from the "Users Online Today" list. how would i go about doing this?
Quote from: The Outsider on December 12, 2005, 12:01:46 PM
Any idea when I try to install it with any skin other than default it re arranges my skin?
Quote from: Skipdawg on December 14, 2005, 07:45:09 PM
???
OK have gone through this thread twice and used the search too.
Is there a place to download this Mod for 1.0.5 that is a English language site. I get to the other mentioned here and get stuck for I can't read it. ::)
Quote from: ASi ve MAVi on December 28, 2005, 06:55:33 AM
my dear frıend,ı have opened a mod ın whıch you had.ıs ıt ok for you?
http://www.guzelforum.com/forum/index.php/board,70.0.html
sorry I don't english speak too
mysql_free_result($result_boards);
// Load the users online today.
$nowdate = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $nowdate['mon'], $nowdate['mday'], $nowdate['year']) - ($modSettings['time_offset'] * 3600);
$s = strpos($user_info['time_format'], '%S') === false ? '' : ':%S';
if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false)
$time_fmt = '%I:%M' . $s . ' %p';
else
$time_fmt = '%H:%M' . $s;
$result = db_query("
SELECT
mem.ID_MEMBER, mem.lastLogin, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.groupName
FROM {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) WHERE mem.lastLogin >= $midnight", __FILE__, __LINE__);
$context['users_online_today'] = array();
$context['list_users_online_today'] = array();
while ($row = mysql_fetch_assoc($result))
{
$userday = strftime('%d', forum_time(true));
$loginday = strftime('%d', forum_time(true, $row['lastLogin']));
$yesterday = $userday == $loginday ? '' : $txt['uot_yesterday'];
$lastLogin = $yesterday . strftime($time_fmt, forum_time(true, $row['lastLogin']));
$title = (allowedTo('moderate_forum') || !empty($row['showOnline'])) ? ' title="' . $lastLogin . '"' : '';
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '"' . $title . ' style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '"' . $title . '>' . $row['realName'] . '</a>';
$is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
if ($is_buddy)
{
$link = '<b>' . $link . '</b>';
}
$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;
}
mysql_free_result($result);
krsort($context['users_online_today']);
krsort($context['list_users_online_today']);
$context['num_users_online_today'] = count($context['users_online_today']);
$context['online_today'] = (int) $context['online_today'];
// Total members online today
$frag = explode('-', strftime('%Y-%m-%d', time()));
$midnight = forum_time(false, mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]));
$result = db_query("
SELECT
COUNT(*)
FROM {$db_prefix}members
WHERE lastLogin >= $midnight", __FILE__, __LINE__);
list ($context['total_users_online_today']) = mysql_fetch_row($result);
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</div>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="catbg" 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>';
<td nowrap="nowrap">', $txt['users_online_today'], ':</td>
<td align="right">', $context['online_today'], '</td>';
<td nowrap="nowrap">', $txt['users_online_today'], ':</td>
<td align="right">', $context['online_today'], '</td>
</tr><tr>
<td nowrap="nowrap">', $txt['uot_total_users_online_today'], ':</td>
<td align="right">', $context['total_users_online_today'], '</td>';
?>
$txt['uot_users_online_today_title']='Users Online Today';
$txt['uot_user_online_today']='user online today';
$txt['uot_users_online_today']='users online today';
$txt['uot_total_users_online_today']='Total Online Today';
$txt['uot_yesterday']='Yesterday at ';
Quote from: beemer on December 28, 2005, 04:31:07 PM
Stuart ?
Did you install the 1.05 version?
What are the errors you are getting?
Quote from: beemer on December 28, 2005, 04:46:34 PM
See if you can uninstall and try the versio in the link on my post 2 above?
Quote from: beemer on December 28, 2005, 05:12:28 PM
Stuart sorry (that was for someting else) doh
The latest version says for 1.1 rc1 I cant find an old copy maybe on my works pc?
What are the errors you get?
1. Voer aanpassing uit ./Sources/BoardIndex.php Succes
2. Voer aanpassing uit ./Sources/Stats.php Failed
3. Voer aanpassing uit ./Themes/default/BoardIndex.template.php Failed
4. Voer aanpassing uit ./Themes/default/Stats.template.php Failed
5. Voer aanpassing uit ./Themes/default/languages/Modifications.english.php Failed
6. Voer aanpassing uit ./Themes/default/languages/Stats.english.php Failed
2: in_array(): Wrong datatype for second argument
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Sources/BoardIndex.php
Regel: 274
8: Undefined index: buddies
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Sources/BoardIndex.php
Regel: 274
Quote from: RoarinRow on December 10, 2005, 06:11:44 PM
I finally got this to work on my forum SMF 1.0.5.
1. I downloaded the file from FaSan's website (Registration required to get to download section). After your register, you should logout, then log back in again to see the contents of the download section.
http://www.smitalia.net/community/index.php
2. Download and install OnLineUserToday_13_10.zip via Package Manager
3. Edit your 'BoardIndexTemplate' for your custom them.
I had to change the highlighted code from 'titlebg' to 'catgb' to go with my Techhead theme.
// "Users online Today"
if(isset($context['num_users_today']))
echo '
<tr>
<td class="catbg" colspan="2">', $txt['158bis'], ' ( ', $context['num_users_today'], ' ', $context['num_users_today'] == 1 ? $txt['user'] : $txt['users'], ' )</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['158bis'], '" border="0" /></td>
<td class="windowbg2" width="100%"><span class="smalltext">', $context['user_today'], '</span></td>
</tr>';
That's it. It put's the member's names in alphabetical order.
8: Undefined index: 158bis
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Themes/safblue105/BoardIndex.template.php (eval?)
Regel: 362
8: Undefined index: 158bis
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Themes/safblue105/BoardIndex.template.php (eval?)
Regel: 364
8: Undefined index: smf_stats_14bis
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Themes/default/languages/Stats.dutch.php (eval?)
Regel: 181
Quote from: RoarinRow on December 28, 2005, 06:24:02 PMQuote from: Stuart on December 28, 2005, 06:13:47 PMQuote from: RoarinRow on December 10, 2005, 06:11:44 PM
I finally got this to work on my forum SMF 1.0.5.
1. I downloaded the file from FaSan's website (Registration required to get to download section). After your register, you should logout, then log back in again to see the contents of the download section.
http://www.smitalia.net/community/index.php
2. Download and install OnLineUserToday_13_10.zip via Package Manager
3. Edit your 'BoardIndexTemplate' for your custom them.
I had to change the highlighted code from 'titlebg' to 'catgb' to go with my Techhead theme.
// "Users online Today"
if(isset($context['num_users_today']))
echo '
<tr>
<td class="catbg" colspan="2">', $txt['158bis'], ' ( ', $context['num_users_today'], ' ', $context['num_users_today'] == 1 ? $txt['user'] : $txt['users'], ' )</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['158bis'], '" border="0" /></td>
<td class="windowbg2" width="100%"><span class="smalltext">', $context['user_today'], '</span></td>
</tr>';
That's it. It put's the member's names in alphabetical order.
I tried all that but I'm getting these errors:Code Select8: Undefined index: 158bis
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Themes/safblue105/BoardIndex.template.php (eval?)
Regel: 362Code Select8: Undefined index: 158bis
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Themes/safblue105/BoardIndex.template.php (eval?)
Regel: 364
I have to put my account into English, otherwise it's not working and it looks like a mess when you view the stats page (if you're using the Dutch language) :'(
I have the file here - OnLineUserToday (http://www.avalanchestyle.com/forum/AVS/OnLineUserToday_13_10.zip)
I resolved those errors by going to my 'Modifications.english.php file' found at Themes/default/languages and adding this line:
//OnLine Users Today
$txt['158bis'] = 'Users Online Today';
$txt['smf_stats_14bis'] = 'Users Online Today';
Quote from: Stuart on December 28, 2005, 06:48:16 PMQuote from: RoarinRow on December 28, 2005, 06:24:02 PMQuote from: Stuart on December 28, 2005, 06:13:47 PMQuote from: RoarinRow on December 10, 2005, 06:11:44 PM
I finally got this to work on my forum SMF 1.0.5.
1. I downloaded the file from FaSan's website (Registration required to get to download section). After your register, you should logout, then log back in again to see the contents of the download section.
http://www.smitalia.net/community/index.php
2. Download and install OnLineUserToday_13_10.zip via Package Manager
3. Edit your 'BoardIndexTemplate' for your custom them.
I had to change the highlighted code from 'titlebg' to 'catgb' to go with my Techhead theme.
// "Users online Today"
if(isset($context['num_users_today']))
echo '
<tr>
<td class="catbg" colspan="2">', $txt['158bis'], ' ( ', $context['num_users_today'], ' ', $context['num_users_today'] == 1 ? $txt['user'] : $txt['users'], ' )</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['158bis'], '" border="0" /></td>
<td class="windowbg2" width="100%"><span class="smalltext">', $context['user_today'], '</span></td>
</tr>';
That's it. It put's the member's names in alphabetical order.
I tried all that but I'm getting these errors:Code Select8: Undefined index: 158bis
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Themes/safblue105/BoardIndex.template.php (eval?)
Regel: 362Code Select8: Undefined index: 158bis
Bestand: /data/members/paid/o/r/orisit.nl/htdocs/www/astmaforum/Themes/safblue105/BoardIndex.template.php (eval?)
Regel: 364
I have to put my account into English, otherwise it's not working and it looks like a mess when you view the stats page (if you're using the Dutch language) :'(
I resolved those errors by going to my 'Modifications.english.php file' found at Themes/default/languages and adding this line:
//OnLine Users Today
$txt['158bis'] = 'Users Online Today';
$txt['smf_stats_14bis'] = 'Users Online Today';
It worked, thanks for your help :D
Quote from: fresnolady on December 29, 2005, 02:28:02 AM
I have installed this and it is not showing up on my board. How do you activate it?
I have logged out and back in. Still not showing up.
Quote from: RoarinRow on December 29, 2005, 02:36:00 AMQuote from: fresnolady on December 29, 2005, 02:28:02 AM
I have installed this and it is not showing up on my board. How do you activate it?
I have logged out and back in. Still not showing up.
I used the edit to my custom BoardIndexTemplate.php as described above for my SMF v.1.0.5 forum. The mod should work for the Default theme, but anything else will require modification to your BoardIndexTemplate.php for your version of SMF.
Quote from: fresnolady on December 30, 2005, 12:27:53 AMQuote from: RoarinRow on December 29, 2005, 02:36:00 AMQuote from: fresnolady on December 29, 2005, 02:28:02 AM
I have installed this and it is not showing up on my board. How do you activate it?
I have logged out and back in. Still not showing up.
I used the edit to my custom BoardIndexTemplate.php as described above for my SMF v.1.0.5 forum. The mod should work for the Default theme, but anything else will require modification to your BoardIndexTemplate.php for your version of SMF.
I am using the Default theme :(
Quote from: RoarinRow on December 30, 2005, 12:46:19 AMQuote from: fresnolady on December 30, 2005, 12:27:53 AMQuote from: RoarinRow on December 29, 2005, 02:36:00 AMQuote from: fresnolady on December 29, 2005, 02:28:02 AM
I have installed this and it is not showing up on my board. How do you activate it?
I have logged out and back in. Still not showing up.
I used the edit to my custom BoardIndexTemplate.php as described above for my SMF v.1.0.5 forum. The mod should work for the Default theme, but anything else will require modification to your BoardIndexTemplate.php for your version of SMF.
I am using the Default theme :(
Is this in your 'boardindextemplate.php' file:
// "Users online Today"
if(isset($context['num_users_today']))
echo '
<tr>
<td class="catbg" colspan="2">', $txt['158bis'], ' ( ', $context['num_users_today'], ' ', $context['num_users_today'] == 1 ? $txt['user'] : $txt['users'], ' )</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['158bis'], '" border="0" /></td>
<td class="windowbg2" width="100%"><span class="smalltext">', $context['user_today'], '</span></td>
</tr>';
Quote$yesterday = $userday == $loginday ? '' : $txt['uot_yesterday'];
Quote from: badja on January 03, 2006, 07:20:08 PM
HI all..
I am Downloaded this mod.
I have installed SMF 1.0.5
How can I Install This Mod?
Please Reply someone, How I can install it.. Step By Step..
I am an Newbie :S
Quote from: Webster on January 05, 2006, 09:47:27 AM
My forum runs on 1.0.5 and this does not work, why?
The Paket Manager says installation ends with errors :(
Quote from: SpyDie on January 05, 2006, 09:56:11 AMQuote from: Webster on January 05, 2006, 09:47:27 AM
My forum runs on 1.0.5 and this does not work, why?
The Paket Manager says installation ends with errors :(
The Mod isn't supported on 1.0.5.
Quote from: RoarinRow on January 05, 2006, 01:21:58 PMThx! Work's fine :)
I got the v.1.0.5 version from this site - http://www.smitalia.net/community/index.php
It's called Online Users Today, instead of Users Online Today.
Quote from: Webster on January 05, 2006, 04:28:52 PMQuote from: RoarinRow on January 05, 2006, 01:21:58 PMThx! Work's fine :)
I got the v.1.0.5 version from this site - http://www.smitalia.net/community/index.php
It's called Online Users Today, instead of Users Online Today.
Quote from: RoarinRow on January 05, 2006, 04:32:37 PMQuote from: Webster on January 05, 2006, 04:28:52 PMQuote from: RoarinRow on January 05, 2006, 01:21:58 PMThx! Work's fine :)
I got the v.1.0.5 version from this site - http://www.smitalia.net/community/index.php
It's called Online Users Today, instead of Users Online Today.
Welcome! ;D
Quote from: Carceri on January 08, 2006, 08:05:41 PM
There is apparently another mod which does more or less the same thing, which does work on 1.0.5. Please don't confuse those two.
Quote from: dustrho on January 08, 2006, 09:11:27 PMQuote from: Carceri on January 08, 2006, 08:05:41 PM
There is apparently another mod which does more or less the same thing, which does work on 1.0.5. Please don't confuse those two.
So how about telling us what this OTHER one you're referring to is called? I could swear that the mod I'm referring to as being previously installed in my forum was Users Online Today.
Quote from: Gargoyle on January 08, 2006, 09:25:19 PMAre you using verion 1.3.1? 1.3.0 is for RC1 only?
I am getting an error when Installing on 1.1RC2....
3. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
Any suggestions ? I really like this MOD.. ;D
Quote from: Furvert on January 11, 2006, 11:46:15 PMAs said it sorts by last online, and it will continue to do so :)
But one thing I may add later is to sort the list of users as this one doesn't do that.
Unless it sorts by last online?
I prefer alpha for this.
Quote from: tolsta on January 14, 2006, 02:50:55 PM
Have a look at the Modifications.english.php file in the languages directory of the theme you are currently using and ensure it contains the following entries
$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 ';
0 Guests, 1 User Users active in past 15 minutes: member2 | |
----------------- end tr ---------------- | |
online.gif | Logged In Today: 3 member1, member2, member3 |
----------------- end tr ---------------- | |
Most Online Today: ... Most Online Ever: ... | |
----------------- end tr ---------------- |
Quote from: fivearts on January 20, 2006, 12:21:55 PM
Is it possible to include number of Guests? Like this...
Quote from: diegolyanky on January 21, 2006, 11:09:31 AM
Is not corrupted, try with Windows Extract or WinRar ...
Regards ;)
Quote from: Carceri on January 21, 2006, 06:16:16 AMQuote from: fivearts on January 20, 2006, 12:21:55 PM
Is it possible to include number of Guests? Like this...
Not really, since there is no way to uniquely identify a quest. I mean I can't differentiate between a guest that visits the forum several times a day, and several guest visiting once a day.
One might use the IP addresses of the guests for an approximation, though.
Quote from: kai920 on January 21, 2006, 11:40:22 AM
I'm using Winrar! and get "Unexepcted end of archive" ::)
Quote from: mistermad on January 22, 2006, 10:30:22 AM
Or is there a way to develop the users online mod towards this?
if (!allowedTo('moderate_forum') && empty($row['showOnline'])) continue;
$context['users_online_today'] = array();
$context['list_users_online_today'] = array();
while ($row = mysql_fetch_assoc($result))
{
Quote from: flapper on January 23, 2006, 06:08:58 AM
Cant seem to find the answer, how do you change the mod so that members are in alphabetical order, can be a pain with lots of members vising the site, to try and find out if they have visited the site today.
Thanks in advance.
:)
Quote from: Prasad007 on January 23, 2006, 06:24:03 AM
too bad it wont work on my non-default theme :(
Quote from: flapper on January 23, 2006, 11:47:18 AMDon't know. As I said the code was untested. Apparently it doesn't work :)
Ok Ive got the members in alphabetical order but half way it starts at a again. How do a put the members in alphabetical order from a to z without it doing it twice. Image unclosed
Quote from: kai920 on January 23, 2006, 11:42:26 PMHave the users not showing up chosen to hide their online status? If yes, are you the administrator and still can't see them when you are logged in?
Installed 1.4.0 beta1... Just noticed one issue - I have a user logged in, his username is "D", and does NOT show up under "Users logged in today".
http://www.kaitech.hk/component/option,com_smf/Itemid,71/
edit#2 - just noticed another user not showing up under "Users logged in today"... am I doing something wrong?
Quote from: kai920 on January 24, 2006, 04:34:13 AMCan you confirm that this behaviour does not exist with version 1.3.1? Since a user suddenly appear, one might suspect something related to the time the user was logged in, but that code has not changed at all from 1.3.1...
And I am the administrator - I saw them online under SMF's default "Who's Online" list, but their names do not appear in "Users Logged in Today". (1.4.0 beta 1)
Quote from: Carceri on January 24, 2006, 05:04:01 AMQuote from: kai920 on January 24, 2006, 04:34:13 AMCan you confirm that this behaviour does not exist with version 1.3.1? Since a user suddenly appear, one might suspect something related to the time the user was logged in, but that code has not changed at all from 1.3.1...
And I am the administrator - I saw them online under SMF's default "Who's Online" list, but their names do not appear in "Users Logged in Today". (1.4.0 beta 1)
Quote from: macgeek on January 28, 2006, 09:52:37 AM
didnt work for me. I using the saf blue theme.
Quote from: desistyle on January 28, 2006, 09:55:25 PM
well it used to work with smf 1.05
Quote from: diegolyanky on January 29, 2006, 08:20:01 PM
The guests would not have to be able to see who was online.
What can I do ?
Quote from: Carceri on January 30, 2006, 02:15:17 AM
You can
1. Uninstall this mod
2. Modify it so guests cannot see who has been online today :)
Quote from: Owain on January 30, 2006, 09:26:15 AM
One question, what file do I need to modify if I want to change the wording from "Users Seen Today" to something else...thanks.
Quote from: diegolyanky on January 30, 2006, 08:24:20 AMTry the 1.4.0 Beta 2 package I have just uploaded...
2° I like to modify this mod, but I don't know how to do it :(
Quote from: ew1dm on January 31, 2006, 01:33:56 PM
Someone, whose nickname is "Fasan" has done (changed) this mod for SMF 1.05.
Quote from: fivearts on February 01, 2006, 11:22:46 AM
One problem is after installation, my category table seems to have gone wrong. Please take a look.
http://www.fivearts.net/index.php#6
Any file that I can look to correct the error? Thanks.
* I also have "Googlebot & Spiders Mod" installed awhile ago.
Quote from: fivearts on February 11, 2006, 12:22:06 AM
Hi Carceri,
Just a note that when the homepage is loading, the alt text for the online.gif has a very long description:
alt="Users Online Users Logged In Today"
Which file should I find to change it to alt="Users Logged In Today"?
Quote from: DemonicInfluence on February 16, 2006, 01:20:18 PM
boardindex.template.php
Quote from: alan s on February 16, 2006, 04:24:09 PMLet me guess. You are not using the default theme?
it dosent work for me at all??
Quote from: mcalan2001 on March 01, 2006, 08:28:13 AMCan you check the affected files, and see if any change has occurred to them? E.g. by comparing to the original files in SMF RC2.
I am using the default theme and have done a chmod 777 to all effected files.
Quote from: Bigguy on March 07, 2006, 08:57:50 PMAlright, is there anyone brave enough to write the code for this? I am not a programmer by any means...
No I dont believe there are permissions for this mod but there should be away to do that by modifying the code somehow. Its a good idea though. :)
if($context['user']['is_admin'])
{
}
Quote from: Red on March 10, 2006, 07:43:03 AM
great mod...
any way to change the "online users" list so it would show the list in alphabetical order???
// 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>';
Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).'
<td class="windowbg" width="20" valign="middle" align="center">
Most users online today: '.$modSettings['mostOnlineToday'].'
Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).' )
</span>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="catbg" 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 they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}
echo '
</table></div>';
echo $botbox.'</div>';
}
?>
Quote from: cbrchris on April 05, 2006, 10:43:48 AM
Thanks beemer! That worked great.
8: Undefined index: uot_hidden
Datei: /home/www/web23/html/board/Themes/default/BoardIndex.template.php (eval?)
Zeile: 419
8: Undefined index: uot_visible
Datei: /home/www/web23/html/board/Themes/default/BoardIndex.template.php (eval?)
Zeile: 419
8: Undefined index: uot_users_online_today_title
Datei: /home/www/web23/html/board/Themes/default/BoardIndex.template.php (eval?)
Zeile: 410
Quote from: kcs on April 18, 2006, 10:14:37 PM
hi all,
i noticed that my MOST USERS stats is not updated... even after i "RECOUNT" under Forum maintenance...
any idea what went wrong?
thanks!
Quote from: Backlash on April 19, 2006, 06:46:53 PM
i had a problem, and don't know how to fix it.Code Select
8: Undefined index: uot_hidden
Datei: /home/www/web23/html/board/Themes/default/BoardIndex.template.php (eval?)
Zeile: 419Code Select8: Undefined index: uot_visible
Datei: /home/www/web23/html/board/Themes/default/BoardIndex.template.php (eval?)
Zeile: 419Code Select
8: Undefined index: uot_users_online_today_title
Datei: /home/www/web23/html/board/Themes/default/BoardIndex.template.php (eval?)
Zeile: 410
is there somebody who is able to help me??
Quote from: perplexed on April 20, 2006, 08:13:45 AM
I could be wrong but I thought that this mod shows the number of members online in a 24hour period, whereas your most users online is most members online at the one time?
So you could have 35 people online in a 24 hour period but only 10 of them on at the same time, so the most online would be 10 not 35
If that's wrong, someone let me know, but that was my understanding :)Quote from: kcs on April 18, 2006, 10:14:37 PM
hi all,
i noticed that my MOST USERS stats is not updated... even after i "RECOUNT" under Forum maintenance...
any idea what went wrong?
thanks!
Quote from: top_secret on April 23, 2006, 02:08:28 PM
hi people
i´m having problems with the installation...
apears to me this error:
-------------------------------------------------------------------------
391: </div>
392: </td>
393: </tr>
394: <tr>
395: <td class="windowbg2" width="100%">
396: <span class="middletext">
397: ', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
398: // Users online today
399: echo '
400: <tr>
401: <td class="titlebg" colspan="2">', $txt['uot_users_online_today_title'], '</td>
402: </tr><tr>
403: <td class="windowbg" width="20" valign="middle" align="center">
404: <img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], ' ', $txt['uot_users_online_today_title'], '" border="0" />
----------------------------------------------------------------------------------------
Parse error: parse error, unexpected '>' in .../Themes/default/BoardIndex.template.php on line 400
please help me!!!
im using the DEFAULT THEME and the 1.1 RC2
</div>
</td>
</tr>
<tr>
<td class="windowbg2" width="100%">
<span class="middletext">
', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
// 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" />
</div>
</td>
</tr>
<tr>
<td class="windowbg2" width="100%">
<span class="middletext">
', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.';
// 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" />
Quote419: if (!empty($context['users_online_today']) && !$context['user']['is_guest'])
420: echo '<br />', implode(', ', $context['list_users_online_today']);
421:
422: echo '
423: <br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
424: <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
425: </div>
426: </td>
427: </tr>';
428: ', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
429: </span>
430: </td>
431: </tr>';
419: if (!empty($context['users_online_today']) && !$context['user']['is_guest'])
420: echo '<br />', implode(', ', $context['list_users_online_today']);
421:
422: echo '
423: <br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
424: <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
425: </div>
426: </td>
427: </tr>';
428: ', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
429: </span>
430: </td>
431: </tr>';
419: if (!empty($context['users_online_today']) && !$context['user']['is_guest'])
420: echo '<br />', implode(', ', $context['list_users_online_today']);
421:
422: echo '
423: <br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
424: <a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
425: </div>
426: </td>
427: </tr>
428: ', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
429: </span>
430: </td>
431: </tr>';
Quote from: beemer on April 04, 2006, 06:30:34 PM
You dont want to put it there
findCode Select
Most users online today: '.$modSettings['mostOnlineToday'].'
Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).' )
</span>
</td>
</tr>';
And replace everything below withCode Select
// Users online today
echo '
<tr>
<td class="catbg" 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 they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}
echo '
</table></div>';
echo $botbox.'</div>';
}
?>
Quote from: kcs on April 21, 2006, 12:26:11 AM
hi,
agree with you on the "bottom" stats portion, but for the "top" portion, there's also a "Users seen today" value... and this value doesnt tally with the users seen on the main index page....
any idea what went wrong?
another query is that, how can i go about "adding" the MOST Seen online Users" on the bottom portion of the stats?
thanks!Quote from: perplexed on April 20, 2006, 08:13:45 AM
I could be wrong but I thought that this mod shows the number of members online in a 24hour period, whereas your most users online is most members online at the one time?
So you could have 35 people online in a 24 hour period but only 10 of them on at the same time, so the most online would be 10 not 35
If that's wrong, someone let me know, but that was my understanding :)Quote from: kcs on April 18, 2006, 10:14:37 PM
hi all,
i noticed that my MOST USERS stats is not updated... even after i "RECOUNT" under Forum maintenance...
any idea what went wrong?
thanks!
Quote from: beemer on April 04, 2006, 06:30:34 PM
You dont want to put it there
findCode Select
Most users online today: '.$modSettings['mostOnlineToday'].'
Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).' )
</span>
</td>
</tr>';
And replace everything below withCode Select
// Users online today
echo '
<tr>
<td class="catbg" 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 they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}
echo '
</table></div>';
echo $botbox.'</div>';
}
?>
Quote from: WarBirD on May 05, 2006, 06:37:59 AM
In this Theme, called MERCURY (http://themes.simplemachines.org/index.php?lemma=18), I can´t find any of this whats to replace. All that stuff is just not in there in the BoardIndex.Template.php.
What now ?
Quote from: L.G.S on May 05, 2006, 11:12:32 AM
Hey Vinspire, is there any chance you could should me the part where you added the whos online code under please?
Quote from: beemer on April 04, 2006, 06:30:34 PM
You dont want to put it there
findCode Select
Most users online today: '.$modSettings['mostOnlineToday'].'
Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).' )
</span>
</td>
</tr>';
And replace everything below withCode Select
// Users online today
echo '
<tr>
<td class="catbg" 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 they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}
echo '
</table></div>';
echo $botbox.'</div>';
}
?>
Quote from: geezmo on May 08, 2006, 05:44:14 AM
The Online Users Today list. That's supposed to appear below the "Users Online" list right, as in your post in Post #295 of this thread? Or do I still need to edit some template?
QuoteUsers Online
Users Online x Guests, x Users
Users active in past 15 minutes:
xxxxxx
[More Stats]
Most Online Today: x. Most Online Ever: x (May x, 2006, xx:xx PM)
QuoteYou cannot download or install new packages because the Packages directory or one of the files in it are not writable!
Quote from: Bigguy on May 08, 2006, 11:46:23 PM
Is the backup folder inside the packages folder also chmodded to 777
Quote from: scottws on May 08, 2006, 11:02:56 PMWell, the Packages folder is owned by smf.forum, and has 777 permissions set. Inside, the backups folder is also 777.
Quote from: geezmo on May 10, 2006, 08:19:35 AMYeah, like I previously posted, I was having the same problem.
at least, scott, something's showing in your forum. in mine (Default Theme, 1.1RC2), the mod was supposedly successfully installed but nothing appears.
Quote from: Viceroy on May 10, 2006, 07:52:52 AM
Are there any plans to make this mod available for 1.0.7 by any chance?
Quote from: L.G.S on May 10, 2006, 01:12:39 PMWhen you installed the package, did it say it was installed successfully and pass all tests? If so, did it actually appear at the bottom of the board index of the default Core theme?
Can I ever get some help for my problem please?
Quote from: DemonicInfluence on March 08, 2006, 11:37:39 AM
just make it so thatCode Selectif($context['user']['is_admin'])
{
is before the mod stuff in the boardindex.template.php of every theme.
Then at the end putCode Select}
Should work to only allow admins to see..
Quote from: scottws on May 09, 2006, 03:35:00 PM
Hmm...
It correctly works on the default theme:
(http://eac.forgiven5.com/pictures/usersonline.png)
But following beemer's instructions to get this mod working on Helios resulted in the same thing Vinspire^ is experiencing:
(http://eac.forgiven5.com/pictures/usersonline_helios.png)
Quote from: scottws on May 10, 2006, 11:42:57 PM
Nope. No solution as of yet. I have to look at the code.
Quote from: DVD_GR on May 11, 2006, 10:25:35 PM
From where can we download older versions who are compatible with 1.07??
Latest says its only for 1.1 rc2?So it doesnt work on 1.07?? ::)
Quote from: akulion on May 11, 2006, 11:47:05 PM"Just place the code..." What code are you referring to? Beemer's code?
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
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
Quote from: scottws on May 14, 2006, 09:40:50 AMQuote from: akulion on May 11, 2006, 11:47:05 PM"Just place the code..." What code are you referring to? Beemer's code?
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
// 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>';
Quote
(http://eac.forgiven5.com/pictures/usersonline_helios.png)
$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 ';
Quote from: akulion on May 15, 2006, 04:19:30 PM
Users with this problem follow these instructions:
1. Go to your theme folder for the theme in which u are having this problem
2. Go to the Languages folder and download this file Modifications.english.php
3. Make a backup of this file in case u mess up
4. Open the file in a text editor and just before the ?> right at the end of the file, add the following codeCode Select
$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 ';
4. save and upload
Quote from: akulion on May 15, 2006, 04:19:30 PM
I am not seeing a Modifications.english.php file in Themes/helios_multi11rc2/languages/.
Quote<?php
$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 ';
?>
QuoteTotal: 2 (Visible: 2, Hidden: 0)
Quote2 users seen today
echo $context['num_users_online_today'], ' ', $context['num_users_online_today']
== 1 ? $txt['uot_user_online_today'] : $txt['uot_users_online_today'];
Quote from: scottws on May 16, 2006, 02:25:13 PMThis was changed from the second to the first in a later version of the mod. Probably the code you are trying to use is based on an old version of this mod.QuoteTotal: 2 (Visible: 2, Hidden: 0)
instead of how it is now after doing the modification:Quote2 users seen today
Quote from: Carceri on May 17, 2006, 05:49:27 AMQuote from: scottws on May 16, 2006, 02:25:13 PMThis was changed from the second to the first in a later version of the mod. Probably the code you are trying to use is based on an old version of this mod.QuoteTotal: 2 (Visible: 2, Hidden: 0)
instead of how it is now after doing the modification:Quote2 users seen today
Quote from: Vinspire on May 17, 2006, 05:27:39 AM
Follow akulion guide but i still couldn't get it working. Anyone manage to get it working ?
// 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>';
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
]]></search>
<add><![CDATA[
Quote from: Carceri on May 17, 2006, 05:49:27 AMQuote from: scottws on May 16, 2006, 02:25:13 PMThis was changed from the second to the first in a later version of the mod. Probably the code you are trying to use is based on an old version of this mod.QuoteTotal: 2 (Visible: 2, Hidden: 0)
instead of how it is now after doing the modification:Quote2 users seen today
Quote from: scottws on May 17, 2006, 08:37:09 AMQuote from: Carceri on May 17, 2006, 05:49:27 AMQuote from: scottws on May 16, 2006, 02:25:13 PMThis was changed from the second to the first in a later version of the mod. Probably the code you are trying to use is based on an old version of this mod.QuoteTotal: 2 (Visible: 2, Hidden: 0)
instead of how it is now after doing the modification:Quote2 users seen today
Ok, well then does anyone have any idea how to get this properly working on the Helios theme?
Quote from: rsj1 on May 17, 2006, 04:51:00 PM
Is there a way to make this hack (I'm using 1.4 beta) with the default skin show users online in the last 24 hours (IE keep cycling around instead of resetting at midnight)? Any help or suggestions would be most appreciated ;)
$nowdate = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $nowdate['mon'], $nowdate['mday'], $nowdate['year']) - ($modSettings['time_offset'] * 3600);
$midnight = time() - 86400;
$frag = explode('-', strftime('%Y-%m-%d', time()));
$midnight = forum_time(false, mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]));
$midnight = time() - 86400;
Quote from: Carceri on May 18, 2006, 07:20:56 AMQuote from: rsj1 on May 17, 2006, 04:51:00 PM
Is there a way to make this hack (I'm using 1.4 beta) with the default skin show users online in the last 24 hours (IE keep cycling around instead of resetting at midnight)? Any help or suggestions would be most appreciated ;)
That should be easy. In BoardIndex.php findCode Select
$nowdate = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $nowdate['mon'], $nowdate['mday'], $nowdate['year']) - ($modSettings['time_offset'] * 3600);
And replace withCode Select
$midnight = time() - 86400;
And in Stats.php findCode Select
$frag = explode('-', strftime('%Y-%m-%d', time()));
$midnight = forum_time(false, mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]));
and replace withCode Select
$midnight = time() - 86400;
Also edit Modifications.english.php to the appropriate text you want displayed
Quote from: akulion on May 15, 2006, 04:19:30 PMQuote
(http://eac.forgiven5.com/pictures/usersonline_helios.png)
Users with this problem follow these instructions:
1. Go to your theme folder for the theme in which u are having this problem
2. Go to the Languages folder and download this file Modifications.english.php
3. Make a backup of this file in case u mess up
4. Open the file in a text editor and just before the ?> right at the end of the file, add the following codeCode Select
$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 ';
4. save and upload
Quote from: akulion on May 17, 2006, 07:44:12 AM
Please note the following Error I made in posting the last code (I have fixed it in my last post as well but posting here just so that everyone knows)
The boardindex.template.php file must be modified as following: (for helios theme)
Download you 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 following code above itCode Select
// 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>';
That should fix it :)
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 :)
Quote from: cyberstang5.0 on May 10, 2006, 09:45:24 PMAnyone? ??? ??? :(Quote from: DemonicInfluence on March 08, 2006, 11:37:39 AM
just make it so thatCode Selectif($context['user']['is_admin'])
{
is before the mod stuff in the boardindex.template.php of every theme.
Then at the end putCode Select}
Should work to only allow admins to see..
Another stupid programing question for ya'll...
How do I get it so admins and moderators (or specific membergroups) see the list but keep it "hidden" from regular users? ???
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.
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.
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>
Quote from: akulion on May 15, 2006, 01:05:45 PMQuote from: scottws on May 14, 2006, 09:40:50 AMQuote from: akulion on May 11, 2006, 11:47:05 PM"Just place the code..." What code are you referring to? Beemer's code?
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
The code I am referring to is this:Code Select
', $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 :)
Quote from: cotdagoo on June 03, 2006, 03:05:44 PMyou could always ban users from your entire .com via cpanel :)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
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?
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.
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?
$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;
$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;
mysql_free_result($result);
krsort($context['users_online_today']);
krsort($context['list_users_online_today']);
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.
Quote from: Carceri on June 19, 2006, 04:05:56 AM
You modify the source code :) Look in BoardIndex.template.php for $context['user']['is_guest']. It occurs twice in the file.
Quote from: RoarinRow on June 21, 2006, 12:55:05 AM
I have multiple themes on my site and this is what I did to my BoardIndex.template.php file:
Find this:
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">'
Change the "titlebg" to "catbg"
Be sure to backup your file.
Quote from: edsloter on June 21, 2006, 01:45:58 PMQuote from: RoarinRow on June 21, 2006, 12:55:05 AM
I have multiple themes on my site and this is what I did to my BoardIndex.template.php file:
Find this:
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">'
Change the "titlebg" to "catbg"
Be sure to backup your file.
Works perfectly thanks
Quote from: auroramae on June 21, 2006, 08:38:05 AM
I have the same question but I am clueless as to how to change this to make the guests show as users in the list.
Quote from: auroramae on June 22, 2006, 11:01:52 AM
I realize that it is impossible to distinguish guests.
<snip>
Would it be possible to show the total number of guests?
Quote from: DeDu on June 28, 2006, 06:53:31 AM
I want to list user online last 24 hour.
How can i do this?
Thanx
Quote from: SurfExcelerator.com on June 28, 2006, 10:13:33 AMYes, i know it but i want to view last ten minute and 24 hour online list
Try this:
Admin >> Features and Options >> Change the "User online time threshold" to 1440 if you want to show how many have been online in last 24 hours.
Quote from: DemonicInfluence on June 26, 2006, 07:02:19 PM
only edit boardindex.template.php
Quote from: akulion on June 28, 2006, 12:18:36 PM
just remove it from the board index template and it will be gone :D
Quote from: carola0102 on June 25, 2006, 06:50:11 AM
I'm using chatbubbles theme.. how to make this mod visible after installing it? Should I edit only the BoardIndex.template.php? And what exactly should I edit? I read the guidelines on this forum. But still I couldnt make it :-[ Can anyone please help?
Thanks in advance,
Carola
<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="replace"><![CDATA[
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
]]></search>
<add><![CDATA[
<td class="windowbg2"', $board['is_redirect'] && $modSettings['redirect_hide_columns'] ? ' colspan="2"' : '' , '>
<b><a href="', $board['href'], '" name="b', $board['id'], '"', ($board['is_redirect'] && $board['redirect_target'] != '') ? ' target="' . $board['redirect_target'] . '"' : '' , '>', $board['name'], '</a></b><br />
]]></add>
<td class="windowbg2" style="padding-top:12px; padding-bottom:12px;">
Quote// Users Online Today Mod
$txt['uot_users_online_today_title']='Users Logged In Today';
$txt['uot_total_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], ' ', $txt['uot_users_online_today_title'], '" border="0" />
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today_title'], '" border="0" />
$txt['uot_users_online_today_title']='Users Logged In Today';
$txt['uot_total_users_online_today']='Users Logged In Today';
$txt['uot_ulit']='Users Logged In Today';
// "Users online" - in order of activity.
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td rowspan="2" class="windowbg" width="20" valign="middle" align="center">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" />', $context['show_who'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">';
Quote from: fivearts on July 21, 2006, 03:59:24 AM
1. The alt="Users Online Users Logged In Today" is still there when installed with 1.40beta2.
2. Since the Title and the Alt are using the same words "Users Logged In Today", there is no need to have 2 variables in Modifications.english.php
Quote from: BMRMorph on July 21, 2006, 12:01:43 PM
maybe you could include the required changes to the babylon script in your next release?
Quote from: Carceri on July 21, 2006, 04:01:18 PMMhh, i can understand that, in some cases nothing other than me *g*
For the time being, I only make the required changes for the default theme, sorry. It's simply due to lack of time.
Quote from: BeoR on July 24, 2006, 03:54:45 PM
Is there a way to make it work at the "statistics center" instead of at the board index? I can't seem to make it "list" the users who logged in for the day.
Quote from: rsj1 on May 20, 2006, 11:02:56 AM
;D Many thanks it worked a treat!Quote from: Carceri on May 18, 2006, 07:20:56 AMQuote from: rsj1 on May 17, 2006, 04:51:00 PM
Is there a way to make this hack (I'm using 1.4 beta) with the default skin show users online in the last 24 hours (IE keep cycling around instead of resetting at midnight)? Any help or suggestions would be most appreciated ;)
That should be easy. In BoardIndex.php findCode Select
$nowdate = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $nowdate['mon'], $nowdate['mday'], $nowdate['year']) - ($modSettings['time_offset'] * 3600);
And replace withCode Select
$midnight = time() - 86400;
And in Stats.php findCode Select
$frag = explode('-', strftime('%Y-%m-%d', time()));
$midnight = forum_time(false, mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]));
and replace withCode Select
$midnight = time() - 86400;
Also edit Modifications.english.php to the appropriate text you want displayed
Quote from: Joshsux on August 09, 2006, 01:48:53 AM
but i don't have a stats.php?
Quote from: Joshsux on August 09, 2006, 11:23:57 PM
oh ok lol, so any idea how to get it working with this theme? i got it working i mean to make it so its 24 hour loop, i dont have any of the file but maybe stats.php will that work?
Quote from: Joshsux on August 11, 2006, 01:55:51 AM
why do people help but only give little replies thinking people know everything how the hell am i suppose to know where this file is?
Quote from: deadpoeticstar on August 14, 2006, 12:09:08 PM
could this be about ready for an RC3 update?
Quote from: ckgb on August 24, 2006, 08:26:29 PM
Where can I change the permissions so that everybody is able to see the full list and not the number alone.
Quote from: Carceri on May 18, 2006, 07:20:56 AMQuote from: rsj1 on May 17, 2006, 04:51:00 PM
Is there a way to make this hack (I'm using 1.4 beta) with the default skin show users online in the last 24 hours (IE keep cycling around instead of resetting at midnight)? Any help or suggestions would be most appreciated ;)
That should be easy. In BoardIndex.php findCode Select
$nowdate = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $nowdate['mon'], $nowdate['mday'], $nowdate['year']) - ($modSettings['time_offset'] * 3600);
And replace withCode Select
$midnight = time() - 86400;
And in Stats.php findCode Select
$frag = explode('-', strftime('%Y-%m-%d', time()));
$midnight = forum_time(false, mktime(0, 0, 0, (int) $frag[1], (int) $frag[2], (int) $frag[0]));
and replace withCode Select
$midnight = time() - 86400;
Also edit Modifications.english.php to the appropriate text you want displayed
$date = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);
// Members online so far today.
$result = db_query("
SELECT mostOn
FROM {$db_prefix}log_activity
WHERE date = $date
LIMIT 1", __FILE__, __LINE__);
list ($context['online_today']) = mysql_fetch_row($result);
mysql_free_result($result);
$context['online_today'] = (int) $context['online_today'];
// Total members online today
$date = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);
$result = db_query("
SELECT
COUNT(*)
FROM {$db_prefix}members
WHERE lastLogin >= $midnight", __FILE__, __LINE__);
list ($context['total_users_online_today']) = mysql_fetch_row($result);
Quote from: scottws on August 26, 2006, 12:08:56 AM
Has the code used in the mod changed since the quoted post was made? What do I have to change to get my idea to work?
Quote from: Carceri on August 26, 2006, 05:57:30 AMQuote from: scottws on August 26, 2006, 12:08:56 AM
Has the code used in the mod changed since the quoted post was made? What do I have to change to get my idea to work?
Yes, the code has changed, but it should be even simpler. Just look for
$date = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);
instead.
Quote from: scottws on August 26, 2006, 04:41:34 PM
So, I'm just changing the midnight part, right?
Quote from: Badelehrling on August 30, 2006, 01:46:17 PM
will you make a version compatible with 1.0.8? I tried all versions to install on my testforum. But no one worked :(
Quote from: pmp6nl on September 12, 2006, 09:38:18 PM
On one of my message boards it shows
6 :
user names
How do I change the 6, to "Users online today"?
Quote from: pmp6nl on September 12, 2006, 09:38:18 PM
Also, on another message board how to I change Users Seen Today, to Users online today?
Quote from: Carceri on September 17, 2006, 06:09:18 AMQuote from: pmp6nl on September 12, 2006, 09:38:18 PM
On one of my message boards it shows
6 :
user names
How do I change the 6, to "Users online today"?
Seems you are missing some language settings. What language are you using? If you are using something else than english, you need to make the changes manually.Quote from: pmp6nl on September 12, 2006, 09:38:18 PM
Also, on another message board how to I change Users Seen Today, to Users online today?
Users Seen Today was the text in an earlier version of this mod. You can either change the same language file or upgrade to the latest version of this mod.
Quote from: steve in houston on September 19, 2006, 08:21:07 PM
i havent packaged it up yet but i can.
Quote from: qd-race on September 23, 2006, 10:36:46 AMIt's in "Users_Online_Today_Mod.xml".
I cannot find the file and and code where this package add in default theme. I want to mod to the other custom theme. Please help.
<file name="$themedir/BoardIndex.template.php" error="fatal">
Quote from: edi67 on September 24, 2006, 10:48:25 AMIt is not random. It is by the time they last logged in.
one question, mod work perfectly but in my forum i see user online today not soerted for name , and i show than in random way, is possible see them sorted for name?
look
www.crazyzone.ws
$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
$context['users_online_today'][$row['memberName']] = array(
Quote from: akabugeyes on September 24, 2006, 10:57:01 AMQuote from: edi67 on September 24, 2006, 10:48:25 AMIt is not random. It is by the time they last logged in.
one question, mod work perfectly but in my forum i see user online today not soerted for name , and i show than in random way, is possible see them sorted for name?
look
www.crazyzone.ws
This is untested, but you can try changing in Sources/BoardIndex.phpCode Select$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
toCode Select$context['users_online_today'][$row['memberName']] = array(
Quote from: MoreBloodWine on October 16, 2006, 12:12:01 AM
Users Logged In Today
The above is the default text one sees in the info center... how can one change it to say something else... like you can do with the MCL (Membergroup Color Legend) mod...
Quote from: rockinaway on November 12, 2006, 08:06:23 AM
Can this shows number of guests and spiders which have visited?
Quote from: ArkServer on November 14, 2006, 01:19:17 PM
That, and how do i make it so that guests can also see the users online today instead of only an integer.
Quote from: Carceri on August 25, 2006, 01:44:12 AM
Edit BoardIndex.template and remove the line that says
if (!$context['user']['is_guest'])
Also, change the line
if (!empty($context['users_online_today']) && !$context['user']['is_guest'])
to
if (!empty($context['users_online_today']))
That should do it (although I have not tested)
Quote from: Carceri on November 17, 2006, 07:41:50 AM
It looks like it, but I have still not tested it :)
Quote from: sager on December 07, 2006, 01:37:34 PM
waiting for 1.1 compatible
$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 ';
Quote from: vipmoney on December 11, 2006, 12:33:22 AM
This MOD doesn't record on the database the Users Online today value for each days ? to be seen on the stats page ?
Quote from: danskmacabre on November 08, 2006, 03:20:44 PM
was very easy to manually add to the helios theme.
Works perfectly.
Quote from: Carceri on December 11, 2006, 01:31:54 AMQuote from: vipmoney on December 11, 2006, 12:33:22 AM
This MOD doesn't record on the database the Users Online today value for each days ? to be seen on the stats page ?
That's true
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.phpCode Select$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
toCode Select$context['users_online_today'][$row['memberName']] = array(
Quote from: vipmoney on December 12, 2006, 12:57:36 PM
And anybody knows how to do that ?
Or is this part of the plans for the next versions of this MOD ? btw, this mod is awesome ;)
Quote from: Carceri on December 14, 2006, 07:06:02 AMQuote from: vipmoney on December 12, 2006, 12:57:36 PM
And anybody knows how to do that ?
Or is this part of the plans for the next versions of this MOD ? btw, this mod is awesome ;)
I don't know how to do it, but I am sure that given the time I could figure it out :-) I will not rule out that it might be added to a future version of this mod, but I don't want to make any promises. We'll see what my time permits.
Quote from: kross on December 22, 2006, 10:26:48 AM
can anyone help me, I want to use this mode for multylanguage forum, so I need to know how to do that.
languages: english-ut8, serbian-utf8 and croatian-utf8
I'm usin SMF 1.1.1 and I managed only to point to english-utf8, so I can see:
Total: 56 (Visible: 53, Hidden: 3)
but, when I swich to other then english-utf8, I get this:
: 56 (: 53, : 3)
I now it's something easy, but can't remeber how ::)
thanks.
$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 ';
Quote from: Vinspire on December 23, 2006, 02:50:29 AM
Is it compatible wif SMF 1.1.1 ?
Quote from: Carceri on December 23, 2006, 05:09:31 AMQuote from: Vinspire on December 23, 2006, 02:50:29 AM
Is it compatible wif SMF 1.1.1 ?
Yes it is
Quote from: mcalan2001 on December 13, 2006, 02:39:52 PMQuote 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.phpCode Select$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
toCode Select$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
krsort($context['users_online_today']);
krsort($context['list_users_online_today']);
ksort($context['users_online_today']);
ksort($context['list_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']))
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>';
// 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>';
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!
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 ;)
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!
// 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>';
$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 ';
Quote from: Carceri on December 30, 2006, 08:18:29 AMit's not the basic feature! But a mod is available, many of them are using! Looks pretty good!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.
Quote from: Dejan on January 02, 2007, 07:51:40 AM
Is it possible to show a number of visitors online today, and not just number of users?
Quote// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
</span>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
QuoteThis should be the only edit you have to do. In your BoardIndex.template.php find:
Quote from: auroramae on January 14, 2007, 11:50:47 AM
I am hoping that someone will be kind enough to tell me how to manually edit the slick_pro graphite theme to show
Users Logged In Today
When I apply the mod to that theme it doesn't apply all of the changes.
It displays
Users Online
but not
Users Logged In Today
Any help would be greatly appreciated.
aurora
Quote from: Bigguy on January 14, 2007, 02:05:41 PM
This should be the only edit you have to do. In your BoardIndex.template.php find:Code Select</span>
</td>
</tr>';
Before that add:Code Select// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
Quote$txt['uot_users_online_today']='Users Logged In Today'; $txt['uot_yesterday']='Yesterday at '; $txt['uot_total']='Total'; $txt['uot_visible']='Visible'; $txt['uot_hidden']='Hidden';
Quote from: mohoganybrwn on January 19, 2007, 01:15:20 AM
Hi. Installed this mod, now I have the following at the top of my forum:Quote$txt['uot_users_online_today']='Users Logged In Today'; $txt['uot_yesterday']='Yesterday at '; $txt['uot_total']='Total'; $txt['uot_visible']='Visible'; $txt['uot_hidden']='Hidden';
Can anyone tell me how I can remove this please?
Quote from: Bigguy on January 14, 2007, 02:05:41 PM
This should be the only edit you have to do. In your BoardIndex.template.php find:Code Select</span>
</td>
</tr>';
Before that add:Code Select// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
Quote from: archiebald on February 14, 2007, 01:52:32 AM
Sorry, I didn't read all 38 pages of this thread.
This mod did not work when attempting to install with the 1.1.2 default theme.
echo $newmembul123 , ' New This Month: ' , $row['month'] , ' ' , $newmembul123 , ' New This Week: ' , $row['week'] , ' ' , $newmembul123 , ' New Today: ' , $row['today'];
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
<td nowrap="nowrap">', $txt['users_online_today'], ':</td>
<td align="right">', $context['online_today'], '</td>';
<td nowrap="nowrap">', $txt['users_online_today'], ':</td>
<td align="right">', $context['online_today'], '</td>
</tr><tr>
<td nowrap="nowrap">', $txt['uot_users_online_today'], ':</td>
<td align="right">', $context['total_users_online_today'], '</td>';
Quote from: archiebald on February 14, 2007, 10:13:39 AM
Surely,
3. Execute Modification C:\Inetpub\wwwroot\forum/Themes/default/BoardIndex.template.php Test failed
All other pre-installation tests are successful
$txt['uot_users_online_today']='Users Logged In Today'; $txt['uot_yesterday']='Yesterday at '; $txt['uot_total']='Total'; $txt['uot_visible']='Visible'; $txt['uot_hidden']='Hidden';
Quote from: Grozzy on March 01, 2007, 07:28:12 AM
How can I download the files from the site AND keep the changes I will make ? ::)
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
Quote from: veldfire on March 01, 2007, 04:21:24 PM????
Is there a way to hide the list from guests ?
// "Users online" - in order of activity.
echo '
<tr>
<td class="catbg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" />', $context['show_who'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">';
if ($context['show_who'])
echo '
<a href="', $scripturl, '?action=who">';
echo $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';
// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];
// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden'];
echo ')';
}
if ($context['show_who'])
echo '</a>';
echo '
<div class="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 '
', $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>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
</td>
<td class="windowbg2" width="100%">
<div class="smalltext">', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</div>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
<td class="catbg" colspan="2">', $txt['uot_users_online_today'], '</td>
$txt['uot_guests']='Guests';
$context['num_users_online_today'] = count($context['users_online_today']);
if (!$user_info['is_admin'])
{
$context['num_users_online_today'] = $context['num_users_online_today'] + $context['num_hidden_users_online_today'] + $context[''num_total_guests''];
}
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_guests'], ': ', $context['num_total_guests'], ', ', $txt['uot_hidden'], ': ', $context['num_hidden_users_online_today'], ')';
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);
uot_yesterday
part used? It doesn't display anywhere and would be handy :)
Quote from: symon on March 12, 2007, 07:00:38 PMhow to show names of users online to guests? it shown number of user online only
Added it to Babylon
Ok...I found this myself as it's not greatly difficult. ;) But rather than go "It's ok...I solved it" I thought I'd show you what I did ;)
I found this code in babylon/Boardindex.template.php:Code Select// "Users online" - in order of activity.
echo '
<tr>
<td class="catbg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" />', $context['show_who'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">';
if ($context['show_who'])
echo '
<a href="', $scripturl, '?action=who">';
echo $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';
// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];
// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden'];
echo ')';
}
if ($context['show_who'])
echo '</a>';
echo '
<div class="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 '
', $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>
And added after it:Code Select
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
</td>
<td class="windowbg2" width="100%">
<div class="smalltext">', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</div>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
In the added code I changed:Code Select<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
To:Code Select<td class="catbg" colspan="2">', $txt['uot_users_online_today'], '</td>
Does this look ok to you experienced coders? It works great now :)
Quote from: alo on March 24, 2007, 05:19:06 AM
how to show names of users online to guests? it shown number of user online only
Quote from: symon on March 24, 2007, 11:48:02 AMi'm using another theme...not the babylon themeQuote from: alo on March 24, 2007, 05:19:06 AM
how to show names of users online to guests? it shown number of user online only
Hey,
Did you add all of the code to all of the files including the Boardindex.template.php in the default theme folder as well as the Babylon theme? The code I've done is ONLY for the babylon Boardindex.template.php. The code for the default theme is with the package. :)
I'll try and help as much as I can but my expertise is limited (it's not even expertise! lol)
Quote from: symon on March 24, 2007, 07:21:50 PMi'm not good at php, can u help me?
That code tweak was for it to work in the babylon theme :(
Quote from: alo on March 26, 2007, 08:04:30 PM
i'm not good at php, can u help me?
Quote from: alo on March 26, 2007, 08:04:30 PMi need that work on another theme but thank you!Quote from: symon on March 24, 2007, 07:21:50 PMi'm not good at php, can u help me?
That code tweak was for it to work in the babylon theme :(
Quote from: Bigguy on March 27, 2007, 08:10:05 PM
Yes it is ok. I thought you wanted to do bd changes thats all, my mistake if I am wrong. :)
QuoteOne simple question, i have this mod installed and all work perfectly with smf 1.1.1 but is possible show the list of users online today in Alphabetic Order?? i see the list in casual order and will be more clean have list in alphabetic order
Quote
Re: Users Online Today Mod
« Reply #375 on: June 19, 2006, 10:11:46 AM » Quote
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
Code:
$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
Code:
$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"
Code:
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
// Set the latest member.
$context['latest_member'] = &$context['common_stats']['latest_member'];
$date = strftime('%Y%m%d', forum_time(false));
// Members online so far today.
$result = db_query("
SELECT mostOn
FROM {$db_prefix}log_activity
WHERE date = $date
LIMIT 1", __FILE__, __LINE__);
list ($context['online_today']) = mysql_fetch_row($result);
mysql_free_result($result);
$context['online_today'] = (int) $context['online_today'];
// Total members online today
$date = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);
$result = db_query("
SELECT
COUNT(*)
FROM {$db_prefix}members
WHERE lastLogin >= $midnight", __FILE__, __LINE__);
list ($context['total_users_online_today']) = mysql_fetch_row($result);
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_users_online_today'], ')';
echo $txt['uot_total'], ': <b>', $context['online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (Members: ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_users_online_today'], ' , Guests: ', ($context['online_today'] - $context['total_users_online_today']), ')';
Quote from: wdm2005 on April 06, 2007, 02:21:23 AM
hi i installed this mod on the default theme but i cant see any changes is there any where in paticular i should be lookin or has any one got a demo and i got this Execute Modification ./Sources/BoardIndex.php Test successful
2. Execute Modification ./Sources/Stats.php Test successful
3. Execute Modification ./Themes/default/BoardIndex.template.php Test failed
4. Execute Modification ./Themes/default/Stats.template.php Test successful
5. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
6. Execute Modification ./Themes/default/languages/Stats.english.php Test successful
as an error could this be why thanks for any help in advance
www.joyrider.web-space.ws/forum (http://www.joyrider.web-space.ws/forum)
Users Online Today
Total: 10 (Members: 3, Hidden: 0, Guests: 7)
User, User2, User3
Users Logged In Today
Total: 3 (Members: 3, Hidden: 0)
User, User2, User3
Users Logged In Today
Total: 2
QuoteTotal: 14 (Members: 96, Hidden: 0 , Guests: -82)
Quote from: symon on April 06, 2007, 04:27:24 PM
Tucker...I'm so glad you're tackling this :)
But I get the following after editing the code:QuoteTotal: 14 (Members: 96, Hidden: 0 , Guests: -82)
The guest is a negative number!
Quote from: Tucker2007 on April 06, 2007, 06:23:05 PM
I dont think there is a way really without logging guests no sums can be done with current data :(
Installation Readme
Users Online Today Mod (ver. 1.4.0).
Install Actions
Installations actions for "Users Online Today Mod":
Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./Sources/BoardIndex.php Test successful
2. Execute Modification ./Sources/Stats.php Test successful
3. Execute Modification ./Themes/default/BoardIndex.template.php Test successful
4. Execute Modification ./Themes/default/Stats.template.php Test successful
5. Execute Modification ./Themes/default/languages/Modifications.english.php File not found
6. Execute Modification ./Themes/default/languages/Stats.english.php File not found
QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Quote from: a.D on April 20, 2007, 08:12:14 PM
This installed fine on the forum, but it doesn't display on the Dilber theme I'm using.
Can someone help?
Quote from: tick on April 21, 2007, 08:46:44 AMQuote from: a.D on April 20, 2007, 08:12:14 PM
This installed fine on the forum, but it doesn't display on the Dilber theme I'm using.
Can someone help?
I posted this a few pages back. This is how to make it work with dilber mc. http://www.simplemachines.org/community/index.php?topic=55513.msg1001561#msg1001561
Quote from: Dud on April 28, 2007, 01:57:44 PM
Help Me...all mine says is : 2 (: 2, : 0)
Yigal, GPGrieco
No picture no nothing Please Help
Im using 1.12
</span>
</td>
</tr>';
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show some statistics next to the link tree if SP1 info is off.
echo '
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td valign="bottom">', theme_linktree(), '</td>
<td align="right">';
if (!$settings['show_sp1_info'])
echo '
', $txt[19], ': ', $context['common_stats']['total_members'], ' • ', $txt[95], ': ', $context['common_stats']['total_posts'], ' • ', $txt[64], ': ', $context['common_stats']['total_topics'], '
', ($settings['show_latest_member'] ? '<br />' . $txt[201] . ' <b>' . $context['common_stats']['latest_member']['link'] . '</b>' . $txt[581] : '');
echo '
</td>
</tr>
</table>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div class="tborder" style="margin-bottom: 2ex;">
<table border="0" width="100%" cellspacing="1" cellpadding="4">
<tr class="titlebg" align="center">
<td>', $txt[102], '</td>
</tr>
<tr>
<td valign="middle" align="center" height="60">';
// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px; "><b>', $context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 250, "g": 250, "b": 250}, smfFadeTo = {"r": 40, "g": 40, "b": 40};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";
var foreColor, backEl, backColor;
if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;
backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;
backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}
// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>
</div>';
}
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge),
and boards. (see below.) */
foreach ($context['categories'] as $category)
{
echo '
<div class="tborder"><table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td colspan="4" class="titlebg', $category['new'] ? '2' : '', '" height="18">';
// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';
echo '
', $category['link'], '
</td>
</tr>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr>
<td class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
echo '</a></td>
<td align="left" class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', $txt['parent_boards'], ': ', implode(', ', $children), '</i></div>';
}
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '<br />
', $board['topics'],' ', $txt[330], '
</span></td>
<td class="windowbg2" valign="middle" width="22%"><span class="smalltext">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link'];
echo '
</span></td>
</tr>';
}
}
echo '
</table></div>
<br />';
}
if ($context['user']['is_logged'])
{
echo '
<div class="tborder" style="padding: 3px;"><table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr class="titlebg">
<td align="', !$context['right_to_left'] ? 'left' : 'right', '" class="smalltext">
<img src="' . $settings['images_url'] . '/new_some.gif" alt="" border="0" align="middle" /> ', $txt[333], '
<img src="' . $settings['images_url'] . '/new_none.gif" alt="" border="0" align="middle" style="margin-left: 4ex;" /> ', $txt[334], '
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" class="smalltext">';
// Show the mark all as read button?
if ($settings['show_mark_read'])
echo '
<a href="', $scripturl, '?action=markasread;sa=all;sesc=' . $context['session_id'] . '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markread.gif" alt="' . $txt[452] . '" border="0" />' : $txt[452]), '</a>';
echo '
</td>
</tr>
</table></div>';
}
// Here's where the "Info Center" starts...
echo '
<br />
<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="4">
<tr class="titlebg">
<td align="center" colspan="2">', $txt[685], '</td>
</tr>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[214], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=recent">
<img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" border="0" /></a>
</td>
<td class="windowbg2">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table width="100%" border="0">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], ']</td>
<td valign="top">', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '</td>
<td align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=calendar">
<img src="', $settings['images_url'], '/icons/calendar.gif" width="20" alt="', $txt['calendar24'], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="smalltext">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span style="color: #', $modSettings['cal_holidaycolor'], ';">', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span style="color: #', $modSettings['cal_bdaycolor'], ';">', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], '</span> ';
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<b>' : '', $member['name'], $member['is_today'] ? '</b>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span style="color: #', $modSettings['cal_eventcolor'], ';">', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<b>' . $event['title'] . '</b>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '
(<a href="', $scripturl, '?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">', $txt['calendar_how_edit'], '</a>)';
}
echo '
</span>
</td>
</tr>';
}
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
// Show a member bar. Not heavily ornate, but functional at least.
if ($settings['show_member_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[331], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' : '', '<img src="', $settings['images_url'], '/icons/members.gif" alt="', $txt[332], '" border="0" />', $context['show_member_list'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">
<b>', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' . $txt[332] . '</a>' : $txt[332], '</b>
<div class="smalltext">', $txt[200], '</div>
</td>
</tr>';
}
// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[645], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=stats">
<img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt[645], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
<table border="0" width="90%"><tr>
<td class="smalltext">
<div style="float: ', !$context['right_to_left'] ? 'left' : 'right', '; width: 50%;">', $txt[490], ': <b>', $context['common_stats']['total_topics'], '</b></div>', $txt[489], ': <b>', $context['common_stats']['total_posts'], '</b><br />', !empty($context['latest_post']) ? '
' . $txt[659] . ': "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')<br />' : '', '
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</td>
<td width="32%" class="smalltext" valign="top">
', $txt[488], ': <b><a href="', $scripturl, '?action=mlist">', $context['common_stats']['total_members'], '</a></b><br />
', $txt[656], ': <b>', $context['common_stats']['latest_member']['link'], '</b><br />';
// If they are logged in, show their unread message count, etc..
if ($context['user']['is_logged'])
echo '
', $txt['smf199'], ': <b><a href="', $scripturl, '?action=pm">', $context['user']['messages'], '</a></b> ', $txt['newmessages3'], ': <b><a href="', $scripturl, '?action=pm">', $context['user']['unread_messages'], '</a></b>';
echo '
</td>
</tr></table>
</td>
</tr>';
}
// "Users online" - in order of activity.
echo '
<tr>
<td class="catbg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" />', $context['show_who'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">';
if ($context['show_who'])
echo '
<a href="', $scripturl, '?action=who">';
echo $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';
// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];
// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden'];
echo ')';
}
if ($context['show_who'])
echo '</a>';
echo '
<div class="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 '
', $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>';
// If they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}
echo '
</table></div>';
}
?>
Quote from: edi67 on April 02, 2007, 01:59:14 PM
One simple question, i have this mod installed and all work perfectly with smf 1.1.1 but is possible show the list of users online today in Alphabetic Order?? i see the list in casual order and will be more clean have list in alphabetic order
thx
Quote from: braveboy on April 27, 2007, 03:16:20 AM
any idea how to install it on "Scribbles" theme please help me thanks
Quote from: uni on April 30, 2007, 05:30:30 AMQuote from: Dud on April 28, 2007, 01:57:44 PM
Help Me...all mine says is : 2 (: 2, : 0)
Yigal, GPGrieco
No picture no nothing Please Help
Im using 1.12
Same thing. I'm using the default theme and a fresh install.
EDIT: Found it. Open your Modifications.english-utf8.php in the language folder inside your default them and add this:
$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
<file name="$sourcedir/BoardIndex.php">
<file name="$sourcedir/Stats.php">
Quote from: InsaneMustang on June 25, 2007, 02:47:17 PM
This has to be the most confusingly written mod ever. I've read all 34 pages of this thread, and I am extremely confused.
I realize that the mod.xml file displays the changes that need to be made in each file, but what the crap is this stuff?Code Select<file name="$sourcedir/BoardIndex.php">
There isn't a file called that in my theme or in the default theme. Does that mean boardindex.template.php ?
Same with thisCode Select<file name="$sourcedir/Stats.php">
does this mean stats.template.php and should all of these edits be done in the theme im using or the default.
Quote from: symon on May 16, 2007, 08:50:17 AM
Has anyone also worked out how to log guests yet? Tucker? ;) hehe
It would make the stats look far more impressive. Afterall, this mod is supposed to be a way to convince visitors it's an active forum :)
Quote from: Photoshocker on June 26, 2007, 05:25:01 AMQuote from: symon on May 16, 2007, 08:50:17 AM
Has anyone also worked out how to log guests yet? Tucker? ;) hehe
It would make the stats look far more impressive. Afterall, this mod is supposed to be a way to convince visitors it's an active forum :)
Im also trying to find this out..anyone knows how?
Quote from: Tick on April 21, 2007, 08:46:44 AMQuote from: a.D on April 20, 2007, 08:12:14 PM
This installed fine on the forum, but it doesn't display on the Dilber theme I'm using.
Can someone help?
I posted this a few pages back. This is how to make it work with dilber mc. http://www.simplemachines.org/community/index.php?topic=55513.msg1001561#msg1001561
Quote: 5 (: 5, : 0)5 meaning the number of users logged in, but I'm wondering what the rest is? And how would I change that, so that before the : , I could put "Users Online Today".
<![CDATA[$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';]]>
Quote from: Cool999 on July 20, 2007, 09:51:28 AM
Hello Everyone.
I want that in the members list it should show the users who r online in last 2 or 3 or 4 days................................
BUt the text "Users Logged In Today" Should Remain Same.
Hope u got it.
Thanks
Quote from: Stargater59 on July 17, 2007, 12:32:35 PM
Is this mod going to be updated for 1.1.3?
Quote from: Cool999 on July 27, 2007, 12:48:47 PM
Will Anyone Help Me.Quote from: Cool999 on July 20, 2007, 09:51:28 AM
Hello Everyone.
I want that in the members list it should show the users who r online in last 2 or 3 or 4 days................................
BUt the text "Users Logged In Today" Should Remain Same.
Hope u got it.
Thanks
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Show some statistics next to the link tree if SP1 info is off.
echo '
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td valign="bottom">', theme_linktree(), '</td>
<td align="right">';
if (!$settings['show_sp1_info'])
echo '
', $txt[19], ': ', $context['common_stats']['total_members'], ' • ', $txt[95], ': ', $context['common_stats']['total_posts'], ' • ', $txt[64], ': ', $context['common_stats']['total_topics'], '
', ($settings['show_latest_member'] ? '<br />' . $txt[201] . ' <b>' . $context['common_stats']['latest_member']['link'] . '</b>' . $txt[581] : '');
echo '
</td>
</tr>
</table>';
// Show the news fader? (assuming there are things to show...)
if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
{
echo '
<div class="tborder" style="margin-bottom: 2ex;">
<table border="0" width="100%" cellspacing="1" cellpadding="4">
<tr class="titlebg" align="center">
<td>', $txt[102], '</td>
</tr>
<tr>
<td valign="middle" align="center" style="height: 60px;">';
// Prepare all the javascript settings.
echo '
<div id="smfFadeScroller" style="width: 90%; padding: 2px;"><b>', $context['news_lines'][0], '</b></div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
// The fading delay (in ms.)
var smfFadeDelay = ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], ';
// Fade from... what text color? To which background color?
var smfFadeFrom = {"r": 0, "g": 0, "b": 0}, smfFadeTo = {"r": 255, "g": 255, "b": 255};
// Surround each item with... anything special?
var smfFadeBefore = "<b>", smfFadeAfter = "</b>";
var foreColor, backEl, backColor;
if (typeof(document.getElementById(\'smfFadeScroller\').currentStyle) != "undefined")
{
foreColor = document.getElementById(\'smfFadeScroller\').currentStyle.color.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (backEl.currentStyle.backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined")
backEl = backEl.parentNode;
backColor = backEl.currentStyle.backgroundColor.match(/#([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/);
smfFadeTo = {"r": eval("0x" + backColor[1]), "g": eval("0x" + backColor[2]), "b": eval("0x" + backColor[3])};
}
else if (typeof(window.opera) == "undefined" && typeof(document.defaultView) != "undefined")
{
foreColor = document.defaultView.getComputedStyle(document.getElementById(\'smfFadeScroller\'), null).color.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeFrom = {"r": parseInt(foreColor[1]), "g": parseInt(foreColor[2]), "b": parseInt(foreColor[3])};
backEl = document.getElementById(\'smfFadeScroller\');
while (document.defaultView.getComputedStyle(backEl, null).backgroundColor == "transparent" && typeof(backEl.parentNode) != "undefined" && typeof(backEl.parentNode.tagName) != "undefined")
backEl = backEl.parentNode;
backColor = document.defaultView.getComputedStyle(backEl, null).backgroundColor.match(/rgb\((\d+), (\d+), (\d+)\)/);
smfFadeTo = {"r": parseInt(backColor[1]), "g": parseInt(backColor[2]), "b": parseInt(backColor[3])};
}
// List all the lines of the news for display.
var smfFadeContent = new Array(
"', implode('",
"', $context['fader_news_lines']), '"
);
// ]]></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/fader.js"></script>
</td>
</tr>
</table>
</div>';
}
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge),
and boards. (see below.) */
foreach ($context['categories'] as $category)
{
echo '
<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="5">
<tr>
<td colspan="4" class="catbg', $category['new'] ? '2' : '', '" height="18">';
echo '
', $category['link'], '
</td>
</tr>';
// Assuming the category hasn't been collapsed...
if (!$category['is_collapsed'])
{
/* Each board in each category's boards has:
new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
children (see below.), link_children (easier to use.), children_new (are they new?),
topics (# of), posts (# of), link, href, and last_post. (see below.) */
foreach ($category['boards'] as $board)
{
echo '
<tr class="windowbg2">
<td class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';
echo '</a></td>
<td class="windowbg">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
', $board['description'];
// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext2"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}
echo '
<div style="padding-top: 1px;" class="smalltext2"><i>', $txt['parent_boards'], ': ', implode(', ', $children), '</i></div>';
}
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext2">
', $board['posts'], ' ', $txt[21], ' ', $txt['smf88'], '<br />
', $board['topics'], ' ', $txt[330], '
</span></td>
<td class="smalltext" valign="middle" width="22%">';
/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
', $txt[22], ' ', $txt[30], ' ', $board['last_post']['time'], '<br />
', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link'];
echo '
</td>
</tr>';
}
}
echo '
</table></div>
<br />';
}
if ($context['user']['is_logged'])
{
echo '
<div class="tborder" style="padding: 3px;"><table border="0" width="100%" cellspacing="0" cellpadding="5">
<tr class="titlebg">
<td align="', !$context['right_to_left'] ? 'left' : 'right', '" class="smalltext">
<img src="' . $settings['images_url'] . '/on.gif" alt="" border="0" align="middle" /> ', $txt[333], '
<img src="' . $settings['images_url'] . '/off.gif" alt="" border="0" align="middle" style="margin-left: 4ex;" /> ', $txt[334], '
</td>
<td align="', !$context['right_to_left'] ? 'right' : 'left', '" class="smalltext">';
// Show the mark all as read button?
if ($settings['show_mark_read'])
echo '
<a href="', $scripturl, '?action=markasread;sa=all;sesc=' . $context['session_id'] . '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markread.gif" alt="' . $txt[452] . '" border="0" />' : $txt[452]), '</a>';
echo '
</td>
</tr>
</table></div>';
}
// Here's where the "Info Center" starts...
echo '
<br />
<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="4">
<tr class="titlebg">
<td align="center" colspan="2">', $txt[685], '</td>
</tr>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[214], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=recent">
<img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" border="0" /></a>
</td>
<td class="windowbg2">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table width="100%" border="0">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], ']</td>
<td valign="top">', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '</td>
<td align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=calendar">
<img src="', $settings['images_url'], '/icons/calendar.gif" alt="', $txt['calendar24'], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="smalltext2">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span style="color: #', $modSettings['cal_holidaycolor'], ';">', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span style="color: #', $modSettings['cal_bdaycolor'], ';">', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], '</span> ';
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<b>' : '', $member['name'], $member['is_today'] ? '</b>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span style="color: #', $modSettings['cal_eventcolor'], ';">', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<b>' . $event['title'] . '</b>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '
(<a href="', $scripturl, '?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">', $txt['calendar_how_edit'], '</a>)';
}
echo '
</span>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
}
// Show a member bar. Not heavily ornate, but functional at least.
if ($settings['show_member_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[331], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' : '', '<img src="', $settings['images_url'], '/icons/members.gif" alt="', $txt[332], '" border="0" />', $context['show_member_list'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">
<b>', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' . $txt[332] . '</a>' : $txt[332], '</b>
<div class="smalltext2">', $txt[200], '</div>
</td>
</tr>';
}
// Show YaBB SP1 style information...
if ($settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[645], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=stats">
<img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt[645], '" border="0" /></a>
</td>
<td class="windowbg2" width="100%">
<table border="0" width="90%"><tr>
<td class="smalltext2">
<div style="float: ', !$context['right_to_left'] ? 'left' : 'right', '; width: 50%;">', $txt[490], ': <b>', $context['common_stats']['total_topics'], '</b></div>', $txt[489], ': <b>', $context['common_stats']['total_posts'], '</b><br />', !empty($context['latest_post']) ? '
' . $txt[659] . ': "' . $context['latest_post']['link'] . '" (' . $context['latest_post']['time'] . ')<br />' : '', '
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</td>
<td width="32%" class="smalltext2" valign="top">
', $txt[488], ': <b><a href="', $scripturl, '?action=mlist">', $context['common_stats']['total_members'], '</a></b><br />
', $txt[656], ': <b>', $context['common_stats']['latest_member']['link'], '</b><br />';
// If they are logged in, show their unread message count, etc..
if ($context['user']['is_logged'])
echo '
', $txt['smf199'], ': <b><a href="', $scripturl, '?action=pm">', $context['user']['messages'], '</a></b> ', $txt['newmessages3'], ': <b><a href="', $scripturl, '?action=pm">', $context['user']['unread_messages'], '</a></b>';
echo '
</td>
</tr></table>
</td>
</tr>';
}
// "Users online" - in order of activity.
echo '
<tr>
<td class="catbg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="',
$settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" />', $context['show_who'] ?
'</a>' : '', '
</td>
<td class="windowbg2" width="100%">';
if ($context['show_who'])
echo '
<a href="', $scripturl, '?action=who">';
echo $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];
// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{
echo ' (';
// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];
// How about hidden users?
if (!empty($context['num_users_hidden']))
echo $context['show_buddies'] ? ', ' : '', $context['num_users_hidden'] . ' ' . $txt['hidden'];
echo ')';
}
if ($context['show_who'])
echo '</a>';
echo '
<div class="smalltext2">';
// 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>
<hr />
Membergroup Legend- <font color="aquamarine">[Headmaster]</font> <font color="#FF9966">[Deputy Headmaster]</font> <font color="#FF0000">[Gryffindor]</font> <font color="#FFFF00">[Hufflepuff]</font> <font color="#0066FF">[Ravenclaw]</font> <font color="#00FF00">[Slytherin]</font> <font color="#3fb45e">[Death Eater]</font> <font color="#CC00CC">[Dark Wizard]</font> <font color=gray>[Creature]</font>
<br>
<font color="#CCCCFF">[Adult Wizard]</font> <font color="#339966">[Mediwizard]</font> <font color="#99FF33">[Ministry of Magic]</font> <font color="#FF9900">[Order of the Phoenix]</font> <font color="#0000FF">[Pro Quidditch Player]</font> <font color="#FF3399">[Professor]</font> <font color="#993333">[Shop Keeper]</font> <font color="#669900">[The Dark Lord]</font> <font color="#CC99CC">[Daily Prophet]</font>
<br>
<br>
</td>
</tr>';
// If they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}
echo '
</table></div>';
}
Quote from: Webrunner on December 27, 2006, 05:31:55 PMQuote from: mcalan2001 on December 13, 2006, 02:39:52 PMQuote 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.phpCode Select$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
toCode Select$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:Code Select
krsort($context['users_online_today']);
krsort($context['list_users_online_today']);
change into:Code Select
ksort($context['users_online_today']);
ksort($context['list_users_online_today']);
and the reverse sorting is over ;)
function ssi_usersonlinetoday($output_method = 'echo')
{
global $txt, $scripturl, $db_prefix, $ID_MEMBER, $user_info, $sourcedir;
global $modSettings, $context, $settings, $options;
// Users online today
// Load the users online today.
$date = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);
$s = strpos($user_info['time_format'], '%S') === false ? '' : ':%S';
if (strpos($user_info['time_format'], '%H') === false && strpos($user_info['time_format'], '%T') === false)
$time_fmt = '%I:%M' . $s . ' %p';
else
$time_fmt = '%H:%M' . $s;
$result = db_query("
SELECT
mem.ID_MEMBER, mem.lastLogin, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.groupName
FROM {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP)) WHERE mem.lastLogin >= $midnight", __FILE__, __LINE__);
$context['num_hidden_users_online_today'] = 0;
$context['users_online_today'] = array();
$context['list_users_online_today'] = array();
//$context['num_users_online_today'] = array();
while ($row = mysql_fetch_assoc($result))
{
if (empty($row['showOnline']))
{
$context['num_hidden_users_online_today'] = $context['num_hidden_users_online_today'] + 1;
if (!$user_info['is_admin']) continue;
}
$userday = strftime('%d', forum_time(true));
$loginday = strftime('%d', forum_time(true, $row['lastLogin']));
$yesterday = $userday == $loginday ? '' : $txt['uot_yesterday'];
$lastLogin = $yesterday . strftime($time_fmt, forum_time(true, $row['lastLogin']));
$title = ' title="' . $lastLogin . '"';
// Some basic color coding...
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '"' . $title . ' style="color: ' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '"' . $title . '>' . $row['realName'] . '</a>';
$is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
if ($is_buddy)
{
$link = '<b>' . $link . '</b>';
}
$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']) ? '<i>' . $link . '</i>' : $link;
}
mysql_free_result($result);
krsort($context['users_online_today']);
krsort($context['list_users_online_today']);
$context['num_users_online_today'] = count($context['users_online_today']);
if (!$user_info['is_admin'])
{
$context['num_users_online_today'] = $context['num_users_online_today'] + $context['num_hidden_users_online_today'];
}
//////////////// Showing the users:
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
//if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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>';
}
Quote from: Malek on August 21, 2007, 12:40:00 PM
Question - did anyone manage to install this on BlackDay theme? I tried but it seems that BoardIndex.template.php is missing the part that the modifications should be added before, and I dared not to proceed further.
Quote from: Stargater59 on July 17, 2007, 12:32:35 PM
You need to add the text strings into the modifications.english.php file.
Find that file in your forums directory
Themes/default/languages/Modifications.english.php
And paste this code at the bottom before the ending ?>Code Select<![CDATA[$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';]]>
Is this mod going to be updated for 1.1.3?
Quote from: Powerbob on August 29, 2007, 02:37:59 AM
Tell me, is this mod Dead? ie no more updates? The author hasn't posted since February 17, 2007, 02:46:38 AM, and has not been online since 31 July!
uksort($myArray, "strnatcasecmp");
instead of ksort instruction.
Quote from: hugodiaz on August 30, 2007, 03:48:53 PM
Does this mod work for SMF1.1.3?
Quote from: hugodiaz on September 01, 2007, 02:33:41 AM
Ok, I have some questions:
I want this to also be visible to guests, how can I do that?
Also, how can I make the entire list of users online today be displayed in alphabetical order?
After reading through a few pages of this thread I saw something about changing the order, but I didn't quite understand it. Any help would be greatly appreciated.
Thanks! :)
Quote from: Paracelsus on August 05, 2007, 03:29:21 PM
(...) changing in Sources/BoardIndex.phpCode Select$context['users_online_today'][$row['lastLogin'] . $row['memberName']] = array(
toCode Select$context['users_online_today'][$row['memberName']] = array(
(...) that needs to be much the same edit, but about ten lines down.
krsort($context['users_online_today']);
krsort($context['list_users_online_today']);
uksort($myArray, "strnatcasecmp");
Quote from: Pierre29200 on June 01, 2007, 10:07:14 AMThank you, it helped very much :)
Add in mod version 1.4.0 joined :
french language and
dilbermc Theme
modifications included.
You can have dilbermc Theme only or French language only and the mod works with that you have.
You can use : http://modparser.dev.dansoftaustralia.net/
to see what i add for french language and dilbermc theme and to do these modifications manually if you prefer...
Hope it helps !
Pierre
Quote from: symon on October 09, 2007, 06:42:10 PM
Another case of the user not being listened to.
I'm not surprised Vbulletin is so popular. Fantastic functionality.
This mod got done and the maker disappeared.
Typical smf support. :o
Quote from: symon on October 10, 2007, 05:21:10 AM
Who knows...the point is this mod has been deserted! And it's very popular. But the functionality is never going to get better when the attitude is "it works...now get on with it".
This is one of the most popular mods and it's development is not going to grow.
Mods that don't/can't evolve aren't much use.
QuoteJesus, why are you being so dramatic? I'm pretty sure that someone will take it, since it's so popular.
Quote from: The Burglar! on October 10, 2007, 06:46:06 AM
@symon
what whould you like to see then,... it's just a little bar wich shows who where online that day... nothing more nothning less....
Quote from: symon on October 10, 2007, 06:51:58 AMQuoteJesus, why are you being so dramatic? I'm pretty sure that someone will take it, since it's so popular.
How's that dramatic? Your responses are harsh and dramatic! Response 742 I may add!
Stop insulting people who post for help...I'm sure it's not the SMF way.Quote from: The Burglar! on October 10, 2007, 06:46:06 AM
@symon
what whould you like to see then,... it's just a little bar wich shows who where online that day... nothing more nothning less....
See...you don't even know the mod. It's not just a little bar and why is progression so wrong? Showing a total of all guests online that day in addition to most online at once would be great. Why does suggestions pi$$ SMF off so much?
People just want help sorting this mod on other themes. What kind of crerten post here just to insult "why don't you just read it" [email protected]
Quote from: symon on October 10, 2007, 08:38:33 AM
Paracelsus ...saying "Jesus, why are you being so dramatic?" and patronizing people is out of order and I'm not going to take your bate. Because I comment on that does not give you right to condescend.
(...)
With all due respect ...you need to spend less time patronizing and more time helping. I've tried my best way back near the beginning of this thread. Telling people it's easy when they come to a support forum for help is disrespectful.
QuoteMy comments where not meant to cause issues
Quote from: The Burglar! on October 11, 2007, 09:20:05 AMThanks, please let me know what you discover. :)
@hugodiaz
i'll look into it when i have a little spare time over....
Quote from: pirat3 on July 30, 2007, 11:20:03 PM
hi can anyone tell me what files i need to edit for aa new daamage?
Quote from: snork13 on November 06, 2005, 05:54:53 PM
works great in 1.1rc1, thanks for sharing
-snork
Quote from: pibe86 on October 16, 2007, 11:12:45 PMQuote from: snork13 on November 06, 2005, 05:54:53 PM
works great in 1.1rc1, thanks for sharing
-snork
sir, your signature helps me a lot, thanks
Quote from: Bigguy on October 17, 2007, 01:19:26 AM
reading the .xml file that comes with the mod will enable you to put the edits into that theme so it will work.
Quote from: hugodiaz on October 10, 2007, 04:35:52 PMOk, since I haven't really heard anything about this as yet:
I asked this before, but I still haven't received an answer. Is there a way to make this mod visible to guests? Seeing a long list of member names is a lot more effective than a simple number that I assume many guests do not even notice. :(
Also, I saw that someone else was interested in also having this mod keep track of how many guests accessed the forum in any given day. I'm also very interested in such functionality, and if anyone could offer some help in that area I would greatly appreciate it.
Thank you! :D
Quote from: Bigguy on October 17, 2007, 01:20:39 AM
@ Alundra: Do you mean about keeping a log file of logged on users. ???
8: Undefined index: uot_users_online_today
File: /afs/ist.utl.pt/users/5/0/ist146950/web/forums/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 407
Quote from: symon on October 10, 2007, 05:21:10 AM
Who knows...the point is this mod has been deserted! And it's very popular. But the functionality is never going to get better when the attitude is "it works...now get on with it".
This is one of the most popular mods and it's development is not going to grow.
Mods that don't/can't evolve aren't much use.
echo '
<br />
', $context['show_stats'] && !$settings['show_sp1_info'] ? '<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</div>
</td>
</tr>
<tr>
<td class="windowbg2" width="100%">
<span class="middletext">
', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
<?php
// Version: 1.1; Modifications
$txt['googlevid'] = 'Googlevideo';
$txt['youtube'] = 'YouTube';
// --- Begin FlashChat Integration ---
$txt['fc_chat'] = 'Chat';
$txt['fc_flashchat'] = 'FlashChat';
$txt['fc_flashchat_settings'] = 'FlashChat Integration Settings';
$txt['fc_in_chat'] = 'in Chat';
$txt['fc_not_found'] = 'FlashChat does not appear to be installed!';
$txt['fc_no_guests'] = 'Sorry, guests aren\'t allowed to use the chat!';
$txt['fc_private_room'] = '<i>private room</i>';
$txt['fc_users_online'] = 'Users currently in chat';
// For 'Who's Online' page
$txt['whoall_chat'] = 'In the <a href="' . $boardurl . '?action=chat">Chatroom</a>';
// Settings for admin panel
$txt['fc_height2'] = 'Height';
$txt['fc_inForum'] = 'Display chat window "inside" forum?';
$txt['fc_newWindow'] = 'Open chat in new window?';
$txt['fc_showUsers'] = 'Display Users in Chat at top of forum?';
$txt['fc_showUserCount'] = 'Show number of users on Chat button?';
$txt['fc_size_desc'] = 'The height and width may be an integer (eg. 600 for 600 pixels) or a percentage (eg. a width of 100% will fill the whole screen horizontally)<br /><strong>Note:</strong> If "' . $txt['fc_inForum'] . '" is turned on, please do not use a percentage for the height. It will not work correctly!';
$txt['fc_width'] = 'Width';
// --- End FlashChat Integration ---$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
?>
// --- End FlashChat Integration ---$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
// --- End FlashChat Integration ---
$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
Quote from: Eleven0 on November 03, 2007, 10:29:43 PMYes, and is it possible to have it be the 'last 24 hours' instead of just from 12AM of the day. For example, if you go to the forum at 1AM, it will only show the users who were active between 12 and 1AM.
How can I change 24 hours to something else?
Quote from: VegaTheChosen on November 05, 2007, 10:08:13 PM
ive added this mod to my forum
and it worked with everything but B l a c k - R a i n V.2 by C r i p ~ theme
can anyone point me in the direction of getting this to show on this particular theme?
thanks
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
Quote from: The Burglar! on November 07, 2007, 04:53:20 PM
BoardIndex.template.php search for thisCode Select
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
not every theme has that inside it don't know if you theme does
add after that codeCode Select
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
success ;D
Quote from: The Burglar! on November 07, 2007, 04:53:20 PM
BoardIndex.template.php search for thisCode Select
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
not every theme has that inside it don't know if you theme does
add after that codeCode Select
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
success ;D
$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
$txt['users_online_today'] = 'Online Today';
$txt['num_hits'] = 'Total page views';
$txt['average_hits'] = 'Average page views per day';
<?php
// Version: 1.1; Modifications
$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
?>
<?php
// Version: 1.1; Stats
$txt[888] = 'Most Online';
$txt['smf_stats_1'] = 'Statistics Center';
$txt['smf_stats_2'] = 'General Statistics';
$txt['smf_stats_3'] = 'Top 10 Posters';
$txt['smf_stats_4'] = 'Top 10 Boards';
$txt['smf_stats_5'] = 'Forum History (using forum time offset)';
$txt['smf_stats_6'] = 'Date (yyyy/mm/dd)';
$txt['smf_stats_7'] = 'New Topics';
$txt['smf_stats_8'] = 'New Posts';
$txt['smf_stats_9'] = 'New Members';
$txt['smf_stats_10'] = 'Page views';
$txt['smf_stats_11'] = 'Top 10 Topics (by Replies)';
$txt['smf_stats_12'] = 'Top 10 Topics (by Views)';
$txt['smf_stats_13'] = 'Monthly Summary';
$txt['smf_stats_14'] = 'Most Online';
$txt['smf_stats_15'] = 'Top Topic Starters';
$txt['smf_stats_16'] = 'Most Time Online';
$txt['smf_stats_17'] = 'Best Karma';
$txt['smf_stats_18'] = 'Worst Karma';
$txt['stats_more_detailed'] = 'more detailed »';
$txt['average_members'] = 'Average registrations per day';
$txt['average_posts'] = 'Average posts per day';
$txt['average_topics'] = 'Average topics per day';
$txt['average_online'] = 'Average online per day';
$txt['users_online'] = 'Users Online';
$txt['gender_ratio'] = 'Male to Female Ratio';
$txt['users_online_today'] = 'Online Today';
$txt['num_hits'] = 'Total page views';
$txt['average_hits'] = 'Average page views per day';
$txt['smf_news_1'] = 'comment';
$txt['smf_news_2'] = 'comments';
$txt['smf_news_3'] = 'Write Comment';
$txt['smf_news_error2'] = 'You cannot specify a board that doesn\'t allow guests. Please check the board ID before trying again.';
$txt['xml_rss_desc'] = 'Live information from ' . $context['forum_name'];
?>
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
Quote from: wdm2005 on November 04, 2007, 04:56:36 AM
there is a mod users online in the last tweny four hours its old tho i have it on my forum i had to mauly install it tho
http://custom.simplemachines.org/mods/index.php?mod=479
Quote from: Kimmie on December 04, 2007, 05:08:09 PM
When I changed to the new theme, that info didnt appear - so I added this code, which allows it to work, It just has the #'s (:2 (:2 :0) instead of the "Users Logged In Today" text.Code Select
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
Is there a way to just adjust the above code to add the Users Logged In Today text as well? Or perhaps change the code to where it says that "instead" of the numbers?
Quote from: tick on April 21, 2007, 08:46:44 AMQuote from: a.D on April 20, 2007, 08:12:14 PM
This installed fine on the forum, but it doesn't display on the Dilber theme I'm using.
Can someone help?
I posted this a few pages back. This is how to make it work with dilber mc. http://www.simplemachines.org/community/index.php?topic=55513.msg1001561#msg1001561
Quote from: The Burglar! on November 07, 2007, 04:53:20 PM
BoardIndex.template.php search for thisCode Select
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
not every theme has that inside it don't know if you theme does
add after that codeCode Select
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
success ;D
Quote from: Carceri on October 24, 2007, 05:32:20 AMQuote from: symon on October 10, 2007, 05:21:10 AM
Who knows...the point is this mod has been deserted! And it's very popular. But the functionality is never going to get better when the attitude is "it works...now get on with it".
This is one of the most popular mods and it's development is not going to grow.
Mods that don't/can't evolve aren't much use.
Let me answer this one.
This is a small mod that does not alter the database, and only affects a few files. It shows a list of users online during the day... no more, no less. This is the feature I was missing, and hence I created this mod. Yes, some people would like to have additional features, but some of the features people request (e.g. make the list available to guests) are possible with a small code edit, and it is described in this thread.
The mod is not deserted. If bugs are discovered I'll try to fix them, but from my point of view, this mod does what it is supposed to, and I have no current interest (or time) in adding a bunch of other features.
Just because there isn't a new version out every second day, doesn't mean that the mod doesn't work or is full of bugs. I actually appreciate software that I can just install and have it working, without having to look for a new version that fixes bugs every week or so.
Actually I am surprised that so many people have assumed that since I don't visit this forum, I have left this mod alone, yet I have not received a single PM asking me that question. PM's are forwarded to my e-mail address, so I do read them :)
But yes... if SMF 2.0 does not have this feature built in, I will make this mod compatible with 2.0 as well.
Quote from: The Burglar! on November 07, 2007, 04:53:20 PM
BoardIndex.template.php search for thisCode Select
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';
not every theme has that inside it don't know if you theme does
add after that codeCode Select
// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
success ;D
<td class="windowbg" width="20" valign="middle" align="center">
Quote from: nokoniumThe primary problem is that the code for Users online today has already been added to the Boardindex.template but to be able to use the code it has to be enabled in the theme support for different mods, unfortunately this is missing so the correct code (different to that inserted into the default/boardindex.template) does not show. All I have done is comment out the 'if' (including closing '}' ) that checks for this mod being enabled in the settings.
This is what I altered
FindCode Select// Users online today
if(!empty($settings['use_usersonlinetoday']))
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_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']) && !$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>';
}
Replace withCode Select// Users online today
//if(!empty($settings['use_usersonlinetoday']))
//{
echo '
<tr>
<td class="catbg" colspan="2">', $txt['uot_users_online_today'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';
echo '
<div class="smalltext">';
echo $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
if (!$context['user']['is_guest'])
echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today