call constants directly from templates

move emails/ to email/ (singular naming)
This commit is contained in:
Spine
2021-01-04 17:16:08 +00:00
parent 94eaff9d3f
commit b06aef8b31
52 changed files with 219 additions and 285 deletions

View File

@@ -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');

View File

@@ -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;

View File

@@ -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');

View File

@@ -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 = <<<END_EMAIL
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=$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,
<?= $SITE_NAME ?> 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

View File

@@ -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');
}
}

View File

@@ -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');

View File

@@ -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']),
])
);

View File

@@ -42,12 +42,7 @@ if (isset($Err)) { ?>
<?php } ?>
</select>
<br />
<ul>
<?php echo G::$Twig->render('collage/description.twig', [
'SITE_NAME' => SITE_NAME,
'personal_allowed' => $personalAllowed,
]); ?>
</ul>
<?= G::$Twig->render('collage/description.twig', [ 'personal_allowed' => $personalAllowed, ]) ?>
</td>
</tr>
<tr>

View File

@@ -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,

View File

@@ -74,7 +74,7 @@ style="color: gold;">Golden Rules</span> right
<br /><br />
<div id="golden_rules" class="rule_summary" style="width: 35%; font-weight: bold; display: none; text-align: left;">
<?= G::$Twig->render('rules/golden.twig', [ 'site_name' => SITE_NAME ]) ?>
<?= G::$Twig->render('rules/golden.twig', []) ?>
</div>
</div>

View File

@@ -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()]);

View File

@@ -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
}

View File

@@ -9,7 +9,7 @@ View::show_header('Rule Index');
These rules are paramount; non-compliance will jeopardize your account.</p>
</div>
<div class="box pad rule_summary" style="padding: 10px 10px 10px 20px;">
<?= G::$Twig->render('rules/golden.twig', [ 'site_name' => SITE_NAME ]) ?>
<?= G::$Twig->render('rules/golden.twig', []) ?>
</div>
</div>
<?php

View File

@@ -27,10 +27,10 @@ $threadId = $forum->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']),
])
);

View File

@@ -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();

View File

@@ -1,8 +1,6 @@
<?php
View::show_header('Two-factor Authentication Validation');
echo G::$Twig->render('login/2fa-validate.twig', [
'site_name' => SITE_NAME,
]);
echo G::$Twig->render('login/2fa-validate.twig', []);
View::show_footer();

View File

@@ -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(),

View File

@@ -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);

View File

@@ -1,3 +1,4 @@
<ul>
<li><strong>Theme</strong> A collage containing releases that all
relate to a certain theme<br /> Examples: "Concept Albums", "Funky
Groove", "Predominantly Polka Dot Covers").</li>
@@ -21,7 +22,7 @@ away in 2020</i>.</li>
<li><strong>Charts</strong> A collage of all the releases that
comprise a certain type of chart<br /> Examples: Billboard Top 100,
Pitchfork Top 100, {{SITE_NAME}} Top 10, etc.).</li>
Pitchfork Top 100, {{ constant('SITE_NAME') }} Top 10, etc.).</li>
<li><strong>Awards</strong> A collage of the releases in an annual
competition, with winners determined by member voting or panel
@@ -38,6 +39,7 @@ The Originals (Deutsche Gramophone and Decca; The Vivaldi Edition
{% if personal_allowed %}
<li><strong>Personal</strong> You can put whatever you want here.
It is your own personal collage. As you increase in rank you may
have more than one.</li>
It is your own personal collage. You can purchase collages in the
bonus store. Donors get free collages.</li>
{% endif %}
</ul>

View File

@@ -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].

View File

@@ -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]<NAME>[/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]<NAME>[/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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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]

View File

@@ -1,7 +1,7 @@
<div class="box pad">
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.
</div>
<div class="box pad">
@@ -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.</p>
<ul class="pad">
<div class="pad">
<ul class="stats nobullet">
{% for k in keys %}
<li><tt>{{ k }}</tt></li>
{% endfor %}
</ul>
</div>
</div>

View File

@@ -1,6 +1,6 @@
<div class="box pad">
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.
</div>

View File

@@ -37,7 +37,7 @@
</tr>
{% for b in bounty %}
<tr>
<td>{{ b.user_name|raw }}</td>
<td>{{ b.UserID|user_full }}</td>
<td title="{{ b.Bounty|number_format }}">{{ b.bounty_size }}</td>
<td><input type="radio" title="No change" name="action-{{ b.UserID }}" value="keep" checked="checked" /></td>
<td><input type="radio" title="Refund" name="action-{{ b.UserID }}" value="refund" /></td>

View File

@@ -68,7 +68,7 @@
<div class="rule_wrap">
<div class="rule_short">Do not request invites or accounts.</div>
<div class="rule_long">Requesting invites to&mdash;or accounts
on&mdash;{{ site_name }} or other trackers is prohibited. Invites may be
on&mdash;{{ constant('SITE_NAME') }} or other trackers is prohibited. Invites may be
<i>offered</i>, but not requested, in the Invites forum (restricted to
the <a href="wiki.php?action=article&amp;name=classes">Elite class</a> and
above). You may request invites by messaging users only when they have
@@ -112,9 +112,9 @@
<li id="gr3.4"><a name="gr3.4" href="#gr3.4" class="rule_link">3.4</a>
<div class="rule_wrap">
<div class="rule_short">Do not modify {{ site_name }} .torrent files.</div>
<div class="rule_long">Embedding non-{{ site_name }} announce URLs in
{{ site_name }} .torrents is prohibited. Doing so causes false data to be
<div class="rule_short">Do not modify {{ constant('SITE_NAME') }} .torrent files.</div>
<div class="rule_long">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.</div>
@@ -125,7 +125,7 @@
<div class="rule_wrap">
<div class="rule_short">Do not share .torrent files or your
passkey.</div>
<div class="rule_long">Embedded in each {{ site_name }} .torrent file is an
<div class="rule_long">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.</div>
</div>
@@ -200,7 +200,7 @@
<div class="rule_wrap">
<div class="rule_short">Do not harvest user-identifying
information.</div>
<div class="rule_long">It is prohibited to use {{ site_name }}'s services to
<div class="rule_long">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.</div>
@@ -209,11 +209,11 @@
<li id="gr4.8"><a name="gr4.8" href="#gr4.8" class="rule_link">4.8</a>
<div class="rule_wrap">
<div class="rule_short">Do not use {{ site_name }}'s services (including the
<div class="rule_short">Do not use {{ constant('SITE_NAME') }}'s services (including the
tracker, website, and IRC network) for commercial gain.</div>
<div class="rule_long">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.</div>
@@ -222,7 +222,7 @@
<li id="gr5.1"><a name="gr5.1" href="#gr5.1" class="rule_link">5.1</a>
<div class="rule_wrap">
<div class="rule_short">Do not browse {{ site_name }} using any free proxy
<div class="rule_short">Do not browse {{ constant('SITE_NAME') }} using any free proxy
or VPN service.</div>
<div class="rule_long">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 @@
<div class="rule_short">Do not autosnatch freeleech torrents.</div>
<div class="rule_long">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 <a
scripts, log or site scraping, etc.) is prohibited. See {{ constant('SITE_NAME') }}'s <a
href="wiki.php?action=article&amp;id=66">Freeleech Autosnatching Policy</a>
article for more information.</div>
</div>
@@ -263,7 +263,7 @@
<div class="rule_long">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 <a
in accordance with {{ constant('SITE_NAME') }}'s <a
href="wiki.php?action=article&amp;name=disclosurepolicy">Responsible
Disclosure Policy</a>. Non-critical bugs can be reported in the <a
href="forums.php?action=viewforum&amp;forumid=6">Bugs Forum</a>.</div>
@@ -284,7 +284,7 @@
<li id="gr7.0"><a name="gr7.0" href="#gr7.0" class="rule_link">7.0</a>
<div class="rule_wrap">
<div class="rule_short">Be respectful to all staff members.</div>
<div class="rule_long">Staff on {{ site_name }} are volunteers who dedicate
<div class="rule_long">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.</div>
@@ -295,7 +295,7 @@
<div class="rule_wrap">
<div class="rule_short">Staff have the final word on rule
interpretations.</div>
<div class="rule_long">All rules on {{ site_name }} may be subject to
<div class="rule_long">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

View File

@@ -39,7 +39,7 @@
<h2><a href="#" class="tooltip" title="These settings allow you to display or hide different categories of information from your profile.">Paranoia Settings</a></h2>
</li>
<li data-gazelle-section-id="access_settings">
<h2><a href="#" class="tooltip" title="These settings control your login and access details for {{ site_name }}, the site's IRC network, and the tracker.">Access Settings</a></h2>
<h2><a href="#" class="tooltip" title="These settings control your login and access details for {{ constant('SITE_NAME') }}, the site's IRC network, and the tracker.">Access Settings</a></h2>
</li>
<li data-gazelle-section-id="live_search">
<input type="text" id="settings_search" placeholder="Live Search" />
@@ -63,7 +63,7 @@
</td>
</tr>
<tr id="site_style_tr">
<td class="label tooltip" title="Selecting a stylesheet will change {{ site_name }}'s visual appearance."><strong>Stylesheet</strong></td>
<td class="label tooltip" title="Selecting a stylesheet will change {{ constant('SITE_NAME') }}'s visual appearance."><strong>Stylesheet</strong></td>
<td>
<select name="stylesheet" id="stylesheet">
{% for sheet in stylesheets %}
@@ -328,7 +328,7 @@
</td>
</tr>
<tr id="comm_mature_tr">
<td class="label tooltip_interactive" title="{{ site_name }} has very flexible &lt;a href=&quot;wiki.php?action=article&amp;amp;id=1063&quot;&gt;mature content policies&lt;/a&gt; for all community areas. Choosing to display mature content will allow you to click-through to view any content posted beneath &lt;code&gt;[mature]&lt;/code&gt; tags. If you choose not to display mature content, all content tagged with &lt;code&gt;[mature]&lt;/code&gt; tags will be hidden from you." data-title-plain="{{ 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."><strong>Mature content (forums, comments, profiles)</strong></td>
<td class="label tooltip_interactive" title="{{ constant('SITE_NAME') }} has very flexible &lt;a href=&quot;wiki.php?action=article&amp;amp;id=1063&quot;&gt;mature content policies&lt;/a&gt; for all community areas. Choosing to display mature content will allow you to click-through to view any content posted beneath &lt;code&gt;[mature]&lt;/code&gt; tags. If you choose not to display mature content, all content tagged with &lt;code&gt;[mature]&lt;/code&gt; 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."><strong>Mature content (forums, comments, profiles)</strong></td>
<td>
<input type="checkbox" name="enablematurecontent" id="enablematurecontent"{{ _self.checked(option.EnableMatureContent) }} />
<label for="enablematurecontent">Display mature content</label>
@@ -617,7 +617,7 @@
</td>
</tr>
<tr id="para_invited_tr">
<td class="label tooltip" title="This option controls the visibility of your {{ site_name }} invitees."><strong>Invitees</strong></td>
<td class="label tooltip" title="This option controls the visibility of your {{ constant('SITE_NAME') }} invitees."><strong>Invitees</strong></td>
<td>
<label><input type="checkbox" name="p_invitedcount"{{ _self.checked(paranoia.invited) }} /> Show count</label>
</td>
@@ -664,7 +664,7 @@
</td>
</tr>
<tr id="acc_email_tr">
<td class="label tooltip" title="This is the email address you want associated with your {{ site_name }} account. It will be used if you forget your password or if an alert needs to be sent to you."><strong>Email address</strong></td>
<td class="label tooltip" title="This is the email address you want associated with your {{ constant('SITE_NAME') }} account. It will be used if you forget your password or if an alert needs to be sent to you."><strong>Email address</strong></td>
<td>
<div class="field_div">
<input type="email" size="50" name="email" id="email" value="{{ user.email }}" />

View File

@@ -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\"" : "" %}
<label>
@@ -80,7 +53,7 @@ self::render_push_settings();
</td>
</tr>
<tr>
<td class="label tooltip" title="Enabling this will give you a notification when you receive a new private message from a member of {{ site_name }} staff.">
<td class="label tooltip" title="Enabling this will give you a notification when you receive a new private message from a member of {{ constant('SITE_NAME') }} staff.">
<strong>Staff messages</strong>
</td>
<td>

View File

@@ -1,4 +1,4 @@
{{ SITE_NAME }} has the following requirements for {{ type }}s:
{{ constant('SITE_NAME') }} has the following requirements for {{ type }}s:
[b]{{ type|capitalize }}s must not exceed {{ size_kb }} kB nor be taller than {{ height }}px.[/b]

View File

@@ -35,7 +35,7 @@
<h2><a href="#" class="tooltip" title="These settings allow you to display or hide different categories of information from your profile.">Paranoia Settings</a></h2>
</li>
<li data-gazelle-section-id="access_settings">
<h2><a href="#" class="tooltip" title="These settings control your login and access details for {{ site_name }}, the site's IRC network, and the tracker.">Access Settings</a></h2>
<h2><a href="#" class="tooltip" title="These settings control your login and access details for {{ constant('SITE_NAME') }}, the site's IRC network, and the tracker.">Access Settings</a></h2>
</li>
<li data-gazelle-section-id="live_search">
<input type="text" id="settings_search" placeholder="Live Search" />
@@ -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' %}
</div>
</form>

View File

@@ -8,7 +8,7 @@
<tr id="acc_resetpk_tr">
<td class="label tooltip_interactive"
title="For information about the function of your passkey, please &lt;a href=&quot;{{ site_url }}/wiki.php?action=article&amp;amp;name=Passkey&quot;&gt;read this wiki article&lt;/a&gt;."
title="For information about the function of your passkey, please &lt;a href=&quot;{{ constant('SITE_URL') }}/wiki.php?action=article&amp;amp;name=Passkey&quot;&gt;read this wiki article&lt;/a&gt;."
data-title-plain="For information about the function of your passkey, please read the &quot;Passkey&quot; wiki article.">
<strong>Reset passkey</strong></td>
<td>
@@ -28,7 +28,7 @@
<input type="button" onclick="RandomIRCKey();" value="Generate IRC key" />
</div>
<p class="min_padding">If set, this key will be used instead of your site password when authenticating with
{{ bot_nick }} on the <a href="wiki.php?action=article&amp;id=5">site's IRC network</a>. <span
{{ constant('BOT_NICK') }} on the <a href="wiki.php?action=article&amp;id=5">site's IRC network</a>. <span
style="white-space: nowrap;">Please note:</span></p>
<ul>
<li>This value is stored in plaintext and should not be your password.</li>
@@ -38,7 +38,7 @@
</tr>
<tr id="acc_email_tr">
<td class="label tooltip" title="This is the email address you want associated with your {{ site_name }}
<td class="label tooltip" title="This is the email address you want associated with your {{ constant('SITE_NAME') }}
account. It will be used if you forget your password or if an alert needs to be sent to you.">
<strong>Email address</strong>
</td>

View File

@@ -6,7 +6,7 @@
</td>
</tr>
<tr id="site_style_tr">
<td class="label tooltip" title="Selecting a stylesheet will change {{ site_name }}'s visual appearance.">
<td class="label tooltip" title="Selecting a stylesheet will change {{ constant('SITE_NAME') }}'s visual appearance.">
<strong>Stylesheet</strong>
</td>
<td>
@@ -20,8 +20,8 @@
{% for sheet in stylesheets %}
<div class="preview_wrapper">
<div class="preview_image" name="{{ style.Name }}">
<a href="{{ static_host }}/stylespreview/full_{{ style.Name }}.png'" target="_blank">
<img src="{{ static_host }}/stylespreview/thumb_{{ style.Name }}.png'" alt="{{ style.Name }}" />
<a href="{{ constant('STATIC_HOST') }}/stylespreview/full_{{ style.Name }}.png'" target="_blank">
<img src="{{ constant('STATIC_HOST') }}/stylespreview/thumb_{{ style.Name }}.png'" alt="{{ style.Name }}" />
</a>
</div>
<p class="preview_name">

View File

@@ -38,8 +38,8 @@
</tr>
<tr id="comm_mature_tr">
<td class="label tooltip_interactive"
title="{{ site_name }} has very flexible &lt;a href=&quot;wiki.php?action=article&amp;amp;id=1063&quot;&gt;mature content policies&lt;/a&gt; for all community areas. Choosing to display mature content will allow you to click-through to view any content posted beneath &lt;code&gt;[mature]&lt;/code&gt; tags. If you choose not to display mature content, all content tagged with &lt;code&gt;[mature]&lt;/code&gt; tags will be hidden from you."
data-title-plain="{{ 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.">
title="{{ constant('SITE_NAME') }} has very flexible &lt;a href=&quot;wiki.php?action=article&amp;amp;id=1063&quot;&gt;mature content policies&lt;/a&gt; for all community areas. Choosing to display mature content will allow you to click-through to view any content posted beneath &lt;code&gt;[mature]&lt;/code&gt; tags. If you choose not to display mature content, all content tagged with &lt;code&gt;[mature]&lt;/code&gt; 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.">
<strong>Mature content (forums, comments, profiles)</strong>
</td>
<td>

View File

@@ -132,7 +132,7 @@
</td>
</tr>
<tr>
<td class="label tooltip" title="Enabling this will give you a notification when you receive a new private message from a member of {{ site_name }} staff.">
<td class="label tooltip" title="Enabling this will give you a notification when you receive a new private message from a member of {{ constant('SITE_NAME') }} staff.">
<strong>Staff messages</strong>
</td>
<td>

View File

@@ -120,7 +120,7 @@
</td>
</tr>
<tr id="para_invited_tr">
<td class="label tooltip" title="This option controls the visibility of your {{ site_name }} invitees.">
<td class="label tooltip" title="This option controls the visibility of your {{ constant('SITE_NAME') }} invitees.">
<strong>Invitees</strong>
</td>
<td>

View File

@@ -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