summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-12-04 01:21:03 +0100
committerneoraider <devnull@localhost>2006-12-04 01:21:03 +0100
commite6e0f3703ab6fc13a1ec9ce95de2bd398bcf881c (patch)
tree6e0e7d7c301b17a327a00a91319873088c1ef6ee
parent7538923358a21e3d857424ecb81c3dc61dc1446f (diff)
downloadbbcode-e6e0f3703ab6fc13a1ec9ce95de2bd398bcf881c.zip
bbcode-e6e0f3703ab6fc13a1ec9ce95de2bd398bcf881c.tar
BBCode-Modul an das neue Template-Interface angepasst.
-rw-r--r--module.xml1
-rw-r--r--pages/editor/bbcode.xml36
-rw-r--r--templates/bbcode.inc.php23
3 files changed, 21 insertions, 39 deletions
diff --git a/module.xml b/module.xml
index 5485eac..cef3055 100644
--- a/module.xml
+++ b/module.xml
@@ -6,7 +6,6 @@
<desc>A little module that parses BBCode</desc>
</info>
<files>
- <page type="e">bbcode</page>
<code>bbcode</code>
<template>bbcode</template>
</files>
diff --git a/pages/editor/bbcode.xml b/pages/editor/bbcode.xml
deleted file mode 100644
index 4b65361..0000000
--- a/pages/editor/bbcode.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<page>
- <info>
- <name>bbcode</name>
- <template>phpexec</template>
- <access>9:0</access>
- <type>e</type>
- </info>
- <data>
- <code>
- <![CDATA[
-<?PHP
- Uses('links');
-
-
- $title = 'Edit \'' . $data['_data']['_page'] . '\'';
-
- echo '<h2>' . $title . '</h2>';
-?>
-<form method="post" action="<?PHP echo $GLOBALS['links']->GetNeonLink('Pages:Edit'); ?>">
- <input type="hidden" name="name" value="<?PHP echo $data['_data']['_page'] ?>" />
- <input type="hidden" name="type" value="<?PHP echo $data['_data']['_type']; ?>" />
- <input type="hidden" name="backlink" value="<?PHP echo htmlspecialchars($data['_backlink']); ?>" />
- Titel: <input type="text" name="data_title" value="<?PHP
- echo htmlspecialchars($data['_data']['title']);
- ?>" size="70" /><br />
- <textarea name="data_code" class="pageedit spaced-top spaced-bottom" rows="25" cols="70"><?PHP
- echo htmlspecialchars($data['_data']['code']);
- ?></textarea><br />
- <input type="submit" value="Änderungen übernehmen" />
- <input type="submit" name="back" value="Zurück" />
-</form>
- ]]>
- </code>
- </data>
-</page>
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;