comparison Includes/Bbcodeparser.inc.php @ 2:ab74e95a8040

added display of broken nodes; Header and Footer in Owls.php now; added logos
author "Meillo r e t u r n s <meillo@marmaro.de>"
date Thu, 07 Dec 2006 21:04:30 +0100
parents 3021ce32ee14
children 2672cd855fa2
comparison
equal deleted inserted replaced
1:6268cdb5fc0b 2:ab74e95a8040
5 * BB-Code-Parser 5 * BB-Code-Parser
6 * 6 *
7 * by Meillo r e t u r n s 7 * by Meillo r e t u r n s
8 * 8 *
9 */ 9 */
10
11
12 define('SMILIE_DIR', 'Smilies/'); // path to smilies
13
14
10 15
11 16
12 function parse_quote1($textinput,$level = 1) { // ohne Quelle 17 function parse_quote1($textinput,$level = 1) { // ohne Quelle
13 $pattern = '#\[quote\](((?R)|(.*))*)\[/quote\]#isUe'; 18 $pattern = '#\[quote\](((?R)|(.*))*)\[/quote\]#isUe';
14 $replacement = "'<br />[nl]<span class=\"quote0\">Zitat:</span>[nl]<div class=\"quote1\">[nl]'.parse_quote1('$1', 19 $replacement = "'<br />[nl]<span class=\"quote0\">Zitat:</span>[nl]<div class=\"quote1\">[nl]'.parse_quote1('$1',
23 ).'[nl]</div>[nl]'"; 28 ).'[nl]</div>[nl]'";
24 return preg_replace($pattern, $replacement, $textinput); 29 return preg_replace($pattern, $replacement, $textinput);
25 } 30 }
26 31
27 function smilies($text) { 32 function smilies($text) {
28 $smilieDir = 'Pics/Smilies/'; // path to smilies
29
30 $smilies = array( ':-)' => 'Smile.gif', 33 $smilies = array( ':-)' => 'Smile.gif',
31 ':)' => 'Smile.gif', 34 ':)' => 'Smile.gif',
32 ';-)' => 'Wink.gif', 35 ';-)' => 'Wink.gif',
33 ';)' => 'Wink.gif', 36 ';)' => 'Wink.gif',
34 ':-D' => 'Biggrin.gif', 37 ':-D' => 'Biggrin.gif',
39 ':P' => 'Lick.gif', 42 ':P' => 'Lick.gif',
40 ':o' => 'Talk.gif', 43 ':o' => 'Talk.gif',
41 ':-S' => 'Dontknow.gif', 44 ':-S' => 'Dontknow.gif',
42 ':dontknow:' => 'Dontknow.gif', 45 ':dontknow:' => 'Dontknow.gif',
43 ':-@' => 'Angry.gif', 46 ':-@' => 'Angry.gif',
44 ':cool:' => 'Cool.gif', 47 ':cool:' => 'Cool.gif',
45 '(H)' => 'Cool.gif', 48 'B-)' => 'Cool.gif',
46 '%-)' => 'Crosseyed.gif', 49 '%-)' => 'Crosseyed.gif',
47 '%-(' => 'Crosseyed.gif', 50 '%-(' => 'Crosseyed.gif',
48 ':rolleyes:' => 'Rolleyes.gif', 51 ':rolleyes:' => 'Rolleyes.gif',
49 ':eek:' => 'Shocked.gif'); 52 ':eek:' => 'Shocked.gif');
50 while(list($key, $val) = each($smilies)) { 53 while(list($key, $val) = each($smilies)) {
51 $text = str_replace($key,'[img]'.$smilieDir.$val.'[/img]',$text); 54 $text = str_replace($key,'[img]'. SMILIE_DIR . $val .'[/img]', $text);
52 } 55 }
53 return $text; 56 return $text;
54 } 57 }
55 58
56 59