diff --git a/_sakura/components/BBcode.php b/_sakura/components/BBcode.php deleted file mode 100644 index 2a193c5..0000000 --- a/_sakura/components/BBcode.php +++ /dev/null @@ -1,16 +0,0 @@ -data['user_id']); + return Forum\Forums::getUserStats($this->data['user_id']); } // Get amount of time since user events using the same format as dates() diff --git a/_sakura/sakura.php b/_sakura/sakura.php index 7eaf446..851041c 100755 --- a/_sakura/sakura.php +++ b/_sakura/sakura.php @@ -8,7 +8,7 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20151121'); +define('SAKURA_VERSION', '20151122'); define('SAKURA_VLABEL', 'Eminence'); define('SAKURA_COLOUR', '#6C3082'); define('SAKURA_STABLE', false); @@ -31,12 +31,32 @@ if (version_compare(phpversion(), '5.4.0', '<')) { require_once ROOT . '_sakura/vendor/autoload.php'; // Include components -foreach (glob(ROOT . '_sakura/components/*.php') as $component) { - require_once $component; -} +require_once ROOT . '_sakura/components/Bans.php'; +require_once ROOT . '_sakura/components/Comments.php'; +require_once ROOT . '_sakura/components/Config.php'; +require_once ROOT . '_sakura/components/Database.php'; +require_once ROOT . '_sakura/components/File.php'; +require_once ROOT . '_sakura/components/Hashing.php'; +require_once ROOT . '_sakura/components/Main.php'; +require_once ROOT . '_sakura/components/Manage.php'; +require_once ROOT . '_sakura/components/News.php'; +require_once ROOT . '_sakura/components/Payments.php'; +require_once ROOT . '_sakura/components/Permissions.php'; +require_once ROOT . '_sakura/components/Rank.php'; +require_once ROOT . '_sakura/components/Session.php'; +require_once ROOT . '_sakura/components/Template.php'; +require_once ROOT . '_sakura/components/Trick.php'; +require_once ROOT . '_sakura/components/Urls.php'; +require_once ROOT . '_sakura/components/User.php'; +require_once ROOT . '_sakura/components/Users.php'; +require_once ROOT . '_sakura/components/Whois.php'; +require_once ROOT . '_sakura/components/Forum/Forum.php'; +require_once ROOT . '_sakura/components/Forum/Forums.php'; +require_once ROOT . '_sakura/components/Forum/Post.php'; +require_once ROOT . '_sakura/components/Forum/Thread.php'; // Include database extensions -foreach (glob(ROOT . '_sakura/components/database/*.php') as $driver) { +foreach (glob(ROOT . '_sakura/components/DBWrapper/*.php') as $driver) { require_once $driver; } diff --git a/_sakura/templates/yuuno/elements/pagination.tpl b/_sakura/templates/yuuno/elements/pagination.tpl index 54fbf66..f2bc275 100755 --- a/_sakura/templates/yuuno/elements/pagination.tpl +++ b/_sakura/templates/yuuno/elements/pagination.tpl @@ -1,4 +1,4 @@ -{% set paginationSeparator %}{% if '?' in pagination.page %}&{% else %}?{% endif %}{% endset %} +{% set paginationSeparator %}{% if '?' in paginationUrl %}&{% else %}?{% endif %}{% endset %} {% set paginationPage = get.page|default(1) %}
diff --git a/_sakura/templates/yuuno/forum/viewtopic.tpl b/_sakura/templates/yuuno/forum/viewtopic.tpl index 1134895..b09ceae 100755 --- a/_sakura/templates/yuuno/forum/viewtopic.tpl +++ b/_sakura/templates/yuuno/forum/viewtopic.tpl @@ -26,7 +26,7 @@ {% endif %}
{{ post.poster.userTitle }}
- Tenshi {{ post.poster.country.long }} + Tenshi {{ post.poster.country.long }}{% if post.poster.id == (thread.posts|first).poster.id %} OP{% endif %} {% if session.checkLogin %}
{% if user.id == post.poster.id %} diff --git a/public/content/images/op.png b/public/content/images/op.png new file mode 100644 index 0000000..9caba70 Binary files /dev/null and b/public/content/images/op.png differ diff --git a/public/index.php b/public/index.php index 8873f77..efb1c5a 100755 --- a/public/index.php +++ b/public/index.php @@ -50,7 +50,7 @@ $renderData['news'] = ($forumMode ? null : (new News(Config::getConfig('site_new $renderData['newsCount'] = Config::getConfig('front_page_news_posts'); -$renderData['forum'] = ($forumMode ? (new Board\Forum()) : null); +$renderData['forum'] = ($forumMode ? (new Forum\Forum()) : null); $renderData['stats'] = [ 'userCount' => Database::count('users', ['password_algo' => ['nologin', '!='], 'rank_main' => ['1', '!=']])[0], diff --git a/public/posting.php b/public/posting.php index 82b70d7..3218718 100755 --- a/public/posting.php +++ b/public/posting.php @@ -20,13 +20,13 @@ $topicId = isset($_GET['t']) ? $_GET['t'] : ( isset($_GET['p']) ? - Board\Forums::getTopicIdFromPostId($_GET['p']) : + Forum\Forums::getTopicIdFromPostId($_GET['p']) : 0 ); $forumId = isset($_GET['f']) ? $_GET['f'] : -Board\Forums::getForumIdFromTopicId($topicId); +Forum\Forums::getForumIdFromTopicId($topicId); $mode = isset($_GET['f']) ? 'f' : (isset($_GET['t']) ? 't' : (isset($_GET['p']) ? 'p' : null)); @@ -39,7 +39,7 @@ $posting = [ // Check if we're in reply mode if ($mode != 'f') { // Attempt to get the topic - $thread = Board\Forums::getTopic($topicId, true); + $thread = Forum\Forums::getTopic($topicId, true); // Prompt an error if the topic doesn't exist if (!$thread) { @@ -120,7 +120,7 @@ if ($mode != 'f') { ]); // Reload the topic - $thread = Board\Forums::getTopic($topicId, true); + $thread = Forum\Forums::getTopic($topicId, true); // If there's no more posts left in the topic delete it as well if (!count($thread['posts'])) { @@ -173,7 +173,7 @@ if ($mode != 'f') { // Check if a post is being made if (isset($_POST['post'])) { // Attempt to make the post - $makePost = Board\Forums::createPost($currentUser->id(), $_POST['subject'], $_POST['text'], $forumId, $topicId, 1, 1, 1); + $makePost = Forum\Forums::createPost($currentUser->id(), $_POST['subject'], $_POST['text'], $forumId, $topicId, 1, 1, 1); // Add page specific things $renderData['page'] = [ diff --git a/public/viewforum.php b/public/viewforum.php index 296521f..de3a117 100755 --- a/public/viewforum.php +++ b/public/viewforum.php @@ -10,7 +10,7 @@ namespace Sakura; require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) . '_sakura/sakura.php'; // Get the forum's data -$forum = new Board\Forum(isset($_GET['f']) ? $_GET['f'] : -1); +$forum = new Forum\Forum(isset($_GET['f']) ? $_GET['f'] : -1); // Initialise templating engine $template = new Template(); diff --git a/public/viewtopic.php b/public/viewtopic.php index 44692f7..b149a2b 100755 --- a/public/viewtopic.php +++ b/public/viewtopic.php @@ -10,14 +10,14 @@ namespace Sakura; require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) . '_sakura/sakura.php'; // Attempt to get the thread -$thread = new Board\Thread( +$thread = new Forum\Thread( isset($_GET['p']) - ? Board\Forums::getTopicIdFromPostId($_GET['p']) + ? Forum\Forums::getTopicIdFromPostId($_GET['p']) : (isset($_GET['t']) ? $_GET['t'] : 0) ); // And attempt to get the forum -$forum = new Board\Forum($thread->forum); +$forum = new Forum\Forum($thread->forum); // Initialise templating engine $template = new Template();