1
tempo
Who's Oline block - question
  • 2003/12/13 13:23

  • tempo

  • Just popping in

  • Posts: 96

  • Since: 2003/11/12


look at this
"4 user(s) are online (4 user
s) are browsing Predictions)"

i want to know if there is any way to insert a breakline after the word "online" . The result must be something like this

"4 user(s) are online
(4 user(s) are browsing Predictions)"

2
Herko
Re: Who's Oline block - question
  • 2003/12/13 14:20

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


<{$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="javascript:openWithSelfMain('<{$xoops_url}>/misc.php?action=showpopups&type=online','Online',420,350);"><{$block.lang_more}></a>


This is the code for the who's online block template. As you can see, the Smarty Tag <{$block.online_total}> displays the text you want to change. This means that we have to dive into the block generation file and change it there.

The who's online block is generated inthe /modules/system/blocks/system_blocks.php file. There, on line 69, you see the following code:
$block['online_total'] .= ' ('.sprintf(_ONLINEPHRASEX$mytotal$xoopsModule->getVar('name')).')';

This code generates the text, starting with the (. You want a linebreak before the opening (, so you'll have to change the code on line 69 to:
$block['online_total'] .= '[color=CC0000]<br />[/color]('.sprintf(_ONLINEPHRASEX$mytotal$xoopsModule->getVar('name')).')';


Save the file, reupload to the modules/system/blocks/ folder on your server, and that should do the trick

Herko

3
tempo
Re: Who's Oline block - question
  • 2003/12/13 22:26

  • tempo

  • Just popping in

  • Posts: 96

  • Since: 2003/11/12


thanks a lot.

it works. you can see it in action http://www.netbet.gr

Login

Who's Online

253 user(s) are online (180 user(s) are browsing Support Forums)


Members: 0


Guests: 253


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits