From: Mutwin K. <mu...@us...> - 2004-11-15 20:39:28
|
Update of /cvsroot/fuwiki/fuwiki_1_0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22330 Modified Files: functions.inc parser.inc syntax_overview.txt Log Message: nearing rc2 Index: parser.inc =================================================================== RCS file: /cvsroot/fuwiki/fuwiki_1_0/parser.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** parser.inc 7 Nov 2004 12:00:33 -0000 1.5 --- parser.inc 15 Nov 2004 20:39:18 -0000 1.6 *************** *** 103,108 **** $comment_num++; $arguments = stripslashes(stripslashes($arguments)); ! if(preg_match("/action=\"(.*)\"/", $arguments, $o)) $action = $WikiParser->parse_comment_action($o[1]); if(preg_match("/timestamp=(.*)$/", $arguments, $o)) $timestamp = $o[1]; --- 103,109 ---- $comment_num++; $arguments = stripslashes(stripslashes($arguments)); ! if(preg_match("/action=\"([^\"]*)\"/", $arguments, $o)) { $action = $WikiParser->parse_comment_action($o[1]); + } if(preg_match("/timestamp=(.*)$/", $arguments, $o)) $timestamp = $o[1]; *************** *** 417,420 **** --- 418,422 ---- $string = $this->parse_showpage($string); $string = $this->parse_votes($string); + $string = $this->parse_divs($string); return $string; } *************** *** 437,440 **** --- 439,443 ---- $string = $this->parse_newsletterquotes($string); $string = $this->parse_votes($string); + $string = $this->parse_divs($string); return $string; } *************** *** 532,536 **** --- 535,541 ---- $string = preg_replace("/\'\'(.*)\'\'/U", "<i>\\1</i>", $string, -1); $string = preg_replace("/\[center\](.*)\[\/center\]/Us", "<center>\\1</center>", $string, -1); + $string = preg_replace("/<u>(.*)<\/u>/Us", "<span style=\"text-decoration:underline;\">\\1</span>", $string, -1); $string = preg_replace("/<u>(.*)<\/u>/Us", "<span style=\"text-decoration:underline;\">\\1</span>", $string, -1); + $string = preg_replace("/\[size=([0-9]{1,3})\](.*)\[\/size\]/Us", "<span style=\"font-size:\\1px;\">\\2</span>", $string, -1); return $string; } *************** *** 626,630 **** function parse_lists($string) { ! $string = preg_replace("/(\n|\r|^)\*([^\n\r]*)(?=[\n\r])/e", "parse_lists_callback('\\2')", $string, -1); return $string; } --- 631,635 ---- function parse_lists($string) { ! $string = preg_replace("/(\n|\r|^)\*([^\n\r]*)(?=[$\n\r])/e", "parse_lists_callback('\\2')", $string, -1); return $string; } *************** *** 633,637 **** { $string = preg_replace("/(\n|\r|^)>/", "\\1>", $string, -1); ! $string = preg_replace("/(\n|\r|^)(>+)([^\n\r]*)(?=[\n\r])/e", "parse_newsletterquotes_callback('\\3', '\\2')", $string, -1); return stripslashes($string); } --- 638,642 ---- { $string = preg_replace("/(\n|\r|^)>/", "\\1>", $string, -1); ! $string = preg_replace("/(\n|\r|^)(>+)([^\n\r]*)(?=[$\n\r])/e", "parse_newsletterquotes_callback('\\3', '\\2')", $string, -1); return stripslashes($string); } *************** *** 655,658 **** --- 660,671 ---- } + function parse_divs($string) { + $string = preg_replace("/<div style=\"(.*)\">/iUs", "<div style=\"\\1\">", $string, -1); + $string = preg_replace("/<\/div>/", "</div>", $string, -1); + $string = preg_replace("/<div>/iUs", "<div>", $string, -1); + return $string; + } + + function work_html($string) { $search = array("/ /", "/¡/", "/¢/", "/£/", "/¤/", "/¥/", Index: functions.inc =================================================================== RCS file: /cvsroot/fuwiki/fuwiki_1_0/functions.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions.inc 7 Nov 2004 12:00:32 -0000 1.4 --- functions.inc 15 Nov 2004 20:39:18 -0000 1.5 *************** *** 101,109 **** $out .= "<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>"; ! $out .= $WikiParser->parse(encode_utf8($_POST["WikiCode"]), true); $out .= "</td></tr><tr><td><br /><hr /></td></tr><tr><td>"; $out .= "<form".$form_enctype." name=\"previewform\" action=\"index.php?"._PAGENAME."\" method=\"post\">"; $out .= "<input type=\"hidden\" name=\"revision\" value=\"".$_POST["revision"]."\">"; ! $out .= "<textarea name=\"WikiCode\" rows=\"25\" cols=\"90\">".encode_utf8($_POST["WikiCode"])."</textarea>"; $out .= "<br />".$form_upload; $out .= "<input type=\"submit\" name=\"edited\" value=\"Abschicken\" accesskey=\"s\"> "; --- 101,109 ---- $out .= "<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>"; ! $out .= $WikiParser->parse(encode_utf8(stripslashes($_POST["WikiCode"])), true); $out .= "</td></tr><tr><td><br /><hr /></td></tr><tr><td>"; $out .= "<form".$form_enctype." name=\"previewform\" action=\"index.php?"._PAGENAME."\" method=\"post\">"; $out .= "<input type=\"hidden\" name=\"revision\" value=\"".$_POST["revision"]."\">"; ! $out .= "<textarea name=\"WikiCode\" rows=\"25\" cols=\"90\">".encode_utf8(stripslashes($_POST["WikiCode"]))."</textarea>"; $out .= "<br />".$form_upload; $out .= "<input type=\"submit\" name=\"edited\" value=\"Abschicken\" accesskey=\"s\"> "; *************** *** 332,338 **** } ! function get_timestamp() { ! $d = getdate(); return $d["year"].($d["mon"] < 10 ? "0".$d["mon"] : $d["mon"]).($d["mday"] < 10 ? "0".$d["mday"] : $d["mday"]).($d["hours"] < 10 ? "0".$d["hours"] : $d["hours"]).($d["minutes"] < 10 ? "0".$d["minutes"] : $d["minutes"]).($d["seconds"] < 10 ? "0".$d["seconds"] : $d["seconds"]); } --- 332,341 ---- } ! function get_timestamp($date=0) { ! if($date == 0) ! $d = getdate(); ! else ! $d = $date; return $d["year"].($d["mon"] < 10 ? "0".$d["mon"] : $d["mon"]).($d["mday"] < 10 ? "0".$d["mday"] : $d["mday"]).($d["hours"] < 10 ? "0".$d["hours"] : $d["hours"]).($d["minutes"] < 10 ? "0".$d["minutes"] : $d["minutes"]).($d["seconds"] < 10 ? "0".$d["seconds"] : $d["seconds"]); } Index: syntax_overview.txt =================================================================== RCS file: /cvsroot/fuwiki/fuwiki_1_0/syntax_overview.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** syntax_overview.txt 13 Oct 2004 20:28:26 -0000 1.1.1.1 --- syntax_overview.txt 15 Nov 2004 20:39:18 -0000 1.2 *************** *** 10,15 **** [quote]text[/quote] [quote]text[/quote] yes (no expression) [comment verb="" time=""]text --user_name[/comment] yes ! URL [url]URL[/url] yes ! [[@URL|desc]] [url desc]URL[/url] yes [[WikiPage]] [[WikiPage]] yes [[WikiPage|desc]] [[WikiPage|desc]] yes --- 10,15 ---- [quote]text[/quote] [quote]text[/quote] yes (no expression) [comment verb="" time=""]text --user_name[/comment] yes ! URL [url]URL[/url] [URL] yes ! [[@URL|desc]] [url desc]URL[/url] [URL Desc] yes [[WikiPage]] [[WikiPage]] yes [[WikiPage|desc]] [[WikiPage|desc]] yes *************** *** 19,22 **** [color=blue]text[/color] [color=blue]text[/color] yes [code]text[/code] [code]text[/code] yes ! [a #anchor] [#anchor] no [size=XX]bla[/size] [size=XX]bla[/size] yes \ No newline at end of file --- 19,22 ---- [color=blue]text[/color] [color=blue]text[/color] yes [code]text[/code] [code]text[/code] yes ! [a #anchor] [#anchor] yes [size=XX]bla[/size] [size=XX]bla[/size] yes \ No newline at end of file |