r20160104
This commit is contained in:
parent
6fb139324f
commit
023bd805c0
153 changed files with 154 additions and 220 deletions
|
@ -274,7 +274,7 @@ class Main
|
|||
$mail->isHTML(true);
|
||||
|
||||
// Set email contents
|
||||
$htmlMail = file_get_contents(ROOT . 'templates/htmlEmail.tpl');
|
||||
$htmlMail = file_get_contents(ROOT . 'templates/htmlEmail.html');
|
||||
|
||||
// Replace template tags
|
||||
$htmlMail = str_replace('{{ sitename }}', Config::get('sitename'), $htmlMail);
|
||||
|
@ -303,7 +303,7 @@ class Main
|
|||
}
|
||||
|
||||
// Cleaning strings
|
||||
public static function cleanString($string, $lower = false, $noSpecial = false)
|
||||
public static function cleanString($string, $lower = false, $noSpecial = false, $replaceSpecial = '')
|
||||
{
|
||||
|
||||
// Run common sanitisation function over string
|
||||
|
@ -318,7 +318,7 @@ class Main
|
|||
|
||||
// If set remove all characters that aren't a-z or 0-9
|
||||
if ($noSpecial) {
|
||||
$string = preg_replace('/[^a-z0-9]/', '', $string);
|
||||
$string = preg_replace('/[^a-z0-9]/', $replaceSpecial, $string);
|
||||
}
|
||||
|
||||
// Return clean string
|
||||
|
|
|
@ -19,9 +19,9 @@ class Rank
|
|||
'rank_id' => 0,
|
||||
'rank_name' => 'Rank',
|
||||
'rank_hierarchy' => 0,
|
||||
'rank_multiple' => null,
|
||||
'rank_multiple' => '',
|
||||
'rank_hidden' => 1,
|
||||
'rank_colour' => '#444',
|
||||
'rank_colour' => 'inherit',
|
||||
'rank_description' => '',
|
||||
'rank_title' => '',
|
||||
];
|
||||
|
|
|
@ -20,7 +20,7 @@ class Template
|
|||
private $template;
|
||||
private $templateName;
|
||||
private $templateOptions;
|
||||
protected $templateFileExtension = ".tpl";
|
||||
protected $templateFileExtension = ".twig";
|
||||
|
||||
// Initialise templating engine and data
|
||||
public function __construct()
|
||||
|
|
|
@ -54,6 +54,48 @@ class User
|
|||
return self::$_userCache[$uid];
|
||||
}
|
||||
|
||||
// Creating a new user
|
||||
public static function create($username, $password, $email, $ranks = [2])
|
||||
{
|
||||
// Set a few variables
|
||||
$usernameClean = Main::cleanString($username, true);
|
||||
$emailClean = Main::cleanString($email, true);
|
||||
$password = Hashing::createHash($password);
|
||||
|
||||
// Insert the user into the database
|
||||
Database::insert('users', [
|
||||
'username' => $username,
|
||||
'username_clean' => $usernameClean,
|
||||
'password_hash' => $password[3],
|
||||
'password_salt' => $password[2],
|
||||
'password_algo' => $password[0],
|
||||
'password_iter' => $password[1],
|
||||
'email' => $emailClean,
|
||||
'rank_main' => 0,
|
||||
'register_ip' => Main::getRemoteIP(),
|
||||
'last_ip' => Main::getRemoteIP(),
|
||||
'user_registered' => time(),
|
||||
'user_last_online' => 0,
|
||||
'user_country' => Main::getCountryCode(),
|
||||
'user_data' => '[]',
|
||||
]);
|
||||
|
||||
// Get the last id
|
||||
$userId = Database::lastInsertID();
|
||||
|
||||
// Create a user object
|
||||
$user = self::construct($userId);
|
||||
|
||||
// Assign the default rank
|
||||
$user->addRanks($ranks);
|
||||
|
||||
// Set the default rank
|
||||
$user->setMainRank($ranks[0]);
|
||||
|
||||
// Return the user object
|
||||
return $user;
|
||||
}
|
||||
|
||||
// Initialise the user object
|
||||
private function __construct($uid)
|
||||
{
|
||||
|
@ -90,7 +132,7 @@ class User
|
|||
// Check if ranks were set
|
||||
if (empty($this->ranks)) {
|
||||
// If not assign the fallback rank
|
||||
$this->ranks[0] = Rank::construct(0);
|
||||
$this->ranks[1] = Rank::construct(1);
|
||||
}
|
||||
|
||||
// Assign the user's main rank to a special variable since we'll use it a lot
|
||||
|
@ -271,11 +313,6 @@ class User
|
|||
// Set the main rank of this user
|
||||
public function setMainRank($rank)
|
||||
{
|
||||
// Only allow this if this rank is actually present in their set of ranks
|
||||
if (!in_array($rank, $this->ranks())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If it does exist update their row
|
||||
Database::update('users', [
|
||||
[
|
||||
|
|
|
@ -221,14 +221,6 @@ class Users
|
|||
return [0, 'DISABLED'];
|
||||
}
|
||||
|
||||
// Check if registration codes are required
|
||||
if (Config::get('require_registration_code')) {
|
||||
// Check if the code is valid
|
||||
if (!self::checkRegistrationCode($regkey)) {
|
||||
return [0, 'INVALID_REG_KEY'];
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the user agreed to the ToS
|
||||
if (!$tos) {
|
||||
return [0, 'TOS'];
|
||||
|
@ -277,45 +269,16 @@ class Users
|
|||
}
|
||||
|
||||
// Set a few variables
|
||||
$usernameClean = Main::cleanString($username, true);
|
||||
$emailClean = Main::cleanString($email, true);
|
||||
$password = Hashing::createHash($password);
|
||||
$requireActive = Config::get('require_activation');
|
||||
$userRank = $requireActive ? [1] : [2];
|
||||
$userRankJson = json_encode($userRank);
|
||||
$ranks = $requireActive ? [1] : [2];
|
||||
|
||||
// Insert the user into the database
|
||||
Database::insert('users', [
|
||||
'username' => $username,
|
||||
'username_clean' => $usernameClean,
|
||||
'password_hash' => $password[3],
|
||||
'password_salt' => $password[2],
|
||||
'password_algo' => $password[0],
|
||||
'password_iter' => $password[1],
|
||||
'email' => $emailClean,
|
||||
'rank_main' => $userRank[0],
|
||||
'user_ranks' => $userRankJson,
|
||||
'register_ip' => Main::getRemoteIP(),
|
||||
'last_ip' => Main::getRemoteIP(),
|
||||
'user_registered' => time(),
|
||||
'user_last_online' => 0,
|
||||
'user_country' => Main::getCountryCode(),
|
||||
'user_data' => '[]',
|
||||
]);
|
||||
|
||||
// Get userid of the new user
|
||||
$uid = Database::fetch('users', false, ['username_clean' => [$usernameClean, '=']])['user_id'];
|
||||
// Create the user
|
||||
$user = User::create($username, $password, $email, $ranks);
|
||||
|
||||
// Check if we require e-mail activation
|
||||
if ($requireActive) {
|
||||
// Send activation e-mail to user
|
||||
self::sendActivationMail($uid);
|
||||
}
|
||||
|
||||
// Check if registration codes are required
|
||||
if (Config::get('require_registration_code')) {
|
||||
// If we do mark the registration code that was used as used
|
||||
self::markRegistrationCodeUsed($regkey, $uid);
|
||||
self::sendActivationMail($user->id());
|
||||
}
|
||||
|
||||
// Return true with a specific message if needed
|
||||
|
@ -493,11 +456,11 @@ class Users
|
|||
$message = "Welcome to " . Config::get('sitename') . "!\r\n\r\n";
|
||||
$message .= "Please keep this e-mail for your records. Your account intormation is as follows:\r\n\r\n";
|
||||
$message .= "----------------------------\r\n\r\n";
|
||||
$message .= "Username: " . $user['username'] . "\r\n\r\n";
|
||||
$message .= "Your profile: http://" . Config::get('url_main') . $urls->format('USER_PROFILE', [$user['user_id']]) . "\r\n\r\n";
|
||||
$message .= "Username: " . $user->username() . "\r\n\r\n";
|
||||
$message .= "Your profile: http://" . Config::get('url_main') . $urls->format('USER_PROFILE', [$user->id()]) . "\r\n\r\n";
|
||||
$message .= "----------------------------\r\n\r\n";
|
||||
$message .= "Please visit the following link in order to activate your account:\r\n\r\n";
|
||||
$message .= "http://" . Config::get('url_main') . $urls->format('SITE_ACTIVATE') . "?mode=activate&u=" . $user['user_id'] . "&k=" . $activate . "\r\n\r\n";
|
||||
$message .= "http://" . Config::get('url_main') . $urls->format('SITE_ACTIVATE') . "?mode=activate&u=" . $user->id() . "&k=" . $activate . "\r\n\r\n";
|
||||
$message .= "Your password has been securely stored in our database and cannot be retrieved. ";
|
||||
$message .= "In the event that it is forgotten, you will be able to reset it using the email address associated with your account.\r\n\r\n";
|
||||
$message .= "Thank you for registering.\r\n\r\n";
|
||||
|
@ -506,7 +469,7 @@ class Users
|
|||
// Send the message
|
||||
Main::sendMail(
|
||||
[
|
||||
$user['email'] => $user['username'],
|
||||
$user->email() => $user->username(),
|
||||
],
|
||||
Config::get('sitename') . ' Activation Mail',
|
||||
$message
|
||||
|
@ -568,71 +531,6 @@ class Users
|
|||
return [1, 'SUCCESS'];
|
||||
}
|
||||
|
||||
// Check if registration code is valid
|
||||
public static function checkRegistrationCode($code)
|
||||
{
|
||||
// Get registration key
|
||||
$keyRow = Database::fetch('regcodes', true, ['code' => [$code, '='], 'key_used' => [0, '=']]);
|
||||
|
||||
// Check if it exists and return it
|
||||
return count($keyRow) ? $keyRow[0]['id'] : false;
|
||||
}
|
||||
|
||||
// Mark registration code as used
|
||||
public static function markRegistrationCodeUsed($code, $uid = 0)
|
||||
{
|
||||
// Check if the code exists
|
||||
if (!$id = self::checkRegistrationCode($code)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Mark it as used
|
||||
Database::update('regcodes', [
|
||||
[
|
||||
'used_by' => $uid,
|
||||
'key_used' => 1,
|
||||
],
|
||||
[
|
||||
'id' => [$id, '='],
|
||||
],
|
||||
]);
|
||||
|
||||
// Return true because yeah
|
||||
return true;
|
||||
}
|
||||
|
||||
// Create new registration code
|
||||
public static function createRegistrationCode($userId)
|
||||
{
|
||||
// Check if we're logged in
|
||||
if (!self::checkLogin()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if the user is not exceeding the maximum registration key amount
|
||||
if (Database::count(
|
||||
'regcodes',
|
||||
true,
|
||||
['uid' => [$userId, '=']]
|
||||
)[0] >= Config::get('max_reg_keys')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Generate a code by MD5'ing some random bullshit
|
||||
$code = md5('SAKURA' . rand(0, 99999999) . $userId . 'NOOKLSISGOD');
|
||||
|
||||
// Insert the key into the database
|
||||
Database::insert('regcodes', [
|
||||
'code' => $code,
|
||||
'created_by' => $userId,
|
||||
'used_by' => 0,
|
||||
'key_used' => 0,
|
||||
]);
|
||||
|
||||
// Return the code
|
||||
return $code;
|
||||
}
|
||||
|
||||
// Check if a user exists
|
||||
public static function userExists($user, $id = true)
|
||||
{
|
||||
|
|
|
@ -644,7 +644,7 @@ a.default:active {
|
|||
display: block;
|
||||
margin: 10px auto;
|
||||
text-align: center;
|
||||
padding: 2px;
|
||||
padding: 2px 3px;
|
||||
border: 1px solid #9475B2;
|
||||
box-shadow: 0 0 3px #9475B2;
|
||||
border-radius: 3px;
|
||||
|
|
|
@ -43,14 +43,14 @@ if ($profile->id() == 0) {
|
|||
'message' => 'The user this profile belongs to changed their username, you are being redirected.',
|
||||
'redirect' => $urls->format('USER_PROFILE', [$check['user_id']]),
|
||||
];
|
||||
|
||||
// Set parse variables
|
||||
$template->setVariables($renderData);
|
||||
|
||||
// Print page contents
|
||||
echo $template->render('global/information');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Set parse variables
|
||||
$template->setVariables($renderData);
|
||||
|
||||
// Print page contents
|
||||
echo $template->render('global/information');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Set parse variables
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
namespace Sakura;
|
||||
|
||||
// Define Sakura version
|
||||
define('SAKURA_VERSION', '20160103');
|
||||
define('SAKURA_VERSION', '20160104');
|
||||
define('SAKURA_VLABEL', 'Eminence');
|
||||
define('SAKURA_COLOUR', '#6C3082');
|
||||
|
||||
|
@ -159,7 +159,6 @@ if (!defined('SAKURA_NO_TPL')) {
|
|||
|
||||
'disableRegistration' => Config::get('disable_registration'),
|
||||
'lockAuth' => Config::get('lock_authentication'),
|
||||
'requireRegCodes' => Config::get('require_registration_code'),
|
||||
'requireActivation' => Config::get('require_activation'),
|
||||
'minPwdEntropy' => Config::get('min_entropy'),
|
||||
'minUsernameLength' => Config::get('username_min_length'),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% include 'global/header.tpl' %}
|
||||
{% include 'global/header.twig' %}
|
||||
<div class="mioboards">
|
||||
<h3 class="miotitle" style="margin: 0;">Welcome!</h3>
|
||||
<br />
|
||||
|
@ -12,7 +12,7 @@
|
|||
<h3 class="miotitle" style="margin: 0;">Latest News Posts<span class="windowbutton-container" onclick="hidePageSection('latestnewsposts',1);"><img class="minbutton" src="/content/pixel.png" alt="_"></span></h3>
|
||||
<div class="mioboxcontent sub" style="margin: 0;">
|
||||
{% for post in news.getPosts(0, newsCount) %}
|
||||
{% include 'elements/newsPost.tpl' %}
|
||||
{% include 'elements/newsPost.twig' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -33,4 +33,4 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'global/footer.tpl' %}
|
||||
{% include 'global/footer.twig' %}
|
|
@ -8,12 +8,12 @@
|
|||
<div class="forumCategoryDescription">{{ forum.description }}</div>
|
||||
</div>
|
||||
{% for forum in forum.forums %}
|
||||
{% include 'forum/forumEntry.tpl' %}
|
||||
{% include 'forum/forumEntry.twig' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include 'forum/forumEntry.tpl' %}
|
||||
{% include 'forum/forumEntry.twig' %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
|
@ -1,10 +1,10 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Forum Listing{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="homepage forums">
|
||||
{% include 'elements/statsHeader.tpl' %}
|
||||
{% include 'forum/forum.tpl' %}
|
||||
{% include 'elements/statsHeader.twig' %}
|
||||
{% include 'forum/forum.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/forum/posting.twig
Normal file
1
templates/misaki/forum/posting.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/forum/viewforum.twig
Normal file
1
templates/misaki/forum/viewforum.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/forum/viewtopic.twig
Normal file
1
templates/misaki/forum/viewtopic.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Information{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Restricted{% endblock %}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/group/index.twig
Normal file
1
templates/misaki/group/index.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/authenticate.twig
Normal file
1
templates/misaki/main/authenticate.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/banned.twig
Normal file
1
templates/misaki/main/banned.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/faq.twig
Normal file
1
templates/misaki/main/faq.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/forgotpassword.twig
Normal file
1
templates/misaki/main/forgotpassword.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1,8 +1,8 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="homepage">
|
||||
{% include 'elements/statsHeader.tpl' %}
|
||||
{% include 'elements/statsHeader.twig' %}
|
||||
<div class="onlineUsers platform">
|
||||
{% if stats.onlineUsers %}
|
||||
{% for amount,onlineUser in stats.onlineUsers %}
|
||||
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
<div class="frontNews platform">
|
||||
{% for post in news.getPosts(0, newsCount) %}
|
||||
{% include 'elements/newsPost.tpl' %}
|
||||
{% include 'elements/newsPost.twig' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}{% if page.title %}{{ page.title }}{% else %}Not found!{% endif %}{% endblock %}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/memberlist.twig
Normal file
1
templates/misaki/main/memberlist.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/news.twig
Normal file
1
templates/misaki/main/news.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/premiumcomplete.twig
Normal file
1
templates/misaki/main/premiumcomplete.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% set profileHidden = profile.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) or (profile.permission(constant('Sakura\\Perms\\Site::RESTRICTED')) and (user.id != profile.id and not user.permission(constant('Sakura\\Perms\\Manage::USE_MANAGE'), constant('Sakura\\Perms::MANAGE')))) %}
|
||||
|
||||
|
@ -217,7 +217,7 @@
|
|||
{% endif %}
|
||||
<div class="userPage profilePlatform">
|
||||
<div class="inner">
|
||||
{% include 'profile/' ~ profileView ~ '.tpl' %}
|
||||
{% include 'profile/' ~ profileView ~ '.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/report.twig
Normal file
1
templates/misaki/main/report.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Search{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}{{ page.category }} / {{ page.mode }}{% endblock %}
|
||||
|
||||
|
@ -13,5 +13,5 @@
|
|||
{% endfor %}
|
||||
</h3>
|
||||
</div>
|
||||
{% include 'settings/' ~ current ~ '.tpl' %}
|
||||
{% include 'settings/' ~ current ~ '.twig' %}
|
||||
{% endblock %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/support.twig
Normal file
1
templates/misaki/main/support.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/misaki/main/supporttracker.twig
Normal file
1
templates/misaki/main/supporttracker.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
<ul>
|
||||
{% for comment in comment.comment_replies %}
|
||||
{% include 'elements/comment.tpl' %}
|
||||
{% include 'elements/comment.twig' %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
|
@ -26,7 +26,7 @@
|
|||
<ul class="comments-list">
|
||||
{% if comments %}
|
||||
{% for comment in comments %}
|
||||
{% include 'elements/comment.tpl' %}
|
||||
{% include 'elements/comment.twig' %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h1 class="stylised" style="text-align: center; padding: 10px 0">There are no comments yet!</h1>
|
|
@ -7,11 +7,11 @@
|
|||
{% if forum.type != 1 %}Subforums{% else %}<a href="{{ urls.format('FORUM_SUB', [forum.id]) }}" class="clean">{{ forum.name }}</a>{% endif %}
|
||||
</div>
|
||||
{% for forum in forum.forums %}
|
||||
{% include 'forum/forumEntry.tpl' %}
|
||||
{% include 'forum/forumEntry.twig' %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include 'forum/forumEntry.tpl' %}
|
||||
{% include 'forum/forumEntry.twig' %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -21,7 +21,7 @@
|
|||
{% set paginationPages = threads %}
|
||||
{% set paginationUrl %}{{ urls.format('FORUM_SUB', [forum.id]) }}{% endset %}
|
||||
|
||||
{% include 'forum/forumBtns.tpl' %}
|
||||
{% include 'forum/forumBtns.twig' %}
|
||||
{% if forum.threads %}
|
||||
<table class="topicList">
|
||||
<thead>
|
||||
|
@ -44,12 +44,12 @@
|
|||
</tfoot>
|
||||
<tbody>
|
||||
{% for thread in threads[get.page|default(1) - 1] %}
|
||||
{% include 'forum/topicEntry.tpl' %}
|
||||
{% include 'forum/topicEntry.twig' %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<h1 class="stylised" style="margin: 2em auto; text-align: center;">There are no posts in this forum!</h1>
|
||||
{% endif %}
|
||||
{% include 'forum/forumBtns.tpl' %}
|
||||
{% include 'forum/forumBtns.twig' %}
|
||||
{% endif %}
|
|
@ -16,6 +16,6 @@
|
|||
<a href="{{ forumMarkRead }}" class="forumbtn"><span class="fa fa-check-square-o"></span> Mark as Read</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'elements/pagination.tpl' %}
|
||||
{% include 'elements/pagination.twig' %}
|
||||
<div class="clear"></div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% set title = 'Forums' %}
|
||||
|
||||
|
@ -9,11 +9,11 @@
|
|||
{% block content %}
|
||||
<div class="content homepage forum">
|
||||
<div class="content-right content-column">
|
||||
{% include 'elements/indexPanel.tpl' %}
|
||||
{% include 'elements/indexPanel.twig' %}
|
||||
</div>
|
||||
<div class="content-left content-column">
|
||||
{% include 'forum/forum.tpl' %}
|
||||
{% include 'forum/forumBtns.tpl' %}
|
||||
{% include 'forum/forum.twig' %}
|
||||
{% include 'forum/forumBtns.twig' %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% set bbcode = {'b': ['Bold', 'bold'], 'i': ['Italic', 'italic'], 'u': ['Underline', 'underline'], 's': ['Strikethrough', 'strikethrough'], 'header': ['Header', 'header'], 'url': ['URL', 'chain'], 'code': ['Code', 'code'], 'spoiler': ['Spoiler', 'minus'], 'box': ['Spoiler box', 'folder', true], 'list': ['List', 'list-ul'], 'img': ['Image', 'picture-o'], 'youtube': ['YouTube video', 'youtube-play']} %}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
{% block content %}
|
||||
<div class="content">
|
||||
<div class="content-column forum posting">
|
||||
{% include 'elements/editor.tpl' %}
|
||||
{% include 'elements/editor.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% set title %}Forums / {{ forum.name }}{% endset %}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
{% block content %}
|
||||
<div class="content homepage forum viewforum">
|
||||
<div class="content-column">
|
||||
{% include 'forum/forum.tpl' %}
|
||||
{% include 'forum/forum.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% set forumBackLink %}{{ urls.format('FORUM_SUB', [forum.id]) }}{% endset %}
|
||||
{% set forumReplyLink %}{{ urls.format('FORUM_REPLY', [thread.id]) }}{% endset %}
|
||||
|
@ -37,7 +37,7 @@
|
|||
<div class="content homepage forum viewtopic">
|
||||
<div class="content-column">
|
||||
<div class="head"><a href="{{ forumBackLink }}" class="clean">{{ forum.name }}</a> / <a href="{{ paginationUrl }}" class="clean">{{ thread.title }}</a></div>
|
||||
{% include 'forum/forumBtns.tpl' %}
|
||||
{% include 'forum/forumBtns.twig' %}
|
||||
<table class="posts">
|
||||
{% for post in posts[get.page|default(1) - 1] %}
|
||||
<tr class="post" id="p{{ post.id }}">
|
||||
|
@ -90,7 +90,7 @@
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% include 'forum/forumBtns.tpl' %}
|
||||
{% include 'forum/forumBtns.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Confirmation{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Information{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Restricted{% endblock %}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/yuuno/group/index.twig
Normal file
1
templates/yuuno/group/index.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Authentication{% endblock %}
|
||||
|
||||
|
@ -113,7 +113,7 @@
|
|||
<label for="recaptcha_response_field">Verification:</label>
|
||||
</div>
|
||||
<div class="centreAlign">
|
||||
{% include 'elements/captcha.tpl' %}
|
||||
{% include 'elements/captcha.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="subLinks centreAlign">
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}You are banned!{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Frequently Asked Questions{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Forgot Password{% endblock %}
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content homepage">
|
||||
<div class="content-right content-column">
|
||||
{% include 'elements/indexPanel.tpl' %}
|
||||
{% include 'elements/indexPanel.twig' %}
|
||||
</div>
|
||||
<div class="content-left content-column">
|
||||
<div class="head">News</div>
|
||||
{% for post in news.posts|batch(newsCount)[0] %}
|
||||
{% include 'elements/newsPost.tpl' %}
|
||||
{% include 'elements/newsPost.twig' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}{% if page.title %}{{ page.title }}{% else %}Not found!{% endif %}{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% set rankTitle %}
|
||||
{% if page.notfound %}Not found{% else %}{% if not page.active %}All members{% else %}{{ page.ranks[page.active].name(true) }}{% endif %}{% endif %}
|
||||
|
@ -106,7 +106,7 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% if users|length > 1 %}
|
||||
{% include 'elements/pagination.tpl' %}
|
||||
{% include 'elements/pagination.twig' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% set newsPosts = viewPost and postExists ? [news.posts[postExists]] : news.posts|batch(postsPerPage)[get.page|default(1) - 1] %}
|
||||
|
||||
|
@ -30,14 +30,14 @@
|
|||
<div class="head">{{ title }}</div>
|
||||
{% if (viewPost ? postExists : newsPosts|length) %}
|
||||
{% for post in newsPosts %}
|
||||
{% include 'elements/newsPost.tpl' %}
|
||||
{% include 'elements/newsPost.twig' %}
|
||||
{% if viewPost and postExists %}
|
||||
{% include 'elements/comments.tpl' %}
|
||||
{% include 'elements/comments.twig' %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if not (viewPost and postExists) and news.posts|batch(postsPerPage)|length > 1 %}
|
||||
<div>
|
||||
{% include 'elements/pagination.tpl' %}
|
||||
{% include 'elements/pagination.twig' %}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{% endif %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% block title %}Purchase complete!{% endblock %}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends 'global/master.tpl' %}
|
||||
{% extends 'global/master.twig' %}
|
||||
|
||||
{% set profileHidden = profile.permission(constant('Sakura\\Perms\\Site::DEACTIVATED')) or (profile.permission(constant('Sakura\\Perms\\Site::RESTRICTED')) and (user.id != profile.id and not user.permission(constant('Sakura\\Perms\\Manage::USE_MANAGE'), constant('Sakura\\Perms::MANAGE')))) %}
|
||||
|
||||
|
@ -128,7 +128,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="content-left content-column">
|
||||
{% include 'profile/' ~ profileView ~ '.tpl' %}
|
||||
{% include 'profile/' ~ profileView ~ '.twig' %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
|
@ -1 +0,0 @@
|
|||
{% extends 'global/master.tpl' %}
|
1
templates/yuuno/main/report.twig
Normal file
1
templates/yuuno/main/report.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'global/master.twig' %}
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue