summaryrefslogtreecommitdiffstats
path: root/templates/bbcode.inc.php
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-04-11 21:09:04 +0200
committerneoraider <devnull@localhost>2006-04-11 21:09:04 +0200
commit08945f7122e50a6e0ef0966c932f0a1496475f04 (patch)
treed5a598d47c062e72f1d09263e280c911a403bfd6 /templates/bbcode.inc.php
parentf491ac343c929e3fae3e62c42372562ff9e11f54 (diff)
downloadbbcode-08945f7122e50a6e0ef0966c932f0a1496475f04.tar
bbcode-08945f7122e50a6e0ef0966c932f0a1496475f04.zip
Noch ein paar Dateien, die nicht mitgekommen waren...
Diffstat (limited to 'templates/bbcode.inc.php')
-rw-r--r--templates/bbcode.inc.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/templates/bbcode.inc.php b/templates/bbcode.inc.php
new file mode 100644
index 0000000..e04d575
--- /dev/null
+++ b/templates/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;
+?>