bread for now
This commit is contained in:
parent
926f0e6653
commit
b8d5ef0ebf
8 changed files with 62 additions and 48 deletions
|
@ -24,7 +24,8 @@
|
|||
"20150620",
|
||||
"20150621",
|
||||
"20150627",
|
||||
"20150628"
|
||||
"20150628",
|
||||
"20150629"
|
||||
|
||||
]
|
||||
|
||||
|
@ -1349,6 +1350,19 @@
|
|||
"change": "Changed Edit icon on profiles."
|
||||
}
|
||||
|
||||
],
|
||||
|
||||
"20150629": [
|
||||
|
||||
{
|
||||
"type": "ADD",
|
||||
"change": "Added topic and post counters to the frontpage."
|
||||
},
|
||||
{
|
||||
"type": "UPD",
|
||||
"change": "Changed SAKURA_VTYPE to a SAKURA_STABLE boolean that can be used for only showing things on stable or development builds."
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace Sakura;
|
|||
class Database {
|
||||
|
||||
// Database container
|
||||
public static $_DATABASE;
|
||||
private static $_DATABASE;
|
||||
|
||||
// Initialisation function
|
||||
public static function init($engine) {
|
||||
|
|
|
@ -26,7 +26,7 @@ class Permissions {
|
|||
'SITE' => [
|
||||
|
||||
'DEACTIVATED' => 1, // Is a user in this group deactivated
|
||||
'USE_CHAT' => 2, // Can use the chatroom
|
||||
'VIEW_ONLINE' => 2, // Can view the extended online list
|
||||
'ALTER_PROFILE' => 4, // Can alter their profile data
|
||||
'CHANGE_AVATAR' => 8, // Can change their avatar
|
||||
'CREATE_BACKGROUND' => 16, // Can create a background (different from changing)
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Define Sakura version
|
||||
define('SAKURA_VERSION', '20150628');
|
||||
define('SAKURA_VERSION', '20150629');
|
||||
define('SAKURA_VLABEL', 'Eminence');
|
||||
define('SAKURA_VTYPE', 'Development');
|
||||
define('SAKURA_STABLE', false);
|
||||
define('SAKURA_COLOUR', '#6C3082');
|
||||
|
||||
// Define Sakura Path
|
||||
define('ROOT', str_replace(basename(__DIR__), '', dirname(__FILE__)));
|
||||
|
||||
// Error Reporting: 0 for production and -1 for testing
|
||||
error_reporting(-1);
|
||||
error_reporting(SAKURA_STABLE ? 0 : -1);
|
||||
|
||||
// Include libraries
|
||||
require_once ROOT .'_sakura/vendor/autoload.php';
|
||||
|
@ -54,8 +54,8 @@ $renderData = [
|
|||
|
||||
'version' => SAKURA_VERSION,
|
||||
'vlabel' => SAKURA_VLABEL,
|
||||
'vtype' => SAKURA_VTYPE,
|
||||
'vcolour' => SAKURA_COLOUR,
|
||||
'stable' => SAKURA_STABLE,
|
||||
'urls' => Configuration::getLocalConfig('urls'),
|
||||
'charset' => Configuration::getConfig('charset'),
|
||||
'currentpage' => '//'. $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'],
|
||||
|
@ -82,7 +82,7 @@ $renderData = [
|
|||
|
||||
'perms' => [
|
||||
|
||||
'canUseChat' => Permissions::check('SITE', 'USE_CHAT', Session::$userId, 1),
|
||||
'canViewOnline' => Permissions::check('SITE', 'USE_CHAT', Session::$userId, 1),
|
||||
'canUseForums' => Permissions::check('FORUM', 'USE_FORUM', Session::$userId, 1)
|
||||
|
||||
],
|
||||
|
|
|
@ -209,10 +209,10 @@
|
|||
<!-- Navigation menu, displayed on left side of the bar. -->
|
||||
<a class="menu-item" href="//{{ sakura.urls.main }}/" title="Return to the front page of Flashii">Home</a>
|
||||
<a class="menu-item" href="//{{ sakura.urls.main }}/news" title="Here you can read updates on Flashii">News</a>
|
||||
{% if perms.canUseChat %}
|
||||
<a class="menu-item" href="//{{ sakura.urls.chat }}/" title="Chat with other Flashii members">Chat</a>
|
||||
{% endif %}
|
||||
{% if perms.canUseForums %}
|
||||
<a class="menu-item" href="//{{ sakura.urls.main }}/forum" title="Discuss things with other members but static">Forums</a>
|
||||
{% endif %}
|
||||
<a class="menu-item" href="//{{ sakura.urls.main }}/search" title="Search on Flashii">Search</a>
|
||||
{% if user.checklogin %}
|
||||
<a class="menu-item menu-donate" href="//{{ sakura.urls.main }}/support" title="Give us money to keep the site (and other services) up and running">Support us</a>
|
||||
|
@ -272,4 +272,3 @@
|
|||
<p>A lot of things on this site require JavaScript to be enabled (e.g. the chat), we try to keep both sides happy but it is highly recommended that you enable it (you'll also have to deal with this message being here if you don't enable it).</p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ $tpl = file_get_contents(ROOT .'_sakura/templates/changeLog.tpl');
|
|||
// Parse tags
|
||||
$tpl = str_replace('{{ version }}', SAKURA_VERSION, $tpl);
|
||||
$tpl = str_replace('{{ version_label }}', SAKURA_VLABEL, $tpl);
|
||||
$tpl = str_replace('{{ version_type }}', SAKURA_VTYPE, $tpl);
|
||||
$tpl = str_replace('{{ version_type }}', SAKURA_STABLE ? 'Stable' : 'Development', $tpl);
|
||||
$tpl = str_replace('{{ colour }}', SAKURA_COLOUR, $tpl);
|
||||
$tpl = str_replace('{{ changeloghtml }}', $changelogHTML, $tpl);
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ namespace Sakura;
|
|||
|
||||
// Include components
|
||||
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) .'_sakura/sakura.php';
|
||||
//print Permissions::check('SITE', 'USE_CHAT', Session::$userId, 1);
|
||||
|
||||
print Permissions::check('SITE', 'USE_CHAT', Session::$userId, 1);
|
||||
|
||||
// Are we in forum mode?
|
||||
$forumMode = isset($_GET['forums']) ? ($_GET['forums'] == true) : false;
|
||||
|
@ -32,8 +33,8 @@ $renderData['stats'] = [
|
|||
'lastRegDate' => ($_INDEX_LAST_REGDATE = date_diff(date_create(date('Y-m-d', $_INDEX_NEWEST_USER['regdate'])), date_create(date('Y-m-d')))->format('%a')) .' day'. ($_INDEX_LAST_REGDATE == 1 ? '' : 's'),
|
||||
'chatOnline' => ($_INDEX_CHAT_ONLINE = count(SockChat::getOnlineUsers())) .' user'. ($_INDEX_CHAT_ONLINE == 1 ? '' : 's'),
|
||||
'onlineUsers' => Users::checkAllOnline(),
|
||||
'topicCount' => '0 topics',
|
||||
'postCount' => '0 posts'
|
||||
'topicCount' => ($_TOPICS = count(Database::fetch('topics'))) .' topic'. ($_TOPICS != 1 ? 's' : ''),
|
||||
'postCount' => ($_POSTS = count(Database::fetch('posts'))) .' post'. ($_POSTS != 1 ? 's' : '')
|
||||
];
|
||||
|
||||
// Print page contents
|
||||
|
|
Reference in a new issue