Firefox PHP

Module: Online Users

Posted by Maurice Makaay 
Re: Module: Online Users
November 07, 2008 01:49PM
That's not really a possibility by simply changing the settings, because the position that you are talking about is inside the header of the page. You can disable showing of the online users module info. After that you can hack your header.tpl to put the info in there. I think that should work. Never tried it myself.

The template code that you can use can be found in mods/onlineusers/templates/emerald/onlineusers.tpl


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Online Users
November 07, 2008 01:53PM
Would a simple {include onlineusers::onlineusers} work in the header.tpl file?


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Online Users
November 07, 2008 06:44PM
None of this works :(
Re: Module: Online Users
November 07, 2008 07:04PM
First, sorry for the mistype, it should be {INCLUDE "onlineusers::onlineusers"} in the header.tpl file.

However, this module does not load the data for the template that early in the page building process. I'm afraid your going to have to really hack to get what you want.

First, add this line to the info.txt
hook: start_output|phorum_mod_onlineusers_start_output
Next, add these lines to the onlineusers.php
Language: PHP
// Load the online user data for use in the header function phorum_mod_onlineusers_start_output() { return phorum_mod_onlineusers_before_footer(TRUE); }
Also, comment out/remove this line from the onlineusers.php
Language: PHP
include(phorum_get_template(';onlineusers::onlineusers';));
Next, add your include line where desired in the header.tpl file.

Finally, visit the admin section so that Phorum will update the Online Users module information.

However, this isn't perfect either as an empty box will appear on pages that don't have Online User data. But this could help you get started.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Online Users
November 07, 2008 07:07PM
I noted this down for the development of the module. It needs a rewrite, because of the shabby anonymous user storage system. I'll shuffle the code around to make it work in the header as wel then. I see no problem in moving that code back to the start of the request and only using the after_header and after_footer code for displaying.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Online Users
November 07, 2008 08:47PM
Sorry for the incomplete hack above, but I was a bit rushed with a phone call coming in.

To fully implement the hack so that it does not show an empty box on pages without online user data, edit the onlineusers/templates/emerald/onlineusers.tpl file and add the following line as the first line in the file:
{IF MOD_ONLINEUSERS}
and add the following as the last line in that file:
{/IF}


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: Online Users
December 20, 2008 09:50AM
does this module require heavy resources usage on server?
Re: Module: Online Users
December 21, 2008 02:01AM
Not really. Only some basic queries and caching is done to limit the resource usage.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Online Users
December 22, 2008 11:06PM
well I guess it is actually the track usage action what is more resource intensive.
Is that *really* heavy? I am giving this a try, set it to 10 minutes. I think it can be reasonable balance between tracking time / resources used
Re: Module: Online Users
December 22, 2008 11:13PM
Let put it like this: only if you have a very busy server, you would notice the user tracking. These updates are very light and a regular system should not be bothered by them.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login