<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Module: Online Users</title>
        <description>This module shows which users have been seen online recently. Additionally, it can keep track of the number of guests, some visitor records and of the number of visitors for each forum.

This is a full rewrite of the Phorum 5.0 module by Chris Eaton.

[b]Language file updates are needed[/b]: The language files for german, japanese, polish and spanish need an update. If you want to help out here, then please update your language file of choice with the strings from english.php and upload the updated file in this thread.

[code]
Changelog:
----------

2016-08-31 v2.5.3 by Oliver Riesen-Mallmann 

    - Made XHTML 1.0 Transitional compliant.
    - Changed htmlspecialchars option from ENT_COMPAT to ENT_QUOTES.

2011-01-09 v2.5.2 - Maurice Makaay

    - Added Swedish translation. Thanks to phorum.org user sebdah.

    - Added new German language files. Thanks to Oliver Riesen!

2009-04-01 v2.5.1 - Thomas Seifert

    - fixed delete statement for guest tracking

2009-03-28 v2.5.0 - Thomas Seifert

    - Added database table / support for storing the entries and avoiding overrun
      settings field
      
2008-07-21 v2.4.5 - Maurice Makaay

    - Added an option to configure whether the online users block
      should be shown in the header or the footer of the page.

2008-07-11 v2.4.4 - Maurice Makaay

    - Small fix for XHTML validity of the &quot;Display number of forum
      readers&quot; feature.

2008-01-28 v2.4.3 - Maurice Makaay

    - Fixed some more undefined index warnings that occurred after
      installing the module on a clean system.

    - Added a permission option to the settings which can be used to
      control displaying of the online user list. Choices are:
      all visitors, registered users and admin users.

2008-01-23 v2.4.2 - Maurice Makaay

    - Fix for working around some (harmless) undefined index warnings.

    - Moved deprecated {LANG-&gt;on} string to {LANG-&gt;mod_onlineusers-&gt;on}.

2007-12-30 v2.4.1 - Maurice Makaay

    - Adding reader counts to folders on the index page is now prevented.

    - Added a new setting, as requested by Berti: &quot;Indicate administrators
      in the online user list&quot;.

    - Added updated language files for German forums. Thanks to Berti!

    - Added a Turkish translation. Thanks to Osman Þener!

    - Added a French translation. Thanks to notre-planete.info.

2007-12-28 v2.4.0 - Maurice Makaay

    - Full rewrite release to make full use of new Phorum features.

    - Added module template support to pull the markup code from
      the module code.

    - Records are only shown when available, so the module won&#039;t show
      &quot; on Januari 1, 1970&quot; after installation anymore.

    - Admin users are now indicated by (admin) after their name.
      The &quot;Online Users (Administrator)&quot; header was to unclear to users.

    - Added support for styling through CSS.

    - For guests counts, Google, Yahoo and unknown clients are not counted
      anymore. In the future, we might add extra clients, but these are the
      most apparent ones to push up the guest count.

    - The idle time for a user is now shown in &quot;m:ss&quot; format.

    - The settings page is compressed by putting option help in help
      balloons.

    - If the Phorum user tracking is disabled or higher than the configured
      idle time for this module, the settings screen will show a clear
      error message and a description of what to do about the problem.

    - Cleaned up some code that could be replaced with new 5.2 API code.

    - Added support for 5.2 display names (where the admin can choose whether
      the username or the real_name for the user has to be used as the
      display name).

    - Added support for also keeping track of the number of guest readers
      in a forum.

    - Improved the code for counting forum readers by not setting the
      count for each forum to zero before counting the readers. We can
      simply asume zero readers if the forum_id is not available in the
      reader list. This will also prevent possible undefined index
      errors in case new forums are added.

    - Users for which &quot;hide_activity&quot; is configured are added to the
      guest count. They will still count as a user for determining the
      record number of users.

    - Added some default settings for the module.

2007-12-14 v2.3.1 - Sunbringer

    - Modified version to work with 5.2.

2004-03-23 v1.0.0 - Chris Eaton

    - Initial Phorum 5.0 release.

[/code]</description>
        <link>https://www.phorum.org/support/read.php?62,126368,126368#msg-126368</link>
        <lastBuildDate>Tue, 21 Jul 2026 02:11:43 -0500</lastBuildDate>
        <generator>Phorum 6.0.4</generator>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,161843#msg-161843</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,161843#msg-161843</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Scott Finegan</strong><br />
The following is what I would try.<br />
If you can get to the admin, make the phorum unavailable<br />
Get a backup  :)   of everything.    <br />
    Turn the module off.<br />
    Clear/Empty the cache. Verify it has been emptied, or do it manually using the Hosts &quot;panel&quot;<br />
    <br />
Using phpmyadmin, or another admin tool, run maintenance on the table.<br />
Verify the &quot;Online Users&quot; scripts have not been tampered with.<br />
<br />
Re-enable and test.<br />
<br />
As a last resort, empty the (Online Users) table (I don&#039;t remember what the repercussions of this are, if any.)</div></blockquote>
<br />
<br />
<br />
<br />
So far I know it&#039;s not the cache since I create new folder and moved the cache path over to it. <br />
<br />
I&#039;ll check on database and do a maintenance on it and reinstall module to see if it fixes it.<br />
<br />
Thank you for your inputs and help with this<br />
<br />
Bill]]></description>
            <dc:creator>CBiLL</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 23 Jan 2018 16:30:29 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,161842#msg-161842</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,161842#msg-161842</link>
            <description><![CDATA[ The following is what I would try.<br />
If you can get to the admin, make the phorum unavailable<br />
Get a backup  :)   of everything.    <br />
    Turn the module off.<br />
    Clear/Empty the cache. Verify it has been emptied, or do it manually using the Hosts &quot;panel&quot;<br />
    <br />
Using phpmyadmin, or another admin tool, run maintenance on the table.<br />
Verify the &quot;Online Users&quot; scripts have not been tampered with.<br />
<br />
Re-enable and test.<br />
<br />
As a last resort, empty the (Online Users) table (I don&#039;t remember what the repercussions of this are, if any.)]]></description>
            <dc:creator>Scott Finegan</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 23 Jan 2018 09:16:46 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,161841#msg-161841</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,161841#msg-161841</link>
            <description><![CDATA[ My online user just stop working and this error is displayed<br />
<br />
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 81 bytes) in /home/garyk/public_html/include/db/mysql/mysqli.php on line 290<br />
<br />
<br />
I tried everything to get it working again but no go.  It can&#039;t be the server because I have more than one phorum installed and online user are working fine on other phorum <br />
Thank you<br />
Bill]]></description>
            <dc:creator>CBiLL</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 22 Jan 2018 23:27:33 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,160801#msg-160801</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,160801#msg-160801</link>
            <description><![CDATA[ New version:<br />
<br />
<pre class="bbcode">
2016-08-31 v2.5.3 by Oliver Riesen-Mallmann &lt;oliver@riesen.org&gt;
    - Made XHTML 1.0 Transitional compliant.
    - Changed htmlspecialchars option from ENT_COMPAT to ENT_QUOTES.
</pre>]]></description>
            <dc:creator>Oliver Riesen-Mallmann</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Wed, 31 Aug 2016 08:15:08 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,155711#msg-155711</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,155711#msg-155711</link>
            <description><![CDATA[ I just found that the number of guests is incorrect when you come back to the forum after being inactive: it seems to keep track of all guests during your inactivity period, and not the real current number of guests. When you reload the page a second time, it becomes correct (note that it&#039;s not a browser cache problem, because the first load is also a complete loading of the page).<br />
<br />
Example: You&#039;re visiting the forum as guest, together with other two guests. You correctly see the number of guests is 3. Then, some hours later, you come back to the forum, the page is reloaded (because you can notice a server delay while list.php is working) and you still see the number of guests is 3. But then you reload the page a second time, and voila, the number of guests is, for example, 2 (which is the correct current number).<br />
<br />
Why is this? Why I always see a change in the number of guests when I reload the page a second time? Can it be corrected somehow and get the correct number the first time?<br />
<br />
BTW, my settings are: Track User Usage &quot;Constantly&quot;; Idle time 3 minutes; Cache time 0; Keep records disabled; Display forum readers enabled.]]></description>
            <dc:creator>cesss</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Fri, 27 Mar 2015 07:01:52 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,155653#msg-155653</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,155653#msg-155653</link>
            <description><![CDATA[ I googled      mysql to db2       here is the first from the results<br />
<br />
IBM Redbooks | MySQL to DB2 Conversion Guide<br />
www.redbooks.ibm.com/abstracts/sg247093.html?Open - Cached<br />
This book is an informative guide that describes how to convert the database system from MySQL™ 5.1 to DB2® V9.7 on Linux® and the steps that are involved ...<br />
<br />
<a href="http://www.redbooks.ibm.com/abstracts/sg247093.html?Open" target="_blank"  rel="nofollow">MySQL to DB2 Conversion Guide</a>]]></description>
            <dc:creator>Scott Finegan</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Thu, 12 Feb 2015 09:52:52 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,155652#msg-155652</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,155652#msg-155652</link>
            <description><![CDATA[ Thanks for your response. I understand what you mean. If I had such great knowledge on php i would have added support to it. When I enable this module i get missing file 1.php under ../mods/onlineuser/db/db2/1.php which i guess is just for creating table. That part is easy but inside this module I don&#039;t know what sql statements are used which is specific to mysql and not supported by db2]]></description>
            <dc:creator>radioactive9</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Thu, 12 Feb 2015 00:16:33 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,155651#msg-155651</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,155651#msg-155651</link>
            <description><![CDATA[ well, can only be done by someone with db2 experience and a running system with it. <br />
As there is no official db2 support in phorum anyway ...]]></description>
            <dc:creator>Thomas Seifert</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Wed, 11 Feb 2015 13:41:17 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,155650#msg-155650</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,155650#msg-155650</link>
            <description><![CDATA[ Sorry to dig this up after so many days. It is definitely a awesome module and beleive the only option for people like me but sadly it doesn&#039;t support db2 yet. Can someone please add db2 support for it. People who are bound to use DB2 as there backend will find this very useful. Please]]></description>
            <dc:creator>radioactive9</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Wed, 11 Feb 2015 07:45:57 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,155299#msg-155299</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,155299#msg-155299</link>
            <description><![CDATA[ Thanks for this awesome module!!!]]></description>
            <dc:creator>TTV</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 01 Sep 2014 05:42:28 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,152699#msg-152699</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,152699#msg-152699</link>
            <description><![CDATA[ Hi,<br />
<br />
How do you change the size of the &quot;Online Users&quot; text? I&#039;ve searched all through the mod files but can&#039;t find it. Thanks in advance for any help.]]></description>
            <dc:creator>marcus</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Wed, 05 Dec 2012 00:49:28 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,152054#msg-152054</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,152054#msg-152054</link>
            <description><![CDATA[ Thanks, innstalled :-)]]></description>
            <dc:creator>laurenz</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 11 Sep 2012 12:22:21 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,152053#msg-152053</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,152053#msg-152053</link>
            <description><![CDATA[ Try the &quot;Forum Stats&quot; module. It has an entry for the most recent user in the setup.]]></description>
            <dc:creator>Scott Finegan</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 11 Sep 2012 07:31:40 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,152052#msg-152052</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,152052#msg-152052</link>
            <description><![CDATA[ It would be nice if the could be an option to include the names of the latest members registered to the forum.<br />
Between the names of online users and the statistics there could be a section saying something like,<br />
&quot;We welcome our newest members: John Johsen, Simon Smith, Jan Jansen.&quot;<br />
<br />
How would I go about including that?<br />
<br />
Laurenz]]></description>
            <dc:creator>laurenz</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 11 Sep 2012 05:45:37 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,151376#msg-151376</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,151376#msg-151376</link>
            <description><![CDATA[ I have a translation to Thai language. <br />
<br />
Thank you for this nice module.]]></description>
            <dc:creator>tonydev</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 08 May 2012 12:47:33 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,149656#msg-149656</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,149656#msg-149656</link>
            <description><![CDATA[ I have made a translation to Norwegian.<br />
<br />
Thank you for this nice module]]></description>
            <dc:creator>laurenz</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Fri, 16 Sep 2011 14:24:35 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,147105#msg-147105</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,147105#msg-147105</link>
            <description><![CDATA[ Is it possible to have this module NOT display pending registrations?<br />
<br />
For example, a spam bot will register with the name &quot;pornvids&quot; and it will appear as a user online for 10 minutes. This is offensive to some of my members.<br />
<br />
I know I should get around to employing the use of the spam hurdles module, but I thought that perhaps the above would be a simple enough change.]]></description>
            <dc:creator>Robert Angle</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Sat, 11 Dec 2010 07:53:06 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,146868#msg-146868</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,146868#msg-146868</link>
            <description><![CDATA[ Hello!<br />
<br />
I made a tiny correction in the onlineusers.tpl code on line 8. It displays an unnecessary space between the username and comma in the Online Users display. The extra space is right after the closing link (&lt;/a&gt;) tag. I then replaced the space after the first {IF OU-&gt;ADMIN OR OU-&gt;IDLE} statement, since the space should only be shown if a user is an administrator and/or idle (right before the opening parenthesis). <br />
<br />
<b>The original code is as follows:</b><br />
<pre class="bbcode">
{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}, {/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot;&gt;{OU-&gt;NAME}&lt;/a&gt; {IF OU-&gt;ADMIN OR OU-&gt;IDLE}({/IF}{IF OU-&gt;ADMIN}{LANG-&gt;mod_onlineusers-&gt;Administrator}{/IF}{IF OU-&gt;ADMIN AND OU-&gt;IDLE}, {/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;ADMIN OR OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre>
<br />
<b>My fixed code, with the moved space:</b><br />
<pre class="bbcode">
{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}, {/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot;&gt;{OU-&gt;NAME}&lt;/a&gt;{IF OU-&gt;ADMIN OR OU-&gt;IDLE} ({/IF}{IF OU-&gt;ADMIN}{LANG-&gt;mod_onlineusers-&gt;Administrator}{/IF}{IF OU-&gt;ADMIN AND OU-&gt;IDLE}, {/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;ADMIN OR OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre>
<br />
Tiny fix, but I hope it&#039;s helpful. :)]]></description>
            <dc:creator>rozmichelle</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 15 Nov 2010 19:09:30 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,144707#msg-144707</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,144707#msg-144707</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Maurice Makaay</strong><br />I packed the 2.5.1 release and updated the thread starter therefore.</div></blockquote>
<br />
Thanks Maurice!]]></description>
            <dc:creator>Oliver Riesen-Mallmann</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 31 May 2010 04:37:05 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,144705#msg-144705</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,144705#msg-144705</link>
            <description><![CDATA[ Removing it would remove the module from the module list, since the script only looks at the start message of the thread. I packed the 2.5.1 release and updated the thread starter therefore.]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 31 May 2010 04:23:00 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,144703#msg-144703</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,144703#msg-144703</link>
            <description><![CDATA[ Hi Maurice,<br />
<br />
can you remove please your files for version 2.4.5?<br />
<br />
I have already installed the newer version 2.5.1 from Thomas and also Check Modules for Upgrades (version 5.2.1.06) so I get always the advice that there is an update available (see pictures below).<br />
<br />
Thanks<br />
Oliver]]></description>
            <dc:creator>Oliver Riesen-Mallmann</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 31 May 2010 04:05:50 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,144576#msg-144576</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,144576#msg-144576</link>
            <description><![CDATA[ A better way could be to use Phorum&#039;s private key ($PHORUM[&quot;private_key&quot;]) as an addition to the cache key. That one is a big random string. Possibly this could be added to the cache layers directly, because when using the same source, more caches could be running into this.]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Thu, 20 May 2010 02:39:07 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,144574#msg-144574</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,144574#msg-144574</link>
            <description><![CDATA[ I have a shared Phorum installation that uses the same files over several domains, with different database configs for each domain.  The online users module doesn&#039;t know this so the cache file was getting messed up with data from all the sites, so I changed the key to be unique like this:<br />
<br />
[code=&quot;diff&quot;]<br />
--- mods/onlineusers/onlineusers.php	(revision 762)<br />
+++ mods/onlineusers/onlineusers.php	(working copy)<br />
@@ -62,7 +62,7 @@<br />
     	//print &quot;DEBUG: is user&quot;;<br />
         if (onlineusers_db_search($track_id,&#039;guest&#039;) !== NULL) {<br />
             onlineusers_db_delete($track_id,&#039;guest&#039;);<br />
-            phorum_cache_remove(&#039;onlineusers&#039;,$PHORUM[&#039;vroot&#039;].&quot;-data&quot;);<br />
+            phorum_cache_remove(&#039;onlineusers&#039;,$PHORUM[&quot;DBCONFIG&quot;][&quot;name&quot;].&quot;-&quot;.$PHORUM[&#039;vroot&#039;].&quot;-data&quot;);<br />
         } else {<br />
             return;<br />
         }<br />
@@ -130,7 +130,7 @@<br />
     // cached data is available yet, then update the list of online users.<br />
     $do_update = true;<br />
     if (!empty($PHORUM[&#039;mod_onlineusers&#039;][&#039;cache_time&#039;])) {<br />
-        $PHORUM[&#039;mod_onlineusers&#039;][&#039;data&#039;] = phorum_cache_get(&#039;onlineusers&#039;,$PHORUM[&#039;vroot&#039;].&quot;-data&quot;);<br />
+        $PHORUM[&#039;mod_onlineusers&#039;][&#039;data&#039;] = phorum_cache_get(&#039;onlineusers&#039;,$PHORUM[&quot;DBCONFIG&quot;][&quot;name&quot;].&quot;-&quot;.$PHORUM[&#039;vroot&#039;].&quot;-data&quot;);<br />
         if($PHORUM[&#039;mod_onlineusers&#039;][&#039;data&#039;] !== NULL) {<br />
             $do_update = false;<br />
         }<br />
@@ -139,9 +139,10 @@<br />
     if ($do_update) {<br />
         mod_onlineusers_update();<br />
         if (!empty($PHORUM[&#039;mod_onlineusers&#039;][&#039;cache_time&#039;])) {<br />
+            #print &quot;Debug: cache key=&quot; . $PHORUM[&quot;DBCONFIG&quot;][&quot;name&quot;].&quot;-&quot;.$PHORUM[&#039;vroot&#039;].&quot;-data&quot;;<br />
             phorum_cache_put(<br />
             	&#039;onlineusers&#039;,<br />
-            	$PHORUM[&#039;vroot&#039;].&quot;-data&quot;,<br />
+            	$PHORUM[&quot;DBCONFIG&quot;][&quot;name&quot;].&quot;-&quot;.$PHORUM[&#039;vroot&#039;].&quot;-data&quot;,<br />
                 $PHORUM[&#039;mod_onlineusers&#039;][&#039;data&#039;],<br />
                 $PHORUM[&#039;mod_onlineusers&#039;][&#039;cache_time&#039;]<br />
             );<br />
<br />
[/code]<br />
<br />
Maybe there&#039;s a better way, but it&#039;s working well for me.<br />
<br />
Thanks<br />
Skye]]></description>
            <dc:creator>Skye N.</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Wed, 19 May 2010 19:56:50 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,142951#msg-142951</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,142951#msg-142951</link>
            <description><![CDATA[ In your module hack, you are doing time formatting yourself. That is a bad idea. Think only of the possibility for users and administrators to change the timezone, which will render your code to be incorrect. Additionally, there are functions available for formatting time, so there&#039;s no need to do all the hard labor yourself. I think your time format could be generated with the following code.<br />
[code=php]<br />
$idle = phorum_date(&quot;%l:%M %p&quot;, $user[&#039;date_last_active&#039;]);<br />
[/code]<br />
(in a general hack for the public, it would be even better to use one of the predefined time formats from the language file, instead of the hard-coded &quot;%l:%M %p&quot;)<br />
<br />
#1) The data is not available, because it takes additional SQL queries to grab the groups from the database and put them in the user data arrays. You could try if changing phorum_api_user_get($list) to phorum_api_user_get($list, TRUE) will work for you. It should add the group data to the users that you are looping over for formatting the output.<br />
<br />
#2) Personally, I would find it rather invasive when my clickpath could be followed through this module. Are you sure that your user base is waiting for this feature? But putting that aside: the data that you want to display is not stored anywhere. The only thing that is stored, is the id of the forum in which the user last clicked. If you want to track all the extra data, then you would have to code all this tracking yourself, e.g. by storing the information in a separate database table. This could become quite heavy on a busy forum, since every action is logged.]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Sun, 31 Jan 2010 03:22:05 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,142950#msg-142950</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,142950#msg-142950</link>
            <description><![CDATA[ Hello!<br />
<br />
First, a contribution for once!  How to change the Idle time for a user to the time they last clicked/refreshed a page in AM/PM format (rather than how many minutes/seconds they are idle):<br />
<br />
Starting at line 168 in <b>onlineusers.php</b>:<br />
<pre class="bbcode">
// Format the user&#039;s idle time.
        $idle = 0;
        if ($PHORUM[&#039;user&#039;][&#039;user_id&#039;] &amp;&amp;
            $user[&#039;user_id&#039;] == $PHORUM[&#039;user&#039;][&#039;user_id&#039;]) {
            // NOOP: Don&#039;t show idle time for the active Phorum user.
        }
        elseif ($PHORUM[&#039;mod_onlineusers&#039;][&#039;show_idle_time&#039;]) {
            <span style="color:#FF0000">$idle_secs = ($user[&#039;date_last_active&#039;] - <span style="color:#00CCFF">7</span>*60*60)%(24*60*60);</span>
			<span style="color:#FF0000">$ampm = ( ($idle_secs/3600) &lt; 11) ? AM : PM ;</span>
            if ($idle_secs) {
              <span style="color:#FF0000">$idle = sprintf(&quot;%d:%02d %s&quot;,$idle_secs/7200, floor(($idle_secs%3600)/60), $ampm);</span>
            }
        }</pre>
Please do note that the number highlighted in blue (the 7) is changeable to determine the timezone you are in.  Remove the number and the * that follows to set the timezone to GMT.<br />
<br />
So the result is getting:<br />
Pmac627 (9:34 PM)  --&gt; Time of the last page refresh<br />
Rather than:<i></i><br />
Pmac627 (34:08)  --&gt; <i>Time elapsed since last page refresh</i><br />
<br />
Second, a really easy modification that helps reduce the clutter if you have a lot of visitors at once.<br />
Showing the idle time in the form of a tooltip rather than next to the username.<br />
<br />
Starting at line 8 in <b>onlineusers.tpl</b>:<br />
<pre class="bbcode">
{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}, {/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot; <span style="color:#FF0000">title=&quot;{IF OU-&gt;IDLE}Idle since {OU-&gt;IDLE}{ELSE}Currently Active{/IF}&quot;</span> &gt;{OU-&gt;NAME}&lt;/a&gt; {IF OU-&gt;ADMIN OR OU-&gt;IDLE}({/IF}{IF OU-&gt;ADMIN}{LANG-&gt;mod_onlineusers-&gt;Administrator}{/IF}{IF OU-&gt;ADMIN AND OU-&gt;IDLE}, {/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;ADMIN OR OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre>
With that, you wont see the users idle time next to their username.  It will appear in a tiny box when you hover your mouse pointer over it.<br />
~~~~~~~~~~~~~~~~~<br />
Now with those presented, I have 2 questions of my own.<br />
<br />
#1)  I saw some discussion about in the hacks forum, but I determined that it should work with the onlineusers module, hence the question being here.  I would like to figure out how to add color to the usernames in the onlineusers module, depending on their group.  I know how to go about that more or less, but I am having difficulty finding the variable I need.  Is there a universal variable used for groups, perhaps a number?  There must be one, because it is utilized by the user tagging module to enable an administrator to set a tag with certain groups.<br />
<br />
#2)  This is far more complex and might merit a separate module, though I see it as another possible upgrade/hack to this module.  A &quot;Last Click&quot; page as it is commonly known as.  Basically, its a page that expands upon what the Onlineusers module already does.  It lists, in order of most recent activity, the users currently online as well as the time of the last click (idle time) and what the last page was that they were viewing/posting in.  All of the necessary variables are already used in onlineusers except the record of the last page visited by a specific user.  Is there a variable for this already in onlineusers.php?  I have not found it if it is there.  The module keeps track of how many views each forum and thread has received, so I would <i>like</i> to assume that even for a brief moment, the forum/thread being viewed is kept track of, whether it is simply the numerical values given to the page for the database or the physical URL.<br />
<br />
I hope some of that made sense... it is late here.  If either or both of these questions are not supposed to be in this thread, (despite my believing they are appropriate here), I will gladly move them to wherever they belong as directed.<br />
<br />
Thank you for any and all help!]]></description>
            <dc:creator>Pmac627</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Sat, 30 Jan 2010 23:30:00 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,142508#msg-142508</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,142508#msg-142508</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Joe Curia</strong><br />
Some of the features you have requested can be easily (and most practically) implemented in the template provided by this module.  If you have a custom template, copy the mods/onlineusers/templates/emerald folder to mods/onlineusers/templates/yourtemplate then edit the css.tpl and onlineusers.tpl as needed.  For example:<br />
<pre class="bbcode">
{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}, {/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot;&gt;{OU-&gt;NAME}&lt;/a&gt; {IF OU-&gt;ADMIN OR OU-&gt;IDLE}({/IF}{IF OU-&gt;ADMIN}{LANG-&gt;mod_onlineusers-&gt;Administrator}{/IF}{IF OU-&gt;ADMIN AND OU-&gt;IDLE}, {/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;ADMIN OR OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre>
in order to remove the (admin) and bold the admin&#039;s name could become:<br />
<pre class="bbcode">
{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}, {/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot;<span style="color:#FF0000"><b>{IF OU-&gt;ADMIN} style=&quot;font-weight: bold;&quot;{/IF}</b></span>&gt;{OU-&gt;NAME}&lt;/a&gt; {IF OU-&gt;IDLE}({/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre>
or, in order to separate the names with a line break could become:<br />
<pre class="bbcode">{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}<span style="color:#FF0000"><b>&lt;/br&gt;</b></span>{/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot;&gt;{OU-&gt;NAME}&lt;/a&gt; {IF OU-&gt;ADMIN OR OU-&gt;IDLE}({/IF}{IF OU-&gt;ADMIN}{LANG-&gt;mod_onlineusers-&gt;Administrator}{/IF}{IF OU-&gt;ADMIN AND OU-&gt;IDLE}, {/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;ADMIN OR OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre></div></blockquote>
<br />
<br />
<br />
Thank you I will give that a try!<br />
<br />
Bill]]></description>
            <dc:creator>CBiLL</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 29 Dec 2009 17:25:27 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,142507#msg-142507</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,142507#msg-142507</link>
            <description><![CDATA[ Some of the features you have requested can be easily (and most practically) implemented in the template provided by this module.  If you have a custom template, copy the mods/onlineusers/templates/emerald folder to mods/onlineusers/templates/yourtemplate then edit the css.tpl and onlineusers.tpl as needed.  For example:<br />
<pre class="bbcode">
{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}, {/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot;&gt;{OU-&gt;NAME}&lt;/a&gt; {IF OU-&gt;ADMIN OR OU-&gt;IDLE}({/IF}{IF OU-&gt;ADMIN}{LANG-&gt;mod_onlineusers-&gt;Administrator}{/IF}{IF OU-&gt;ADMIN AND OU-&gt;IDLE}, {/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;ADMIN OR OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre>
in order to remove the (admin) and bold the admin&#039;s name could become:<br />
<pre class="bbcode">
{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}, {/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot;<span style="color:#FF0000"><b>{IF OU-&gt;ADMIN} style=&quot;font-weight: bold;&quot;{/IF}</b></span>&gt;{OU-&gt;NAME}&lt;/a&gt; {IF OU-&gt;IDLE}({/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre>
or, in order to separate the names with a line break could become:<br />
<pre class="bbcode">{LOOP MOD_ONLINEUSERS-&gt;USERS}{VAR OU MOD_ONLINEUSERS-&gt;USERS}{IF NOT FIRST}<span style="color:#FF0000"><b>&lt;/br&gt;</b></span>{/IF}&lt;a href=&quot;{OU-&gt;PROFILE}&quot;&gt;{OU-&gt;NAME}&lt;/a&gt; {IF OU-&gt;ADMIN OR OU-&gt;IDLE}({/IF}{IF OU-&gt;ADMIN}{LANG-&gt;mod_onlineusers-&gt;Administrator}{/IF}{IF OU-&gt;ADMIN AND OU-&gt;IDLE}, {/IF}{IF OU-&gt;IDLE}{OU-&gt;IDLE}{/IF}{IF OU-&gt;ADMIN OR OU-&gt;IDLE}){/IF}{VAR FIRST 0}{/LOOP MOD_ONLINEUSERS-&gt;USERS}</pre>]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 29 Dec 2009 13:36:32 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,142506#msg-142506</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,142506#msg-142506</link>
            <description><![CDATA[ And to add to Bill&#039;s requests, I would like to see the names listed one per line...<br />
<br />
Bill<br />
Bob<br />
Joe<br />
Maurice<br />
Thomas<br />
<br />
I utilize a sidebar on my site, and I thought it would be cool to put this information in the side bar somehow instead of right before the footer.<br />
<br />
- Bob]]></description>
            <dc:creator>Robert Angle</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 29 Dec 2009 12:32:48 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,142505#msg-142505</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,142505#msg-142505</link>
            <description><![CDATA[ I have a couple feature request for this module and if I had the skill to code I would been more than happy to code it in myself so I hope someone would be willing to pick it up and code some new features to this module.<br />
<br />
I would like to see total count amount of both the Online Users and Online Hidden Users next to the Online Users title <br />
Something like this  in the title box at the top - Online Users 243 Users (23 Hidden)<br />
Total counts of online and hidden are viewable to everyone.<br />
<br />
I would like the administrators to be able to see the hidden usernames in the Online Users box with the ( )  like this (Maurice)  but it is still hidden from the public and only viewable to the administrators. The hidden username are still hidden from regular user or public.<br />
<br />
I would like to remove the (admin) next to the adminstrator username and make the adminstrator username bold in letter instead. Or make a different color text for the adminstrator.<br />
<br />
Thank you<br />
Bill]]></description>
            <dc:creator>CBiLL</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 29 Dec 2009 11:15:26 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,126368,142474#msg-142474</guid>
            <title>Re: Module: Online Users</title>
            <link>https://www.phorum.org/support/read.php?62,126368,142474#msg-142474</link>
            <description><![CDATA[ Actually, that is probably based on the General Settings &gt; Cookie/Session Settings &gt; Track User Usage.  Chances are you have this set to 15 minutes.  Depending on how busy your site is and how powerful your server, you can set this all the way to &quot;Constantly.&quot;]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Thu, 24 Dec 2009 18:15:26 -0600</pubDate>
        </item>
    </channel>
</rss>
