xoops forums

tcnet

Friend of XOOPS
Posted on: 2011/1/1 14:32
tcnet
tcnet (Show more)
Friend of XOOPS
Posts: 297
Since: 2006/5/12
#1

Display the Whos Online Block from a Theme

Want to display the Who's Online block anywhere in a theme? This worked for me.

<{php}>
$block b_system_online_show();
print 
"<div>".$block['online_total']."<br /><br />".
$block['lang_members'].": ".$block['online_members']."<br />".
$block['lang_guests'].": ".$block['online_guests']
.
"<br /><br />".
$block['online_names']
.
"<a href= &92"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&type=online','Online',420,350);&92" title=&92"".$block['lang_more']."&92">
    "
.$block['lang_more']."
</a>
</div>"
;
<{/
php}>


EDIT: The backslash is not displaying with dhtml editor. Manually replace &92 with backslash.

Anonymous

Posted on: 2011/1/1 14:38
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#2

Re: Display the Whos Online Block from a Theme

Try blocks anywhere:
http://www.xuups.com/modules/publisher/item.php?itemid=10

tcnet

Friend of XOOPS
Posted on: 2011/1/1 14:49
tcnet
tcnet (Show more)
Friend of XOOPS
Posts: 297
Since: 2006/5/12
#3

Re: Display the Whos Online Block from a Theme

Client did not want to install additional files or modify core files. This application required all code in the theme.