2
ok This is based on these post
Quote:
Make sure you have this code by trabis in root/header.php..you can put it before the file closing tags ?>
le="color: #000000"><?php $online_handler =& xoops_gethandler('online'); mt_srand((double)microtime()*1000000); // set gc probabillity to 10% for now.. if (mt_rand(1, 100) < 11) { $online_handler->gc(300); } if (is_object($xoopsUser)) { $uid = $xoopsUser->getVar('uid'); $uname = $xoopsUser->getVar('uname'); } else { $uid = 0; $uname = ''; } if (is_object($xoopsModule)) { $online_handler->write($uid, $uname, time(), $xoopsModule->getVar('mid'), $_SERVER['REMOTE_ADDR']); } else { $online_handler->write($uid, $uname, time(), 0, $_SERVER['REMOTE_ADDR']); }
next open yogurt/searchmembers.php
bfore
le="color: #000000"><?php include_once XOOPS_ROOT_PATH.'/footer.php';
add this code
le="color: #000000"><?php $user_online = new XoopsUser($xoopsUser->getVar('uid')); if ($user_online->isOnline()) { $xoopsTpl->assign('user_online', true); }
next open yogurt/templates/yogurt_searchresults.html
serach for
le="color: #000000"><?php <td class="even"><{$users[i].avatar}></td>
and replace it with this
le="color: #000000"><?php <td class="even"><{$users[i].avatar}> <{if $user_online == true}> <br /> <span style='color:#ee0000;'>Online</span><br /> <{else}> <br /> <span style='color:#000000;'>Offline</span><br /> <{/if}> </td>
clear cache...wallaaa..
tell me if it works..