diff --git a/app/API/GenerateInvite.php b/app/API/GenerateInvite.php index d02d18263..13fbc1580 100644 --- a/app/API/GenerateInvite.php +++ b/app/API/GenerateInvite.php @@ -46,14 +46,10 @@ class GenerateInvite extends AbstractAPI { $site_url = SITE_URL . "/register.php?invite={$key}"; if (!empty($_GET['email'])) { - $body = $this->twig->render('emails/invite.twig', [ - 'InviterName' => $interviewer_name, - 'InviteKey' => $key, - 'Email' => $_GET['email'], - 'SITE_NAME' => SITE_NAME, - 'SITE_URL' => SITE_URL, - 'IRC_SERVER' => BOT_SERVER, - 'DISABLED_CHAN' => BOT_DISABLED_CHAN + $body = $this->twig->render('email/invite.twig', [ + 'inviter_name' => $interviewer_name, + 'inviter_key' => $key, + 'email' => $_GET['email'], ]); \Misc::send_email($_GET['email'], 'New account confirmation at '.SITE_NAME, $body, 'noreply'); diff --git a/app/Manager/Donation.php b/app/Manager/Donation.php index bb1845b83..3cbc76bb4 100644 --- a/app/Manager/Donation.php +++ b/app/Manager/Donation.php @@ -180,7 +180,6 @@ class Donation extends \Gazelle\Base { "You have Reached Special Donor Rank #1! You've Earned: One User Pick. Details Inside.", $this->twig->render('donation/special-rank-1.twig', [ 'forum_url' => SITE_URL . '/forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790', - 'site_name' => SITE_NAME, 'staffpm_url' => SITE_URL . '/staffpm.php', ]) ); @@ -192,7 +191,6 @@ class Donation extends \Gazelle\Base { "You have Reached Special Donor Rank #2! You've Earned: The Double-Avatar. Details Inside.", $this->twig->render('donation/special-rank-2.twig', [ 'forum_url' => SITE_URL . '/forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790', - 'site_name' => SITE_NAME, ]) ); $SpecialRank = 2; @@ -204,7 +202,6 @@ class Donation extends \Gazelle\Base { $this->twig->render('donation/special-rank-3.twig', [ 'forum_url' => SITE_URL . '/forums.php?action=viewthread&threadid=178640&postid=4839790#post4839790', 'forum_gold_url' => SITE_URL . '/forums.php?action=viewthread&threadid=178640&postid=4839789#post4839789', - 'site_name' => SITE_NAME, ]) ); $SpecialRank = 3; diff --git a/app/Manager/Referral.php b/app/Manager/Referral.php index 46276001f..d716eafc1 100644 --- a/app/Manager/Referral.php +++ b/app/Manager/Referral.php @@ -624,13 +624,9 @@ class Referral extends \Gazelle\Base { ); if (defined('REFERRAL_SEND_EMAIL') && REFERRAL_SEND_EMAIL) { - $message = $twig->render('emails/referral.twig', [ - 'Email' => $email, - 'InviteKey' => $inviteKey, - 'DISABLED_CHAN' => BOT_DISABLED_CHAN, - 'IRC_SERVER' => BOT_SERVER, - 'SITE_NAME' => SITE_NAME, - 'SITE_URL' => SITE_URL + $message = $twig->render('email/referral.twig', [ + 'email' => $email, + 'inviter_key' => $inviteKey, ]); \Misc::send_email($email, 'You have been invited to ' . SITE_NAME, $message, 'noreply', 'text/plain'); diff --git a/app/Recovery.php b/app/Recovery.php index fe6f2b7ff..506c0f3c4 100644 --- a/app/Recovery.php +++ b/app/Recovery.php @@ -259,43 +259,12 @@ class Recovery { ", $admin_id, $key, $email, "Account recovery id={$id} key={$key}" ); - $SITE_URL = SITE_URL; - $SITE_NAME = SITE_NAME; - $mail = <<. - -The information you provided was sufficient proof for confirm that you -did have in fact have an account, and consequently you have been given -an invitation. - -Please note that selling invites, trading invites, and giving invites -away publicly (e.g. on a forum) is strictly forbidden. If you do any of -these things with this invitation, do not bother signing up - you will -be banned, the person who used the invite will be banned and you and they -lose your chances of ever signing up in the future. - -To confirm your invite, click on the following link: - -$SITE_URL/register.php?invite=$key - -After you register, you will be able to use your account. Please take note -that if you do not use this invite in the next 3 days, it will expire. We -urge you to read the RULES and the wiki immediately after you join. - -MOST IMPORTANT OF ALL: - -You should read the following article: $SITE_URL/wiki.php?action=article&id=114 - -This will help you understand what you need to do to begin reseeding -your old torrents (and avoid downloading them all over again by accident, -thereby destroying your buffer). - -Thank you, - Staff -END_EMAIL; - - \Misc::send_email($email, 'Account recovery confirmation at '.SITE_NAME, $mail, 'noreply'); + \Misc::send_email($email, 'Account recovery confirmation at ' . SITE_NAME, + G::$Twig->render('email/recovery.twig', [ + 'invite_key' => $key, + ]), + 'noreply' + ); $db->prepared_query(" UPDATE recovery diff --git a/classes/autoenable.class.php b/classes/autoenable.class.php index c7e17930c..88d9621dd 100644 --- a/classes/autoenable.class.php +++ b/classes/autoenable.class.php @@ -111,36 +111,31 @@ class AutoEnable { } } else { // Prepare email - $context = [ - 'SITE_NAME' => SITE_NAME, - 'TOKEN' => '', - ]; if ($Status == self::APPROVED) { - $template = 'enable_request_accepted.twig'; - $context['SITE_URL'] = SITE_URL; + $subject = "Your enable request for " . SITE_NAME . " has been approved"; + $template = 'email/enable_request_accepted.twig'; } else { - $template = 'enable_request_denied.twig'; + $subject = "Your enable request for " . SITE_NAME . " has been denied"; + $template = 'email/enable_request_denied.twig'; } foreach ($Results as $Result) { [$Email, $ID, $UserID] = $Result; $UserInfo[] = [$ID, $UserID]; - if ($Status == self::APPROVED) { + if ($Status != self::APPROVED) { + $token = ''; + } else { // Generate token - $context['TOKEN'] = randomString(); + $token = randomString(); G::$DB->prepared_query(" UPDATE users_enable_requests SET Token = ? WHERE ID = ? - ", $context['TOKEN'], $ID + ", $token, $ID ); } - - // Send email - $Subject = "Your enable request for " . SITE_NAME . " has been " - . ($Status == self::APPROVED ? 'approved' : 'denied'); - Misc::send_email($Email, $Subject, G::$Twig->render("emails/".$template, $context), 'noreply'); + Misc::send_email($Email, $subject, G::$Twig->render($template, ['token' => $token]), 'noreply'); } } diff --git a/classes/users.class.php b/classes/users.class.php index aba08567e..ded33a0e5 100644 --- a/classes/users.class.php +++ b/classes/users.class.php @@ -741,18 +741,16 @@ class Users { { $ResetKey = randomString(); G::$DB->prepared_query(" - UPDATE users_info - SET + UPDATE users_info SET ResetKey = ?, ResetExpires = ? - WHERE UserID = ?", $ResetKey, time_plus(60 * 60), $UserID); - - $template = G::$Twig->render('emails/password_reset.twig', [ - 'Username' => $Username, - 'ResetKey' => $ResetKey, - 'IP' => $_SERVER['REMOTE_ADDR'], - 'SITE_NAME' => SITE_NAME, - 'SITE_URL' => SITE_URL + WHERE UserID = ? + ", $ResetKey, time_plus(60 * 60), $UserID + ); + $template = G::$Twig->render('email/password_reset.twig', [ + 'username' => $Username, + 'reset_key' => $ResetKey, + 'ipaddr' => $_SERVER['REMOTE_ADDR'], ]); Misc::send_email($Email, 'Password reset information for ' . SITE_NAME, $template, 'noreply'); diff --git a/sections/artist/takeeditrequest.php b/sections/artist/takeeditrequest.php index b7c6ada77..c3a2f096c 100644 --- a/sections/artist/takeeditrequest.php +++ b/sections/artist/takeeditrequest.php @@ -2,7 +2,7 @@ authorize(); -list ($artistId, $name) = $DB->row(" +[$artistId, $name] = $DB->row(" SELECT ArtistID, concat(Name, IF(VanityHouse = 0, '', ' [Vanity House]')) as Name FROM artists_group WHERE ArtistID = ? @@ -17,10 +17,10 @@ $threadId = $forum->addThread( SYSTEM_USER_ID, "Editing request — Artist: $name", G::$Twig->render('forum/request-edit.twig', [ - 'user_name' => G::$LoggedUser['Username'], - 'url' => SITE_URL . '/artist.php?id=' . $artistId, - 'name' => $name, - 'details' => trim($_POST['edit_details']), + 'username' => $LoggedUser['Username'], + 'url' => SITE_URL . '/artist.php?id=' . $artistId, + 'name' => $name, + 'details' => trim($_POST['edit_details']), ]) ); diff --git a/sections/collages/new.php b/sections/collages/new.php index 351c786f8..4586be06b 100644 --- a/sections/collages/new.php +++ b/sections/collages/new.php @@ -42,12 +42,7 @@ if (isset($Err)) { ?>
- +render('collage/description.twig', [ 'personal_allowed' => $personalAllowed, ]) ?> diff --git a/sections/image/index.php b/sections/image/index.php index 39ce46dfd..365cec1ea 100644 --- a/sections/image/index.php +++ b/sections/image/index.php @@ -137,7 +137,6 @@ if (isset($_GET['type']) && isset($_GET['userid'])) { ); (new Gazelle\Manager\User)->sendPM($userId, 0, $subject, G::$Twig->render('user/reset-avatar.twig', [ 'height' => $maxHeight, - 'site_name' => SITE_NAME, 'size_kb' => $sizeKb, 'type' => $imageType, 'url' => $url, diff --git a/sections/login/disabled.php b/sections/login/disabled.php index d224c2d41..d763514ec 100644 --- a/sections/login/disabled.php +++ b/sections/login/disabled.php @@ -74,7 +74,7 @@ style="color: gold;">Golden Rules right

diff --git a/sections/register/index.php b/sections/register/index.php index 6252aece6..aa3b66f30 100644 --- a/sections/register/index.php +++ b/sections/register/index.php @@ -57,11 +57,9 @@ if (!empty($_REQUEST['confirm'])) { Misc::send_email( $user->email(), 'New account confirmation at '.SITE_NAME, - G::$Twig->render('emails/new_registration.twig', [ + G::$Twig->render('email/new_registration.twig', [ 'username' => $username, 'announce_key' => $user->announceKey(), - 'site_name' => SITE_NAME, - 'site_url' => SITE_URL ]), 'noreply' ); @@ -70,8 +68,6 @@ if (!empty($_REQUEST['confirm'])) { G::$Twig->render('user/welcome.twig', [ 'username' => $username, 'announce_key' => $user->announceKey(), - 'site_name' => SITE_NAME, - 'site_url' => SITE_URL ]) ); Tracker::update_tracker('add_user', ['id' => $user->id(), 'passkey' => $user->announceKey()]); diff --git a/sections/requests/edit_bounty.php b/sections/requests/edit_bounty.php index d77ced5d5..0ca17ac11 100644 --- a/sections/requests/edit_bounty.php +++ b/sections/requests/edit_bounty.php @@ -15,7 +15,6 @@ if (!$bounty) { } foreach ($bounty as &$b) { - $b['user_name'] = Users::format_username($b['UserID'], true, true, true, true); $b['bounty_size'] = Format::get_size($b['Bounty']); unset($b); // because looping by reference } diff --git a/sections/rules/rules.php b/sections/rules/rules.php index 1d1d46920..69466677b 100644 --- a/sections/rules/rules.php +++ b/sections/rules/rules.php @@ -9,7 +9,7 @@ View::show_header('Rule Index'); These rules are paramount; non-compliance will jeopardize your account.

- render('rules/golden.twig', [ 'site_name' => SITE_NAME ]) ?> + render('rules/golden.twig', []) ?>
addThread( SYSTEM_USER_ID, "Editing request – Torrent Group: $groupName", G::$Twig->render('forum/request-edit.twig', [ - 'user_name' => G::$LoggedUser['Username'], - 'url' => SITE_URL . '/torrents.php?id=' . $groupId, - 'name' => $name, - 'details' => trim($_POST['edit_details']), + 'username' => $LoggedUser['Username'], + 'url' => SITE_URL . '/torrents.php?id=' . $groupId, + 'name' => $name, + 'details' => trim($_POST['edit_details']), ]) ); diff --git a/sections/user/2fa/complete.php b/sections/user/2fa/complete.php index 2b387a9e4..c0b3171c1 100644 --- a/sections/user/2fa/complete.php +++ b/sections/user/2fa/complete.php @@ -12,8 +12,7 @@ $keys = unserialize($DB->scalar(" )); echo G::$Twig->render('login/2fa-backup.twig', [ - 'site_name' => SITE_NAME, - 'keys' => $keys, + 'keys' => $keys, ]); View::show_footer(); diff --git a/sections/user/2fa/step2.php b/sections/user/2fa/step2.php index 11198e79f..4158a4593 100644 --- a/sections/user/2fa/step2.php +++ b/sections/user/2fa/step2.php @@ -1,8 +1,6 @@ render('login/2fa-validate.twig', [ - 'site_name' => SITE_NAME, -]); +echo G::$Twig->render('login/2fa-validate.twig', []); View::show_footer(); diff --git a/sections/user/edit.php b/sections/user/edit.php index 12dbd969f..45f6b9e2f 100644 --- a/sections/user/edit.php +++ b/sections/user/edit.php @@ -85,7 +85,6 @@ echo $Val->generateJS('userform'); echo G::$Twig->render('user/setting.twig', [ 'auth' => $LoggedUser['AuthKey'], 'avatar' => $Avatar, - 'bot_nick' => BOT_NICK, 'download_text' => $DownloadAlt, 'is_mod' => check_perms('users_mod'), 'logged_user' => $LoggedUser['ID'], @@ -94,8 +93,6 @@ echo G::$Twig->render('user/setting.twig', [ 'option' => $options, 'profile' => $profile, 'release_order' => $User->releaseOrder($options, (new Gazelle\ReleaseType)->extendedList()), - 'site_name' => SITE_NAME, - 'static_host' => STATIC_SERVER, 'style_id' => $StyleID, 'style_url' => $StyleURL, 'stylesheets' => (new Gazelle\Stylesheet)->list(), diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php index 52a000994..f430385e8 100644 --- a/sections/user/takemoderate.php +++ b/sections/user/takemoderate.php @@ -540,13 +540,8 @@ if ($resetAuthkey == 1 && check_perms('users_edit_reset_keys')) { } if ($sendHackedMail && check_perms('users_disable_any')) { - Misc::send_email($hackedEmail, 'Your '.SITE_NAME.' account', G::$Twig->render('emails/hacked.twig', [ - 'site_name' => SITE_NAME, - 'server' => BOT_SERVER, - 'port' => BOT_PORT, - 'port_ssl' => BOT_PORT_SSL, - 'channel' => BOT_DISABLED_CHAN, - ]), + Misc::send_email($hackedEmail, 'Your '.SITE_NAME.' account', + G::$Twig->render('email/hacked.twig', []), 'noreply' ); Tools::disable_users($userID, '', 1); diff --git a/templates/collage/description.twig b/templates/collage/description.twig index 795df562c..5867a9173 100644 --- a/templates/collage/description.twig +++ b/templates/collage/description.twig @@ -1,3 +1,4 @@ + diff --git a/templates/donation/donation-pm.twig b/templates/donation/donation-pm.twig index 28eb23f88..032073aff 100644 --- a/templates/donation/donation-pm.twig +++ b/templates/donation/donation-pm.twig @@ -7,7 +7,7 @@ Thank you for your generosity and support. It's users like you who make all of t Once again, thank you for your continued support of the site. Sincerely, -{{ site_name }} Staff +{{ constant('SITE_NAME') }} Staff [align=center][[n]If you have any questions or concerns, please [url={{ staffpm_url }}]send a Staff PM[/url]. diff --git a/templates/donation/special-rank-1.twig b/templates/donation/special-rank-1.twig index b3d0ac3f5..f1f27d198 100644 --- a/templates/donation/special-rank-1.twig +++ b/templates/donation/special-rank-1.twig @@ -1,17 +1,16 @@ -Congratulations on reaching [url={{ forum_url }}]Special Rank #1[/url]! You've been awarded [b]one user pick[/b]! This user pick will be featured on the {{ site_name }} front page during an upcoming event. After you submit your pick, there is no guarantee as to how long it will take before your pick is featured. Picks will be featured on a first-submitted, first-served basis. Please abide by the following guidelines when making your selection: +Congratulations on reaching [url={{ forum_url }}]Special Rank #1[/url]! You've been awarded [b]one user pick[/b]! This user pick will be featured on the {{ constant('SITE_NAME') }} front page during an upcoming event. After you submit your pick, there is no guarantee as to how long it will take before your pick is featured. Picks will be featured on a first-submitted, first-served basis. Please abide by the following guidelines when making your selection: [*] Pick something that hasn't been chosen. You can tell if a pick has been used previously by reviewing the collages it appears in. [*] If the only release is a CD rip, please ensure it is not trumpable for bad or missing checksums. [*] Complete the enclosed form carefully and completely. -[*] Send a [url={{ staffpm_url }}]Staff PM[/url], entitle this PM "Special Rank User Pick", and choose "Sysop" as recipient. +[*] Send a [url={{ staffpm_url }}]Staff PM[/url], entitle this PM "Special Rank User Pick", and choose "Staff" as recipient. - -[important][align=center]**The following form must be used. Do not edit the BBCode. Reply to this message with the completed form.**[/align][/important] +[important][align=center]**The following form must be used. Do not edit the +BBCode. Reply to this message with the completed form.**[/align][/important] [quote][align=center][size=10]SUBMISSION FORM[/size] [size=4]COPY & PASTE THE BBCODE INTO YOUR REPLY. FILL FORM WITH YOUR INFO. SUBMIT.[/size][/align] - [code][align=center][size=10][u]FRONT PAGE[/u][/size][/align] [b][size=5][user][/user]'s Special Donor Pick[/size][/b] @@ -24,8 +23,6 @@ Congratulations on reaching [url={{ forum_url }}]Special Rank #1[/url]! You've b [b]Review:[/b] [quote]Put your front page review here. The review should be a maximum of two small(ish) paragraphs or one medium-sized paragraph. Do not include a huge review for the front page portion of your post, as it will be truncated per the wishes of the Staff Team.[/quote] - - [align=center][size=10][u]FORUM POST[/u][/size][/align] [b][size=5][user][/user]'s Special Donor Pick[/size][/b] @@ -110,6 +107,5 @@ Congratulations on reaching [url={{ forum_url }}]Special Rank #1[/url]! You've b [b]Review:[/b] [quote=Mutant Sounds]Stumblebum idiot savant songform fragmentation that vacillates between moments of delirious jerry-rigged inspiration and passages that border on the insufferably sophomoric, brought to you by this batch of DIY rabble rousers whose stance and attitude (complete with DIY manifestos on the back cover) aligned them strongly at the time with the likes of The Desperate Bicycles. Loosely yoked to a whole network of willfully rinky dink art damage, Nag and Bendle (2/3 of The Door And The Window) also participated in The 49 Americans, a group with a similar propensity for inspired faux naif art brut whimsy and Mark Perry (the other 1/3) was of course the leader of Alternative TV, whose NWW list included group The Good Missionaries also traffic in much the same sort of abstruse fuckery.[/quote][/hide] - With :heart:, -{{ site_name }} Staff +{{ constant('SITE_NAME') }} Staff diff --git a/templates/donation/special-rank-2.twig b/templates/donation/special-rank-2.twig index 20d4bb2a3..3ef8c4983 100644 --- a/templates/donation/special-rank-2.twig +++ b/templates/donation/special-rank-2.twig @@ -2,7 +2,7 @@ Congratulations on reaching [url={{ forum_url }}]Special Rank #2[/url]! You've been awarded [b]double avatar functionality[/b]! To set a second avatar, please enter a URL leading to a valid image in the new field which has been unlocked in your [b]Personal Settings[/b]. Any avatar you choose must abide by normal avatar rules. When running your cursor over your avatar, it will flip to the alternate choice you've established. Other users will also be able to view both of your avatars using this method. -At this time, we'd like to thank you for your continued support of the site. The fact that you've reached this milestone is testament to your belief in {{ site_name }} as a project. It is dedicated users like you that keep us alive. Have fun with the new toy. +At this time, we'd like to thank you for your continued support of the site. The fact that you've reached this milestone is testament to your belief in {{ constant('SITE_NAME') }} as a project. It is dedicated users like you that keep us alive. Have fun with the new toy. With :heart:, -{{ site_name }} Staff +{{ constant('SITE_NAME') }} Staff diff --git a/templates/donation/special-rank-3.twig b/templates/donation/special-rank-3.twig index 387f71edc..a061b877c 100644 --- a/templates/donation/special-rank-3.twig +++ b/templates/donation/special-rank-3.twig @@ -1,6 +1,6 @@ Congratulations on reaching [url={{ forum_url }}]Special Rank #3[/url]! You've been awarded [b]Diamond Rank[/b]! Diamond Rank grants you the benefits associated with every Donor Rank up to and including Gold ([url={{ forum_gold_url }}]Donor Rank #5[/url]). But unlike Donor Rank #5 — because Diamond Rank is a Special Rank — it will never expire. -At this time, we'd like to thank you for your continued support of the site. The fact that you've reached this milestone is testament to your belief in {{ site_name }} as a project. It's dedicated users like you that keep us alive. Consider yourself one of our top supporters! +At this time, we'd like to thank you for your continued support of the site. The fact that you've reached this milestone is testament to your belief in {{ constant('SITE_NAME') }} as a project. It's dedicated users like you that keep us alive. Consider yourself one of our top supporters! With all our :heart:, -{{ site_name }} Staff +{{ constant('SITE_NAME') }} Staff diff --git a/templates/email/enable_request_accepted.twig b/templates/email/enable_request_accepted.twig new file mode 100644 index 000000000..17f94fe3d --- /dev/null +++ b/templates/email/enable_request_accepted.twig @@ -0,0 +1,8 @@ +Your request to re-enable your account has been accepted. Please use the +following link to activate your account. This link is valid for 48 hours, +and can be clicked only once. + +{{ constant('SITE_URL') }}/enable.php?token={{ token }} + +Thank you, +{{ constant('SITE_NAME') }} Staff diff --git a/templates/emails/enable_request_denied.twig b/templates/email/enable_request_denied.twig similarity index 80% rename from templates/emails/enable_request_denied.twig rename to templates/email/enable_request_denied.twig index 8adf41dfe..4b5366f25 100644 --- a/templates/emails/enable_request_denied.twig +++ b/templates/email/enable_request_denied.twig @@ -1,8 +1,9 @@ -Your request to re-enable your account was not accepted, for one or more of the following reasons: +Your request to re-enable your account was not accepted, for one or more of +the following reasons: * We may require more information to verify your account ownership. * The e-mail address you provided does not match our records. * Your account may not qualify for automatic re-enabling due to rule violations. Thank you, -{{SITE_NAME}} Staff +{{ constant('SITE_NAME') }} Staff diff --git a/templates/email/hacked.twig b/templates/email/hacked.twig new file mode 100644 index 000000000..7c962c4f7 --- /dev/null +++ b/templates/email/hacked.twig @@ -0,0 +1,13 @@ +Your {{ constant('SITE_NAME') }} account appears to have been compromised. +As a security measure, we have disabled your account. To resolve this, +please visit us on IRC. + +This is the information to connect to our server: +IRC Server: {{ constant('BOT_SERVER') }} +Port: {{ constant('BOT_PORT') }} ({{ constant('BOT_PORT_SSL') }} for SSL) + +Once you are connected to the server you will need to join the disabled users channel. +Type: /join {{ constant('BOT_DISABLED_CHAN') }} + +Please visit us soon so we can help you resolve this matter. This is an +automated message and no replies will be delivered. diff --git a/templates/email/invite.twig b/templates/email/invite.twig new file mode 100644 index 000000000..38f8d8b4b --- /dev/null +++ b/templates/email/invite.twig @@ -0,0 +1,23 @@ +The user {{ inviter_name }} has invited you to join {{ constant('SITE_NAME') +}}, and has specified this address ({{ email }}) as your email address. If +you do not know this person, please ignore this email, and do not reply. + +Please note that selling invites, trading invites, and giving invites away +publicly (e.g. on a forum) is strictly forbidden. If you have received your +invite as a result of any of these things, do not bother signing up - you +will be banned and lose your chances of ever signing up legitimately. + +If you had previously had an account at {{ constant('SITE_NAME') }}, do not +use this invite. Instead, please join {{ constant('DISABLED_CHAN') }} on {{ +constant('IRC_SERVER') }} and ask for your account to be reactivated. + +To confirm your invite, click on the following link: + +{{ constant('SITE_URL') }}/register.php?invite={{ invite_key }} + +After you register, you will be able to use your account. Please take note +that if you do not use this invite in the next 3 days, it will expire. We +urge you to read the RULES and the wiki immediately after you join. + +Thank you, +{{ constant('SITE_NAME') }} Staff diff --git a/templates/email/new_registration.twig b/templates/email/new_registration.twig new file mode 100644 index 000000000..37cbd1efe --- /dev/null +++ b/templates/email/new_registration.twig @@ -0,0 +1,9 @@ +This email is to confirm the account you just created at {{ constant('SITE_NAME') }} + +You have 24 hours to click the link below and finish the registration +process for the account created with the username: {{ username }} + +{{ site_url }}/register.php?confirm={{ announce_key }} + +Thank you, +{{ constant('SITE_NAME') }} Staff diff --git a/templates/emails/password_reset.twig b/templates/email/password_reset.twig similarity index 57% rename from templates/emails/password_reset.twig rename to templates/email/password_reset.twig index 3f2c80a31..4d2c7b4d6 100644 --- a/templates/emails/password_reset.twig +++ b/templates/email/password_reset.twig @@ -1,11 +1,11 @@ -A password reset process has been started for the username: {{ Username }} +A password reset process has been started for the username: {{ username }} To finish this process please click the link below (you have 1 hour) -{{ SITE_URL }}/login.php?act=recover&key={{ ResetKey }} +{{ constant('SITE_URL') }}/login.php?act=recover&key={{ reset_key }} If you did not initiate this password reset then please disregard this email. -The user who requested the password reset had the IP address {{ IP }}. +The user who requested the password reset had the IP address {{ ipaddr }}. Thank you, -{{ SITE_NAME }} Staff +{{ constant('SITE_NAME') }} Staff diff --git a/templates/email/recovery.twig b/templates/email/recovery.twig new file mode 100644 index 000000000..74f31e06f --- /dev/null +++ b/templates/email/recovery.twig @@ -0,0 +1,31 @@ +You recently requested to recover your account from a previous tracker in +order to join {{ constant('SITE_NAME') }}. + +The information you provided was sufficient proof for confirm that you did +have in fact have an account, and consequently you have been given an +invitation. + +Please note that selling invites, trading invites, and giving invites away +publicly (e.g. on a forum) is strictly forbidden. If you do any of these +things with this invitation, do not bother signing up - you will be banned, +the person who used the invite will be banned and you and they lose your +chances of ever signing up in the future. + +To confirm your invite, click on the following link: + +{{ constant('SITE_URL') }}/register.php?invite={{ invite_key }} + +After you register, you will be able to use your account. Please take note +that if you do not use this invite in the next 3 days, it will expire. We +urge you to read the RULES and the wiki immediately after you join. + +MOST IMPORTANT OF ALL: + +You should read the following article: {{ constant('SITE_URL') }}/wiki.php?action=article&id=114 + +This will help you understand what you need to do to begin reseeding your +old torrents (and avoid downloading them all over again by accident, thereby +destroying your buffer). + +Thank you, +{{ constant('SITE_NAME') }} Staff diff --git a/templates/email/referral.twig b/templates/email/referral.twig new file mode 100644 index 000000000..b2e240ae9 --- /dev/null +++ b/templates/email/referral.twig @@ -0,0 +1,22 @@ +Hello + +You have been invited to join {{ constant('SITE_NAME') }} and have specified +this address ({{ email }}) as your email address. + +Please note that selling invites, trading invites, and giving invites away +publicly (e.g. on a forum) is strictly forbidden. + +If you had previously had an account at {{ constant('SITE_NAME') }}, do not use this +invite. Instead, please join {{ constant('DISABLED_CHAN') }} on {{ constant('IRC_SERVER') }} and ask for +your account to be reactivated. + +To confirm your invite, click on the following link: + +{{ constant('SITE_URL') }}/register.php?invite={{ invite_key }} + +After you register, you will be able to use your account. Please take note +that if you do not use this invite in the next 3 days, it will expire. We +urge you to read the RULES and the wiki immediately after you join. + +Thank you, +{{ constant('SITE_NAME') }} Staff diff --git a/templates/emails/enable_request_accepted.twig b/templates/emails/enable_request_accepted.twig deleted file mode 100644 index 43097333f..000000000 --- a/templates/emails/enable_request_accepted.twig +++ /dev/null @@ -1,6 +0,0 @@ -Your request to re-enable your account has been accepted. Please use the following link to activate your account. This link is valid for 48 hours, and can be clicked only once. - -{{SITE_URL}}/enable.php?token={{TOKEN}} - -Thank you, -{{SITE_NAME}} Staff diff --git a/templates/emails/hacked.twig b/templates/emails/hacked.twig deleted file mode 100644 index f894e5dc3..000000000 --- a/templates/emails/hacked.twig +++ /dev/null @@ -1,11 +0,0 @@ -Your {{ site_name }} account appears to have been compromised. As a security measure, we have disabled your account. To resolve this, please visit us on IRC. - -This is the information to connect to our server: -IRC Server: {{ server }} -Port: {{ port }} ({{ port_ssl }} for SSL) - -Once you are connected to the server you will need to join the disabled users channel. -Type: /join {{ channel }} - -Please visit us soon so we can help you resolve this matter. This is an automated message and no replies will be delivered. - diff --git a/templates/emails/invite.twig b/templates/emails/invite.twig deleted file mode 100644 index f9fd1513a..000000000 --- a/templates/emails/invite.twig +++ /dev/null @@ -1,14 +0,0 @@ -The user {{InviterName}} has invited you to join {{SITE_NAME}}, and has specified this address ({{Email}}) as your email address. If you do not know this person, please ignore this email, and do not reply. - -Please note that selling invites, trading invites, and giving invites away publicly (e.g. on a forum) is strictly forbidden. If you have received your invite as a result of any of these things, do not bother signing up - you will be banned and lose your chances of ever signing up legitimately. - -If you had previously had an account at {{SITE_NAME}}, do not use this invite. Instead, please join {{DISABLED_CHAN}} on {{IRC_SERVER}} and ask for your account to be reactivated. - -To confirm your invite, click on the following link: - -{{SITE_URL}}/register.php?invite={{InviteKey}} - -After you register, you will be able to use your account. Please take note that if you do not use this invite in the next 3 days, it will expire. We urge you to read the RULES and the wiki immediately after you join. - -Thank you, -{{SITE_NAME}} Staff diff --git a/templates/emails/new_registration.twig b/templates/emails/new_registration.twig deleted file mode 100644 index 133a0dfe8..000000000 --- a/templates/emails/new_registration.twig +++ /dev/null @@ -1,8 +0,0 @@ -This email is to confirm the account you just created at {{ site_name }} - -You have 24 hours to click the link below and finish the registration process for the account created with the username: {{ username }} - -{{ site_url }}/register.php?confirm={{ announce_key }} - -Thank you, -{{ site_name }} Staff diff --git a/templates/emails/recovery.twig b/templates/emails/recovery.twig deleted file mode 100644 index 5c64bb9de..000000000 --- a/templates/emails/recovery.twig +++ /dev/null @@ -1,20 +0,0 @@ -You recently requested to recover your account from a previous tracker in order to join {{SITE_NAME}}. - -The information you provided was sufficient proof for confirm that you did have in fact have an account, and consequently you have been given an invitation. - -Please note that selling invites, trading invites, and giving invites away publicly (e.g. on a forum) is strictly forbidden. If you do any of these things with this invitation, do not bother signing up - you will be banned, the person who used the invite will be banned and you and they lose your chances of ever signing up in the future. - -To confirm your invite, click on the following link: - -{{SITE_URL}}/register.php?invite={{InviteKey}} - -After you register, you will be able to use your account. Please take note that if you do not use this invite in the next 3 days, it will expire. We urge you to read the RULES and the wiki immediately after you join. - -MOST IMPORTANT OF ALL: - -You should read the following article: {{ SITE_URL }}/wiki.php?action=article&id=114 - -This will help you understand what you need to do to begin reseeding your old torrents (and avoid downloading them all over again by accident, thereby destroying your buffer). - -Thank you, -{{SITE_NAME}} Staff diff --git a/templates/emails/referral.twig b/templates/emails/referral.twig deleted file mode 100644 index 77532c6a2..000000000 --- a/templates/emails/referral.twig +++ /dev/null @@ -1,16 +0,0 @@ -Hello - -You have been invited to join {{SITE_NAME}} and have specified this address ({{Email}}) as your email address. - -Please note that selling invites, trading invites, and giving invites away publicly (e.g. on a forum) is strictly forbidden. - -If you had previously had an account at {{SITE_NAME}}, do not use this invite. Instead, please join {{DISABLED_CHAN}} on {{IRC_SERVER}} and ask for your account to be reactivated. - -To confirm your invite, click on the following link: - -{{SITE_URL}}/register.php?invite={{InviteKey}} - -After you register, you will be able to use your account. Please take note that if you do not use this invite in the next 3 days, it will expire. We urge you to read the RULES and the wiki immediately after you join. - -Thank you, -{{SITE_NAME}} Staff diff --git a/templates/forum/request-edit.twig b/templates/forum/request-edit.twig index 7bf8753fa..3b96fa0f8 100644 --- a/templates/forum/request-edit.twig +++ b/templates/forum/request-edit.twig @@ -1,3 +1,3 @@ -[user]{{ user_name }}[/user] has submitted an editing request for: [url={{ url }}]{{ name }}[/url]. +[user]{{ username }}[/user] has submitted an editing request for: [url={{ url }}]{{ name }}[/url]. [quote=Comments]{{ details }}[/quote] diff --git a/templates/login/2fa-backup.twig b/templates/login/2fa-backup.twig index da2c7e2e6..6652dbe50 100644 --- a/templates/login/2fa-backup.twig +++ b/templates/login/2fa-backup.twig @@ -1,7 +1,7 @@
Please note that if you lose your 2FA key and all your backup keys, the -{{ site_name }} staff cannot help you retrieve your account. Ensure you -keep your backup keys in a safe place. +{{ constant('SITE_NAME') }} staff cannot help you retrieve your account. +Ensure you keep your backup keys in a safe place.
@@ -10,9 +10,11 @@ keep your backup keys in a safe place. note down the following recovery keys, they are the only way you will be able to recover your account if you lose your hardware device.

-
    +
    +
      {% for k in keys %}
    • {{ k }}
    • {% endfor %}
    +
diff --git a/templates/login/2fa-validate.twig b/templates/login/2fa-validate.twig index 31c742694..68dbcecc4 100644 --- a/templates/login/2fa-validate.twig +++ b/templates/login/2fa-validate.twig @@ -1,6 +1,6 @@
Please note that if you lose your 2FA key and all of your backup keys, the -{{ site_name }} staff cannot help you retrieve your account. Ensure you +{{ constant('SITE_NAME') }} staff cannot help you retrieve your account. Ensure you keep your backup keys in a safe place.
diff --git a/templates/request/edit-bounty.twig b/templates/request/edit-bounty.twig index f5a7c86ac..8d114a64c 100644 --- a/templates/request/edit-bounty.twig +++ b/templates/request/edit-bounty.twig @@ -37,7 +37,7 @@ {% for b in bounty %} - {{ b.user_name|raw }} + {{ b.UserID|user_full }} {{ b.bounty_size }} diff --git a/templates/rules/golden.twig b/templates/rules/golden.twig index 034720cf1..e444850d1 100644 --- a/templates/rules/golden.twig +++ b/templates/rules/golden.twig @@ -68,7 +68,7 @@
Do not request invites or accounts.
Requesting invites to—or accounts - on—{{ site_name }} or other trackers is prohibited. Invites may be + on—{{ constant('SITE_NAME') }} or other trackers is prohibited. Invites may be offered, but not requested, in the Invites forum (restricted to the Elite class and above). You may request invites by messaging users only when they have @@ -112,9 +112,9 @@
  • 3.4
    -
    Do not modify {{ site_name }} .torrent files.
    -
    Embedding non-{{ site_name }} announce URLs in - {{ site_name }} .torrents is prohibited. Doing so causes false data to be +
    Do not modify {{ constant('SITE_NAME') }} .torrent files.
    +
    Embedding non-{{ constant('SITE_NAME') }} announce URLs in + {{ constant('SITE_NAME') }} .torrents is prohibited. Doing so causes false data to be reported and will be interpreted as cheating. This applies to standalone .torrent files and .torrent files that have been loaded into a client.
    @@ -125,7 +125,7 @@
    Do not share .torrent files or your passkey.
    -
    Embedded in each {{ site_name }} .torrent file is an +
    Embedded in each {{ constant('SITE_NAME') }} .torrent file is an announce URL containing your personal passkey. Passkeys enable users to report stats to the tracker.
    @@ -200,7 +200,7 @@
    Do not harvest user-identifying information.
    -
    It is prohibited to use {{ site_name }}'s services to +
    It is prohibited to use {{ constant('SITE_NAME') }}'s services to harvest user-identifying information of any kind (e.g., IP addresses, personal links) through the use of scripts, exploits, or other techniques.
    @@ -209,11 +209,11 @@
  • 4.8
    -
    Do not use {{ site_name }}'s services (including the +
    Do not use {{ constant('SITE_NAME') }}'s services (including the tracker, website, and IRC network) for commercial gain.
    Commercializing services provided by or code - maintained by {{ site_name }} (e.g., Gazelle, Ocelot) is prohibited. - Commercializing content provided by {{ site_name }} users via the + maintained by {{ constant('SITE_NAME') }} (e.g., Gazelle, Ocelot) is prohibited. + Commercializing content provided by {{ constant('SITE_NAME') }} users via the aforementioned services (e.g., user torrent data) is prohibited. Referral schemes, financial solicitations, and money offers are also prohibited.
    @@ -222,7 +222,7 @@
  • 5.1
    -
    Do not browse {{ site_name }} using any free proxy +
    Do not browse {{ constant('SITE_NAME') }} using any free proxy or VPN service.
    You may browse the site through a VPN/proxy only if you have paid for this service. This includes (for example) @@ -250,7 +250,7 @@
    Do not autosnatch freeleech torrents.
    The automatic snatching of freeleech torrents using any method involving little or no user-input (e.g., API-based - scripts, log or site scraping, etc.) is prohibited. See {{ site_name }}'s Freeleech Autosnatching Policy article for more information.
    @@ -263,7 +263,7 @@
    Seeking or exploiting bugs in the live site (as opposed to a local development environment) is prohibited. If you discover a critical bug or security vulnerability, immediately report it - in accordance with {{ site_name }}'s Responsible Disclosure Policy. Non-critical bugs can be reported in the Bugs Forum.
    @@ -284,7 +284,7 @@
  • 7.0
    Be respectful to all staff members.
    -
    Staff on {{ site_name }} are volunteers who dedicate +
    Staff on {{ constant('SITE_NAME') }} are volunteers who dedicate their time in order to keep the site running, while receiving no compensation. Being disrespectful to them is prohibited, and might result in a warning or a ban.
    @@ -295,7 +295,7 @@
    Staff have the final word on rule interpretations.
    -
    All rules on {{ site_name }} may be subject to +
    All rules on {{ constant('SITE_NAME') }} may be subject to different interpretations. Since the staff wrote these rules, their interpretation is final. If you need clarification on a rule, or if you think a rule should be restated, please send a diff --git a/templates/user/edit.twig b/templates/user/edit.twig index cb60e7d90..46ac27cb0 100644 --- a/templates/user/edit.twig +++ b/templates/user/edit.twig @@ -39,7 +39,7 @@

    Paranoia Settings

  • -

    Access Settings

    +

    Access Settings

  • @@ -63,7 +63,7 @@ - Stylesheet + Stylesheet @@ -617,7 +617,7 @@ - Invitees + Invitees @@ -664,7 +664,7 @@ - Email address + Email address
    diff --git a/templates/user/notification-settings.twig b/templates/user/notification-settings.twig index 30633b7d1..f5bd3e26d 100644 --- a/templates/user/notification-settings.twig +++ b/templates/user/notification-settings.twig @@ -1,32 +1,5 @@ self::render_push_settings(); -{# - const OPT_DISABLED = 0; - const OPT_POPUP = 1; - const OPT_TRADITIONAL = 2; - const OPT_PUSH = 3; - const OPT_POPUP_PUSH = 4; - const OPT_TRADITIONAL_PUSH = 5; - - const NEWS = 'News'; - const BLOG = 'Blog'; - const STAFFBLOG = 'StaffBlog'; - const STAFFPM = 'StaffPM'; - const INBOX = 'Inbox'; - const QUOTES = 'Quotes'; - const SUBSCRIPTIONS = 'Subscriptions'; - const TORRENTS = 'Torrents'; - const COLLAGES = 'Collages'; - const SITEALERTS = 'SiteAlerts'; - const FORUMALERTS = 'ForumAlerts'; - const REQUESTALERTS = 'RequestAlerts'; - const COLLAGEALERTS = 'CollageAlerts'; - const TORRENTALERTS = 'TorrentAlerts'; - const GLOBALNOTICE = 'Global'; - - fuck this shit -#} - {% macro check_popup(name, setting) %} {% set checked = not setting or setting in [1, 4] ? " checked=\"checked\"" : "" %}
  • -

    Access Settings

    +

    Access Settings

  • @@ -62,7 +62,7 @@ } only %} {% include 'user/setting/personal.twig' %} -{% include 'user/setting/paranoia.twig' with {'paranoia': paranoia, 'site_name': site_name} only %} +{% include 'user/setting/paranoia.twig' with {'paranoia': paranoia} only %} {% include 'user/setting/access.twig' %}
  • diff --git a/templates/user/setting/access.twig b/templates/user/setting/access.twig index 93dee0fe2..4f8251219 100644 --- a/templates/user/setting/access.twig +++ b/templates/user/setting/access.twig @@ -8,7 +8,7 @@ Reset passkey @@ -28,7 +28,7 @@

    If set, this key will be used instead of your site password when authenticating with - {{ bot_nick }} on the site's IRC network. site's IRC network. Please note:

    • This value is stored in plaintext and should not be your password.
    • @@ -38,7 +38,7 @@ - Email address diff --git a/templates/user/setting/appearance.twig b/templates/user/setting/appearance.twig index 5b89b66e7..69f98a582 100644 --- a/templates/user/setting/appearance.twig +++ b/templates/user/setting/appearance.twig @@ -6,7 +6,7 @@ - + Stylesheet @@ -20,8 +20,8 @@ {% for sheet in stylesheets %}

      diff --git a/templates/user/setting/community.twig b/templates/user/setting/community.twig index a9a0f45be..855ee5310 100644 --- a/templates/user/setting/community.twig +++ b/templates/user/setting/community.twig @@ -38,8 +38,8 @@ + title="{{ constant('SITE_NAME') }} has very flexible <a href="wiki.php?action=article&amp;id=1063">mature content policies</a> for all community areas. Choosing to display mature content will allow you to click-through to view any content posted beneath <code>[mature]</code> tags. If you choose not to display mature content, all content tagged with <code>[mature]</code> tags will be hidden from you." + data-title-plain="{{ constant('SITE_NAME') }} has very flexible mature content policies for all community areas. Choosing to display mature content will allow you to click-through to view any content posted beneath [mature] tags. If you choose not to display mature content, all content tagged with [mature] tags will be hidden from you."> Mature content (forums, comments, profiles) diff --git a/templates/user/setting/notification.twig b/templates/user/setting/notification.twig index 3f3f7ddbd..84004c1d6 100644 --- a/templates/user/setting/notification.twig +++ b/templates/user/setting/notification.twig @@ -132,7 +132,7 @@ - + Staff messages diff --git a/templates/user/setting/paranoia.twig b/templates/user/setting/paranoia.twig index f0d9ce237..c0fd45f68 100644 --- a/templates/user/setting/paranoia.twig +++ b/templates/user/setting/paranoia.twig @@ -120,7 +120,7 @@ - + Invitees diff --git a/templates/user/welcome.twig b/templates/user/welcome.twig index deac5cdbb..939cccafb 100644 --- a/templates/user/welcome.twig +++ b/templates/user/welcome.twig @@ -1,4 +1,4 @@ -Welcome to {{ site_name }}! +Welcome to {{ constant('SITE_NAME') }}! We hope you enjoy the site. Remember to read the rules. @@ -7,4 +7,4 @@ To learn more, you can browse the wiki, and then stop by in the forums and say h For uploading, your announce key is {{ announce_key }}. It is also shown on the upload page. <3 -{{ site_name }} Staff +{{ constant('SITE_NAME') }} Staff