Besondere Benutzergruppe hervorheben. block-Who_is_Online

Begonnen von wiederalleine, 06 Oktober 2005, 16:07:16

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

wiederalleine

Hallo ....! Mail ist raus!
Weiss übrigens inzwischen, wie ich auch in der Members_List die Abfrage der Benutzergruppe realisieren kann.
echo "<td bgcolor=\"$dcolor\" align=\"center\"><font color=\"$textcolor1\">&nbsp;".$theuser['user_ingroup']."</font>&nbsp;</td>\n";
Nur würde ich lieber anstelle der Zahl eine Grafik angezeigt bekommen, sobald der User sich in einer bestimmten Gruppe befindet. Habs hiermit versucht, aber leider ohne Erfolg.
if ($user_ingroup == "5") echo "<td width=\"50%\" valign=\"top\"><center><img src=\"images/menu/foerder.jpg\">[/url]&nbsp;";
Vielleicht jemand noch ne Idee?
Gruß und Dank
Peter

vittatus

der block läuft bei mir irgentwie nicht  :'(
das heisst er zeigt rein garnichts an..

wenn ich dann den debug mode anmache zeigt er mir das:
Notice: Undefined variable: content in /usr/export/www/vhosts/funnetwork/hosting/markuswahl/blocks/block-Who_is_Online.php on line 419

und folgendes steht in dieser zeile:
$content .= "</div>\n<!-- $thisfile output end -->\n";

munzur

#22
Hi!

Trag eine Zeile vorher das ein:



$content = "";



L.g
"Debug-Mode" einschalten.
"SQL-Fehler anzeigen" einschalten
und evt. auftauchende Fehlermeldungen posten .

vittatus

hey..
danke erstmal für die antwort
aber leider bringt es nichts der fehler bleibt bestehen.
kann es vielleicht damit zusammen hängen das ich den chat nicht drauf hab ?
poste mal hier den ganzen code:

<?php 
// $Id: block-Who_is_Online_IrcChat.php,v 20.1 2004/01/13 10:56:11 KorschAl Exp $
// based on: block-Who_is_Online.php,v 1.6 2003/10/02 22:28:55 EllselAn Exp $
/**********************************************************************/
/* vkpMx 2.0  Content Management System Platform                      */
/* ================================================================== */
/* Copyright (C) 2003 by the vkpMx & pragmaMx Developer Team          */
/* email:         team@pragmamx.org                                   */
/* homepage:      http://www.maax-design.de                           */
/* further sites: http://www.pragmaMx.org, http;//guggemahier.de, */
/*            http://www.marx-city.de, http://www.genutec-studios.de, */
/*            http://www.shiba-design.de, http://www.power-maax.de    */
/* ================================================================== */
/*   The vkpMx is distributed free of charge by maax-design.de.       */
/*   The use of this system is allowed until copyright information    */
/*   is shown perspicuous visible and correcty on all system pages.   */
/*   Sales, rent out and the use of single code parts from this       */
/*   system must be allowed by maax-design.de.                        */
/**********************************************************************/
/* */
/* Module Co-Development and eggdrop enhancement by ircfreunde.de */
/* */
/********************************************************************/

################# Einstell Variablen ############################################################################
$onlinelistsize  8     # Hoehe des Selectfeld der Onlinuser (Online-Liste)
$onlinechatlistsize=0;       # Hoehe des Selectfeld der Chatuser (Online-Liste)
$showuserlistall 0;      # Wenn Online-Liste immer erscheinen soll, 1=Ja, 0=nein
$showbuddy       1;   # Buddylink (Messenger) anzeigen , 1=Ja, 0=nein

# User, die nicht angezeigt werden sollen
# Sys-Chef!
$excludedusers ="Sys-Chef, Knaxllerfgfd";
##################################################################################################################
$imagedir="images/maaxon";
$pm_module_name "Private_Messages";
##################################################################################################################
#$checkpmtime=200000; # Intervall zum private Nachrichten abfragen, 0 wenn nicht abgefragt werden soll
$thisfile=basename(__file__);
if (!
defined("mxMainFileLoaded")) die ("You can't access this file directly...");

$mxblockcache FALSE;

global 
$prefix$user_prefix$bgcolor1$bgcolor2$bgcolor3$txtcolor1$txtcolor2

if(@
file_exists("language/maaXoN/maaXoN-".$GLOBALS['currentlang'].".php")) {
include_once("language/maaXoN/maaXoN-".$GLOBALS['currentlang'].".php");
}
else {
include_once("language/maaXoN/maaXoN-english.php");
}
# Variablen initialisieren
if(substr(strtolower($GLOBALS['currentlang']), 06) == "german"){ # Bilder fuer Buttons definieren (noch keine Bilder vorhanden!!)
$pmimagepath="modules/$pm_module_name/images/buttons/german";
}
else{
$pmimagepath="modules/$pm_module_name/images/buttons/english";
}

# Variablen initialisieren
$isseruser 0;
$username "";
if (
mxIsUser()){
$isseruser 1;
$cookie=mxGetUserSession();
$username $cookie[1];
$uid $cookie[0];
}

$isseradmin mxIsAdmin();
# SQL-bedingung fuer excluded Users erstellen
$exusers explode (","$excludedusers);
if(!
$isseradmin){
while (list($key$val) = each($exusers)) {      
$xexusers[]=trim($val);
}
}
$xexusers[] = $GLOBALS['anonymous'];
$excludedusers "'".implode("','",$xexusers)."'";

# Anzahl aller User und hoechste uid ermitteln
$totalmembers=0;
$qry="select COUNT(uid), MAX(uid) from ${user_prefix}_users where user_stat=1;";
list(
$totalmembers$lastuid) = sql_fetch_row(sql_query($qry));

$totaluser=0;
$qry="select COUNT(uid) from ${user_prefix}_users;";
list(
$totaluser) = sql_fetch_row(sql_query($qry));

# neusten User ermitteln
$lastuid = (empty($lastuid)) ? $lastuid;
$qry="select uname from ${user_prefix}_users where uid = $lastuid;";
$result sql_query($qry); # neusten User ermitteln
list($lastuser) = sql_fetch_row($result);

$past time()- MX_SETINACTIVE_MINS ;
# Alle Gaeste ermitteln
$guest_online_num=0;
$result sql_query("SELECT Count(ip) FROM ${prefix}_visitors WHERE time>".$past." AND uid=0;");
list(
$guest_online_num) = sql_fetch_row($result);

# Alle User ermitteln, evtl auflisten
$member_online_num 0
$whoonlineselect "";
$smallunmae strtolower($username);

# Anzahl weiblicher Mitglieder ermitteln
$weiblich=0;
$qry="select COUNT(uid), MAX(uid) from ${user_prefix}_users where user_sexus=1 and user_stat=1;";
list(
$weiblich) = sql_fetch_row(sql_query($qry));

# Anzahl männlicher Mitglieder ermitteln
$maenlich=0;
$qry="select COUNT(uid), MAX(uid) from ${user_prefix}_users where user_sexus=2 and user_stat=1;";
list(
$maenlich) = sql_fetch_row(sql_query($qry));

$result sql_query("SELECT uname, user_sexus, (YEAR( CURRENT_DATE ) - YEAR( user_bday )) -
( RIGHT( CURRENT_DATE, 5 ) < RIGHT( user_bday, 5 ) ) AS user_age FROM 
${user_prefix}_users
WHERE ((uname Not In ("
.$excludedusers.")) AND (user_lastvisit >= ".$past.") AND (user_stat=1) AND (user_lastmod<>'logout')) ORDER BY uname");
#$GLOBALS["mxSqlDebug"]      = 0;
while (list($uname2$user_sexus$user_age) = sql_fetch_row($result)) {

$check date('Y');

if (
$user_sexus==1) {
    
    
$uname3 mxCutString($uname218"..""");    # Kurzen Usernamen erstellen
    
$whoonlineselect.="<option style=\"color:black;\" value=\"".$uname2."\" title=\"".$uname2."\">".$uname3." (w)</OPTION>\n"# options fuer auswahlselect erstellen
    
$member_online_num++;    # Anzahl User hochzaehlen
    
}
if (
$user_sexus==2){    
    
    
$uname3 mxCutString($uname218"..""");    # Kurzen Usernamen erstellen
    
$whoonlineselect.="<option style=\"color:black;\" value=\"".$uname2."\" title=\"".$uname2."\">".$uname3." (m)</OPTION>\n"# options fuer auswahlselect erstellen
    
$member_online_num++;    # Anzahl User hochzaehlen
    
}
if (
$user_sexus==0){    
    
    
$uname3 mxCutString($uname218"..""");    # Kurzen Usernamen erstellen
    
$whoonlineselect.="<option style=\"color:black;\" value=\"".$uname2."\" title=\"".$uname2."\">".$uname3."</OPTION>\n"# options fuer auswahlselect erstellen
    
$member_online_num++;    # Anzahl User hochzaehlen
    
}
}

# Private Nachrichten 
$countpm=0$countpmunread=0$sendpm=0;
if (
$isseruser) { # Wenn aktueller User registriert ist (kein Gast)
$pmactiv = (mxModuleAllowed($pm_module_name)) ? 0# feststellen ob pm-modul aktiv ist
if ($pmactiv){ # falls pm-modul aktiv ist
$qry="SELECT read_msg, Count(msg_id) FROM ${prefix}_priv_msgs WHERE to_userid=".$uid." group by read_msg;";
$result sql_query($qry);
while (list($read_msg$nums) = sql_fetch_row($result)) {
   if ($read_msg==0) { # wenn angemeldeter User
$countpmunread=$nums; # Anzahl ungelesene ermitteln
   }
else{
$countpm=$nums; #++; # Anzahl aller pm's ermitteln
}
}
}
$qry="SELECT read_msg, Count(msg_id) FROM ${prefix}_priv_msgs_send WHERE from_userid=".$uid." group by read_msg;";
$result sql_query($qry);
while (list($read_msg$nums) = sql_fetch_row($result)) {
   $sendpm=$nums;
}
#else{
#$checkpmtime=0; # private Nachrichten nicht abfragen!
# }
}

# Usergaestebuch
$content_ug "";
if (
$isseruser) { # Wenn aktueller User registriert ist (kein Gast)
if (mxModuleAllowed("UserGuest")){ # falls gaestebuch vorhanden
$qry="SELECT Count(gid) FROM ${prefix}_userguest WHERE touserid='".$uid."' AND touser = '".$username."' AND dummy=0;";
$result sql_query($qry);
list($gbnewentries) = sql_fetch_row($result);
# Usergaestebuch
if(!empty($gbnewentries)){
$content_ug .= "<div align=\"left\"><a href=\"modules.php?name=UserGuest&op=view&touser=$username\">
<img src=\"
$imagedir/tcake.gif\" width=\"19\" height=\"19\" border=\"0\" Alt=\""._BWOGUESTBOOK."\"></a> \n
<b>
$gbnewentries </b><a href=\"modules.php?name=UserGuest&op=view&touser=$username\">";
if($gbnewentries==1){ 
$content_ug .= ""._BWOGUESTBOOK1."";
}
else { 
$content_ug .= ""._BWOGUESTBOOK2."";
}
$content_ug .= "</a></div>";
}
}
}

# weitere Variablen initialisieren zur Zeitberechnung :(
//Creating SQL parameter
$gestern mktime(000date ("m") , date ("d")-1date("Y"));
$heute mktime(000date ("m") , date ("d"), date("Y"));

# Heute neu angemeldete User ermitteln
$qry "SELECT COUNT(uid) from ${user_prefix}_users WHERE user_regtime >= $heute and user_stat=1 and uname not in($excludedusers);";
list(
$userCount) = sql_fetch_row(sql_query($qry));

# Gestern neu angemeldete User ermitteln
$qry "SELECT COUNT(uid) from ${user_prefix}_users WHERE user_regtime >= $gestern and user_regtime < $heute and user_stat=1 and uname not in($excludedusers);";
list(
$userCount2) = sql_fetch_row(sql_query($qry));
# Chatuser ermitteln
$chatrooms="";

//
// IrcChat-Enhancement
//
// disable ircchat html output by default
$ircchat_active false;
if(
mxModuleAllowed("IrcChat")){
include("modules/IrcChat/config.php");
if($botconf['eggdrop'] == "true" && !empty($botconf['verzeich'])) {
// enable html output
$ircchat_active true;
// Wenn Admin wird Admin-Nic genommen
if(mxIsAdmin())
{
   extract(mxGetAdminSession());
$thisuser str_replace(array("SiteAdmin ""SiteAssistant ""Admin "" "),array("","","","_"), $aid);

if(count($chatroom['public']) > 0){
for($i=0$i count($chatroom['public']); $i++) $chatrooms[] = $chatroom['public']["$i"]; 
}
if(count($chatroom['user']) > 0){
for($i=0$i count($chatroom['user']); $i++) $chatrooms[] = $chatroom['user']["$i"]; 
}
if(count($chatroom['admin']) > 0){
for($i=0$i count($chatroom['admin']); $i++) $chatrooms[] = $chatroom['admin']["$i"]; 
}
}
// wenn User und nicht Admin wird User-Nic genommen
elseif(mxIsUser()){
$cookie mxGetUserSession();
$thisuser str_replace(" ""_"$cookie[1]);

if(count($chatroom['public']) > 0){
for($i=0$i count($chatroom['public']); $i++) $chatrooms[] = $chatroom['public']["$i"]; 
}
if(count($chatroom['user']) > 0){
for($i=0$i count($chatroom['user']); $i++) $chatrooms[] = $chatroom['user']["$i"]; 
}
// wenn Anonymous wird Nic hier zusammen gesetzt
// (damit auch mehr als ein Gast im Chat sein kann)
}else{
$thisuser _CHAT_GUEST."_".substrtime(), 6);
if(count($chatroom['public']) > 0){
for($i=0$i count($chatroom['public']); $i++) $chatrooms[] = $chatroom['public']["$i"]; 
}
}
$ChatPeople[]= "";
$wio_chat_file_size0;
if(count($chatrooms) > 0){
for($i=0$i count($chatrooms); $i++)
if($chatrooms["$i"] != ""){
$onlinetext"".$botconf['verzeich']."/".$chatrooms["$i"].".txt";

if(ereg('://'$onlinetext) && !ini_get('allow_url_fopen')){
@ini_set("allow_url_fopen","1");
$restore_ini true;
}else{
$restore_ini false;
}

$wio_chat_file fopen($onlinetext"rt");
while ($CLine fgets($wio_chat_file999)) {
$teile=explode(chr(32),$CLine); $name=$teile[0];
if ($name!=$botconf['botname'] && $name!="ChanServ") {
$ChatPeople[].="<option value=\"".$name."\" title=\"".$name."\">".$name."</OPTION>\n";

}
}
fclose($wio_chat_file);
if($restore_ini) @ini_set("allow_url_fopen","0");
}
}
$ChatPeople array_unique($ChatPeople);
//$wio_chat_file_size = count($ChatPeople);
$sauber "";
foreach($ChatPeople as $value) {
if($value !=""){
 $sauber .= "\n$value"
 $wio_chat_file_size++;
}

}

$ChatPeople substr($sauber,1);
if($wio_chat_file_size>0){

if($onlinechatlistsize>=$wio_chat_file_size) {$onlinechatlistsize=$wio_chat_file_size+1;}
        } else {
        $onlinechatlistsize=2;
        $ChatPeople.="<option value=\"niemand\" title=\"niemand\">Kein User im Chat</OPTION>\n";
        }



// end if eggdrop
# Ausgabe ...................................
$content "\n<!-- $thisfile output start -->\n<div class=\"boxcontent\" align=\"center\">\n"
."<a href=\"modules.php?name=Your_Account\"><img src=\"$imagedir/people.gif\" width=\"19\" height=\"19\" border=\"0\" Alt=\""._BWOPICS."\"></a>\n"
."<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border: 0px; margin-bottom: 5px;\">\n"
."\n<tr>\n<td class=\"boxcontent\">"._BWOTOTALMEMBERS."</td>\n<td align=\"right\" class=\"boxcontent\">\n<b>$totaluser</b></td>\n</tr>\n"
."\n<tr>\n<td class=\"boxcontent\">Weibliche User:</td>\n<td align=\"right\" class=\"boxcontent\">\n<b>$weiblich</b></td>\n</tr>\n"
."\n<tr>\n<td class=\"boxcontent\">Männliche User:</td>\n<td align=\"right\" class=\"boxcontent\">\n<b>$maenlich</b></td>\n</tr>\n"
."\n<tr>\n<td class=\"boxcontent\">"._BWOTODAYMEMBERS."</td>\n<td align=\"right\" class=\"boxcontent\">\n<b>$userCount</b></td>\n</tr>\n"
."\n<tr>\n<td class=\"boxcontent\">"._BWOYESTERDAYMEMBERS."</td>\n<td align=\"right\" class=\"boxcontent\">\n<b>$userCount2</b></td>\n</tr>\n"
."\n<tr>\n<td class=\"boxcontent\">"._BWOMEMBERS1."</td>\n<td align=\"right\" class=\"boxcontent\">\n<b>$member_online_num</b></td>\n</tr>\n"
."\n<tr>\n<td class=\"boxcontent\">"._BWOGUESTES."</td>\n<td align=\"right\" class=\"boxcontent\">\n<b>$guest_online_num</b></td>\n</tr>\n"
."\n<tr>\n<td class=\"boxcontent\"></td>\n<td align=\"right\" class=\"boxcontent\">\n<b>$wio_chat_file_size</b></td>\n</tr>\n"
."</table>\n";
if (
$isseruser) {
// zuletzt angemeldeter User
$content .= "<div style=\"border: 0px; margin-bottom: 5px;\">"._BWOLATEMEMBER."<br>\n<A HREF=\"modules.php?name=Userinfo&uname=$lastuser\">$lastuser</a></div>\n";
}
if (
$isseruser || $isseradmin || $showuserlistall) { # Wenn angemeldeter User oder Admin oder Liste immer erscheinen soll
# Onlineliste anzeigen wenn User online sind
if($member_online_num>0){
if($onlinelistsize>=$member_online_num) {$onlinelistsize=$member_online_num+1;}
if(!$isseruser || !$pmactiv){
$script "";
}
else{
$script " onDblClick=\"whob_clickit()\"";
$content .= "<script language=\"JavaScript\">\n<!--\n";
$content .= "function whob_clickit(){\n";
$content .= " var y=document.onlineuserinfo.uname.selectedIndex; \n";
$content .= " var x=document.onlineuserinfo.uname.options[y].value; \n";
$content .= " window.open('modules.php?name=$pm_module_name&file=buddy&op=compose&to='+x, '".md5(time())."','left=370,top=150,width=360,height=200,toolbar=no,location=no,menubar=no,scrollbars=yes,resizeable=yes,status=no');\n";
$content .= " return false;\n";
$content .= " }\n//-->\n";
$content .= "</script>\n";
}
#background-color: $bgcolor1; font-size: 9px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: $txtcolor1; width: 90%; border: 0px $bgcolor1;


// Unset chat config.php values
unset($chatsettings); unset($chatroom); unset($chatconf); unset($styleconf); unset($guiconf); unset($botconf); unset($chatsmileys);
// end if chat enabled and allowed

$content .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border: 0px; margin-bottom: 5px;\">\n";
$content .= "\n<tr>\n<td colspan=\"2\" align=\"center\" class=\"boxcontent\">\n";
$content .= "<img src=\"$imagedir/guy_hand.gif\" width=\"19\" height=\"19\" border=\"0\" Alt=\""._BWOPICS."\" align=\"absmiddle\">\n<b>"._BWOONLINELIST."</b>\n<img src=\"$imagedir/girl_hand.gif\" width=\"19\" height=\"19\" border=\"0\" Alt=\""._BWOPICS."\" align=\"absmiddle\"><br>\n";
$content .= "</td>\n</tr>\n";
$content .= "\n<tr>\n<td colspan=\"2\" align=\"center\">"; # select-options verwenden
$content .= "<form action=\"modules.php?test\" name=\"onlineuserinfo\" method=\"get\" style=\"border: 0px; margin-bottom: 5px; margin-top: 0px;\">";
$content .= "<input type=\"hidden\" name=\"name\" value=\"Your_Account\">";
$content .= "<input type=\"hidden\" name=\"op\" value=\"userinfo\">";
$content .= "<select name=\"uname\" size=\"$onlinelistsize\" style=\" background-color: $bgcolor1; font-size: 9px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: $txtcolor1; width: 90%; cursor: hand; border: 1px solid $bgcolor2; text-decoration: none; padding-left: 1px; padding-top: 1px; padding-bottom: 1px;\" $script>".$whoonlineselect."</select>";
$content .= "<br>\n<input type=\"image\" src=\"$pmimagepath/info.gif\" alt=\""._BWOUSERINFO."\">";
$content .= "</form>\n";
$content .= "</td>\n</tr>\n";
// only active when ircchat if-part was executed
if($ircchat_active) {
$content .= "\n<tr>\n<td colspan=\"2\" align=\"center\" class=\"boxcontent\">\n";
$content .= "<img src=\"$imagedir/guy_hand.gif\" width=\"19\" height=\"19\" border=\"0\" Alt=\""._BWOPICS."\" align=\"absmiddle\">\n<b>Im Chat</b>\n<img src=\"$imagedir/girl_hand.gif\" width=\"19\" height=\"19\" border=\"0\" Alt=\""._BWOPICS."\" align=\"absmiddle\"><br>\n";
$content .= "</td>\n</tr>\n";
$content .= "\n<tr>\n<td colspan=\"2\" align=\"center\">"; # select-options verwenden
$content .= "<form action=\"modules.php?test\" name=\"onlinechatuserinfo\" method=\"get\" style=\"border: 0px; margin-bottom: 5px; margin-top: 0px;\">";
$content .= "<select name=\"ucname\" size=\"$onlinechatlistsize\" style=\" background-color: $bgcolor1; font-size: 9px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: $txtcolor1; width: 90%; cursor: hand; border: 1px solid $bgcolor2; text-decoration: none; padding-left: 1px; padding-top: 1px; padding-bottom: 1px;\">".$ChatPeople."</select>";
$content .= "</form>\n";
$content .= "</td>\n</tr>\n";
}
$content .= "</table>\n";
}
# private messages
if (!empty($pmactiv) && $isseruser){
# pm Liste
include("modules/Private_Messages/inboxsize-conf.php");
$erlaubtpm=$sentboxsize;
$erlaubtgetpm=$inboxsize;
if($countpm >= $erlaubtgetpm) {
$countpm "<font color=red>$countpm</font>";
}
if($sendpm >= $erlaubtpm) {
$sendpm "<font color=red>$sendpm</font>";
}
$content .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border: 0px; margin-bottom: 5px;\">\n";
if ($countpm || $sendpm){
$content .= "\n<tr>\n<td colspan=\"3\" align=\"center\" class=\"boxcontent\"><a href=\"modules.php?name=Private_Messages\">"._BWOPMSG."</a></td>\n</tr>\n";
$content .= "\n<tr>\n<td align=\"center\" class=\"boxcontent\"><a href=\"modules.php?name=Private_Messages\"><img src=\"$imagedir/pmessage.gif\" width=\"19\" height=\"19\" border=\"0\" Alt=\""._BWOPMSG."\"></a></td>\n";
$content .= "<td valign=\"top\" class=\"boxcontent\">"._BWOPMSGALL.":<br>\ngesendet:<br>\n"._BWOPMSGUNREAD.":</td>\n";
$content .= "<td valign=\"top\" align=\"right\" class=\"boxcontent\"><b>".$countpm." </b>(".$erlaubtgetpm.")<br>\n";
$content .= "&nbsp;<b>".$sendpm."</b> (".$erlaubtpm.")<BR>";
$content .= ($countpmunread) ? "<img src=\"images/menu/arrow-ani.gif\" alt=\"\" width=\"14\" height=\"9\" border=\"0\">&nbsp;<b>".$countpmunread."</b>" "<b>$countpmunread</b>";
$content .= "</td>\n";
$content .= "</tr>\n";
}
else{
$content .= "<tr><td class=\"boxcontent\"><a href=\"modules.php?name=Private_Messages\"><img src=\"$imagedir/pmessage.gif\" width=\"19\" height=\"19\" border=\"0\" Alt=\""._BWOPMSG."\" hspace=\"0\"></a></td><td><a href=\"modules.php?name=Private_Messages\">"._BWOPMSG."</a></td></tr>\n";
}
$content .= "</table>\n";
# Buddy
if ($showbuddy){
$themedir MX_THEME_DIR."/images";
$buddyimg = (@file_exists($themedir."/buddy.gif")) ? $themedir."/buddy.gif" $imagedir."/buddy.gif";
$buddyimg mxCreateImage($buddyimg_BWOBUDDIE0);
$windowname=md5($GLOBALS['sitename']);
$content .= "<a href=\"#\" onClick=\"window.open('modules.php?name=Private_Messages&file=buddy','$windowname','left=180, top=150, width=240,height=350,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,copyhistory=0'); return false;\">".$buddyimg."</a><br>\n";
}
}
# Usergaestebuch
$content .= $content_ug;


if (!
MX_IS_USER) { # Gast no user
$content .= "<div align=\"justify\"><br>\n"._BWOASREGISTERED."</div>\n";
}


#if($isseruser && $checkpmtime>0 && $pmactiv){
# $checkpmfile="modules.php?name=$pm_module_name&file=buddy&op=check&ref_intervall=$checkpmtime";
# $content.= "<iframe name=\"who_checkpm_1\" src=\"$checkpmfile\" marginwidth=\"0\" marginheight=\"0\" width=\"0\" height=\"0\" scrolling=\"no\" frameborder=\"0\"></iframe>";
# }

$content .= "";
$content .= "</div>\n<!-- $thisfile output end -->\n";
# Blocktitel aus Sprachdatei auslesen
$blockfiletitle=_BWOMAAXONLINE;
/* CVS-Log:
$Log: block-Who_is_Online_IrcChat.php,v $
Revision 20.1  2004/01/13 10:56:11  KorschAl
PJIRC GPL-Code mit 20 importiert

Revision 1.4  2004/01/10 18:29:08  KorschAl
no message

Revision 1.3  2004/01/09 18:38:08  KorschAl
Online-Listen Fix für IrcChat

Revision 1.2  2004/01/09 18:29:42  KorschAl
Online-Listen Fix für IrcChat

Revision 1.6  2003/10/02 22:28:55  EllselAn
Zeilenumbruch nach scriptende entfernt

Revision 1.5  2003/10/01 12:00:51  EllselAn
problem mit file_exists bei safe_mode=on

Revision 1.4  2003/09/09 19:57:51  EllselAn
Abfrage des Usergästebuchs verändert

Revision 1.3  2003/09/01 14:49:24  EllselAn
function join() / implode() falsch verwendet


 */

?>



munzur

Hi!
Sry hab ein Punkt zuviel denke ich, probier mal das untere:


$content = "";


L.g
"Debug-Mode" einschalten.
"SQL-Fehler anzeigen" einschalten
und evt. auftauchende Fehlermeldungen posten .

vittatus

hey,

fehler ist zwar weg aber es wird nichts angezeigt.
Hat vielleicht jemand noch einen anderen who_is_online block ?

gruss Markus

vittatus

#26
hallo,

habs hinbekommen wird jetzt angezeigt.
gibt es eine möglichkeit das alter im block anzeigen zu lassen ?

ich hab da noch eine idee. z.B könnte man das nicht einrichten das z.B Admins eine andere schrift farbe im Block haben ? z.B Admins (weiss) andere besondere Gruppe Grün und normale benutzer weiterhin schwarz

Gruss Markus

Stallion44

guckt ma was ich entdeckt hab screenshot aus yurdum.at


Das wär doch was oder? ich finds super es werden auch bei mod oder admins kleine symbole angezeigt aber leider war während des screenshots kein admin oder mod online...

vieleicht kann ja jemand das auch so hin kriegen für uns
würd mich freuen :thumbup:
MfG
Stallion44

Andi

schön´s Grüssle, Andi

vittatus

servus,

habe nochmal versucht gruppen anzeigen zu lassen im who is online block... nur bekomme ich es leider immernoch nicht hin...

habe es mal so versucht:

// Benutzergruppe
if (MX_IS_ADMIN) {
$result = sql_query("SELECT access_title FROM ".$prefix."_groups_access WHERE access_id = ".intval($uinfo['user_ingroup'])."");
list($uinfo['usergroup']) = sql_fetch_row($result);
}

$user_ingroup = $uinfo['user_ingroup'];
if ($user_ingroup == "3") {
$gruppe = "<b>(A)</b>\n";
}
if ($user_ingroup == "2") {
$gruppe = "<b>(P)</b>\n";
}


Es wird aber nichts angezeigt...

vittatus

Hey,

hat da vielleicht jemand nochmal nachgeschaut wie man das machen könnte oder weiss vielleicht jemand wie man  das hinbekommen könnte ?
Wäre mir echt sehr wichtig..

Gruss Markus

jubilee

ZitatEs wird aber nichts angezeigt...

Gibst Du denn die Variable $gruppe wo das Ergebnis drinnesteht
irgendwo in die $content-Variable rein ?
Wenn Du das nicht machst, wird das natürlich auch nirgends im Block angezeigt .....


MfG
jubilee

vittatus

Hey habs so im moment....

// Benutzergruppe

$result = sql_query("SELECT access_title FROM ".$prefix."_groups_access WHERE access_id = ".intval($uinfo['user_ingroup'])."");
list($uinfo['usergroup']) = sql_fetch_row($result);


$user_ingroup = $uinfo['user_ingroup'];
if ($user_ingroup == "3") {
$gruppe = "<b>(A)</b>\n";
}
if ($user_ingroup == "2") {
$gruppe = "<b>(P)</b>\n";
}



if ($user_sexus==1) {
   
    $uname3 = mxCutString($uname2, 18, "..", "");    # Kurzen Usernamen erstellen
    $whoonlineselect.="<a href=\"modules.php?name=Userinfo&uname=".$uname3."\">".$gruppe."(w-".$user_age.")".$uname3."".$foto."</font></b><br>\n"; # options fuer auswahlselect erstellen
    $member_online_num++;    # Anzahl User hochzaehlen
    }
if ($user_sexus==2){   
   
    $uname3 = mxCutString($uname2, 18, "..", "");    # Kurzen Usernamen erstellen
    $whoonlineselect.="<a href=\"modules.php?name=Userinfo&uname=".$uname3."\">".$gruppe."(m-".$user_age.")".$uname3."".$foto."</font></b><br>\n"; # options fuer auswahlselect erstellen
    $member_online_num++;    # Anzahl User hochzaehlen
    }
if ($user_sexus==0){   
   
    $uname3 = mxCutString($uname2, 18, "..", "");    # Kurzen Usernamen erstellen
    $whoonlineselect.="<a href=\"modules.php?name=Userinfo&uname=".$uname3."\">".$gruppe."(".$user_age.")".$uname3."".$foto."</font></b><br>\n"; # options fuer auswahlselect erstellen
    $member_online_num++;    # Anzahl User hochzaehlen
  }
}

$content .= "<center>";
$content .= "Onlineliste (<b>$member_online_num</b>)<br>";
$content .= "</center>";
$content .= "<div style=\"height: 300px; width: 150px; background-color: $bgcolor8; border: 2px solid $bgcolor2; text-decoration: none; padding-left: 1px; padding-top: 1px; padding-bottom: 1px; overflow: auto;\><a href=\"modules.php?name=Userinfo&uname=".$uname3."\">".$whoonlineselect."</a></div>";


?>


HILFE ??  ;D

NeMeSiSX2LC

das ingroup gibt es in der $prefix_users auch und dort solltest du es auch auslesen.... das mit der group tabelle ist da nicht das richtige
CMS-Version: pragmaMx 0.1.8, 1.20.4.5/2006-03-10     
PHP-Version: 5.1.2
MySQL-Version: 5.0.15-max-log
Server-Version: Apache/2.0.55
phpMyAdmin-Version: 2.7.0-pl1

vittatus

hey, kannst du mir vielleicht sagen welches das richtige ist  :)

Wäre super

Gruss Markus

JoergK

Hoi  ;)

Wenn Du die function mxGetUserDataFromUsername() benutzt, bekommst Du mit einem Rutsch alle Userdaten in ein Array geliefert. Alternativ kannst Du auch die function mxGetUserDataFromUid() nutzen, wenn Du "nur" die User-ID zur Verfügung hast. Zusätzlich zu den Daten der Tabelle {[user_]prefix}_users werden in den functions noch das Alter und der Online-Status generiert. Beispiel:

<?php
$benutzerinfo 
mxGetUserDataFromUsername("username");
$benutzer_alter $benutzerinfo['user_age'];    // Alter des Users
$benutzer_online $benutzerinfo['user_online'];    // Online-Status des Users: TRUE = Online, FALSE = Offline
$benutzer_gruppe $benutzerinfo['user_ingroup'];    // Benutzergruppe des Users
?>



Gruss,
JoergK
Gruß,
Jörg


Nobody is perfect ... so don't call me Nobody

vittatus

Ich glaube ich bin zu blöd ich verstehe einfach nicht wie das gehen soll...
könntest du mir das vielleicht eben einbauen ?

stelle hier mal meine Datei zum Download frei...



[gelöscht durch Administrator]

vittatus


NeMeSiSX2LC

$result = sql_query("SELECT uname FROM ${user_prefix}_users
WHERE ((uname Not In (" . $excludedusers . ")) AND (user_lastvisit >= " . $past . ") AND (user_stat=1) AND (user_lastmod<>'logout'))
ORDER BY uname");

diese Abfrage soweit sie bei dir so ist so ändern:

$result = sql_query("SELECT uname, user_ingroup FROM ${user_prefix}_users
WHERE ((uname Not In (" . $excludedusers . ")) AND (user_lastvisit >= " . $past . ") AND (user_stat=1) AND (user_lastmod<>'logout'))
ORDER BY uname");

die while darunter so abändern:

while (list($uname2, $user_ingroup) = sql_fetch_row($result)) {

und schon sollte das gehen....
CMS-Version: pragmaMx 0.1.8, 1.20.4.5/2006-03-10     
PHP-Version: 5.1.2
MySQL-Version: 5.0.15-max-log
Server-Version: Apache/2.0.55
phpMyAdmin-Version: 2.7.0-pl1

vittatus

#39
Es will und will einfach nicht klappen.
Kann vielleicht nochmal jemand drüber schauen was ich falsch mache !?
Ich verzweifel langsam

Code entfernt - RtR ... siehe dazu auch "Posten von Quellcode" in den Forenregeln -->> http://www.pragmamx.org/Content-pa-showpage-pid-48.html#brule_8

Wäre super
Gruss Markus