diff --git a/libraries/Main.php b/libraries/Main.php
index e20b7a5..7617872 100644
--- a/libraries/Main.php
+++ b/libraries/Main.php
@@ -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
diff --git a/libraries/Rank.php b/libraries/Rank.php
index 03c5ad1..6fc8583 100644
--- a/libraries/Rank.php
+++ b/libraries/Rank.php
@@ -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' => '',
];
diff --git a/libraries/Template.php b/libraries/Template.php
index 45a13fc..5ed0500 100644
--- a/libraries/Template.php
+++ b/libraries/Template.php
@@ -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()
diff --git a/libraries/User.php b/libraries/User.php
index 5dba9d4..0d17236 100644
--- a/libraries/User.php
+++ b/libraries/User.php
@@ -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', [
[
diff --git a/libraries/Users.php b/libraries/Users.php
index 4820f39..f3b7d73 100644
--- a/libraries/Users.php
+++ b/libraries/Users.php
@@ -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)
{
diff --git a/public/content/data/yuuno/css/yuuno.css b/public/content/data/yuuno/css/yuuno.css
index 5989d6d..cdc3d38 100644
--- a/public/content/data/yuuno/css/yuuno.css
+++ b/public/content/data/yuuno/css/yuuno.css
@@ -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;
diff --git a/public/profile.php b/public/profile.php
index bd5a97c..f75bc2c 100644
--- a/public/profile.php
+++ b/public/profile.php
@@ -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
diff --git a/sakura.php b/sakura.php
index 8865258..0d4a3ea 100644
--- a/sakura.php
+++ b/sakura.php
@@ -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'),
diff --git a/templates/htmlEmail.tpl b/templates/htmlEmail.html
similarity index 100%
rename from templates/htmlEmail.tpl
rename to templates/htmlEmail.html
diff --git a/templates/mio/elements/newsPost.tpl b/templates/mio/elements/newsPost.twig
similarity index 100%
rename from templates/mio/elements/newsPost.tpl
rename to templates/mio/elements/newsPost.twig
diff --git a/templates/mio/global/footer.tpl b/templates/mio/global/footer.twig
similarity index 100%
rename from templates/mio/global/footer.tpl
rename to templates/mio/global/footer.twig
diff --git a/templates/mio/global/header.tpl b/templates/mio/global/header.twig
similarity index 100%
rename from templates/mio/global/header.tpl
rename to templates/mio/global/header.twig
diff --git a/templates/mio/main/index.tpl b/templates/mio/main/index.twig
similarity index 93%
rename from templates/mio/main/index.tpl
rename to templates/mio/main/index.twig
index 8c1ebb2..3b16b7b 100644
--- a/templates/mio/main/index.tpl
+++ b/templates/mio/main/index.twig
@@ -1,4 +1,4 @@
-{% include 'global/header.tpl' %}
+{% include 'global/header.twig' %}
Welcome!
@@ -12,7 +12,7 @@
Latest News Posts
{% for post in news.getPosts(0, newsCount) %}
- {% include 'elements/newsPost.tpl' %}
+ {% include 'elements/newsPost.twig' %}
{% endfor %}
@@ -33,4 +33,4 @@
-{% include 'global/footer.tpl' %}
+{% include 'global/footer.twig' %}
diff --git a/templates/misaki/elements/newsPost.tpl b/templates/misaki/elements/newsPost.twig
similarity index 100%
rename from templates/misaki/elements/newsPost.tpl
rename to templates/misaki/elements/newsPost.twig
diff --git a/templates/misaki/elements/statsHeader.tpl b/templates/misaki/elements/statsHeader.twig
similarity index 100%
rename from templates/misaki/elements/statsHeader.tpl
rename to templates/misaki/elements/statsHeader.twig
diff --git a/templates/misaki/forum/forum.tpl b/templates/misaki/forum/forum.twig
similarity index 86%
rename from templates/misaki/forum/forum.tpl
rename to templates/misaki/forum/forum.twig
index 3e6f421..d7f6772 100644
--- a/templates/misaki/forum/forum.tpl
+++ b/templates/misaki/forum/forum.twig
@@ -8,12 +8,12 @@
{{ forum.description }}
{% 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 %}
diff --git a/templates/misaki/forum/forumEntry.tpl b/templates/misaki/forum/forumEntry.twig
similarity index 100%
rename from templates/misaki/forum/forumEntry.tpl
rename to templates/misaki/forum/forumEntry.twig
diff --git a/templates/misaki/forum/index.tpl b/templates/misaki/forum/index.twig
similarity index 50%
rename from templates/misaki/forum/index.tpl
rename to templates/misaki/forum/index.twig
index ed2bad3..7d33466 100644
--- a/templates/misaki/forum/index.tpl
+++ b/templates/misaki/forum/index.twig
@@ -1,10 +1,10 @@
-{% extends 'global/master.tpl' %}
+{% extends 'global/master.twig' %}
{% block title %}Forum Listing{% endblock %}
{% block content %}
- {% include 'elements/statsHeader.tpl' %}
- {% include 'forum/forum.tpl' %}
+ {% include 'elements/statsHeader.twig' %}
+ {% include 'forum/forum.twig' %}
{% endblock %}
diff --git a/templates/misaki/forum/posting.tpl b/templates/misaki/forum/posting.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/forum/posting.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/forum/posting.twig b/templates/misaki/forum/posting.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/forum/posting.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/forum/topicEntry.tpl b/templates/misaki/forum/topicEntry.twig
similarity index 100%
rename from templates/misaki/forum/topicEntry.tpl
rename to templates/misaki/forum/topicEntry.twig
diff --git a/templates/misaki/forum/viewforum.tpl b/templates/misaki/forum/viewforum.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/forum/viewforum.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/forum/viewforum.twig b/templates/misaki/forum/viewforum.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/forum/viewforum.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/forum/viewtopic.tpl b/templates/misaki/forum/viewtopic.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/forum/viewtopic.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/forum/viewtopic.twig b/templates/misaki/forum/viewtopic.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/forum/viewtopic.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/global/information.tpl b/templates/misaki/global/information.twig
similarity index 90%
rename from templates/misaki/global/information.tpl
rename to templates/misaki/global/information.twig
index 96b93ef..4c99e56 100644
--- a/templates/misaki/global/information.tpl
+++ b/templates/misaki/global/information.twig
@@ -1,4 +1,4 @@
-{% extends 'global/master.tpl' %}
+{% extends 'global/master.twig' %}
{% block title %}Information{% endblock %}
diff --git a/templates/misaki/global/master.tpl b/templates/misaki/global/master.twig
similarity index 100%
rename from templates/misaki/global/master.tpl
rename to templates/misaki/global/master.twig
diff --git a/templates/misaki/global/notfound.tpl b/templates/misaki/global/notfound.twig
similarity index 100%
rename from templates/misaki/global/notfound.tpl
rename to templates/misaki/global/notfound.twig
diff --git a/templates/misaki/global/restricted.tpl b/templates/misaki/global/restricted.twig
similarity index 90%
rename from templates/misaki/global/restricted.tpl
rename to templates/misaki/global/restricted.twig
index 5b63fa2..c76dbc9 100644
--- a/templates/misaki/global/restricted.tpl
+++ b/templates/misaki/global/restricted.twig
@@ -1,4 +1,4 @@
-{% extends 'global/master.tpl' %}
+{% extends 'global/master.twig' %}
{% block title %}Restricted{% endblock %}
diff --git a/templates/misaki/group/index.tpl b/templates/misaki/group/index.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/group/index.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/group/index.twig b/templates/misaki/group/index.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/group/index.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/authenticate.tpl b/templates/misaki/main/authenticate.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/authenticate.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/authenticate.twig b/templates/misaki/main/authenticate.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/authenticate.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/banned.tpl b/templates/misaki/main/banned.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/banned.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/banned.twig b/templates/misaki/main/banned.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/banned.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/faq.tpl b/templates/misaki/main/faq.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/faq.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/faq.twig b/templates/misaki/main/faq.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/faq.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/forgotpassword.tpl b/templates/misaki/main/forgotpassword.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/forgotpassword.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/forgotpassword.twig b/templates/misaki/main/forgotpassword.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/forgotpassword.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/index.tpl b/templates/misaki/main/index.twig
similarity index 83%
rename from templates/misaki/main/index.tpl
rename to templates/misaki/main/index.twig
index c485a8b..1a47807 100644
--- a/templates/misaki/main/index.tpl
+++ b/templates/misaki/main/index.twig
@@ -1,8 +1,8 @@
-{% extends 'global/master.tpl' %}
+{% extends 'global/master.twig' %}
{% block content %}
- {% include 'elements/statsHeader.tpl' %}
+ {% include 'elements/statsHeader.twig' %}
{% if stats.onlineUsers %}
{% for amount,onlineUser in stats.onlineUsers %}
@@ -14,7 +14,7 @@
{% for post in news.getPosts(0, newsCount) %}
- {% include 'elements/newsPost.tpl' %}
+ {% include 'elements/newsPost.twig' %}
{% endfor %}
diff --git a/templates/misaki/main/infopage.tpl b/templates/misaki/main/infopage.twig
similarity index 87%
rename from templates/misaki/main/infopage.tpl
rename to templates/misaki/main/infopage.twig
index 2645c56..ba9bbc1 100644
--- a/templates/misaki/main/infopage.tpl
+++ b/templates/misaki/main/infopage.twig
@@ -1,4 +1,4 @@
-{% extends 'global/master.tpl' %}
+{% extends 'global/master.twig' %}
{% block title %}{% if page.title %}{{ page.title }}{% else %}Not found!{% endif %}{% endblock %}
diff --git a/templates/misaki/main/memberlist.tpl b/templates/misaki/main/memberlist.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/memberlist.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/memberlist.twig b/templates/misaki/main/memberlist.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/memberlist.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/news.tpl b/templates/misaki/main/news.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/news.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/news.twig b/templates/misaki/main/news.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/news.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/premiumcomplete.tpl b/templates/misaki/main/premiumcomplete.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/premiumcomplete.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/premiumcomplete.twig b/templates/misaki/main/premiumcomplete.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/premiumcomplete.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/profile.tpl b/templates/misaki/main/profile.twig
similarity index 99%
rename from templates/misaki/main/profile.tpl
rename to templates/misaki/main/profile.twig
index 0e42426..c2a4fb2 100644
--- a/templates/misaki/main/profile.tpl
+++ b/templates/misaki/main/profile.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 %}
- {% include 'profile/' ~ profileView ~ '.tpl' %}
+ {% include 'profile/' ~ profileView ~ '.twig' %}
diff --git a/templates/misaki/main/report.tpl b/templates/misaki/main/report.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/report.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/report.twig b/templates/misaki/main/report.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/report.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/search.tpl b/templates/misaki/main/search.twig
similarity index 95%
rename from templates/misaki/main/search.tpl
rename to templates/misaki/main/search.twig
index 7f7bc21..0ac16a5 100644
--- a/templates/misaki/main/search.tpl
+++ b/templates/misaki/main/search.twig
@@ -1,4 +1,4 @@
-{% extends 'global/master.tpl' %}
+{% extends 'global/master.twig' %}
{% block title %}Search{% endblock %}
diff --git a/templates/misaki/main/settings.tpl b/templates/misaki/main/settings.twig
similarity index 83%
rename from templates/misaki/main/settings.tpl
rename to templates/misaki/main/settings.twig
index 1922fbb..fa5e170 100644
--- a/templates/misaki/main/settings.tpl
+++ b/templates/misaki/main/settings.twig
@@ -1,4 +1,4 @@
-{% extends 'global/master.tpl' %}
+{% extends 'global/master.twig' %}
{% block title %}{{ page.category }} / {{ page.mode }}{% endblock %}
@@ -13,5 +13,5 @@
{% endfor %}
- {% include 'settings/' ~ current ~ '.tpl' %}
+ {% include 'settings/' ~ current ~ '.twig' %}
{% endblock %}
diff --git a/templates/misaki/main/support.tpl b/templates/misaki/main/support.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/support.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/support.twig b/templates/misaki/main/support.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/support.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/main/supporttracker.tpl b/templates/misaki/main/supporttracker.tpl
deleted file mode 100644
index 384a88a..0000000
--- a/templates/misaki/main/supporttracker.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{% extends 'global/master.tpl' %}
diff --git a/templates/misaki/main/supporttracker.twig b/templates/misaki/main/supporttracker.twig
new file mode 100644
index 0000000..38b9115
--- /dev/null
+++ b/templates/misaki/main/supporttracker.twig
@@ -0,0 +1 @@
+{% extends 'global/master.twig' %}
diff --git a/templates/misaki/profile/comments.tpl b/templates/misaki/profile/comments.twig
similarity index 100%
rename from templates/misaki/profile/comments.tpl
rename to templates/misaki/profile/comments.twig
diff --git a/templates/misaki/profile/friends.tpl b/templates/misaki/profile/friends.twig
similarity index 100%
rename from templates/misaki/profile/friends.tpl
rename to templates/misaki/profile/friends.twig
diff --git a/templates/misaki/profile/groups.tpl b/templates/misaki/profile/groups.twig
similarity index 100%
rename from templates/misaki/profile/groups.tpl
rename to templates/misaki/profile/groups.twig
diff --git a/templates/misaki/profile/hidden.tpl b/templates/misaki/profile/hidden.twig
similarity index 100%
rename from templates/misaki/profile/hidden.tpl
rename to templates/misaki/profile/hidden.twig
diff --git a/templates/misaki/profile/index.tpl b/templates/misaki/profile/index.twig
similarity index 100%
rename from templates/misaki/profile/index.tpl
rename to templates/misaki/profile/index.twig
diff --git a/templates/misaki/profile/posts.tpl b/templates/misaki/profile/posts.twig
similarity index 100%
rename from templates/misaki/profile/posts.tpl
rename to templates/misaki/profile/posts.twig
diff --git a/templates/misaki/profile/threads.tpl b/templates/misaki/profile/threads.twig
similarity index 100%
rename from templates/misaki/profile/threads.tpl
rename to templates/misaki/profile/threads.twig
diff --git a/templates/misaki/settings/general.home.tpl b/templates/misaki/settings/general.home.twig
similarity index 100%
rename from templates/misaki/settings/general.home.tpl
rename to templates/misaki/settings/general.home.twig
diff --git a/templates/misaki/settings/general.options.tpl b/templates/misaki/settings/general.options.twig
similarity index 100%
rename from templates/misaki/settings/general.options.tpl
rename to templates/misaki/settings/general.options.twig
diff --git a/templates/yuuno/elements/captcha.tpl b/templates/yuuno/elements/captcha.twig
similarity index 100%
rename from templates/yuuno/elements/captcha.tpl
rename to templates/yuuno/elements/captcha.twig
diff --git a/templates/yuuno/elements/comment.tpl b/templates/yuuno/elements/comment.twig
similarity index 97%
rename from templates/yuuno/elements/comment.tpl
rename to templates/yuuno/elements/comment.twig
index 667ae72..6c5a304 100644
--- a/templates/yuuno/elements/comment.tpl
+++ b/templates/yuuno/elements/comment.twig
@@ -23,7 +23,7 @@
{% for comment in comment.comment_replies %}
- {% include 'elements/comment.tpl' %}
+ {% include 'elements/comment.twig' %}
{% endfor %}
diff --git a/templates/yuuno/elements/comments.tpl b/templates/yuuno/elements/comments.twig
similarity index 97%
rename from templates/yuuno/elements/comments.tpl
rename to templates/yuuno/elements/comments.twig
index 690bad8..1ade73b 100644
--- a/templates/yuuno/elements/comments.tpl
+++ b/templates/yuuno/elements/comments.twig
@@ -26,7 +26,7 @@
There are no comments yet!
diff --git a/templates/yuuno/elements/editor.tpl b/templates/yuuno/elements/editor.twig similarity index 100% rename from templates/yuuno/elements/editor.tpl rename to templates/yuuno/elements/editor.twig diff --git a/templates/yuuno/elements/indexPanel.tpl b/templates/yuuno/elements/indexPanel.twig similarity index 100% rename from templates/yuuno/elements/indexPanel.tpl rename to templates/yuuno/elements/indexPanel.twig diff --git a/templates/yuuno/elements/newsPost.tpl b/templates/yuuno/elements/newsPost.twig similarity index 100% rename from templates/yuuno/elements/newsPost.tpl rename to templates/yuuno/elements/newsPost.twig diff --git a/templates/yuuno/elements/pagination.tpl b/templates/yuuno/elements/pagination.twig similarity index 100% rename from templates/yuuno/elements/pagination.tpl rename to templates/yuuno/elements/pagination.twig diff --git a/templates/yuuno/elements/settingsNav.tpl b/templates/yuuno/elements/settingsNav.twig similarity index 100% rename from templates/yuuno/elements/settingsNav.tpl rename to templates/yuuno/elements/settingsNav.twig diff --git a/templates/yuuno/forum/forum.tpl b/templates/yuuno/forum/forum.twig similarity index 87% rename from templates/yuuno/forum/forum.tpl rename to templates/yuuno/forum/forum.twig index 913d583..fa168f7 100644 --- a/templates/yuuno/forum/forum.tpl +++ b/templates/yuuno/forum/forum.twig @@ -7,11 +7,11 @@ {% if forum.type != 1 %}Subforums{% else %}{{ forum.name }}{% endif %} {% 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 %} @@ -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 %}There are no posts in this forum!
{% endif %} - {% include 'forum/forumBtns.tpl' %} + {% include 'forum/forumBtns.twig' %} {% endif %} diff --git a/templates/yuuno/forum/forumBtns.tpl b/templates/yuuno/forum/forumBtns.twig similarity index 95% rename from templates/yuuno/forum/forumBtns.tpl rename to templates/yuuno/forum/forumBtns.twig index 7a875b7..08e6987 100644 --- a/templates/yuuno/forum/forumBtns.tpl +++ b/templates/yuuno/forum/forumBtns.twig @@ -16,6 +16,6 @@ Mark as Read {% endif %} - {% include 'elements/pagination.tpl' %} + {% include 'elements/pagination.twig' %} diff --git a/templates/yuuno/forum/forumEntry.tpl b/templates/yuuno/forum/forumEntry.twig similarity index 100% rename from templates/yuuno/forum/forumEntry.tpl rename to templates/yuuno/forum/forumEntry.twig diff --git a/templates/yuuno/forum/index.tpl b/templates/yuuno/forum/index.twig similarity index 74% rename from templates/yuuno/forum/index.tpl rename to templates/yuuno/forum/index.twig index 4f89f41..4acb320 100644 --- a/templates/yuuno/forum/index.tpl +++ b/templates/yuuno/forum/index.twig @@ -1,4 +1,4 @@ -{% extends 'global/master.tpl' %} +{% extends 'global/master.twig' %} {% set title = 'Forums' %} @@ -9,11 +9,11 @@ {% block content %}Verification