aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--INSTALL.md14
-rwxr-xr-xcreate-package.sh2
-rw-r--r--ratatoeskr/libs/INFO6
-rw-r--r--ratatoeskr/sys/init_ste.php4
-rw-r--r--ratatoeskr/templates/src/systemtemplates/articles.html41
-rwxr-xr-xratatoeskr/templates/src/systemtemplates/backend_login.html2
-rw-r--r--ratatoeskr/templates/src/systemtemplates/comments_list.html29
-rw-r--r--ratatoeskr/templates/src/systemtemplates/image_list.html25
-rwxr-xr-xratatoeskr/templates/src/systemtemplates/master.html2
-rw-r--r--ratatoeskr/templates/src/systemtemplates/pluginlist.html30
-rw-r--r--ratatoeskr/templates/src/systemtemplates/repos.html22
-rw-r--r--setup.php2
13 files changed, 80 insertions, 101 deletions
diff --git a/.gitignore b/.gitignore
index 2505a76..d231bc2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,7 @@ images/*
ratatoeskr/templates/src/plugintemplates/*
ratatoeskr/templates/src/usertemplates/*
ratatoeskr/templates/transc/*
-ratatoeskr/libs/stupid_template_engine.php
+ratatoeskr/libs/ste.php
ratatoeskr/libs/markdown.php
ratatoeskr/libs/kses.php
ratatoeskr/libs/jquery.min.js
diff --git a/INSTALL.md b/INSTALL.md
index 8d50ddb..8a59dfc 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -5,7 +5,7 @@ Step 0: Requirements
--------------------
* Apache Webserver with PHP 5.3
-* These PHP modules (usually installed): gd, hash, session, mysql
+* These PHP modules (usually installed): gd, hash, session, pdo
* A MySQL server.
Step 1: Get additional libraries
@@ -13,11 +13,11 @@ Step 1: Get additional libraries
You need these libraries to run Ratatöskr (it is probably already bundled with these):
-1. Stupid Template Engine (STE)
+1. STE Template Engine (STE)
- Place "stupid_template_engine.php" directly into this directory.
+ Place "ste.php" directly into this directory.
- STE can be found here: <https://github.com/kch42/Stupid-Template-Engine>
+ STE can be found here: <https://github.com/kch42/ste>
2. PHP Markdown
@@ -31,6 +31,12 @@ You need these libraries to run Ratatöskr (it is probably already bundled with
kses can be found at <http://sourceforge.net/projects/kses/>
+4. jQuery
+
+ Place jquery.min.js into this folder.
+
+ jQuery can be found at <http://jquery.com>
+
Step 2: Copy files to your Webspace
-----------------------------------
diff --git a/create-package.sh b/create-package.sh
index a2efb4f..534518b 100755
--- a/create-package.sh
+++ b/create-package.sh
@@ -12,7 +12,7 @@ mkdir plugin_extradata/public
mkdir templates/src/plugintemplates
mkdir templates/transc
cd libs
-wget https://raw.github.com/kch42/Stupid-Template-Engine/master/stupid_template_engine.php
+wget https://raw.github.com/kch42/ste/ste.php
wget http://michelf.com/docs/projets/php-markdown-1.0.1o.zip
unzip php-markdown-*.zip
mv PHP\ Markdown\ */markdown.php .
diff --git a/ratatoeskr/libs/INFO b/ratatoeskr/libs/INFO
index e2bc19b..448a3d0 100644
--- a/ratatoeskr/libs/INFO
+++ b/ratatoeskr/libs/INFO
@@ -1,10 +1,10 @@
This directory will hold some libraries Ratatöskr needs.
-1. Stupid Template Engine (STE)
+1. STE Template Engine (STE)
- Place "stupid_template_engine.php" directly into this directory.
+ Place "ste.php" directly into this directory.
- STE can be found here: <https://github.com/kch42/Stupid-Template-Engine>
+ STE can be found here: <https://github.com/kch42/ste>
2. PHP Markdown
diff --git a/ratatoeskr/sys/init_ste.php b/ratatoeskr/sys/init_ste.php
index 6152683..2084cb5 100644
--- a/ratatoeskr/sys/init_ste.php
+++ b/ratatoeskr/sys/init_ste.php
@@ -11,7 +11,7 @@
* See "ratatoeskr/licenses/ratatoeskr" for more information.
*/
-require_once(dirname(__FILE__) . "/../libs/stupid_template_engine.php");
+require_once(dirname(__FILE__) . "/../libs/ste.php");
$tpl_basedir = dirname(__FILE__) . "/../templates";
@@ -20,7 +20,7 @@ if(!isset($ste))
/*
* Variable: $ste
*
- * The global STECore (Stupid Template Engine) instance.
+ * The global STECore instance.
*/
$ste = new \ste\STECore(new \ste\FilesystemStorageAccess("$tpl_basedir/src", "$tpl_basedir/transc"));
if(defined("__DEBUG__") && __DEBUG__)
diff --git a/ratatoeskr/templates/src/systemtemplates/articles.html b/ratatoeskr/templates/src/systemtemplates/articles.html
index 764ac40..2970b7c 100644
--- a/ratatoeskr/templates/src/systemtemplates/articles.html
+++ b/ratatoeskr/templates/src/systemtemplates/articles.html
@@ -37,32 +37,27 @@
</th>
</tr></thead>
<tbody>
- <ste:set var="articles_n"><ste:arraylen array="articles" /></ste:set>
- <ste:if>~{$articles_n|gt|0}
- <ste:then>
- <ste:foreach array="articles" value="article">
- <tr>
- <td><input type="checkbox" name="article_multiselect[]" value="$article[urlname]" /></td>
- <td><a href="$rel_path_to_root/backend/content/write/$article[urlname]">$article[urlname]</a></td>
- <td>
- <ste:foreach array="article[languages]" value="lang" counter="i">
- ?{~{$i|eq|0}||, }<a href="$rel_path_to_root/backend/content/write/$article[urlname]/$lang">$lang</a>
- </ste:foreach>
- </td>
- <td><ste:date timestamp="$article[date]">%Y-%m-%d %H:%M:%S</ste:date></td>
- <td>
- <ste:foreach array="article[tags]" value="tag" counter="i">
- ?{~{$i|eq|0}||, } <ste:escape>$tag</ste:escape>
- </ste:foreach>
- </td>
- <td><ste:escape>$article[section][name]</ste:escape></td>
- </tr>
- </ste:foreach>
- </ste:then>
+ <ste:foreach array="articles" value="article">
+ <tr>
+ <td><input type="checkbox" name="article_multiselect[]" value="$article[urlname]" /></td>
+ <td><a href="$rel_path_to_root/backend/content/write/$article[urlname]">$article[urlname]</a></td>
+ <td>
+ <ste:foreach array="article[languages]" value="lang" counter="i">
+ ?{~{$i|eq|0}||, }<a href="$rel_path_to_root/backend/content/write/$article[urlname]/$lang">$lang</a>
+ </ste:foreach>
+ </td>
+ <td><ste:date timestamp="$article[date]">%Y-%m-%d %H:%M:%S</ste:date></td>
+ <td>
+ <ste:foreach array="article[tags]" value="tag" counter="i">
+ ?{~{$i|eq|0}||, } <ste:escape>$tag</ste:escape>
+ </ste:foreach>
+ </td>
+ <td><ste:escape>$article[section][name]</ste:escape></td>
+ </tr>
<ste:else>
<tr><td colspan="6" style="text-align: center;"><em><ste:get_translation for="no_articles" /></em></td></tr>
</ste:else>
- </ste:if>
+ </ste:foreach>
</tbody>
</table>
<div>
diff --git a/ratatoeskr/templates/src/systemtemplates/backend_login.html b/ratatoeskr/templates/src/systemtemplates/backend_login.html
index 8c26b83..7317ffa 100755
--- a/ratatoeskr/templates/src/systemtemplates/backend_login.html
+++ b/ratatoeskr/templates/src/systemtemplates/backend_login.html
@@ -9,7 +9,7 @@
<body>
<img id="background_image" src="$rel_path_to_root/ratatoeskr/cms_style/images/login_bg.jpg" alt="" />
<div id="main">
- <div id="bar_top"><strong>Ratatöskr</strong>::Noctilucent clouds (v. 0.2 &beta; 2)</div>
+ <div id="bar_top"><strong>Ratatöskr</strong>::Noctilucent clouds (v. 0.2 &beta; 3)</div>
<div class="vcenter_outer"><div class="vcenter_inner">
<div id="login_box">
<h1><ste:get_translation for="login_form_header" /></h1>
diff --git a/ratatoeskr/templates/src/systemtemplates/comments_list.html b/ratatoeskr/templates/src/systemtemplates/comments_list.html
index 5c86a8e..8bbcda8 100644
--- a/ratatoeskr/templates/src/systemtemplates/comments_list.html
+++ b/ratatoeskr/templates/src/systemtemplates/comments_list.html
@@ -39,26 +39,21 @@
</tr>
</thead>
<tbody>
- <ste:set var="comments_n"><ste:arraylen array="comments" /></ste:set>
- <ste:if>~{$comments_n|gt|0}
- <ste:then>
- <ste:foreach array="comments" value="comment">
- <tr>
- <td><input type="checkbox" name="comment_multiselect[]" value="$comment[id]" /></td>
- <td>?{$comment[read_by_admin]|<ste:get_translation for="yes" />|<strong><ste:get_translation for="no" /></strong>}</td>
- <td>?{$comment[visible]|<ste:get_translation for="yes" />|<ste:get_translation for="no" />}</td>
- <td><em><ste:escape>$comment[excerpt]</ste:escape>...</em> <a href="$rel_path_to_root/backend/content/comments/$comment[id]"><ste:get_translation for="read_more" /></a></td>
- <td>$comment[language]</td>
- <td><ste:escape>$comment[author]</ste:escape></td>
- <td><ste:date timestamp="$comment[date]">%Y-%m-%d %H:%M:%S</ste:date></td>
- <td><a href="$rel_path_to_root/backend/content/write/<ste:escape>$comment[article]</ste:escape>"><ste:escape>$comment[article]</ste:escape></a></td>
- </tr>
- </ste:foreach>
- </ste:then>
+ <ste:foreach array="comments" value="comment">
+ <tr>
+ <td><input type="checkbox" name="comment_multiselect[]" value="$comment[id]" /></td>
+ <td>?{$comment[read_by_admin]|<ste:get_translation for="yes" />|<strong><ste:get_translation for="no" /></strong>}</td>
+ <td>?{$comment[visible]|<ste:get_translation for="yes" />|<ste:get_translation for="no" />}</td>
+ <td><em><ste:escape>$comment[excerpt]</ste:escape>...</em> <a href="$rel_path_to_root/backend/content/comments/$comment[id]"><ste:get_translation for="read_more" /></a></td>
+ <td>$comment[language]</td>
+ <td><ste:escape>$comment[author]</ste:escape></td>
+ <td><ste:date timestamp="$comment[date]">%Y-%m-%d %H:%M:%S</ste:date></td>
+ <td><a href="$rel_path_to_root/backend/content/write/<ste:escape>$comment[article]</ste:escape>"><ste:escape>$comment[article]</ste:escape></a></td>
+ </tr>
<ste:else>
<tr><td colspan="8" style="text-align: center"><em><ste:get_translation for="no_comments" /></em></td></tr>
</ste:else>
- </ste:if>
+ </ste:foreach>
</tbody>
</table>
<div>
diff --git a/ratatoeskr/templates/src/systemtemplates/image_list.html b/ratatoeskr/templates/src/systemtemplates/image_list.html
index fe600aa..0674f94 100644
--- a/ratatoeskr/templates/src/systemtemplates/image_list.html
+++ b/ratatoeskr/templates/src/systemtemplates/image_list.html
@@ -26,24 +26,19 @@
<th><ste:get_translation for="image_getmarkup" /></th>
</tr></thead>
<tbody>
- <ste:set var="images_n"><ste:arraylen array="images" /></ste:set>
- <ste:if>~{$images_n|gt|0}
- <ste:then>
- <ste:foreach array="images" value="image">
- <tr>
- <td><input type="checkbox" name="image_multiselect[]" value="$image[id]" /></td>
- <td><img src="$rel_path_to_root/images/previews/${image[id]}.png" alt="" /></td>
- <td><a href="$rel_path_to_root/images/$image[file]"><ste:escape>$image[name]</ste:escape></a></td>
- <td>
- <a href="$rel_path_to_root/backend/content/images/$image[id]/markdown">Markdown</a> - <a href="$rel_path_to_root/backend/content/images/$image[id]/html">HTML</a> - <a href="$rel_path_to_root/backend/content/images/$image[id]/ste">STE</a>
- </td>
- </tr>
- </ste:foreach>
- </ste:then>
+ <ste:foreach array="images" value="image">
+ <tr>
+ <td><input type="checkbox" name="image_multiselect[]" value="$image[id]" /></td>
+ <td><img src="$rel_path_to_root/images/previews/${image[id]}.png" alt="" /></td>
+ <td><a href="$rel_path_to_root/images/$image[file]"><ste:escape>$image[name]</ste:escape></a></td>
+ <td>
+ <a href="$rel_path_to_root/backend/content/images/$image[id]/markdown">Markdown</a> - <a href="$rel_path_to_root/backend/content/images/$image[id]/html">HTML</a> - <a href="$rel_path_to_root/backend/content/images/$image[id]/ste">STE</a>
+ </td>
+ </tr>
<ste:else>
<tr><td colspan="5" style="text-align: center;"><em><ste:get_translation for="no_images" /></em></td></tr>
</ste:else>
- </ste:if>
+ </ste:foreach>
</tbody>
</table>
<div>
diff --git a/ratatoeskr/templates/src/systemtemplates/master.html b/ratatoeskr/templates/src/systemtemplates/master.html
index 161b75d..a37f449 100755
--- a/ratatoeskr/templates/src/systemtemplates/master.html
+++ b/ratatoeskr/templates/src/systemtemplates/master.html
@@ -40,7 +40,7 @@
</head>
<body>
<div id="bar_top">
- <span class="branding"><strong>Ratatöskr</strong>::Noctilucent clouds (v. 0.2 &beta; 2)</span>
+ <span class="branding"><strong>Ratatöskr</strong>::Noctilucent clouds (v. 0.2 &beta; 3)</span>
<span class="user">
<a href="$rel_path_to_root/backend/admin/users/u/$user[id]">$user[name]</a> | <a href="$rel_path_to_root/backend/logout"><ste:get_translation for="logout" /></a>
</span>
diff --git a/ratatoeskr/templates/src/systemtemplates/pluginlist.html b/ratatoeskr/templates/src/systemtemplates/pluginlist.html
index 5d88fb4..85ad71a 100644
--- a/ratatoeskr/templates/src/systemtemplates/pluginlist.html
+++ b/ratatoeskr/templates/src/systemtemplates/pluginlist.html
@@ -19,27 +19,21 @@
</tr>
</thead>
<tbody>
- <ste:set var="plugins_n"><ste:arraylen array="plugins" /></ste:set>
- <ste:if>
- ~{$plugins_n|gt|0}
- <ste:then>
- <ste:foreach array="plugins" value="p">
- <tr>
- <td><input type="checkbox" name="plugins_multiselect[]" value="$p[id]" /></td>
- <td><ste:escape>$p[name]</ste:escape></td>
- <td><ste:escape>$p[versiontext]</ste:escape></td>
- <td>?{$p[active]|<strong><ste:get_translation for="yes" />|<ste:get_translation for="no" />}</td>
- <td><ste:escape>$p[description]</ste:escape></td>
- <td><ste:escape>$p[author]</ste:escape></td>
- <td>?{$p[web]|<a href="<ste:escape>$p[web]</ste:escape>"><ste:escape>$p[web]</ste:escape></a>|}</td>
- <td>?{$p[help]|<a href="$rel_path_to_root/backend/plugin/help/$p[id]"><ste:get_translation for="plugin_help" /></a>|}</td>
- </tr>
- </ste:foreach>
- </ste:then>
+ <ste:foreach array="plugins" value="p">
+ <tr>
+ <td><input type="checkbox" name="plugins_multiselect[]" value="$p[id]" /></td>
+ <td><ste:escape>$p[name]</ste:escape></td>
+ <td><ste:escape>$p[versiontext]</ste:escape></td>
+ <td>?{$p[active]|<strong><ste:get_translation for="yes" />|<ste:get_translation for="no" />}</td>
+ <td><ste:escape>$p[description]</ste:escape></td>
+ <td><ste:escape>$p[author]</ste:escape></td>
+ <td>?{$p[web]|<a href="<ste:escape>$p[web]</ste:escape>"><ste:escape>$p[web]</ste:escape></a>|}</td>
+ <td>?{$p[help]|<a href="$rel_path_to_root/backend/plugin/help/$p[id]"><ste:get_translation for="plugin_help" /></a>|}</td>
+ </tr>
<ste:else>
<tr><td colspan="8" style="text-align: center;"><em><ste:get_translation for="no_plugins" /></em></td></tr>
</ste:else>
- </ste:if>
+ </ste:foreach>
</tbody>
</table>
<div>
diff --git a/ratatoeskr/templates/src/systemtemplates/repos.html b/ratatoeskr/templates/src/systemtemplates/repos.html
index 31de6a5..1da92ea 100644
--- a/ratatoeskr/templates/src/systemtemplates/repos.html
+++ b/ratatoeskr/templates/src/systemtemplates/repos.html
@@ -23,25 +23,19 @@
</tr>
</thead>
<tbody>
- <ste:set var="repos_n"><ste:arraylen array="repos" /></ste:set>
- <ste:if>
- ~{$repos_n|gt|0}
- <ste:then>
- <ste:foreach array="repos" value="repo">
- <tr>
- <td><input type="checkbox" name="repos_multiselect[]" value="$repo[id]" /></td>
- <td><ste:escape>$repo[name]</ste:escape></td>
- <td><ste:escape>$repo[description]</ste:escape></td>
- <td><ste:escape>$repo[baseurl]</ste:escape></td>
- </tr>
- </ste:foreach>
- </ste:then>
+ <ste:foreach array="repos" value="repo">
+ <tr>
+ <td><input type="checkbox" name="repos_multiselect[]" value="$repo[id]" /></td>
+ <td><ste:escape>$repo[name]</ste:escape></td>
+ <td><ste:escape>$repo[description]</ste:escape></td>
+ <td><ste:escape>$repo[baseurl]</ste:escape></td>
+ </tr>
<ste:else>
<tr>
<td colspan="4" style="font-style: italic; text-align: center;"><ste:get_translation for="no_repos" /></td>
</tr>
</ste:else>
- </ste:if>
+ </ste:foreach>
</tbody>
</table>
<div>
diff --git a/setup.php b/setup.php
index 054001e..4c3e39d 100644
--- a/setup.php
+++ b/setup.php
@@ -60,7 +60,7 @@ $files = array(
"/ratatoeskr/translations/en.php",
"/ratatoeskr/backend.php",
"/ratatoeskr/libs/markdown.php",
- "/ratatoeskr/libs/stupid_template_engine.php",
+ "/ratatoeskr/libs/ste.php",
"/ratatoeskr/libs/kses.php",
"/ratatoeskr/.htaccess",
"/ratatoeskr/setup/create_tables.php",