# HG changeset patch # User Meillo r e t u r n s # Date 1166047735 -3600 # Node ID 2672cd855fa29d3d0ceed8fac92f691a7c16d3f7 # Parent a3a651f0cac6c0ea588e12544f84de4a2867b0c6 added further doxygen-comments diff -r a3a651f0cac6 -r 2672cd855fa2 Includes/Bbcodeparser.inc.php --- a/Includes/Bbcodeparser.inc.php Wed Dec 13 22:16:59 2006 +0100 +++ b/Includes/Bbcodeparser.inc.php Wed Dec 13 23:08:55 2006 +0100 @@ -1,27 +1,39 @@ */ - define('SMILIE_DIR', 'Smilies/'); // path to smilies + /// path to smilies + define('SMILIE_DIR', 'Smilies/'); - - function parse_quote1($textinput,$level = 1) { // ohne Quelle + /** + * parses recursive quotes without a source mentioned + * + * @param $textinput the bbcode-text + * @param $level number of levels to go inside + * @return HTML-text + */ + function parse_quote1($textinput,$level = 1) { $pattern = '#\[quote\](((?R)|(.*))*)\[/quote\]#isUe'; $replacement = "'
[nl]Zitat:[nl]
[nl]'.parse_quote1('$1', ". ($level + 1) ." ).'[nl]
[nl]'"; return preg_replace($pattern, $replacement, $textinput); } - function parse_quote2($textinput,$level = 1) { // mit Quelle + + /** + * parses recursive quotes with a source mentioned + * + * @param $textinput the bbcode-text + * @param $level number of levels to go inside + * @return HTML-text + */ + function parse_quote2($textinput,$level = 1) { $pattern = '#\[quote\=(.*)\](((?R)|(.*))*)\[/quote\]#isUe'; $replacement = "'
[nl]Zitat: ($1)[nl]
[nl]'.parse_quote2('$2', ". ($level + 1) ." @@ -29,6 +41,12 @@ return preg_replace($pattern, $replacement, $textinput); } + /** + * replaces smilies + * + * @param $text text with ASCII-smilies + * @return text with [img]-smilies + */ function smilies($text) { $smilies = array( ':-)' => 'Smile.gif', ':)' => 'Smile.gif', @@ -57,6 +75,14 @@ } + /** + * turns bbcode in HTML + * + * @param $text the text with bbcode inside + * @param $smilies set to 1 causes smilies to be replaced with pics + * @param $images set to 1 causes images to be displayed ([img]-tag) + * @return text with HTML-code + */ function bbcode($text, $smilies = 0, $images = 0) { // smilies @@ -94,4 +120,4 @@ return $text; } -?> \ No newline at end of file +?> diff -r a3a651f0cac6 -r 2672cd855fa2 Includes/Nav.inc.php --- a/Includes/Nav.inc.php Wed Dec 13 22:16:59 2006 +0100 +++ b/Includes/Nav.inc.php Wed Dec 13 23:08:55 2006 +0100 @@ -93,7 +93,12 @@