31
mrphilong
Re: Format membership ONLINE List
  • 2008/6/2 10:29

  • mrphilong

  • Quite a regular

  • Posts: 351

  • Since: 2006/7/14


Just a little bit of moving stuff around to or so it won't break the column. See demo here right column

in \membership\blocks\membership_block.php

replace
$members .= '.XOOPS_URL.'/userinfo.php?uid='.$onlines[$i]['online_uid'].'">'.$onlines[$i]['online_uname'].''.$onlineUsers[$i]['module'].'.XOOPS_URL.'/modules/membership/images/flags/'.$country.'.gif" alt="'.$alt.'" title="'.$alt.'">';
                
//if is not a user
                
} else {
                    
$hostname strtolower(gethostbyaddr($onlines[$i]['online_ip']));
                    
$pos1 strpos($hostname$findbot);
                    
$pos2 strpos($hostname$findsearch);

                    
//if is bot
                    
if ($pos1 !== false || $pos2 !== false) {
                        
$alt $hostname;
                        
$guess .= ''.$censored.''.$onlineUsers[$i]['module'].'.XOOPS_URL.'/modules/membership/images/bots.gif" alt="'.$alt.'" title="'.$alt.'">';
                        
$bots++;
                    } else {
                        
$guess .= ''.$censored.''.$onlineUsers[$i]['module'].'.XOOPS_URL.'/modules/membership/images/flags/'.$country.'.gif" alt="'.$alt.'" title="'.$alt.'">';
                    }
                    
$guests++;


with

$members .= '.XOOPS_URL.'/modules/membership/images/flags/'.$country.'.gif" alt="'.$alt.'" title="'.$alt.'">.XOOPS_URL.'/userinfo.php?uid='.$onlines[$i]['online_uid'].'">'.$onlines[$i]['online_uname'].'';
                
//if is not a user
                
} else {
                    
$hostname strtolower(gethostbyaddr($onlines[$i]['online_ip']));
                    
$pos1 strpos($hostname$findbot);
                    
$pos2 strpos($hostname$findsearch);

                    
//if is bot
                    
if ($pos1 !== false || $pos2 !== false) {
                        
$alt $hostname;
                        
$guess .= '.XOOPS_URL.'/modules/membership/images/bots.gif" alt="'.$alt.'" title="'.$alt.'">
                        '
.$censored.''.$onlineUsers[$i]['module'].'';
                        
$bots++;
                    } else {
                        
$guess .= '.XOOPS_URL.'/modules/membership/images/flags/'.$country.'.gif" alt="'.$alt.'" title="'.$alt.'">'.$censored.'';
                    }
                    
$guests++;

32
trabis
Re: Format membership ONLINE List
  • 2008/6/2 12:43

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Nice work mrphilong!

I noticed you have also a counter integrated, can you share that?
Thanks

33
mrphilong
Re: Format membership ONLINE List
  • 2008/6/2 22:55

  • mrphilong

  • Quite a regular

  • Posts: 351

  • Since: 2006/7/14


Hi Trabis,

I am using PHP Stats and installed it separately from Xoops, you can get a copy from here.

Once installed modify your XOOPS footer.php and put this code in:

$xoopsLogger->stopTime();
}
// Code for PHP-Stats counter
define('__PHP_STATS_PATH__','/xxxxxxxxx/html/yourwebsite.net/stats/');
include(
__PHP_STATS_PATH__.'php-stats.redir.php');
?>


in membership module, modify templates\blocks\membership_block.html and put this code in:

<b><u>Site Statistic:u>b><br />
<
table style="font-size:9px;text-align:right;" align="center">
    <
tr >
        <
td style="font-size:9px"><{if $xoops_isadmin}><strong>Now:strong><script type="text/javascript" src="http://www.yourwebsite.com/stats/view_stats.js.php?mode=0">script><{/if}>td><td style="font-size:9px"><strong>Visitorstrong>td>
        <
td style="font-size:9px">&nbsp;td>
        <
td style="font-size:9px"><strong>Viewstrong>td>
    tr>
    <
tr>
        <
td style="font-size:9px"><strong><strong>Today:strong>td>
        <
td style="font-size:9px"><script type="text/javascript" src="http://www.yourwebsite.com/stats/view_stats.js.php?mode=1">script>td>
        <
td style="font-size:9px">&nbsp;td><td style="font-size:9px"><script type="text/javascript" src="http://www.yourwebsite.com/stats/view_stats.js.php?mode=2">script>td>
    tr>
    <
tr>
        <
td style="font-size:9px"><strong>Y'day:
         
    
    
        Total:
         
    
    
        Since: 09/09/2006
    

34
trabis
Re: Format membership ONLINE List
  • 2008/6/3 0:31

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Thank you mrphilong!

Login

Who's Online

361 user(s) are online (276 user(s) are browsing Support Forums)


Members: 0


Guests: 361


more...

Donat-O-Meter

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

Latest GitHub Commits