There is a module I bought on joomlancers (it's open source) :
It show the users connections with their pictures.
I made a little modification that is easily removable or translatable :
It display a cb_search form when the user has no friend yet.
I attach the module here.
The modification I wanna make is adding the gende function into it :
[code:1]<?php
// $Id: mod_online.php,v 1.7 2004/01/13 14:50:38 rcastley Exp $
/**
* Users Online Module
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License :
www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.7 $
**/
/**
* MamboMe CB Colors Online Module
* By Jeffrey Randall
* Copyright (C) 2005 MamboMe.com
* All rights reserved
* Mambo Open Source is Free Software
* Released under GNU/GPL License :
www.gnu.org/copyleft/gpl.html
* version 1.0
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$moduleclass_sfx = $params->get( 'moduleclass_sfx' );
$use_colors = $params->get( 'use_colors' );
$field = $params->get( 'field' );
$field_valuea = $params->get( 'field_valuea' );
$field_valueb = $params->get( 'field_valueb' );
$colora = $params->get( 'colora' );
$colorb = $params->get( 'colorb' );
$query = "SELECT DISTINCT a.username, a.userid"
."\n FROM #__session AS a"
."\n WHERE (a.guest=0)";
$database->setQuery($query);
$rows = $database->loadObjectList();
$content = "";
foreach($rows as $row)
{
if($use_colors == 'Yes'){
$query_field = "SELECT $field FROM #__comprofiler WHERE user_id=$row->userid";
$database ->setQuery ($query_field);
$field_result = $database->loadResult();
if($field_result == $field_valuea)
{
$content.= "<b><a style='color:$colora' href='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=$row->userid"«»)."'>".$row->username."</a></b></font>";
$content.= "<br />";
}
elseif($field_result == $field_valueb)
{
$content.= "<b><a <a style='color:$colorb' href='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=$row->userid"«»)."'>".$row->username."</a></b>";
$content.= "<br />";
}
else {
$content.= "<b><a href='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=$row->userid"«»)."'>".$row->username."</a></b>";
$content.= "<br />";
}
}
}
foreach($rows as $row)
{
if($use_colors == 'No'){
$content.= "<b><a href='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=$row->userid"«»)."'>".$row->username."</a></b>";
$content.= "<br />";
}
}
$query1 = "SELECT count(session_id) as guest_online FROM #__session WHERE guest=1 AND (usertype is NULL OR usertype='')";
$database->setQuery($query1);
$guest_array = $database->loadResult();
if ($guest_array<>0 && $user_array==0) {
if ($guest_array==1) {
$content.=_WE_HAVE;
$content.=_GUEST_COUNT;
$content.=_ONLINE;
eval ("\$content = \"$content\";"«»);
} else {
$content.=_WE_HAVE;
$content.=_GUESTS_COUNT;
$content.=_ONLINE;
eval ("\$content = \"$content\";"«»);
}
}
?>[/code:1]
If you know how is it possible to do it ....
thx