Ik heb mijn bb parser nu werkend, maar als ik een groot stuk script tussen de [ code ] tags zet, werkt het niet. Ik zie dan 0.5 sec even de pagina, en dan krijg ik een 404 error.
kleine stukjes code werken wel...
de variabelen verschijnen ook niet.
$blaat = "hoi";
wordt
= "hoi";
Dit is het script
kleine stukjes code werken wel...
de variabelen verschijnen ook niet.
$blaat = "hoi";
wordt
= "hoi";
Dit is het script
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
| <? $smilie_find = array( '>:)', ':)', '|:(', ":'(", ':P', ); $smilie_replace = array( '[img]"../pics/smilies/devil.gif">', '<img[/img]', '[img]"../pics/smilies/frusty.gif">', '<img[/img]', '[img]"../pics/smilies/puh2.gif"[/img]', ); function filter($input, $replace) { if (!eregi("javascript:", $input)) return $replace; else return "Geen javascripts toegestaan"; } function ircme($input, $user) { return "<font color=\"#FF0000\">* ".eregi_replace("/me", htmlspecialchars($user), $input)."$text</font>"; } function code($input, $numbers, $code) { global $smilie_find, $smilie_replace; $temp = $input; $input = trim(str_replace("<br />", "", $input)); for($i=0; $i < count($smilie_find); $i++) $input = str_replace($smilie_replace["$i"], $smilie_find["$i"], $input); if($code == 0) $output = nl2br($input); elseif($code == 1) { $input = stripslashes($input); $input = str_replace("<", "<", $input); $input = str_replace(">", ">", $input); $input = str_replace(""", '"', $input); $input = str_replace("&", "&", $input); ob_start(); $data = explode("\n", $temp); $count = count($data); if($count > 1) { echo "\n<table border=0 cellpadding=2 cellspacing=0>\n"; echo "<tr>\n<td valign=top bgcolor=#DDDDDD align=right>\n"; echo "<code style=\"color: #666666\">\n"; for($i=1; $i <= $count; $i++) echo $i." <br>\n"; echo "</code>\n</td>\n<td width=100% bgcolor=#ffffff nowrap>\n"; } @highlight_string($input); if($count > 1) { echo "</td>\n</tr>\n</table>\n"; } $output = ob_get_contents(); ob_end_clean(); } $output = str_replace("]", "]", $output); $output = str_replace("[", "[", $output); $output = str_replace("<br /> ", "", $output); return $output; } function bbcode($input, $user) { global $smilie_find, $smilie_replace; $input = nl2br(htmlspecialchars(trim($input))); for($i=0; $i < count($smilie_find); $i++) $input = str_replace($smilie_find["$i"], $smilie_replace["$i"], $input); $input = preg_replace("/\\[code\]((.|\n)*?)\\[\/code\]/e", 'code("\\1", 1, 1)', $input); $input = preg_replace("/\\[php\]((.|\n)*?)\\[\/php\]/e", 'code("\\1", 1, 1)', $input); $input = preg_replace("/\\[no\]((.|\n)*?)\\[\/no\]/e", 'code("\\1", 0, 0)', $input); $input = preg_replace('!\\[u\]((.|\n)*?)\\[/u\]!', "<u>\\1</u>", $input); $input = preg_replace('!\\[b\]((.|\n)*?)\\[/b\]!', "<b>\\1</b>", $input); $input = preg_replace('!\\[i\]((.|\n)*?)\\[/i\]!', "<i>\\1</i>", $input); $input = preg_replace('!\\[s\]((.|\n)*?)\\[/s\]!', "<s>\\1</s>", $input); $input = preg_replace('!\\[li\]((.|\n)*?)\\[/li\]!', "<li>\\1</li>", $input); $input = preg_replace("/\/me (.+)/e", 'ircme("\\0", $user)', $input); $input = str_replace("[quote]", "<blockquote class=\"quote\">", $input); $input = str_replace("[/quote]", "</blockquote>", $input); $input = preg_replace('!\[quote=((\w)*?)\]!', "<blockquote class=\"quote\"><i>Quote van: \\1</i><br><br>", $input); $input = eregi_replace("\\[url\][[:space:]]*(http://)?([^\\\[]*)[[:space:]]*\\[/url\]", "<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $input); $input = eregi_replace("\\\[url=([^\\\[]*)\\]([^\\\[]*)\\\[/url\\]","<a href=\"\\1\" target=_blank>\\2</a>",$input); $input = preg_replace("/\[img=(.+)\]/e", 'filter("\\1", "[img]\"\\1\"[/img]")', $input); $input = preg_replace("/\\[img\](.+)\\[\/img]/e", 'filter("\\1", "[img]\"\\1\"[/img]")', $input); return $input; } ?> |
[ Voor 19% gewijzigd door Verwijderd op 12-01-2003 14:50 ]