Hallo ihr!
Mit diesem Addon sollen die User zeigen könne wie es ihnen geht und das in Form von Smilies!
Einbauanleitung:
datei gut.php => ../
Ordner smilies => ../images/
Füge im Dorf einen Link zu gut.php ein.
Führe folgenden Sql im phpmyadmin aus:
$this->bbcode_second_pass_code('', 'ALTER TABLE `accounts` ADD `pic` tinyint( 7 ) UNSIGNED DEFAULT '0' NOT NULL ; ')
öffne list.php suche:
$this->bbcode_second_pass_code('', 'if ($_GET['page']=="" && $_GET['op']==""){ output("`c`bDiese Krieger sind gerade online`b`c"); $sql = "SELECT acctid,name,login,alive,location,sex,level,laston,loggedin,lastip,uniqueid,race FROM accounts WHERE locked=0 AND loggedin=1 AND laston>'".date("Y-m-d H:i:s",strtotime(date("r")."-".getsetting("LOGINTIMEOUT",900)." seconds"))."' ORDER BY level DESC, dragonkills DESC, login ASC"; }else{ output("`c`bKrieger in dieser Welt (Seite ".($pageoffset/$playersperpage+1).": $from-$to von $totalplayers)`b`c"); $sql = "SELECT acctid,name,login,alive,location,sex,level,laston,loggedin,lastip,uniqueid,race FROM accounts WHERE locked=0 $search ORDER BY level DESC, dragonkills DESC, login ASC $limit"; }')
ersetzt mit:
$this->bbcode_second_pass_code('', 'if ($_GET['page']=="" && $_GET['op']==""){ output("`c`bDiese Krieger sind gerade online`b`c"); $sql = "SELECT acctid,name,login,alive,location,sex,level,laston,loggedin,lastip,uniqueid,race,pic FROM accounts WHERE locked=0 AND loggedin=1 AND laston>'".date("Y-m-d H:i:s",strtotime(date("r")."-".getsetting("LOGINTIMEOUT",900)." seconds"))."' ORDER BY level DESC, dragonkills DESC, login ASC"; }else{ output("`c`bKrieger in dieser Welt (Seite ".($pageoffset/$playersperpage+1).": $from-$to von $totalplayers)`b`c"); $sql = "SELECT acctid,name,login,alive,location,sex,level,laston,loggedin,lastip,uniqueid,race,pic FROM accounts WHERE locked=0 $search ORDER BY level DESC, dragonkills DESC, login ASC $limit"; }')
suche:
$this->bbcode_second_pass_code('', 'output("<tr class='trhead'><td><b>Level</b></td><td><b>Name</b></td><td><b>Rasse</b></td><td><b><img src=\"images/female.gif\">/<img src=\"images/male.gif\"></b></td><td><b>Ort</b></td><td><b>Status</b></td><td><b>Zuletzt da</b></td>",true);')
erstze mit:
$this->bbcode_second_pass_code('', 'output("<tr class='trhead'><td><b>Level</b></td><td><b>Name</b></td><td><b>Rasse</b></td><td><b><img src=\"images/female.gif\">/<img src=\"images/male.gif\"></b></td><td><b>Ort</b></td><td><b>Status</b></td><td><b>Zuletzt da</b></td><td><b>Stimmung</b></td>",true);')
suche:
$this->bbcode_second_pass_code('', ' if (substr($laston,0,2)=="1 ") $laston="1 Tag"; if (date("Y-m-d",strtotime($row[laston])) == date("Y-m-d")) $laston="Heute"; if (date("Y-m-d",strtotime($row[laston])) == date("Y-m-d",strtotime(date("r")."-1 day"))) $laston="Gestern"; if ($loggedin) $laston="Jetzt"; output($laston); output("</td></tr>",true); }')
erstzen mit:
$this->bbcode_second_pass_code('', ' if (substr($laston,0,2)=="1 ") $laston="1 Tag"; if (date("Y-m-d",strtotime($row[laston])) == date("Y-m-d")) $laston="Heute"; if (date("Y-m-d",strtotime($row[laston])) == date("Y-m-d",strtotime(date("r")."-1 day"))) $laston="Gestern"; if ($loggedin) $laston="Jetzt"; output($laston); output("</td><td>",true); if(file_exists("images/smilies/{$row['pic']}.gif")) output("<img src='images/smilies/{$row['pic']}.gif' width='50' height='50' alt='' align=''>",true); else output("Stimmung unbekannt"); output("</td></tr>",true); }')
Viel Spaß!
Kommentare und verbesserungen sind erwünscht!
Dateianhänge: |
gut.rar [21.2 KIB]
616-mal heruntergeladen
|
|