1
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] == 1 ) {
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 .= '';
$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