From ffd56eada0fbad2672c3bec6771708b6535549af Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 1 Apr 2015 19:25:14 +0200 Subject: [PATCH] info page --- _sakura/templates/yuuno/main/infopage.tpl | 5 +++++ main/.htaccess | 3 +++ main/credits.php | 5 +++-- main/infopage.php | 18 ++++++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 _sakura/templates/yuuno/main/infopage.tpl create mode 100644 main/infopage.php diff --git a/_sakura/templates/yuuno/main/infopage.tpl b/_sakura/templates/yuuno/main/infopage.tpl new file mode 100644 index 0000000..2711622 --- /dev/null +++ b/_sakura/templates/yuuno/main/infopage.tpl @@ -0,0 +1,5 @@ +{% include 'global/header.tpl' %} +
+ {{ page.parsed }} +
+{% include 'global/footer.tpl' %} diff --git a/main/.htaccess b/main/.htaccess index fd11d20..a3181e0 100644 --- a/main/.htaccess +++ b/main/.htaccess @@ -21,6 +21,9 @@ RewriteRule ^(.*)$ $1.php # Rewrite Rules +## Info pages +RewriteRule ^r/([a-z]+)$ infopage.php?r=$1 + # Serving Images RewriteRule ^a/([0-9]+)$ imageserve.php?m=avatar&u=$1 RewriteRule ^a/([0-9]+).png$ imageserve.php?m=avatar&u=$1 diff --git a/main/credits.php b/main/credits.php index 3ce8842..1c11d88 100644 --- a/main/credits.php +++ b/main/credits.php @@ -1,6 +1,6 @@ ['Providing the Captcha system we use.', 'http://recaptcha.net'], - 'Twig' => ['The templating engine used by Sakura.', 'http://twig.sensiolabs.org/'] + 'Twig' => ['The templating engine used by Sakura.', 'http://twig.sensiolabs.org/'], + 'Parsedown' => ['A PHP markdown parser.', 'http://parsedown.org/'] ]; // Print page contents diff --git a/main/infopage.php b/main/infopage.php new file mode 100644 index 0000000..4dd79e8 --- /dev/null +++ b/main/infopage.php @@ -0,0 +1,18 @@ + 'Infopage' +]; + +// Print page contents +print Main::$_TPL->render('main/infopage.tpl', $renderData);