1
CCV_Pinto
Re: Mod at xmemberstats
  • 2006/2/15 22:55

  • CCV_Pinto

  • Just popping in

  • Posts: 5

  • Since: 2005/11/6


i did it!

if (empty($onlineUsers[$i]['module'])){
$onlineUsers[$i]['module'] = 'Home';
}


now it works fine

[]´s

can close ;)



2
CCV_Pinto
Mod at xmemberstats
  • 2006/2/15 21:21

  • CCV_Pinto

  • Just popping in

  • Posts: 5

  • Since: 2005/11/6


hi all,

i use XOOPS for almost 2 years, but i dnt know progaming at php code

i want to do one modification at xmemberstats module

let me explain:

that module has a block wich show the user who are online and the module wich the user is

but when the user is at the Home of my site it doesnt show anything... and i want to appear "Home"

so i was looking at the php code of the block, and this is the part of the code:

if ($options[0] == ) {

        for (
$i 0$i $total$i++) {

        
$onlineUsers[$i]['ip'] = $onlines[$i]['online_ip'];
        if (
$onlines[$i]['online_uid'] > 0) {
                
$module_handler =& xoops_gethandler('module');
                
$modules =& $module_handler->getList(new Criteria('isactive'1));
                
$onlineUsers[$i]['module'] = ($onlines[$i]['online_module'] > 0) ? $myts->makeTareaData4Show($modules[$onlines[$i]['online_module']]) : '';
            
$ip $onlines[$i]['online_ip'];
            
$numbers=explode (".",$ip);
            
$code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]);
            
$country_query  $xoopsDB->query("SELECT country2,country FROM ".$xoopsDB->prefix("iptoc")." WHERE IPFROM<=$code"." AND IPTO>=$code");
            list(
$domain,$country) = $xoopsDB->fetchRow($country_query);
            if(
$domain==''$domain='-';
            
$members .= '<table class="outer" cellspacing="0"><tr><td class="even" width="50%"><a href="'.XOOPS_URL.'/userinfo.php?uid='.$onlines[$i]['online_uid'].'"><font size="-2" face="Arial, Helvetica, sans-serif">'.$onlines[$i]['online_uname'].'</font></td><td class="odd" align="center">'.$onlineUsers[$i]['module'].'</td><td class="even" align="center" width="10%"><img src="'.XOOPS_URL.'/modules/xmmemberstats/images/flags/'.$domain.'.gif" alt="'.$country.'"></td></tr></table>';
            
$bil++;


so i think this variable: '.$onlineUsers[$i]['module'].' show the module in wich the visitor is

i think i have to do something simple like (in C, wich i know)

if ('.$onlineUsers[$i]['module'].' == 0){
'.$onlineUsers[$i]['module'].' 'Home';
}


someone can tell me how i have to do that at PHP and working for this module and xoops

ps: my XOOPS is 2.0.13 and thats is the latest module of xmemberstats

sorry for my bad english
[]´s



3
CCV_Pinto
Re: Editing & Cloning Blocks
  • 2005/11/6 4:25

  • CCV_Pinto

  • Just popping in

  • Posts: 5

  • Since: 2005/11/6


yeah... you are right... i didnt know that the "top news" could be used like the recent news, but there is a problem:

i already use the top news like the top news.. lol
doing what u said i lost my top news.. but its better to have the recent news at too diferent places than have a top news...

but, if i dnt want to lost the top news, then, how can i make it?



4
CCV_Pinto
Re: Editing & Cloning Blocks
  • 2005/11/6 3:28

  • CCV_Pinto

  • Just popping in

  • Posts: 5

  • Since: 2005/11/6


oh... thats its exaclty what i want

cause i want to show the Recent News Block at the center (in home page) and at the left menu in the others modules

can someone tell me exactly what i have to do?

thx

[]´s




TopTop



Login

Who's Online

170 user(s) are online (90 user(s) are browsing Support Forums)


Members: 0


Guests: 170


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