Module: Online Users
Posted by Maurice Makaay
Re: Module: Online Users November 07, 2008 07:49AM |
Admin Registered: 19 years ago Posts: 8,532 |
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
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 07:53AM |
Registered: 17 years ago Posts: 1,301 |
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
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 12:44PM |
Registered: 15 years ago Posts: 11 |
Re: Module: Online Users November 07, 2008 01:04PM |
Registered: 17 years ago Posts: 1,301 |
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
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
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_outputNext, add these lines to the onlineusers.php
Also, comment out/remove this line from the onlineusers.phpLanguage: PHP// Load the online user data for use in the header function phorum_mod_onlineusers_start_output() { return phorum_mod_onlineusers_before_footer(TRUE); }
Next, add your include line where desired in the header.tpl file.Language: PHPinclude(phorum_get_template(';onlineusers::onlineusers';));
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 01:07PM |
Admin Registered: 19 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Online Users November 07, 2008 02:47PM |
Registered: 17 years ago Posts: 1,301 |
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:
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
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 03:50AM |
Registered: 20 years ago Posts: 174 |
Re: Module: Online Users December 20, 2008 08:01PM |
Admin Registered: 19 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Online Users December 22, 2008 05:06PM |
Registered: 20 years ago Posts: 174 |
Re: Module: Online Users December 22, 2008 05:13PM |
Admin Registered: 19 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.