array( 'h1-result' => '

Ryzom chatLog Konverter Ergebnis

', 'says' => 'sagt', 'shouts' => 'ruft', 'says-team' => 'sagt zum Team', 'says-guild' => 'sagt zur Gilde', 'says-region' => 'sagt zur Region', 'says-universe' => 'schreit ins Universum', 'h1-form' => '

Ryzom chatLog Konverter

', 'h2-chatlogfile' => '

Ryzom chatLog Datei

', 'h2-chatcolors' => '

Ryzom Chatfarben

', 'templates' => 'Vorlagen', 'autodetect' => 'Automatisch', 'fromicfg' => 'Aus .icfg Datei erkennen', 'thead-chatcolors' => 'Chatkanal / -eigenschaftFarbcode im Chatlog', 'speaker-name' => 'Name des Sprechenden', 'around-channel' => 'Umgebung', 'shout-channel' => 'Schreien', 'team-channel' => 'Team', 'guild-channel' => 'Gilde', 'region-channel' => 'Region', 'universe-channel' => 'Universum', 'h1-adapt' => '

Anpassungen

', 'adapt-de' => 'Deutscher Client', 'adapt-en' => 'Englischer Client', 'word-you' => 'Bezeichnung für Du im Chat', 'replace-you' => 'Du ersetzen durch', 'blacklist' => 'Unerkannte Zeilen mit folgenden Worten unterdrücken', 'h1-output' => '

Ausgabe

', 'thead-output' => 'Chatkanal / -eigenschaftEinbeziehenPrefixPostfix', 'date' => 'Datum', 'time' => 'Uhrzeit', 'unrecognized' => 'Sonstiges / Unerkanntes', 'remove-colortags' => 'Unerkannte Ryzom-Farbtags entfernen (z.B. Emote mit ":")', 'html-special-chars' => 'Ausgabe mit html Sonderzeichen (Copy und Paste von der Website statt aus dem Quelltext)', 'submit' => 'Umwandeln (Ergebnis im neuen Fenster/Tab)', 'your-name' => 'Dein Name', 'select-lang' => 'Sprache / Language (Formular wird zurückgesetzt)', 'source' => 'PHP Quelltext (.php.txt in .php umbenennen)' ), 'en' => array ( 'h1-result' => '

Ryzom chatLog Converter Result

', 'says' => 'says', 'shouts' => 'shouts', 'says-team' => 'says to team', 'says-guild' => 'says to guild', 'says-region' => 'says to region', 'says-universe' => 'shouts into universe', 'h1-form' => '

Ryzom chatLog Converter

', 'h2-chatlogfile' => '

Ryzom chatLog File

', 'h2-chatcolors' => '

Ryzom Chat Colors

', 'templates' => 'Templates', 'autodetect' => 'Autodetect', 'fromicfg' => 'from .icfg file', 'thead-chatcolors' => 'Channel / Chat EntitieschatLog Color Code', 'speaker-name' => 'Name of speaker', 'around-channel' => 'Around', 'shout-channel' => 'Shout', 'team-channel' => 'Team', 'guild-channel' => 'Guild', 'region-channel' => 'Region', 'universe-channel' => 'Universe', 'h1-adapt' => '

Adapt / Change

', 'adapt-de' => 'german client', 'adapt-en' => 'english client', 'word-you' => 'Word for you in chatLog', 'replace-you' => 'Replace you by', 'blacklist' => 'Suppress unrecognized lines containing', 'h1-output' => '

Output

', 'thead-output' => 'Channel / Chat EntitiesIncludePrefixPostfix', 'date' => 'Date', 'time' => 'Time', 'unrecognized' => 'Other / Unrecognized', 'remove-colortags' => 'Remove unrecognized color tags (z.B. Emote mit ":")', 'html-special-chars' => 'Print html special chars (copy & paste from page instead of sourcecode)', 'submit' => 'Convert (Result in new window/tab)', 'your-name' => 'your name here', 'select-lang' => 'Sprache / Language (resets form)', 'source' => 'PHP source code (rename .php.txt to .php)' ) ); unset($lang); foreach($langs as $key => $value) { if($_REQUEST['lang']==$key) $lang=$value; } if(!isset($lang)) { $lang=$langs['de']; } if(isset($_FILES['chatlog'])) { echo "
"; echo $lang['h1-result']."\r\n"; echo "
"; /*unset($symbols); unset($chatmodes); unset($remove_rc); unset($htmlout); unset($you_find); unset($you_replace); unset($bl_string); unset($i0_bl); unset($i1_bl); unset($bl_1); unset($blacklist); unset($lines); unset($crlf); unset($line_rd); unset($rc); unset($inc); unset($pre); unset($pst); *** register_globals wird geprüft*/ // Konstanten $symbols=array("date","time","name","around","team","guild","region","uni","unrec","shout"); $chatmodes=array("around","team","guild","region","uni","shout"); $crlf="
\n"; $lines=array(); $rc=array(); $inc=array(); $pre=array(); $pst=array(); // array parameter einlesen foreach($symbols as $symbol) { if(isset($_REQUEST['rc-'.$symbol]) && $_REQUEST['rc-'.$symbol]!="") $rc[$symbol]=stripcslashes($_REQUEST['rc-'.$symbol]); if(isset($_REQUEST['inc-'.$symbol])) $inc[$symbol]=($_REQUEST['inc-'.$symbol]=='yes'); if(isset($_REQUEST['pre-'.$symbol])) $pre[$symbol]=stripcslashes($_REQUEST['pre-'.$symbol]); if(isset($_REQUEST['post-'.$symbol])) $pst[$symbol]=stripcslashes($_REQUEST['post-'.$symbol]); } // flags und einzelparameter $remove_rc=($_REQUEST['remove-rc']=='yes'); $htmlout=($_REQUEST['htmlout']=='yes'); $you_find=$_REQUEST['chat-you']; $you_replace=$_REQUEST['chat-name']; // blacklist für sysinfo $blacklist=array(); $bl_string=$_REQUEST['forbidden']; $i0_bl=0; while($i0_bl "Unerkannt" $unrecognized=TRUE; } else { // mit Chantfarben -> Chat Zeile // Name bestimmen $i_name_rc=strpos($line,$rc['name'],$i_star); $i_name_start=$i_name_rc+strlen($rc['name']); if(substr($line,$i_name_start,1)=='[') { $i_name_start=strpos($line,']',$i_name_start)+1; while(substr($line,$i_name_start,1)==' ' && $i_name_start) { $i_name_start++; } } // Ende des Namens: Vor dem letzten wort vor dem Doppelpunkt (says oder sagt) $i_name_end_b=strpos($line,':',$i_name_start); $i_name_end=$i_name_end_b-2; // strrpos mit startpunkt erst ab php 5.0 while(substr($line,$i_name_end,1)!=' ' && $i_name_end) { $i_name_end--; } if($i_name_rc===FALSE || $i_name_end_b===FALSE || ($i_name_end-$i_name_start)>20) { // Name nicht gefunden oder ungültig $unrecognized=TRUE; } else { // Name gefunden und gültig $name=substr($line,$i_name_start,$i_name_end-$i_name_start); // "Du" ersetzen durch Namen if($name==$you_find) $name=$you_replace; // modus bestimmen $i_chat_rc=FALSE; foreach($chatmodes as $try_chatmode) { if(!isset($rc[$try_chatmode]) || $rc[$try_chatmode]=='') { // Keine Chatfarbe angegeben -> ignorieren continue; } $i_chat_rc=strpos($line,$rc[$try_chatmode],$i_name_end-1); if($i_chat_rc!==FALSE) { $chatmode=$try_chatmode; break; } } if($i_chat_rc===FALSE) { // Chatfarbe wird nicht erkannt $unrecognized=TRUE; } else { // Chatfarbe wurde erkannt, alles ist gut. $i_chat_start=$i_chat_rc+strlen($rc[$chatmode]); $chat=substr($line,$i_chat_start); if($inc[$chatmode]) { $outline=''; if($inc['date']) $outline.= $pre['date'].$date.$pst['date'].' '; if($inc['time']) $outline.= $pre['time'].$time.$pst['time'].' '; if($inc['name']) $outline.= $pre['name'].$name.$pst['name'].' '; $outline.=$pre[$chatmode].$chat.$pst[$chatmode].$crlf; if($remove_rc) $outline=remove_all_rc($outline); if($htmlout) echo htmlspecialchars($outline); else echo $outline; } } } // name gefunden } // mit rc-tags if($unrecognized) { $mayshow=TRUE; foreach($blacklist as $bl) { if(strpos($line,$bl)!==FALSE) { $mayshow=FALSE; break; } } if($inc['unrec'] && $mayshow) { $outline=''; if($inc['date']) $outline.= $pre['date'].$date.$pst['date'].' '; if($inc['time']) $outline.= $pre['time'].$time.$pst['time'].' '; $outline.=$pre['unrec'].substr($line,$i_star+2).$pst['unrec'].$crlf; if($remove_rc) $outline=remove_all_rc($outline); if($htmlout) echo htmlspecialchars($outline); else echo $outline; } } } //i_star!==FALSE } //foreach($line) // Nach Ausgabe eines Chatlogs ist hier schluss. Formular nicht anzeigen. echo '
'; echo '
'; return; } //isset(file) function remove_all_rc($line) { $itag=-1; while($itag!==FALSE) { $itag=strpos($line,"@{",$itag+1); if($itag!==FALSE && substr($line,$itag+6,1)=='}') { return remove_all_rc(substr($line,0,$itag).substr($line,$itag+7)); } } return $line; } ?>
: Beta, Silan 1
:
'; } function inp_check($id,$default_on) { return ''; } echo ''; echo $lang['thead-chatcolors']; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'.$lang['speaker-name'].''.inp_text('rc-name',8).'
'.$lang['around-channel'].''.inp_text('rc-around',8).'
'.$lang['shout-channel'].''.inp_text('rc-shout',8).'
'.$lang['team-channel'].''.inp_text('rc-team',8).'
'.$lang['guild-channel'].''.inp_text('rc-guild',8).'
'.$lang['region-channel'].''.inp_text('rc-region',8).'
'.$lang['universe-channel'].''.inp_text('rc-uni',8).'
'; ?>
: ,
'; echo ''; echo ''; ?>
'.$lang['word-you'].''.inp_text('chat-you',25).'
'.$lang['replace-you'].''.inp_text('chat-name',25).'
'.$lang['blacklist'].''; echo '
: html, BBCode (Forum), plain text
'; echo $lang['thead-output']; echo ''.$lang['date'].''.inp_check('inc-date',FALSE).''.inp_text('pre-date',48).''.inp_text('post-date',24).''; echo ''.$lang['time'].''.inp_check('inc-time',TRUE).''.inp_text('pre-time',48).''.inp_text('post-time',24).''; echo ''.$lang['speaker-name'].''.inp_check('inc-name',TRUE).''.inp_text('pre-name',48).''.inp_text('post-name',24).''; echo ''.$lang['around-channel'].''.inp_check('inc-around',TRUE).''.inp_text('pre-around',48).''.inp_text('post-around',24).''; echo ''.$lang['shout-channel'].''.inp_check('inc-shout',TRUE).''.inp_text('pre-shout',48).''.inp_text('post-shout',24).''; echo ''.$lang['team-channel'].''.inp_check('inc-team',TRUE).''.inp_text('pre-team',48).''.inp_text('post-team',24).''; echo ''.$lang['guild-channel'].''.inp_check('inc-guild',FALSE).''.inp_text('pre-guild',48).''.inp_text('post-guild',24).''; echo ''.$lang['region-channel'].''.inp_check('inc-region',TRUE).''.inp_text('pre-region',48).''.inp_text('post-region',24).'';; echo ''.$lang['universe-channel'].''.inp_check('inc-uni',FALSE).''.inp_text('pre-uni',48).''.inp_text('post-uni',24).'';; echo ''.$lang['unrecognized'].''.inp_check('inc-unrec',TRUE).''.inp_text('pre-unrec',48).''.inp_text('post-unrec',24).'';; echo ''; echo ''; echo ''; echo ''; echo '
'.inp_check('remove-rc',TRUE).$lang['remove-colortags'].'
'.inp_check('htmlout',FALSE).$lang['html-special-chars'].'
'; ?>

Original URL: http://www.thefreesoul.net/include.php?path=diverses/chatlog/chatlog-parser.php