section = $section; # Admin *g* } else { $this->section = trim($mysql_object->real_escape_string(stripslashes($section))); } $this->limit = (int)$limit; $this->talkline = trim($mysql_object->real_escape_string(stripslashes($talkline))); $this->user = &$user; $this->message = $message; $this->coloremote = '`2'; $this->color3person = '`&'; $this->colortalkline = '`3'; $this->colorspeak = '`#'; $this->colorpet = '`7'; $this->colornpc = '`9'; } public function ChangeDefaultColors($speak = false, $thirdperson = false, $emote = false) { if($speak !== false) { $this->colorspeak = $speak; } if($emote !== false) { $this->coloremote = $emote; } if($thirdperson !== false) { $this->color3person = $thirdperson; } } // Funktionen public function Add() { if(isset($_SESSION['session']['comment_for_insert'])) { $_POST = $_SESSION['session']['comment_for_insert']; } if(!empty($this->user['prefs']['commenttalkcolor'])) $this->colortalkline = $this->user['prefs']['commenttalkcolor']; if(!empty($this->user['prefs']['commentemotecolor'])) $this->coloremote = $this->user['prefs']['commentemotecolor']; if($_POST['section'] == HTMLEntities($this->section)) { $commentary = trim($_POST['commentary']); if($commentary != '') { // Emotecheck $emote = 0; if(beginsWith($commentary,'::')) { $commentary = $this->coloremote.substr($commentary,2); $emote = 1; } elseif(beginsWith($commentary,':')) { $commentary = $this->coloremote.substr($commentary,1); $emote = 1; } elseif(beginsWith($commentary,'/me')) { $commentary = $this->coloremote.substr($commentary,3); $emote = 1; } elseif(beginsWith($commentary,'/em')) { $commentary = $this->color3person.substr($commentary,3); $emote = 2; } elseif(beginsWith($commentary,'/x')) { $commentary = $this->color3person.substr($commentary,2); $emote = 2; } elseif(beginsWith($commentary,'/ms')) { $commentary = $this->coloremote.substr($commentary,3); $emote = 3; // Erweiterte Überprüfung für Pet und NPC by Auric } elseif(beginsWith($commentary,'/p')) { $commentary = $this->colorpet.substr($commentary,3); $emote = 4; } elseif(beginsWith($commentary,'/npc')) { $commentary = $this->colornpc.substr($commentary,5); $emote = 5; } else { $commentary = $this->colorspeak.$commentary; } $this->emote = $emote; $commentary = $this->Clear($commentary); $this->Insert($commentary,$this->user['acctid']); } return true; unset($session['comment_for_insert']); $_POST = array(); } else return false; } private function Clear($commentary) { $commentary = str_replace('`n','',$commentary); return $commentary; } private function Insert($commentary,$author) { global $mysql_object; // Kommentare kürzen, radikal *g* $commentary = substr($commentary, 0, COMMENTARY_MAXLENGHT); // Eintragen $sql = 'INSERT INTO `commentary` (`author`,`comment`,`section`,`emote`,`postdate`'.($this->emote==5?',`control`':'').') ' .'VALUES ( ' .'"'.$author.'",' .'"'.$mysql_object->real_escape_string(stripslashes($commentary)).'",' .'"'.$this->section.'",' .'"'.$this->emote.'",' .'NOW()' .($this->emote==5?", '".npc::getActOf($author)."'":'') .') '; db_query($sql) or die('MySQL-Error (#'.db_errno()."):
\r\n".db_error()); } public function View($postfield = true) { $com = (int)$_GET['comscroll']; $REQUEST_URI = $_SERVER['REQUEST_URI']; $sql = 'SELECT `commentary`.*, `accounts`.`name`, `accounts`.`login`, `accounts`.`loggedin`, `accounts`.`location`, `accounts`.`laston`, `accounts`.`hashorse`, `accounts`.`petname`, `accounts`.`statusrp`, `accounts`.`statusot` FROM `commentary` INNER JOIN `accounts` ON `accounts`.`acctid` = `commentary`.`author` WHERE `commentary`.`section` = "'.$this->section.'" ORDER BY `commentid` DESC LIMIT '.($com*$this->limit).','.$this->limit.' '; if(COMMENTARY_GUILDTAG_DISPLAY) { $sql = $this->GuildPrefixes('overwrite_sql', COMMENTARY_GUILDTAG_VERSION, array('section' => $this->section, 'com' => $com, 'limit' => $this->limit)); } $result = db_query($sql); $i = 0; $comments = array(); $postzeiten = array(); $search = array('`&'); $replace = array('`&'); define('endl',"\r\n"); if(NOBIO === false) { $linktemplate = '`0'.endl.'`&{$NAME}`0'.endl; $petlinktemplate = '`0'.endl; $npclinktemplate = '`0'.endl.'`&{$NPC}`0'.endl; } else { $linktemplate = '{$NAME}'; $petlinktemplate = '{$PET}'; $npclinktemplate = '{$NPC}'; } $sea4linktemplate = array('{$LOGIN}','{$REQUESTURI}','{$NAME}','{$STATUSRP}'); $sea4linktemplateP = array('{$LOGIN}','{$REQUESTURI}','{$PET}'); $sea4linktemplateN = array('{$ID}','{$REQUESTURI}','{$NPC}'); while($row = db_fetch_assoc($result)) { $row['comment'] = preg_replace("'[`][^".COMMENTARY_ALLOWEDTAGS."]'","",$row['comment']); $statusrp = "~".$row['statusrp']."~ ~".$row['statusot']."~"; $rep4linktemplate = array(RawURLEncode($row['login']),RawURLEncode($REQUEST_URI),$row['name'],$statusrp); $row['namebackup'] = $row['name']; $row['name'] = str_replace($sea4linktemplate,$rep4linktemplate,$linktemplate); addnav('','bio.php?char='.RawURLEncode($row['login']).'&ret='.RawURLEncode($REQUEST_URI)); if(COMMENTARY_GUILDTAG_DISPLAY) { $row['name'] = $this->GuildPrefixes('addprefix', COMMENTARY_GUILDTAG_VERSION, array('row' => $row, 'name' => $row['name'])); } // Deleteprefix if($this->user['superuser'] >= COMMENTARY_LIVEDELETING_SULEVEL) { $prefix = '[X] '; addnav("",COMMENTARY_LIVEDELETING_DELETETARGET.'&commentid='.$row['commentid'].'&return='.RawURLEncode($_SERVER['REQUEST_URI'])); } else { $prefix = ''; } // Timestamp if(COMMENTARY_TIMESTAMP_DISPLAY === true) { $prefix .= '`0['.date(COMMENTARY_TIMESTAMP_FORMAT, strToTime($row['postdate'])).']`0'; } $postzeiten[] = $row['postdate']; //substr($row['postdate'],11,12); // Emotler entlarven if(COMMENTARY_DISPLAYEMOTLERNAME === true AND $this->user['superuser'] >= COMMENTARY_DISPLAYEMOTLERNAME_SULEVEL) { $emotename = ' `0('.trim($row['namebackup']).')`0 '; } else { $emotename = ''; } switch($row['emote']) { case 5: // NPC-Erweiterung von Auric $npcsql = "SELECT `id`, `name` FROM `npc` WHERE `id`=".$row["control"]." LIMIT 1"; $npcres = db_query($npcsql) or die(db_error(LINK)); $npc = db_fetch_assoc($npcres); $rep4linktemplateN = array($npc['id'],RawURLEncode($REQUEST_URI),$npc['name']); $row['npc'] = str_replace($sea4linktemplateN,$rep4linktemplateN,$npclinktemplate); $npclink = str_replace($sea4linktemplateN,$rep4linktemplateN,'npc.php?op=bio&id={$ID}&ret={$REQUESTURI}'); addnav('',$npclink); $comments[] = $prefix.str_replace($search,$replace,'`&'.$row['npc'].' '.$this->nl2paragraph($row['comment'])."`0\r\n"); break; case 4: // Pet-Erweiterung von Auric $petname = $row['petname']; $pet = getmount($row['hashorse']); $rep4linktemplateP = array(RawURLEncode($row['login']),RawURLEncode($REQUEST_URI),$pet['mountname']." ".$petname); $row['pet'] = str_replace($sea4linktemplateP,$rep4linktemplateP,$petlinktemplate); $petlink = str_replace($sea4linktemplateP,$rep4linktemplate,'bio.php?char={$LOGIN}&what=pet&ret={$REQUESTURI}'); addnav("",$petlink); $comments[] = $prefix.str_replace($search,$replace,'`&'.$row['pet'].' '.$this->nl2paragraph($row['comment'])."`0\r\n"); break; case 3: $lastchar = strToLower(substr($this->StripTag($row['namebackup']), -1)); switch($lastchar) { case 's': case 'z': case 'c': $comments[] = $prefix.str_replace($search,$replace, '`&'.substr($row['name'], 0, -2)."`` ".$this->nl2paragraph($row['comment'])."`0\r\n"); break; default: $comments[] = $prefix.str_replace($search,$replace, '`&'.substr($row['name'], 0, -2)."s ".$this->nl2paragraph($row['comment'])."`0\r\n"); break; } break; case 2: $comments[] = $prefix.str_replace($search,$replace, $emotename.$this->nl2paragraph($row['comment'])."`0\r\n"); break; case 1: $comments[] = $prefix.str_replace($search,$replace, '`&'.$row['name'].' '.$this->nl2paragraph($row['comment'])."`0\r\n"); break; default: $comments[] = $prefix.str_replace($search,$replace, '`&'.$row['name'].' '.$this->colortalkline.$this->talkline.': "'.$this->nl2paragraph($row['comment']).$this->colortalkline."\"`0\r\n"); } $i++; } // Ausgabe krsort($comments); reset($comments); while (list($sec,$v)=each($comments)){ if(COMMENTARY_USEPARAGRAPHS === true) { output('

'.$v.'

',true); } else { output($v.'
',true); } } // Textfeld if($postfield === true) { $this->Field(); } $this->Navigation($result); db_free_result($result); } private function Field() { global $REQUEST_URI; rawoutput('

'); if(COMMENTARY_AUTOTEXTAREA === true) { if(COMMENTARY_MAXLENGHT <= COMMENTARY_AUTEXTAREA_CHARS) { # Einzeiliges Feld if(COMMENTARY_USE_CHATPREVIEW) { if(COMMENTARY_FARBHACK_IS_INSTALLED) { $this->PrintJS('chatpreview.withfarbhack'); } else { $this->PrintJS('chatpreview.withoutfarbhack'); } # Mit Chatpreview, einzeilig, automatisch rawoutput("

"); rawoutput('
'); } else { # Ohne Chatpreview, einzeilig, automatisch rawoutput('
'); } } else { # Mehrzeiliges Feld if(COMMENTARY_TEXTAREA_SHOWCHARS === true) { if(COMMENTARY_USE_CHATPREVIEW) { if(COMMENTARY_FARBHACK_IS_INSTALLED) { $this->PrintJS('chatpreview.withfarbhack'); } else { $this->PrintJS('chatpreview.withoutfarbhack'); } # Mit Chatpreview, mit Zeichen-übrig, mehrzeilig $this->PrintJS('textarea.chars'); rawoutput("

"); rawoutput('
Übrige Zeichen:
'); } else { // Ohne Chatpreview, mit Zeichen-übrig, mehrzeilig $this->PrintJS('textarea.chars'); rawoutput('
Übrige Zeichen:
'); } } else { if(COMMENTARY_USE_CHATPREVIEW) { if(COMMENTARY_FARBHACK_IS_INSTALLED) { $this->PrintJS('chatpreview.withfarbhack'); } else { $this->PrintJS('chatpreview.withoutfarbhack'); } # Mit Chatpreview, ohne Zeichen-übrig, mehrzeilig rawoutput("

"); rawoutput('
'); } else { # Ohne Chatpreview, ohne Zeichen-übrig, mehrzeilig rawoutput('
'); } } } } elseif(COMMENTARY_ACTIVETEXTAREA === true) { # Mehrzeiliges Feld if(COMMENTARY_TEXTAREA_SHOWCHARS === true) { if(COMMENTARY_USE_CHATPREVIEW) { if(COMMENTARY_FARBHACK_IS_INSTALLED) { $this->PrintJS('chatpreview.withfarbhack'); } else { $this->PrintJS('chatpreview.withoutfarbhack'); } # Mit Chatpreview, mit Zeichen übrig, mehrzeilig $this->PrintJS('textarea.chars'); rawoutput("

"); rawoutput('
Übrige Zeichen:
'); } else { # Ohne Chatpreview, mit Zeichen übrig, mehrzeilig $this->PrintJS('textarea.chars'); rawoutput('
Übrige Zeichen:
'); } } else { if(COMMENTARY_USE_CHATPREVIEW) { if(COMMENTARY_FARBHACK_IS_INSTALLED) { $this->PrintJS('chatpreview.withfarbhack'); } else { $this->PrintJS('chatpreview.withoutfarbhack'); } # Ohne Chatpreview, mit zeichen übrig, mehrzeilig rawoutput("

"); rawoutput('
'); } else { # Ohne Chatpreview, ohne Zeichen übrig, mehrzeilig rawoutput('
'); } } } else { # Einzeiliges Feld if(COMMENTARY_USE_CHATPREVIEW) { if(COMMENTARY_FARBHACK_IS_INSTALLED) { $this->PrintJS('chatpreview.withfarbhack'); } else { $this->PrintJS('chatpreview.withoutfarbhack'); } # Mit Chatpreview, einzeilig, manuell rawoutput("

"); rawoutput('
'); } else { # Ohne Chatpreview, einzeilig, manuell rawoutput('
'); } } rawoutput(' ' .'
'); addnav('',$REQUEST_URI); } private function StripTag($input) { // 2005-2006 by Eliwood return preg_replace("'[`].'","",$input); } # Möglichkeiten für which: # - chatpreview.withoutfarbhack # - chatpreview.withfarbhack # - textarea.chars private function PrintJS($which) { switch($which) { // OnFocus='CountMax(".getsetting('mailsizelimit' ,0).");' OnClick='CountMax(".getsetting('mailsizelimit' ,0).");' OnChange='CountMax(".getsetting('mailsizelimit' ,0).");' onKeydown='CountMax(".getsetting('mailsizelimit' ,0).");' onKeyup='CountMax(".getsetting('mailsizelimit' ,0).");' case 'textarea.chars': // Script taken from anpera.NET; Originaly by Day aka Kevz, modified by Eliwood rawoutput(' '); break; case 'chatpreview.withoutfarbhack': # Chatvorschau, Orignal von Chaosmaker, modifziziert von blackfin. Danke an Rikka für das rausrücken vom Code *g* # Weitere, kleine Modifikationen von Basilius Sauter. $my_name = $this->user['name'] ; $clearname = str_replace("`0","",$this->striptag($my_name)) ; $my_lastchar = substr($clearname,strlen($clearname)-1,0) ; // $myemoteuse = $this->user['emoteuse'] ; $script .= << JS; // chat preview mod by Chaosmaker - end // modified by blackfin // chat preview mod by Chaosmaker - end rawoutput($script); break; case 'chatpreview.withfarbhack': global $appoencode; # Chatvorschau, Orignal von Chaosmaker, modifziziert von blackfin. Danke an Rikka für das rausrücken vom Code *g* # Weitere, kleine Modifikationen von Basilius Sauter. $my_name = $this->user['name'] ; $clearname = str_replace("`0","",$this->striptag($my_name)) ; $my_lastchar = substr($clearname,strlen($clearname)-1,0) ; // $myemoteuse = $this->user['emoteuse'] ; $includinscript = ''; reset($appoencode); while(list($key,$val) = each($appoencode)) { $includinscript .= ' case "'.$key.'": if(openspan) output = output+""; else openspan = true; output= output + ""; break;'; } $script .= << JS; // chat preview mod by Chaosmaker - end // modified by blackfin // chat preview mod by Chaosmaker - end $script .= ""; rawoutput($script); break; } } private function Navigation($result) { global $REQUEST_URI; $com = (int)$_GET['comscroll']; $req1 = preg_replace("'[&]?c(omscroll)?=([[:digit:]-])*'","",$REQUEST_URI); // Zurück if(db_num_rows($result) >= $this->limit) { $req = $req1."&comscroll=".($com+1); $req = str_replace('?&','?',$req); if (!strpos($req,'?')) $req = str_replace('&','?',$req); rawoutput('<< Vorherige'); addnav('',$req); } // Aktualisieren $req = $req1."&comscroll=0"; $req = str_replace("?&","?",$req); if (!strpos($req,"?")) $req = str_replace("&","?",$req); rawoutput(' Aktualisieren '); addnav("",$req); // Wieder nach vorne if ($com>0){ $req = $req1."&comscroll=".($com-1); $req = str_replace("?&","?",$req); if (!strpos($req,"?")) $req = str_replace("&","?",$req); rawoutput(' Nächste >>'); addnav("",$req); } // Letzten Post Löschen [Added by Auric] $dellink="chat_delete.php?section=".$this->section."&return=".rawurlencode($REQUEST_URI); rawoutput(" Letzten Post löschen"); addnav('',$dellink); } private function nl2paragraph($input) { $input = HTMLSpecialchars($input); if(COMMENTARY_ALLOWPARAGRAPHS) { $input = str_replace(COMMENTARY_MANUALPARAGRAPHCHAR, "\n", $input); if(COMMENTARY_USEPARAGRAPHS) { $input = str_replace("\r\n", "\n", $input); $input = str_replace("\r", "\n", $input); $exploded = explode("\n", $input); return implode('

', $exploded); } else { $search = array("\r\n", "\r", "\n"); return str_Replace($search, '
', $input); } } else return $input; } public function SuView($deletetarget = 'superuser.php?op=commentdelete', $sectionviewfile = 'superuser.php?op=checkcommentary') { $com = (int)$_GET['comscroll']; $REQUEST_URI = $_SERVER['REQUEST_URI']; if(empty($_GET['section'])) { $where = ''; $i = 0; foreach($this->section as $disallowedsection) { $where.= ($i > 0?'AND ':'WHERE ').'`commentary`.`section` NOT LIKE "'.$disallowedsection.'"'; $i++; } $sql = 'SELECT `commentary`.`section`, COUNT(`commentid`) as counter FROM `commentary` INNER JOIN `accounts` ON `accounts`.`acctid` = `commentary`.`author` '.$where.' GROUP BY `section` LIMIT '.($com*$this->limit).','.$this->limit.' '; } else { $where = 'WHERE `section` = "'.$_GET['section'].'" '; $sql = 'SELECT `commentary`.*, `accounts`.`name`, `accounts`.`login`, `accounts`.`loggedin`, `accounts`.`location`, `accounts`.`laston` FROM `commentary` INNER JOIN `accounts` ON `accounts`.`acctid` = `commentary`.`author` '.$where.' ORDER BY `section` ASC, `commentid` DESC LIMIT '.($com*$this->limit).','.$this->limit.' '; } $result = db_query($sql); $i = 0; $comments = array(); $sections = array(); $counts = array(); $search = array('`&'); $replace = array('`&'); define('endl',"\r\n"); $linktemplate = '{$NAME}'; $acsection = ''; while($row = db_fetch_assoc($result)) { $row['comment'] = preg_replace("'[`][^".COMMENTARY_ALLOWEDTAGS."]'","",$row['comment']); $sea4linktemplate = array('{$NAME}'); $rep4linktemplate = array($row['name']); $sections[] = $row['section']; $row['namebackup'] = $row['name']; $row['name'] = str_replace($sea4linktemplate,$rep4linktemplate,$linktemplate); $delprefix = '[ X ] '; addnav("",$deletetarget.'&commentid='.$row['commentid'].'&return='.RawURLEncode($_SERVER['REQUEST_URI'])); // Timestamp if(COMMENTARY_TIMESTAMP_DISPLAY === true) { $prefix .= '`0['.date(COMMENTARY_TIMESTAMP_FORMAT, strToTime($row['postdate'])).']`0'; } // Emotler entlarven if(COMMENTARY_DISPLAYEMOTLERNAME === true AND $this->user['superuser'] >= COMMENTARY_DISPLAYEMOTLERNAME_SULEVEL) { $emotename = ' `0('.trim($row['namebackup']).')`0 '; } else { $emotename = ''; } switch($row['emote']) { case 3: $lastchar = strToLower(substr($this->StripTag($row['namebackup']), -1)); switch($lastchar) { case 's': case 'z': case 'c': $comments[] = $delprefix.str_replace($search,$replace, '`&'.substr($row['name'], 0, -2)."`` ".$this->nl2paragraph($row['comment'])."`0\r\n"); break; default: $comments[] = $delprefix.str_replace($search,$replace, '`&'.substr($row['name'], 0, -2)."s ".$this->nl2paragraph($row['comment'])."`0\r\n"); break; } break; case 2: $comments[] = $delprefix.str_replace($search,$replace, $emotename.$this->nl2paragraph($row['comment'])."`0\r\n"); break; case 1: $comments[] = $delprefix.str_replace($search,$replace, '`&'.$row['name'].' '.$this->nl2paragraph($row['comment'])."`0\r\n"); break; default: $comments[] = $delprefix.str_replace($search,$replace, '`&'.$row['name'].' '.$this->colortalkline.$this->talkline.': "'.$this->nl2paragraph($row['comment']).$this->colortalkline."\"`0\r\n"); } if(empty($_GET['section'])) { $counts[] = $row['counter']; } $i++; } // Ausgabe krsort($comments); krsort($sections); ksort($counts); reset($comments); reset($sections); reset($counts); $acsection = ''; while (list($sec,$v)=each($comments)){ if($acsection != $sections[$sec]) { $acsection = $sections[$sec]; if(empty($_GET['section'])) { $count = $counts[$sec]; output('

'.$acsection.' ('.$count.')

', true); addnav('', $sectionviewfile.'§ion='.RawURLEncode($acsection)); } else { output('

'.$acsection.'

', true); } } if(!empty($_GET['section'])) { if(COMMENTARY_USEPARAGRAPHS === true) { output('

'.$v.'

',true); } else { output($v.'
',true); } } } $this->SuNavigation($result, $sectionviewfile); db_free_result($result); } private function SuNavigation($result, $sectionviewfile) { global $REQUEST_URI; $com = (int)$_GET['comscroll']; $req1 = preg_replace("'[&]?c(omscroll)?=([[:digit:]-])*'","",$REQUEST_URI); // Zurück if(db_num_rows($result) >= $this->limit) { $req = $req1."&comscroll=".($com+1); $req = str_replace('?&','?',$req); if (!strpos($req,'?')) $req = str_replace('&','?',$req); rawoutput('<< Vorherige'); addnav('',$req); } // Aktualisieren $req = $req1."&comscroll=0"; $req = str_replace("?&","?",$req); if (!strpos($req,"?")) $req = str_replace("&","?",$req); rawoutput(' Aktualisieren '); addnav("",$req); // Wieder nach vorne if ($com>0){ $req = $req1."&comscroll=".($com-1); $req = str_replace("?&","?",$req); if (!strpos($req,"?")) $req = str_replace("&","?",$req); rawoutput(' Nächste >>'); addnav("",$req); } // Zurück zur Übersicht if(!empty($_GET['section'])) { rawoutput('
 Zurück zur Übersicht '); addnav('', $sectionviewfile); } } private function GuildPrefixes($hook, $guildv, $args) { switch($hook) { case 'overwrite_sql': switch($guildv) { case 'dashguild': $sql = "SELECT commentary.*, accounts.loggedin, accounts.name, accounts.login, accounts.guildID, accounts.prefs, accounts.hashorse, `accounts`.`petname`, lotbd_guilds.GuildPrefix FROM commentary INNER JOIN accounts ON accounts.acctid = commentary.author LEFT JOIN lotbd_guilds ON lotbd_guilds.ID = accounts.GuildID WHERE section = '$args[section]' AND accounts.locked=0 ORDER BY commentid DESC LIMIT ".($args['com']*$args['limit']).",$args[limit]"; break; case 'eliguild': $sql = "SELECT commentary.*, accounts.name, accounts.login, accounts.prefs, accounts.loggedin, accounts.location, accounts.laston, accounts.memberid, accounts.acctid, accounts.hashorse, `accounts`.`petname`, `accounts`.`statusrp`, `accounts`.`statusot`, gilden.gildenprefix, gilden.gildenid, gilden.leaderid FROM commentary INNER JOIN accounts ON accounts.acctid = commentary.author LEFT JOIN gilden ON gilden.leaderid = accounts.acctid OR gilden.gildenid = accounts.memberid WHERE section = '$args[section]' AND accounts.locked=0 ORDER BY commentid DESC LIMIT ".($args['com']*$args['limit']).",$args[limit]"; break; case 'eliguildv2': break; } return $sql; break; case 'addprefix': $row = $args['row']; switch($guildv) { case 'dashguild': # Dashers Gilden if (!(unserialize($row['GuildPrefix'])===false)) { $row['GuildPrefix']=unserialize($row['GuildPrefix']); $pre=$row['GuildPrefix']['pre']; // Prefix or postfix $prefix=$row['GuildPrefix']['display'].""; // This Guild TLA if ($prefix!="") { // The link to display the guild info for non-members $Guildshortlink = "guild.php?op=nonmember&action=examine&id=".$row['guildID']. "&return=".URLEncode(CalcReturnPath()); $Guildlink = "`0`0[$prefix`0]`& "; switch ( $pre ) { case 0: // suffix $guildsuf = $Guildlink; $guildpre = ""; addnav("",$Guildshortlink); break; case 1: // prefix $guildsuf = ""; $guildpre = $Guildlink; addnav("",$Guildshortlink); break; case 2: // nofix default: $guildsuf = ""; $guildpre = ""; break; } } } $name = $guildpre.' '.$args['name'].' '.$guildsuf; break; case 'eliguild': if($row['gildenid'] > 0) { $link2 = "`2[`0`&".stripslashes($row['gildenprefix'])."`&`2]`0"; } $name = $link2.' '.$args['name']; break; case 'eliguildv2': break; } return $name; break; } } } /// Wrapperfunktionen // Wird für noch nicht vorhandene Ersetzungen gebraucht function addcommentary() { define('COMMENTARY_ADD',true); if(isset($_POST['commentary'])) { $session['comment_for_insert'] = $_POST; } } function viewcommentary($section,$message="Kommentar hinzufügen?",$limit=COMMENTARY_DEFAULTLIMIT,$talkline="sagt", $arg5 = false) { global $session; $comment = new Commentary($session['user'],$section,$message,$limit,$talkline); /* Entklammere die Untere Funktion, wenn du die Standardfarben des Users injezieren willst * Der Erste Parameter ist für die Sprechfarbe, der zweite Parameter für die /me-Farbe, der dritte für die /X-Farbe. */ //$comment->ChangeDefaultColors('`%', '`5', '`^'); if(defined('COMMENTARY_ADD') && StrToLower($message) != 'x' && strToLower($message) != 'y') { $comment->Add(); } if(strToLower($message) == 'x') { // Admin if(empty($arg5)) { $comment->SuView(); } else { $comment->SuView($arg5[0], $arg5[1]); } } elseif(strToLower($message) == 'y') { // View only, Idea from anpera.NET, thanks Leen $comment->View(false); } else { // Normal *g* $comment->View(); } unset($comment); } // Ende ?>