news
This commit is contained in:
parent
f4e5c151f8
commit
0a34bf911b
2 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,10 @@ RewriteRule ^(.*)$ $1.php
|
||||||
## Info pages
|
## Info pages
|
||||||
RewriteRule ^r/([a-z]+)$ infopage.php?r=$1
|
RewriteRule ^r/([a-z]+)$ infopage.php?r=$1
|
||||||
|
|
||||||
|
## News
|
||||||
|
RewriteRule ^news/([0-9]+)$ news.php?id=$1
|
||||||
|
RewriteRule ^news.xml$ news.php?xml
|
||||||
|
|
||||||
# Serving Images
|
# Serving Images
|
||||||
RewriteRule ^a/([0-9]+)$ imageserve.php?m=avatar&u=$1
|
RewriteRule ^a/([0-9]+)$ imageserve.php?m=avatar&u=$1
|
||||||
RewriteRule ^a/([0-9]+).png$ imageserve.php?m=avatar&u=$1
|
RewriteRule ^a/([0-9]+).png$ imageserve.php?m=avatar&u=$1
|
||||||
|
|
|
@ -13,7 +13,7 @@ require_once '/var/www/flashii.net/_sakura/sakura.php';
|
||||||
$renderData['page'] = [
|
$renderData['page'] = [
|
||||||
'title' => 'Flashii News'
|
'title' => 'Flashii News'
|
||||||
];
|
];
|
||||||
$renderData['newsPosts'] = Main::getNewsPosts();
|
$renderData['newsPosts'] = Main::getNewsPosts((isset($_GET['id']) && is_numeric($_GET['id'])) ? $_GET['id'] : null);
|
||||||
|
|
||||||
// Print page contents
|
// Print page contents
|
||||||
print Main::tplRender('main/news.tpl', $renderData);
|
print Main::tplRender('main/news.tpl', $renderData);
|
||||||
|
|
Reference in a new issue