r20151003

Signed-off-by: Flashwave <me@flash.moe>
This commit is contained in:
flash 2015-10-04 00:45:19 +02:00
parent f30f03ba59
commit 14465c4ca4
7 changed files with 72 additions and 37 deletions

View file

@ -2987,6 +2987,22 @@
"user": "Flashwave" "user": "Flashwave"
} }
],
"20151003": [
"eminence",
{
"type": "FIX",
"change": "Fixed public/.htaccess.",
"user": "Flashwave"
},
{
"type": "FIX",
"change": "Fixed template not being found in manage.",
"user": "Flashwave"
}
] ]
} }

View file

@ -8,7 +8,7 @@
namespace Sakura; namespace Sakura;
// Define Sakura version // Define Sakura version
define('SAKURA_VERSION', '20150929'); define('SAKURA_VERSION', '20151003');
define('SAKURA_VLABEL', 'Eminence'); define('SAKURA_VLABEL', 'Eminence');
define('SAKURA_COLOUR', '#6C3082'); define('SAKURA_COLOUR', '#6C3082');
define('SAKURA_STABLE', false); define('SAKURA_STABLE', false);

View file

@ -34,11 +34,21 @@
</div> </div>
<div id="navbar" class="navbar-collapse collapse"> <div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-left"> <ul class="nav navbar-nav navbar-left">
<li><a href="{{ urls.format('MANAGE_INDEX') }}">Dashboard</a></li> <li{% if manage.category == 'dashboard' %} class="active"{% endif %}><a href="{{ urls.format('MANAGE_INDEX') }}">Dashboard</a></li>
<li><a href="{{ urls.format('MANAGE_CAT', ['reports']) }}">Reports</a></li> <li{% if manage.category == 'news' %} class="active"{% endif %}><a href="{{ urls.format('MANAGE_CAT', ['news']) }}">News</a></li>
<li><a href="{{ urls.format('MANAGE_CAT', ['infopages']) }}">Info pages</a></li> <li class="dropdown{% if manage.category == 'configuration' %} active{% endif %}">
<li><a href="{{ urls.format('MANAGE_CAT', ['system']) }}">System information</a></li> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Configuration <span class="caret"></span></a>
<li class="dropdown"> <ul class="dropdown-menu">
<li><a href="{{ urls.format('MANAGE_MODE', ['configuration', 'general']) }}">General</a></li>
<li><a href="{{ urls.format('MANAGE_MODE', ['configuration', 'security']) }}">Security</a></li>
<li><a href="{{ urls.format('MANAGE_MODE', ['configuration', 'authentication']) }}">Authentication</a></li>
<li><a href="{{ urls.format('MANAGE_MODE', ['configuration', 'appearance']) }}">Appearance</a></li>
<li><a href="{{ urls.format('MANAGE_MODE', ['configuration', 'performance']) }}">Performance</a></li>
</ul>
</li>
<li{% if manage.category == 'reports' %} class="active"{% endif %}><a href="{{ urls.format('MANAGE_CAT', ['reports']) }}">Reports</a></li>
<li{% if manage.category == 'infopages' %} class="active"{% endif %}><a href="{{ urls.format('MANAGE_CAT', ['infopages']) }}">Info pages</a></li>
<li class="dropdown{% if manage.category == 'users' %} active{% endif %}">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Users <span class="caret"></span></a> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Users <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="{{ urls.format('MANAGE_MODE', ['users', 'manage']) }}">Manage users</a></li> <li><a href="{{ urls.format('MANAGE_MODE', ['users', 'manage']) }}">Manage users</a></li>
@ -49,21 +59,21 @@
<li><a href="{{ urls.format('MANAGE_MODE', ['users', 'bans']) }}">Bans</a></li> <li><a href="{{ urls.format('MANAGE_MODE', ['users', 'bans']) }}">Bans</a></li>
</ul> </ul>
</li> </li>
<li class="dropdown"> <li class="dropdown{% if manage.category == 'forums' %} active{% endif %}">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Forums <span class="caret"></span></a> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Forums <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="{{ urls.format('MANAGE_MODE', ['forums', 'manage']) }}">Manage forums</a></li> <li><a href="{{ urls.format('MANAGE_MODE', ['forums', 'manage']) }}">Manage forums</a></li>
<li><a href="{{ urls.format('MANAGE_MODE', ['forums', 'moderate']) }}">Moderate forums</a></li> <li><a href="{{ urls.format('MANAGE_MODE', ['forums', 'moderate']) }}">Moderate forums</a></li>
</ul> </ul>
</li> </li>
<li class="dropdown"> <li class="dropdown{% if manage.category == 'permissions' %} active{% endif %}">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Permissions <span class="caret"></span></a> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Permissions <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="{{ urls.format('MANAGE_MODE', ['permissions', 'global']) }}">Global permissions</a></li> <li><a href="{{ urls.format('MANAGE_MODE', ['permissions', 'global']) }}">Global permissions</a></li>
<li><a href="{{ urls.format('MANAGE_MODE', ['permissions', 'forums']) }}">Forum permissions</a></li> <li><a href="{{ urls.format('MANAGE_MODE', ['permissions', 'forums']) }}">Forum permissions</a></li>
</ul> </ul>
</li> </li>
<li class="dropdown"> <li class="dropdown{% if manage.category == 'logs' %} active{% endif %}">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Logs <span class="caret"></span></a> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Logs <span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="{{ urls.format('MANAGE_MODE', ['logs', 'all']) }}">Full log</a></li> <li><a href="{{ urls.format('MANAGE_MODE', ['logs', 'all']) }}">Full log</a></li>

View file

@ -0,0 +1,15 @@
{% extends 'global/master.tpl' %}
{% block title %}Configuration{% endblock %}
{% block content %}
<div class="main">
<h1 class="page-header"><small>Configuration /</small> General</h1>
<div class="panel panel-default">
<div class="panel-heading">Windows XPs</div>
<div class="panel-body">
and Windows XP Accessories
</div>
</div>
</div>
{% endblock %}

View file

@ -1,21 +0,0 @@
{% extends 'global/master.tpl' %}
{% block title %}System Information{% endblock %}
{% block content %}
<div class="main">
<h1 class="page-header">System information <small>Stuff about the server the site runs on</small></h1>
<dl class="dl-horizontal">
<dt>Operating System</dt>
<dd>{{ uname.osn }}</dd>
<dt>Version Info</dt>
<dd>{{ uname.osv }}</dd>
<dt>System Hostname</dt>
<dd>{{ uname.host }}</dd>
<dt>Architecture</dt>
<dd>{{ uname.arch }}</dd>
<dt>Uptime</dt>
<dd>{{ uname.arch }}</dd>
</dl>
</div>
{% endblock %}

View file

@ -14,7 +14,6 @@ RewriteBase /
Options +FollowSymLinks -Indexes Options +FollowSymLinks -Indexes
# Rewrite Rules # Rewrite Rules
RewriteRule ^index/?$ index.php [L,QSA]
RewriteRule ^login/?$|^logout/?$|^activate/?$|^register/?$|^forgotpassword/?|^authenticate/?$ authenticate.php [L,QSA] RewriteRule ^login/?$|^logout/?$|^activate/?$|^register/?$|^forgotpassword/?|^authenticate/?$ authenticate.php [L,QSA]
RewriteRule ^support/?$ support.php [L,QSA] RewriteRule ^support/?$ support.php [L,QSA]
RewriteRule ^support/tracker/?$ support.php?tracker=true [L,QSA] RewriteRule ^support/tracker/?$ support.php?tracker=true [L,QSA]
@ -59,9 +58,9 @@ RewriteRule ^u/?$ profile.php [L,QSA]
RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/?$ profile.php?u=$1 [L,QSA] RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/?$ profile.php?u=$1 [L,QSA]
RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/header/?$ imageserve.php?m=header&u=$1 [L,QSA] RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/header/?$ imageserve.php?m=header&u=$1 [L,QSA]
RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/groups/?$ profile.php?u=$1&view=groups [L,QSA] RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/groups/?$ profile.php?u=$1&view=groups [L,QSA]
RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/friends/?$ profile.php?u=$1$view=friends [L,QSA] RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/friends/?$ profile.php?u=$1&view=friends [L,QSA]
RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/threads/?$ profile.php?u=$1$view=threads [L,QSA] RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/threads/?$ profile.php?u=$1&view=threads [L,QSA]
RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/posts/?$ profile.php?u=$1$view=posts [L,QSA] RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/posts/?$ profile.php?u=$1&view=posts [L,QSA]
RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/report/?$ report.php?mode=user&id=$1 [L,QSA] RewriteRule ^u/([A-Za-z0-9\_\-\s\.]+)/report/?$ report.php?mode=user&id=$1 [L,QSA]
# Groups # Groups

View file

@ -23,8 +23,12 @@ $modes = [
'dashboard' => [ 'dashboard' => [
'index', 'index',
], ],
'system' => [ 'configuration' => [
'index', 'general',
'security',
'authentication',
'appearance',
'performance',
], ],
'error' => [ 'error' => [
'index', 'index',
@ -50,9 +54,17 @@ $mode = isset($_GET['mode'])
// Override category if mode is error // Override category if mode is error
if ($mode == 'error') { if ($mode == 'error') {
$category = 'error'; $category = 'error';
$mode = key($modes[$category]); $mode = $modes[$category][0];
} }
// Set page data
$renderData = array_merge($renderData, [
'manage' => [
'category' => $category,
'mode' => $mode,
],
]);
// Add special variables // Add special variables
switch ($category . '.' . $mode) { switch ($category . '.' . $mode) {
case 'system.index': case 'system.index':
@ -65,6 +77,10 @@ switch ($category . '.' . $mode) {
], ],
]); ]);
break; break;
case 'config.index':
$renderData = array_merge($renderData, [
]);
break;
} }
// Print page contents // Print page contents