Имеется модуль "Кто на сайте?" от расширения Community Builder , я бы хотел сделать так чтобы из всего списка ников администраторы или редакторы выделялись другим цветом (напрмер, красным). Я в пхп не силен, так что просто выкладываю весь код из пхх файла модуля тут: Код (PHP): <?php /** * Users Online Module * $Id: mod_comprofileronline.php 434 2006-10-08 01:55:29Z beat $ * * @package Community Builder * @Copyright (C) 2000 - 2003 Miro International Pty Ltd * @ All rights reserved * @ Mambo Open Source is Free Software * @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html * @version 1.0.2 **/ defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); function getNameFormatOnline($name,$uname,$format) { SWITCH ($format) { CASE 1 : $returnName = $name; break; CASE 2 : $returnName = $name." (".$uname.")"; break; CASE 3 : $returnName = $uname; break; CASE 4 : $returnName = $uname." (".$name.")"; break; } return $returnName; } global $mainframe, $ueConfig; include_once( $mainframe->getCfg('absolute_path')."/administrator/components/com_comprofiler/ue_config.php" ); if (is_callable(array($params,"get"))) { // Mambo 4.5.0 compatibility $class_sfx = $params->get( 'moduleclass_sfx'); $pretext = $params->get( 'pretext', "" ); $posttext = $params->get( 'posttext', "" ); } else { $class_sfx = ""; $pretext = ""; $posttext = ""; } $showmode = 0; if ($showmode==0 || $showmode==2) { $query = "SELECT guest, usertype" . "\n FROM #__session" ; $database->setQuery( $query ); $sessions = $database->loadObjectList(); // calculate number of guests and members $user_array = 0; $guest_array = 0; foreach( $sessions as $session ) { // if guest increase guest count by 1 if ( $session->guest == 1 && !$session->usertype ) { $guest_array++; } // if member increase member count by 1 if ( $session->guest == 0 ) { $user_array++; } } // check if any guest or member is on the site if ($guest_array != 0 || $user_array != 0) { $output .= _WE_HAVE; // guest count handling if ($guest_array == 1) { // 1 guest only $output .= sprintf( _GUEST_COUNT, $guest_array ); } else if ($guest_array > 1) { // more than 1 guest $output .= sprintf( _GUESTS_COUNT, $guest_array ); } // if there are guests and members online if ($guest_array != 0 && $user_array != 0) { $output .= _AND; } // member count handling if ($user_array == 1) { // 1 member only $output .= sprintf( _MEMBER_COUNT, $user_array ); } else if ($user_array > 1) { // more than 1 member $output .= sprintf( _MEMBERS_COUNT, $user_array ); } $output .= _ONLINE; } } echo "<div class=\"small\">".$output."</div><br>"; $query = "SELECT DISTINCT a.username, a.userid, u.name, y.avatar" ."\n FROM #__session AS a, #__users AS u, #__comprofiler AS y" ."\n WHERE (a.userid=u.id) AND (a.guest = 0) AND (NOT ( a.usertype is NULL OR a.usertype = '' )) AND y.user_id=u.id" ."\n ORDER BY ".(($ueConfig['name_format'] > 2) ? "a.username" : "u.name")." ASC"; $database->setQuery($query); $rows = $database->loadObjectList(); $result = ""; if (count($rows) > 0) { $result .= "<div class='mod_login".$class_sfx."'>\n"; // style='list-style-type:none; margin:0px; padding:0px; font-weight:bold;' foreach($rows as $row) { if ($row->avatar == 0) { $image="<img src=components/com_comprofiler/images/english/tnnophoto.jpg>"; $result.= "<a href='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=$row->userid") ."' class='mod_login".$class_sfx."' onmouseover=\"Tip('$image', SHADOW, true, BGCOLOR, '#C3C3C3', BORDERCOLOR, '#FDC5E0', FADEIN, 400, FADEOUT, 400)\">".htmlspecialchars(getNameFormatOnline($row->name,$row->username,$ueConfig['name_format']))."</a><br>\n"; }else { $image="<img src=images/comprofiler/tn".$row->avatar.">"; $result.= "<a href='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=$row->userid") ."' class='mod_login".$class_sfx."' onmouseover=\"Tip('$image', SHADOW, true, BGCOLOR, '#C3C3C3', BORDERCOLOR, '#FDC5E0', FADEIN, 400, FADEOUT, 400)\">".htmlspecialchars(getNameFormatOnline($row->name,$row->username,$ueConfig['name_format']))."</a><br>\n"; } } $result .= "</div>\n"; if ($pretext != '') $result = $pretext."<br />\n".$result; $result .= $posttext; } else { if ( defined( "_NONE" ) ) { $result .= _NONE; } elseif ( class_exists( "JText" ) ) { // Joomla 1.5: $result .= JText::_( "NONE" ); } elseif ( is_callable( "T_" ) ) { // Mambo 4.6.x: $result .= T_( "None" ); } } echo $result; ?> Заранее благодарен, за помощь подарю 7-значный номер ICQ