1
scartissue
Who's online block editing!
  • 2005/3/30 15:30

  • scartissue

  • Just popping in

  • Posts: 20

  • Since: 2004/12/26


Well, its quite simple, but I wan't to make correct.
So, I want to make this (look at the Who's online? (Kes on online?) block):
Resized Image
into like this:
Resized Image

Should I change something in AdminCP > Blocks > Who's online? > Edit > Edit template? And how?

Full code would be very nice :)!

Thank You Xoopsers anyway ;)!

2
dickinsd
Re: Who's online block editing!
  • 2005/4/2 23:06

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Hello.

This method will work you can see it at this site http://www.rndinternet.co.uk

You need to FTP to your web server

get this file:
XOOPS DIR/modules/system/blocks/system_blocks.php
Where XOOPS DIR is the folder your XOOPS files are installed to
When you have this file, the FIRST thing you should do is copy it to a safe location, this way if anything goes wrong you can quickly replace the file with a working copy.
Common sense I know, but worth mentioning - ALWAYS make a backup of files your about to change.

Open the system_blocks.php with your favourite text editor (notepad, gedit, etc)

About maybe 20 lines down you should see a section like this:

$onlines =& $online_handler->getAll();
    if (
false != $onlines) {
        
$total count($onlines);
        
$block = array();
        
$guests 0;
        
$members '';
        for (
$i 0$i $total$i++) {
            if (
$onlines[$i]['online_uid'] > 0) {
                [
b]$members .= .XOOPS_URL.'/userinfo.php?uid='.$onlines[$i]['online_uid'].'">'.$onlines[$i]['online_uname'].',';[/b]
            } else {
                
$guests++;
            }
        }
I have made the text we're interested in Bold

All you need to do is add the
tag to that line e.g.
$onlines =& $online_handler->getAll();
    if (
false != $onlines) {
        
$total count($onlines);
        
$block = array();
        
$guests 0;
        
$members '';
        for (
$i 0$i $total$i++) {
            if (
$onlines[$i]['online_uid'] > 0) {
                [
b]$members .= .XOOPS_URL.'/userinfo.php?uid='.$onlines[$i]['online_uid'].'">'.$onlines[$i]['online_uname'].',[size=medium][color=990000]
[/color][/size]'
;[/b]
            } else {
                
$guests++;
            }
        }
Thats it, save the file and upload it via FTP, you may be asked if you want to overwrite the existing file, choose yes and job done!

Dave

Login

Who's Online

158 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

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

Latest GitHub Commits