Display Format

DWho's Online module (mod_dwhosonline) shows members, guests and robots on the site.

Display Format

Postby mycatsheaven » Thu Mar 04, 2010 3:06 am

1. I'd like to display on 1 line instead of 2 lines:
"Now online:
# Members#guests

2. I'd like to have more space between text. Currently it reads: "# members# guests" - I'd like to put more space between "s" & "the # of guests.

What file(s) do I edit to accomplish?

Thank you.

mycatsheaven
 
Posts: 2
Joined: Wed Feb 24, 2010 8:19 pm

Re: Display Format

Postby Darkick » Thu Mar 04, 2010 5:27 am

By default you mast get not 2 lines, but more — members and guest in separate lines.

You can modify output format in the module language file. For English language it's {joomla_root}/language/en-GB/en-GB.mod_dwhosonline.ini
By default at the end of the file you'll find:
Code: Select all
# Text to show before main content of the summary info
DWO SUMMARY INFO PREFIX=<span>Now online:</span>\n<ul class="mod_dwhosonline-summary">
# Format for main content of the summary info. Use variables: $members, $guests, $robots
DWO_SUMMARY_OUTPUT_FORMAT=$members $guests $robots
# Text to show after main content of the summary info
DWO SUMMARY INFO SUFFIX=</ul>
# $members
DWO NO MEMBERS=<li>no members</li>
DWO ONE MEMBER=<li>1 member</li>
DWO X MEMBERS=<li>%s members</li>
# $guests
DWO NO GUESTS=<li>no guests</li>
DWO ONE GUEST=<li>1 guest</li>
DWO X GUESTS=<li>%s guests</li>
# $robots
DWO NO ROBOTS=<li>no robots</li>
DWO ONE ROBOT=<li>1 robot</li>
DWO X ROBOTS=<li>%s robots</li>

You can replace it with:
Code: Select all
# Text to show before main content of the summary info
DWO SUMMARY INFO PREFIX=<span>Now online:</span>\n
# Format for main content of the summary info. Use variables: $members, $guests, $robots
DWO_SUMMARY_OUTPUT_FORMAT=$members &nbsp; $guests &nbsp; $robots
# Text to show after main content of the summary info
DWO SUMMARY INFO SUFFIX=
# $members
DWO NO MEMBERS=no members
DWO ONE MEMBER=1 member
DWO X MEMBERS=%s members
# $guests
DWO NO GUESTS=no guests
DWO ONE GUEST=1 guest
DWO X GUESTS=%s guests
# $robots
DWO NO ROBOTS=no robots
DWO ONE ROBOT=1 robot
DWO X ROBOTS=%s robots



And the second way is do not change language files, but add some CSS styles definitions for the list to make it inline. I prefer this solution.

Darkick
 
Posts: 204
Joined: Fri Sep 04, 2009 10:16 pm
Location: Russia, Ekaterinburg

Re: Display Format

Postby mycatsheaven » Sun Mar 07, 2010 11:20 am

Perfect! Thank you!

mycatsheaven
 
Posts: 2
Joined: Wed Feb 24, 2010 8:19 pm


Return to DWho's Online

Who is online

Users browsing this forum: No registered users and 2 guests

cron