summaryrefslogtreecommitdiffstats
path: root/handlers
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-04-11 20:39:05 +0200
committerneoraider <devnull@localhost>2006-04-11 20:39:05 +0200
commitf491ac343c929e3fae3e62c42372562ff9e11f54 (patch)
tree9772121e1d5851a5dfd1506ee7736840ed82736a /handlers
parent70df8e380e9ffa0bbcb351b09c668fdc606bac28 (diff)
downloadbbcode-f491ac343c929e3fae3e62c42372562ff9e11f54.tar
bbcode-f491ac343c929e3fae3e62c42372562ff9e11f54.zip
Noch ein paar Dateien, die nicht mitgekommen waren...
Diffstat (limited to 'handlers')
-rw-r--r--handlers/bbcode.inc.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/handlers/bbcode.inc.php b/handlers/bbcode.inc.php
new file mode 100644
index 0000000..e04d575
--- /dev/null
+++ b/handlers/bbcode.inc.php
@@ -0,0 +1,20 @@
+<?PHP
+ require_once('code/message.inc.php');
+ require_once('code/modules.inc.php');
+
+ require_mod('code/bbcode.inc.php');
+
+ class bbcode_template {
+ function Get($data) {
+ if($data['title'])
+ $title = strtr($data['title'], array('<' => '&lt;', '>' => '&gt;', '&' => '&amp;', '"' => '&quot;'));
+ else
+ $title = strtr($data['_page'], array(':' => ' - '));
+ $content = '<h2>' . $title . '</h2>' . $GLOBALS['bbcode']->Parse($data['code']);
+
+ return array('title' => $title, 'content' => $content);
+ }
+ }
+
+ $GLOBALS['templates']['bbcode'] = new bbcode_template;
+?>