r20151227.1
This commit is contained in:
parent
6fc3d9e349
commit
316ec49a83
8 changed files with 39 additions and 56 deletions
|
@ -48,5 +48,8 @@ iso3166 = config/iso3166.json
|
||||||
|
|
||||||
; Development mode settings
|
; Development mode settings
|
||||||
[dev]
|
[dev]
|
||||||
; Enable development mode
|
; Show detailed error logs in browser
|
||||||
enable = true
|
show_errors = true
|
||||||
|
|
||||||
|
; Show a small version of the changelog loaded from sakura.flash.moe
|
||||||
|
show_changelog = true
|
||||||
|
|
|
@ -76,8 +76,7 @@ class mysql
|
||||||
PDO::ATTR_EMULATE_PREPARES => false,
|
PDO::ATTR_EMULATE_PREPARES => false,
|
||||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING,
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING,
|
||||||
]);
|
]);
|
||||||
}
|
} catch (PDOException $e) {
|
||||||
catch (PDOException $e) {
|
|
||||||
// Catch connection errors
|
// Catch connection errors
|
||||||
trigger_error('SQL Driver: ' . $e->getMessage(), E_USER_ERROR);
|
trigger_error('SQL Driver: ' . $e->getMessage(), E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ class Main
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for dev mode
|
// Check for dev mode
|
||||||
$detailed = Config::local('dev', 'enable');
|
$detailed = Config::local('dev', 'show_errors');
|
||||||
|
|
||||||
// Build page
|
// Build page
|
||||||
$errorPage = '<!DOCTYPE html>
|
$errorPage = '<!DOCTYPE html>
|
||||||
|
|
|
@ -101,7 +101,6 @@ class User
|
||||||
'password_algo' => $this->data['password_algo'],
|
'password_algo' => $this->data['password_algo'],
|
||||||
'password_iter' => $this->data['password_iter'],
|
'password_iter' => $this->data['password_iter'],
|
||||||
'password_chan' => $this->data['password_chan'],
|
'password_chan' => $this->data['password_chan'],
|
||||||
'password_new' => $this->data['password_new'],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,7 @@ switch ($category . '.' . $mode) {
|
||||||
'userscount' => Database::count('users')[0],
|
'userscount' => Database::count('users')[0],
|
||||||
'bancount' => Database::count('bans')[0],
|
'bancount' => Database::count('bans')[0],
|
||||||
'uploadcount' => count(glob(ROOT . Config::get('user_uploads') . '/*')) - 1,
|
'uploadcount' => count(glob(ROOT . Config::get('user_uploads') . '/*')) - 1,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
namespace Sakura;
|
namespace Sakura;
|
||||||
|
|
||||||
// Define Sakura version
|
// Define Sakura version
|
||||||
define('SAKURA_VERSION', '20151224');
|
define('SAKURA_VERSION', '20151227');
|
||||||
define('SAKURA_VLABEL', 'Eminence');
|
define('SAKURA_VLABEL', 'Eminence');
|
||||||
define('SAKURA_COLOUR', '#6C3082');
|
define('SAKURA_COLOUR', '#6C3082');
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ set_error_handler(['Sakura\Main', 'errorHandler']);
|
||||||
Config::init(ROOT . 'config/config.ini');
|
Config::init(ROOT . 'config/config.ini');
|
||||||
|
|
||||||
// Change error reporting according to the dev configuration
|
// Change error reporting according to the dev configuration
|
||||||
error_reporting(Config::local('dev', 'enable') ? -1 : 0);
|
error_reporting(Config::local('dev', 'show_errors') ? -1 : 0);
|
||||||
|
|
||||||
// Make the database connection
|
// Make the database connection
|
||||||
Database::init(Config::local('database', 'driver'));
|
Database::init(Config::local('database', 'driver'));
|
||||||
|
@ -127,7 +127,7 @@ if (!defined('SAKURA_NO_TPL')) {
|
||||||
],
|
],
|
||||||
|
|
||||||
'dev' => [
|
'dev' => [
|
||||||
'enable' => Config::local('dev', 'enable'),
|
'showChangelog' => Config::local('dev', 'show_changelog'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'cookie' => [
|
'cookie' => [
|
||||||
|
|
|
@ -241,7 +241,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="ftsections">
|
<div class="ftsections">
|
||||||
<div class="copycentre">Powered by <a href="https://github.com/flashwave/sakura/" target="_blank">Sakura</a>{% if sakura.dev.enable %} <a href="https://sakura.flash.moe/#r{{ sakura.versionInfo.version }}" target="_blank">r{{ sakura.versionInfo.version }}</a>{% endif %} © 2013-2015 <a href="http://flash.moe/" target="_blank">Flashwave</a></div>
|
<div class="copycentre">Powered by <a href="https://github.com/flashwave/sakura/" target="_blank">Sakura</a>{% if sakura.dev.showChangelog %} <a href="https://sakura.flash.moe/#r{{ sakura.versionInfo.version }}" target="_blank">r{{ sakura.versionInfo.version }}</a>{% endif %} © 2013-2015 <a href="http://flash.moe/" target="_blank">Flashwave</a></div>
|
||||||
<ul class="ftsection">
|
<ul class="ftsection">
|
||||||
<li class="fthead">General</li>
|
<li class="fthead">General</li>
|
||||||
<li><a href="{{ urls.format('SITE_HOME') }}" title="Flashii Frontpage">Home</a></li>
|
<li><a href="{{ urls.format('SITE_HOME') }}" title="Flashii Frontpage">Home</a></li>
|
||||||
|
@ -269,7 +269,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if sakura.dev.enable and php.self == '/index.php' and stats %}
|
{% if sakura.dev.showChangelog and php.self == '/index.php' and stats %}
|
||||||
<script type="text/javascript" src="https://sakura.flash.moe/?get={{ sakura.versionInfo.version|slice(0, 4) }}-{{ sakura.versionInfo.version|slice(4, 2) }}-{{ sakura.versionInfo.version|slice(6, 2) }}&variable=true"></script>
|
<script type="text/javascript" src="https://sakura.flash.moe/?get={{ sakura.versionInfo.version|slice(0, 4) }}-{{ sakura.versionInfo.version|slice(4, 2) }}-{{ sakura.versionInfo.version|slice(6, 2) }}&variable=true"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// Column colours for actions
|
// Column colours for actions
|
||||||
|
|
|
@ -1,46 +1,28 @@
|
||||||
<div style="margin: 5px;">
|
<div style="margin: 5px;">
|
||||||
<h1 class="stylised">Common Tasks</h1>
|
<h1 class="stylised">Common Tasks</h1>
|
||||||
<h2>Profile</h2>
|
<h2>Profile</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ urls.format('SETTING_MODE', ['appearance', 'avatar']) }}" class="default">Change Avatar</a></li>
|
<li><a href="{{ urls.format('SETTING_MODE', ['appearance', 'avatar']) }}" class="default">Change Avatar</a></li>
|
||||||
<li><a href="{{ urls.format('SETTING_MODE', ['appearance', 'userpage']) }}" class="default">Change Userpage</a></li>
|
<li><a href="{{ urls.format('SETTING_MODE', ['appearance', 'userpage']) }}" class="default">Change Userpage</a></li>
|
||||||
<li><a href="{{ urls.format('SETTING_MODE', ['appearance', 'signature']) }}" class="default">Change Signature</a></li>
|
<li><a href="{{ urls.format('SETTING_MODE', ['appearance', 'signature']) }}" class="default">Change Signature</a></li>
|
||||||
<li><a href="{{ urls.format('SETTING_MODE', ['general', 'profile']) }}" class="default">Change Profile Details</a></li>
|
<li><a href="{{ urls.format('SETTING_MODE', ['general', 'profile']) }}" class="default">Change Profile Details</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>Messaging</h2>
|
<h2>Messaging</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ urls.format('SETTING_MODE', ['messages', 'inbox']) }}" class="default">View Inbox</a></li>
|
<li><a href="{{ urls.format('SETTING_MODE', ['messages', 'inbox']) }}" class="default">View Inbox</a></li>
|
||||||
<li><a href="{{ urls.format('SETTING_MODE', ['messages', 'compose']) }}" class="default">Send PM</a></li>
|
<li><a href="{{ urls.format('SETTING_MODE', ['messages', 'compose']) }}" class="default">Send PM</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>Account</h2>
|
<h2>Account</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ urls.format('SETTING_MODE', ['advanced', 'sessions']) }}" class="default">Manage Active Sessions</a></li>
|
<li><a href="{{ urls.format('SETTING_MODE', ['advanced', 'sessions']) }}" class="default">Manage Active Sessions</a></li>
|
||||||
<li><a href="{{ urls.format('SETTING_MODE', ['account', 'password']) }}" class="default">Change Password</a></li>
|
<li><a href="{{ urls.format('SETTING_MODE', ['account', 'password']) }}" class="default">Change Password</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<br />
|
<br />
|
||||||
<h1 class="stylised">Personal Statistics</h1>
|
<h1 class="stylised">Personal Statistics</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>You joined on <b>{{ user.dates.joined|date(sakura.dateFormat) }}</b>.</li>
|
<li>You joined on <b>{{ user.dates.joined|date(sakura.dateFormat) }}</b>.</li>
|
||||||
<li>You have made <b>{{ user.forumStats.posts }} forum post{% if user.forumStats.posts != 1 %}s{% endif %}</b> and started <b>{{ user.forumStats.topics }} forum thread{% if user.forumStats.topics != 1 %}s{% endif %}</b>.</li>
|
<li>You have made <b>{{ user.forumStats.posts }} forum post{% if user.forumStats.posts != 1 %}s{% endif %}</b> and started <b>{{ user.forumStats.topics }} forum thread{% if user.forumStats.topics != 1 %}s{% endif %}</b>.</li>
|
||||||
<li>You have <b>x</b> warnings.</li>
|
<li>You have <b>x</b> warnings.</li>
|
||||||
<li>You have <b>{{ user.getFriends|length }} friend{% if user.getFriends|length != 1 %}s{% endif %}</b>.</li>
|
<li>You have <b>{{ user.getFriends|length }} friend{% if user.getFriends|length != 1 %}s{% endif %}</b>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br />
|
|
||||||
<h1 class="stylised"><a class="clean" href="{{ urls.format('SETTING_MODE', ['friends', 'listing']) }}">Friends</a></h1>
|
|
||||||
<h2 style="color: #080;">Online</h2>
|
|
||||||
{% if user.getFriends(true, true, true).online %}
|
|
||||||
{% for key,friend in user.getFriends(true, true, true).online %}
|
|
||||||
<a href="/u/{{ friend.user.id }}" class="default" style="color: {{ friend.user.colour }};">{{ friend.user.username }}</a>{% if key + 1 != user.getFriends(true, true, true).online|length %},{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<h4>No friends are online.</h4>
|
|
||||||
{% endif %}
|
|
||||||
<h2 style="color: #800;">Offline</h2>
|
|
||||||
{% if user.getFriends(true, true, true).offline %}
|
|
||||||
{% for key,friend in user.getFriends(true, true, true).offline %}
|
|
||||||
<a href="/u/{{ friend.user.id }}" class="default" style="color: {{ friend.user.colour }};">{{ friend.user.username }}</a>{% if key + 1 != user.getFriends(true, true, true).offline|length %},{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<h4>No friends are offline.</h4>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue