summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/bbcode.inc.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/templates/bbcode.inc.php b/templates/bbcode.inc.php
index e5de9ce..3c8212e 100644
--- a/templates/bbcode.inc.php
+++ b/templates/bbcode.inc.php
@@ -1,8 +1,8 @@
<?PHP
- Uses('message', 'bbcode');
+ Uses('message', 'bbcode', 'links');
class bbcode_template {
- function Get($data) {
+ function GetPage($data) {
if($data['title'])
$title = htmlspecialchars($data['title']);
else
@@ -11,6 +11,25 @@
return array('title' => $title, 'content' => $content);
}
+
+ function GetEditor($data) {
+ $title = 'Edit \'' . $data['_page'] . '\'';
+
+ $content = '<h2>' . $title . '</h2>';
+ $content .= '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Edit') . '">';
+ $content .= '<input type="hidden" name="name" value="' . $data['_page'] . '" />';
+ $content .= '<input type="hidden" name="type" value="' . $data['_type'] . '" />';
+ $content .= '<input type="hidden" name="backlink" value="' . htmlspecialchars($data['_backlink']) . '" />';
+ $content .= 'Titel: <input type="text" name="data_title" value="';
+ $content .= htmlspecialchars($data['title']) . '" size="70" /><br />';
+ $content .= '<textarea name="data_content" class="pageedit spaced-top spaced-bottom" rows="25" cols="70">';
+ $content .= htmlspecialchars($data['code']) . '</textarea><br />';
+ $content .= '<input type="submit" value="Änderungen übernehmen" />';
+ $content .= '<input type="submit" name="back" value="Zurück" />';
+ $content .= '</form>';
+
+ return array('title' => $title, 'content' => $content);
+ }
}
$GLOBALS['templates']['bbcode'] = new bbcode_template;