Browse Source

More stylesheets and words, blah blah blah

pjc 5 years ago
parent
commit
ddbb7bd718

+ 26
- 40
classes/rules.class.php View File

@@ -27,19 +27,19 @@ class Rules {
27 27
   public static function display_site_tag_rules($OnUpload = false) {
28 28
     ?>
29 29
     <ul>
30
-      <li><strong>Please use the "<strong class="important_text_alt">vanity.house</strong>" tag for sequences that you or your lab produced.</strong> This helps us promote the DIYbio community's original contributions.</li>
30
+      <li><strong>Please use the <strong class="important_text_alt">vanity.house</strong> tag for sequences that you or your lab produced.</strong> This helps us promote the DIYbio community's original contributions.</li>
31 31
 
32
-      <li>Tags should be comma-separated, and you should use a period (".") to separate words inside a tag &mdash; e.g., "<strong class="important_text_alt">gram.negative</strong>".</li>
32
+      <li>Tags should be comma-separated, and you should use a period to separate words inside a tag, e.g., <strong class="important_text_alt">gram.negative</strong>.</li>
33 33
 
34
-      <li>There is a list of official tags <?=($OnUpload ? 'to the left of the text box' : 'on <a href="upload.php">the torrent upload page</a>')?>. Please use these tags instead of "unofficial" tags (e.g., use the official "<strong class="important_text_alt">fungi</strong>" tag, instead of an unofficial "<strong class="important_text">mushrooms</strong>" tag).</strong></li>
34
+      <li>There is a list of official tags <?=($OnUpload ? 'to the left of the text box' : 'on <a href="upload.php">the torrent upload page</a>')?>. Please use these tags instead of "unofficial" tags, e.g., use the official <strong class="important_text_alt">fungi</strong> tag instead of an unofficial <strong class="important_text">mushrooms</strong> tag.</li>
35 35
 
36
-      <li>Avoid using multiple synonymous tags. Using both "<strong class="important_text">cyanobacteria</strong>" and "<strong class="important_text_alt">bacteria</strong>" is redundant and stupid &mdash; just use the official "<strong class="important_text_alt">bacteria</strong>" tag.</li>
36
+      <li>Avoid using multiple synonymous tags. Using both <strong class="important_text">cyanobacteria</strong> and <strong class="important_text_alt">bacteria</strong> is redundant and stupid &mdash; just use the official <strong class="important_text_alt">bacteria</strong>.</li>
37 37
 
38
-      <li>Do not add useless tags that are already covered by other metadata. If a torrent is in the DNA category, it should not be tagged <strong class="important_text">dna</strong>.</li>
38
+      <li>Don't add useless tags that are already covered by other metadata. If a torrent is in the DNA category, please don't tag it <strong class="important_text">dna</strong>.</li>
39 39
 
40
-      <li>Only tag information related to the group itself &mdash; <strong>not the individual release</strong>. Tags such as "<strong class="important_text">apollo.100</strong>", "<strong class="important_text">hiseq.2500</strong>", etc., are strictly forbidden. Remember that these tags will be used for other releases in the same group.</li>
40
+      <li>Only tag information related to the group itself &mdash; <strong>not the individual release</strong>. Tags such as <strong class="important_text">apollo.100</strong>, <strong class="important_text">hiseq.2500</strong>, etc., are strictly forbidden. Remember that these tags will be used for other releases in the same group.</li>
41 41
 
42
-      <li><strong>Certain tags are strongly encouraged for appropriate uploads:</strong> "<strong class="important_text_alt">archaea</strong>", "<strong class="important_text_alt">bacteria</strong>", "<strong class="important_text_alt">fungi</strong>", "<strong class="important_text_alt">animals</strong>", "<strong class="important_text_alt">plants</strong>", "<strong class="important_text_alt">plasmids</strong>". People search for these kinds of things specifically, so tagging them properly will get you more snatches.</li>
42
+      <li><strong>Certain tags are strongly encouraged for appropriate uploads:</strong> <strong class="important_text_alt">archaea</strong>, <strong class="important_text_alt">bacteria</strong>, <strong class="important_text_alt">fungi</strong>, <strong class="important_text_alt">animals</strong>, <strong class="important_text_alt">plants</strong>, <strong class="important_text_alt">plasmids</strong>. People search for these kinds of things specifically, so tagging them properly will get you more snatches.</li>
43 43
 
44 44
       <!--
45 45
       <li><strong>Certain tags are <strong class="important_text">required</strong> for appropriate uploads:</strong>"<strong class="important_text_alt">lolicon</strong>", "<strong class="important_text_alt">shotacon</strong>", "<strong class="important_text_alt">toddlercon</strong>". Failure to use these tags may result in punishment.</li>
@@ -56,9 +56,9 @@ class Rules {
56 56
       </li>
57 57
       -->
58 58
 
59
-      <li><strong>All uploads require a minimum of 5 tags.</strong> Do not add unrelated tags just to meet the 5 tag requirement. If you can't think of 5 tags for your content, study it again until you can.</li>
59
+      <li><strong>All uploads require a minimum of 5 tags.</strong> Please don't add unrelated tags just to meet the 5 tag requirement. If you can't think of 5 tags for your content, study it again until you can.</li>
60 60
 
61
-      <li><strong>You should be able to build up a list of tags using only the official tags <?=($OnUpload ? 'to the left of the text box' : 'on <a href="upload.php">the torrent upload page</a>')?>.</strong> If you are in any doubt about whether or not a tag is acceptable, do not add it.</li>
61
+      <li><strong>You should be able to build up a list of tags using only the official tags <?=($OnUpload ? 'to the left of the text box' : 'on <a href="upload.php">the torrent upload page</a>')?>.</strong> If you doubt whether or not a tag is acceptable, please omit it for now and send a staff PM to request a new official tag or an approved alias.</li>
62 62
     </ul>
63 63
 <?
64 64
   }
@@ -69,22 +69,17 @@ class Rules {
69 69
    */
70 70
   public static function display_forum_rules() {
71 71
     ?>
72
-    <ol>
73
-      <li>Many forums have their own set of rules. Make sure you read and take note of these rules before you attempt to post in one of these forums.</li>
74
-      <li>No commercial advertising or referral schemes. This includes any scheme in which the poster gets personal gain from users clicking a link. You will be immediately banned for this, no questions asked.</li>
75
-      <li>No asking for money for any reason whatsoever. We don't know or care about your friend who lost everything, or dying relative who wants to enjoy their last few moments alive by being given lots of money.</li>
76
-      <li>Do not inappropriately advertise your uploads. In special cases, it is acceptable to mention new uploads in an approved thread, but be sure to carefully read the thread's rules before posting. It is also acceptable to discuss releases you have uploaded when conversing about the title itself. Blatant attempts to advertise your uploads outside of the appropriate forums or threads may result in a warning or loss of privileges.</li>
77
-      <li>No posting requests in forums. There's a requests link at the top of the page for a reason.</li>
78
-      <li>Be sure you read all the sticky threads in a forum before you post.</li>
72
+        <ul>
73
+      <li>Let's treat the biology boards like how the Shroomery used to be: each thread a set of resourceful diverse wisdom worth using permalinks to. It's okay if the boards are slow, that's why there are only a few of them.</li>
74
+      <li>Please discuss site news in the corresponding Announcements thread instead of making a new General thread. Discussing science-related news in General is highly encouraged, but discussing political news is much less so. Thank you.</li>
75
+      <li>No advertising, referrals, affiliate links, cryptocurrency pumps, or calls to action that involve using a financial instrument. You're banned on the spot. The exceptions: cryptocurrencies that derive their value from work performed on distributed science computation networks, e.g., Curecoin, FoldingCoin, and Gridcoin.</li>
76
+      <li>Feel free to post announcements for your own projects, even and especially if they're commercial ones, in the General board. Limit all discussion of trading biomaterials, including bulk giveaways, to the Marketplace forum available to Power Users.</li>
77
+      <li>Please be modest when talking about your uploads. It's unnecessary to announce your uploads because Gazelle logs everything (at least one this is encrypted). If someone asks for help on his project and your upload fits the bill, go write a post!</li>
79 78
       <li>Use descriptive and specific subject lines. This helps others decide whether your particular words of "wisdom" relate to a topic they care about.</li>
80
-      <li>Don't post comments that don't add anything to the discussion. This generally includes any post without its own substance, such as "I agree" or "haha". These kinds of posts are annoying to people who are trying to actually find some information in a thread.</li>
81
-      <li>Refrain from quoting excessively. When quoting someone, use only the portion of the quote that is absolutely necessary.</li>
82
-      <li>Do not post any potentially malicious links without sufficient warning.</li>
83
-      <li>Don't waste other people's bandwidth by posting images with a large file size.</li>
84
-      <li>Only offer or request invites to other trackers in designated forums. If you can't find the invite forum, it's because you don't have access to it and should not post about it.</li>
85
-      <li>No language other than English (and Japanese, when relevant) is permitted in the forums.</li>
86
-      <li>Some things that <em>are</em> allowed include mature and graphic content, political and religious discussions, and insults. You are welcome to express whatever inflammatory opinions you want as long as you don't go overboard with it.</li>
87
-    </ol>
79
+      <li>Don't post comments that don't add anything to the discussion, such as "I agree" or "haha." Bottle the trained dopamine response to social media because comment reactions are an unlikely feature.</li>
80
+      <li>Please refrain from quoting excessively. When quoting someone, use only the necessary parts of the quote. Avoid quoting more than 3 levels deep.</li>
81
+      <li>Don't post potentially malicious links without sufficient warning, or post pictures > 2 MiB. Please only speak English as stated in the Upload rules.</li>
82
+    </ul>
88 83
 <?
89 84
   }
90 85
 
@@ -94,22 +89,13 @@ class Rules {
94 89
    */
95 90
   public static function display_irc_chat_rules() {
96 91
     ?>
97
-    <ol>
98
-      <li>Staff have the final decision. If a staff member says stop and you continue, expect repercussions.</li>
99
-      <li>Do not leave Caps Lock enabled all the time. It gets annoying, and you will likely get yourself kicked.</li>
100
-      <li>No opinions, especially related to race, religion, politics, etc are allowed. Failure to comply with a request to cease having an opinion WILL be considered a thoughtcrime and you WILL be reeducated.</li>
101
-      <li>Flooding is irritating and will warrant you a kick if it isn't funny enough or if an admin is cranky. This includes, but is not limited to, automatic "now playing" scripts, pasting large amounts of irrelevant text, and multiple consecutive lines with no relevance to the conversation at hand.</li>
102
-      <li>Impersonation of other members &mdash; particularly staff members &mdash; will not go unpunished. If you are uncertain of a user's identity, check their vhost</li>
103
-      <li>Spamming is <b>strictly</b> forbidden unless it's funny. This includes, but is not limited to, personal sites, online auctions, and cans of blended meat.</li>
104
-      <li>Obsessive annoyance &mdash; both to other users and staff &mdash; will not be tolerated.</li>
105
-      <li>Do not PM, DCC, or Query anyone you don't know or have never talked to without asking first; this applies specifically to staff.</li>
106
-      <li>No language other than English is permitted in the official IRC channels.</li>
107
-      <li>Bots are not permitted in official channels with the exception of <strong>#BioTorrents.de-announce</strong> and <strong>#BioTorrents.de-requests</strong>.</li>
108
-      <li>Any bots you have on IRC should authenticate with Udon using your own username and IRC key</li>
109
-      <li>Bots must identify themselves by setting the +B usermode on themselves.</li>
110
-      <li>Unofficial channels are <em>not</em> policed by staff. Any content or discussion that goes on in unofficial channels shoud be treated as part of an unrelated public irc network.</li>
111
-      <li><strong>Read the channel topic before asking questions.</strong></li>
112
-    </ol>
92
+      <li>BioTorrents.de's Slack channels are just are another quiet hangout you can stack your app with so you look cool at conferences.</li>
93
+      <li>Please use <code>#general</code> for the usual chit-chat, <code>#development</code> for questions about the Gazelle software, and <code>#disabled</code> to get help recovering your account.</li>
94
+      <li>Don't send mass alerts with <code>@channel</code>, <code>@everyone</code>, or <code>@here</code>. It's obnoxious and you should handle anything genuinely important on the boards.</li>
95
+      <li>Flooding is irritating and you'll get kicked for it. This includes "now playing" scripts, large amounts of irrelevant text such as lorem ipsum, and unfunny non sequiturs.</li>
96
+      <li>Impersonating other members &mdash; particularly staff members &mdash; will not go unpunished. Please remember that the Slack channels are publicly accessible.</li>
97
+      <li>Please use the threaded conversation in Slack and avoid replying to threads with new messages or crossposting replies to the main channel.</li>
98
+      <li>Announce and bot channels are in development, as standard IRC instead of Slack for obvious reasons. Any IRC bots you have must authenticate with your own username and IRC key, and set the <code>+B</code> usermode on themselves.</li>
113 99
 <?
114 100
   }
115 101
 }

+ 1
- 1
design/publicfooter.php View File

@@ -3,6 +3,6 @@
3 3
   </table>
4 4
 </div>
5 5
 <div id="foot">
6
-  <span><a href="#"><?=SITE_NAME?></a> | <a href="https://git.oppaiti.me/Oppaitime/Gazelle">Project Gazelle</a></span></div>
6
+  <span><a href="/"><?=SITE_NAME?></a> | <a href="https://git.oppaiti.me/Oppaitime/Gazelle">Project Gazelle</a></span></div>
7 7
 </body>
8 8
 </html>

+ 20
- 17
design/publicheader.php View File

@@ -1,6 +1,6 @@
1
-<?
1
+<?php
2 2
 global $LoggedUser;
3
-define('FOOTER_FILE',SERVER_ROOT.'/design/publicfooter.php');
3
+define('FOOTER_FILE', SERVER_ROOT.'/design/publicfooter.php');
4 4
 ?>
5 5
 <!DOCTYPE html>
6 6
 <html>
@@ -12,32 +12,35 @@ define('FOOTER_FILE',SERVER_ROOT.'/design/publicfooter.php');
12 12
   <link rel="shortcut icon" href="static/common/icon.png?v=<?=md5_file('static/common/icon.png');?>">
13 13
   <link rel="manifest" href="/manifest.php">
14 14
   <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css">
15
-<?
15
+<?php
16 16
   $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
17
-  foreach($Scripts as $Script) {
18
-    if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
19
-      $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");
20
-      $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, SERVER_ROOT.STATIC_SERVER."functions/$Script.js", true));
21
-      $ScriptStats['algo'] = INTEGRITY_ALGO;
22
-      G::$Cache->cache_value("script_stats_$Script", $ScriptStats);
23
-    }
24
-?>
17
+  foreach ($Scripts as $Script) {
18
+      if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
19
+          $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");
20
+          $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, SERVER_ROOT.STATIC_SERVER."functions/$Script.js", true));
21
+          $ScriptStats['algo'] = INTEGRITY_ALGO;
22
+          G::$Cache->cache_value("script_stats_$Script", $ScriptStats);
23
+      } ?>
25 24
     <script src="<?=STATIC_SERVER."functions/$Script.js?v=$ScriptStats[mtime]"?>" type="text/javascript" integrity="<?="$ScriptStats[algo]-$ScriptStats[hash]"?>"></script>
26
-<?
25
+<?php
27 26
   }
28 27
   $img = array_diff(scandir(SERVER_ROOT.'/misc/bg', 1), array('.', '..')); ?>
29
-  <meta name="bg_data" content="<?=$img[rand(0,count($img)-1)]?>">
28
+  <meta name="bg_data" content="<?=$img[rand(0, count($img)-1)]?>">
30 29
 </head>
31 30
 <body>
32 31
 <div id="head"><span>
33 32
 <a href="login.php">Log in</a>
34
-<? if (OPEN_REGISTRATION) { ?>
33
+<?php if (OPEN_REGISTRATION) { ?>
35 34
  | <a href="register.php">Register</a>
36
-<? } ?>
35
+<?php } ?>
37 36
 </span></div>
38 37
 <div id="content">
38
+
39
+    <!-- todo: Put index page stats here -->
40
+    <?php #include('/sections/login/stats.php'); ?>
41
+
39 42
   <table class="layout" id="maincontent">
40 43
     <tr>
41 44
       <td class="centered">
42
-        <a href="index.php"><div id="logo"></div></a>
43
-<?
45
+        <a href="/"><div id="logo"></div></a>
46
+<?php

+ 9
- 13
sections/login/login.php View File

@@ -2,7 +2,7 @@
2 2
 View::show_header('Login');
3 3
 ?>
4 4
 
5
-<span id="no-cookies" class="hidden warning">You appear to have cookies disabled.<br /><br /></span>
5
+<p id="no-cookies" class="hidden warning">You appear to have cookies disabled.</p>
6 6
 
7 7
 <?php
8 8
 if (!$Banned) {
@@ -14,23 +14,21 @@ if (!$Banned) {
14 14
   if (isset($Err)) {
15 15
       ?>
16 16
 
17
-  <span class="warning"><?=$Err?><br /><br /></span>
17
+  <p class="warning"><?=$Err?></p>
18 18
 
19 19
   <?php
20 20
   } ?>
21 21
 
22 22
   <?php if ($Attempts > 0) { ?>
23 23
 
24
-  You have <span class="info"><?=(6 - $Attempts)?></span> attempts
25
-  remaining.<br /><br />
26
-  <strong>WARNING:</strong> You will be banned for 6 hours after your login attempts run out!<br /><br />
24
+  <div class="notice">
25
+    <p>You have <span class="info"><?=(6 - $Attempts)?></span> attempts remaining.</p>
26
+    <p><strong>You'll be banned for 6 hours after your login attempts run out!</strong></p>
27
+  </div>
27 28
 
28 29
   <?php } ?>
29 30
 
30
-  <table class="layout">
31
-
32
-    <!-- todo: Put index page stats here -->
33
-
31
+  <table class="layout" width="250px">
34 32
     <tr>
35 33
       <td colspan="2">
36 34
         <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="username"
@@ -61,16 +59,14 @@ if (!$Banned) {
61 59
 <?php
62 60
 } else {
63 61
       ?>
64
-<span class="warning">You are banned from logging in for a few hours.</span>
62
+<p class="warning">You are banned from logging in for a few hours.</p>
65 63
 <?php
66 64
   }
67 65
 
68 66
 if ($Attempts > 0) {
69 67
     ?>
70 68
 
71
-<br /><br />
72
-Forgot your password? <a href="login.php?act=recover" class="tooltip" title="Recover your password"
73
-  style="text-decoration: underline;">Reset it here!</a>
69
+<p>Forgot your password? <a href="login.php?act=recover" class="tooltip" title="Recover your password">Reset it here!</a></p>
74 70
 
75 71
 <?php
76 72
 }

+ 23
- 17
sections/login/recover_step1.php View File

@@ -1,33 +1,39 @@
1
-<?
2
-View::show_header('Recover Password','validate');
1
+<?php
2
+View::show_header('Recover Password', 'validate');
3 3
 echo $Validate->GenerateJS('recoverform');
4 4
 ?>
5 5
 <form class="auth_form" name="recovery" id="recoverform" method="post" action="" onsubmit="return formVal();">
6
-  <div style="width: 320px;">
7
-    <span class="titletext">Reset your password - Step 1</span><br /><br />
8
-<?
6
+  <div style="width: 250px;">
7
+    <p class="titletext"><strong>Reset Your Password</strong></p>
8
+<?php
9 9
 if (empty($Sent) || (!empty($Sent) && $Sent != 1)) {
10
-  if (!empty($Err)) {
11
-?>
12
-    <strong class="important_text"><?=$Err ?></strong><br /><br />
13
-<?  } ?>
14
-    An email will be sent to your email address with information on how to reset your password.<br /><br />
10
+    if (!empty($Err)) {
11
+        ?>
12
+    <strong class="important_text"><?=$Err ?></strong>
13
+<?php
14
+    } ?>
15
+    <p>An email will be sent to your email address with information on how to reset your password.</p>
15 16
     <table class="layout" cellpadding="2" cellspacing="1" border="0" align="center">
16
-      <tr valign="top">
17
-        <td align="right">Email address:&nbsp;</td>
18
-        <td align="left"><input type="email" name="email" id="email" class="inputtext" /></td>
17
+      <tr valign="center">
18
+        <!-- <td align="right"><strong>Email Address&nbsp;</strong></td> -->
19
+        <td align="left">
20
+        <input type="email" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="email"
21
+          id="email" class="inputtext" required="required" maxlength="50"
22
+          autofocus="autofocus" placeholder="Email" size="40"
23
+          autocomplete="email" />
24
+      </td>
19 25
       </tr>
20 26
       <tr>
21 27
         <td colspan="2" align="right"><input type="submit" name="reset" value="Reset!" class="submit" /></td>
22 28
       </tr>
23 29
     </table>
24
-<?
30
+<?php
25 31
 } else { ?>
26
-  An email has been sent to you; please follow the directions in that email to reset your password.
27
-<?
32
+  <p>An email has been sent to you. Please follow the directions to reset your password.</p>
33
+<?php
28 34
 } ?>
29 35
   </div>
30 36
 </form>
31
-<?
37
+<?php
32 38
 View::show_footer(['recover' => true]);
33 39
 ?>

+ 162
- 0
sections/login/stats.php View File

@@ -0,0 +1,162 @@
1
+<!-- Stats -->
2
+<div class="box">
3
+      <div class="head colhead_dark"><strong>Stats</strong></div>
4
+      <ul class="stats nobullet">
5
+<?php if (USER_LIMIT > 0) { ?>
6
+        <li>Maximum users: <?=number_format(USER_LIMIT) ?></li>
7
+<?php
8
+}
9
+
10
+if (($UserCount = $Cache->get_value('stats_user_count')) === false) {
11
+    $DB->query("
12
+    SELECT COUNT(ID)
13
+    FROM users_main
14
+    WHERE Enabled = '1'");
15
+    list($UserCount) = $DB->next_record();
16
+    $Cache->cache_value('stats_user_count', $UserCount, 86400);
17
+}
18
+$UserCount = (int)$UserCount;
19
+?>
20
+        <li>Enabled users: <?=number_format($UserCount)?> <a href="stats.php?action=users" class="brackets">Details</a></li>
21
+<?php
22
+
23
+if (($UserStats = $Cache->get_value('stats_users')) === false) {
24
+    $DB->query("
25
+    SELECT COUNT(ID)
26
+    FROM users_main
27
+    WHERE Enabled = '1'
28
+      AND LastAccess > '".time_minus(3600 * 24)."'");
29
+    list($UserStats['Day']) = $DB->next_record();
30
+
31
+    $DB->query("
32
+    SELECT COUNT(ID)
33
+    FROM users_main
34
+    WHERE Enabled = '1'
35
+      AND LastAccess > '".time_minus(3600 * 24 * 7)."'");
36
+    list($UserStats['Week']) = $DB->next_record();
37
+
38
+    $DB->query("
39
+    SELECT COUNT(ID)
40
+    FROM users_main
41
+    WHERE Enabled = '1'
42
+      AND LastAccess > '".time_minus(3600 * 24 * 30)."'");
43
+    list($UserStats['Month']) = $DB->next_record();
44
+
45
+    $Cache->cache_value('stats_users', $UserStats, 0);
46
+}
47
+?>
48
+        <li>Users active today: <?=number_format($UserStats['Day'])?> (<?=number_format($UserStats['Day'] / $UserCount * 100, 2)?>%)</li>
49
+        <li>Users active this week: <?=number_format($UserStats['Week'])?> (<?=number_format($UserStats['Week'] / $UserCount * 100, 2)?>%)</li>
50
+        <li>Users active this month: <?=number_format($UserStats['Month'])?> (<?=number_format($UserStats['Month'] / $UserCount * 100, 2)?>%)</li>
51
+<?php
52
+
53
+if (($TorrentCount = $Cache->get_value('stats_torrent_count')) === false) {
54
+    $DB->query("
55
+    SELECT COUNT(ID)
56
+    FROM torrents");
57
+    list($TorrentCount) = $DB->next_record();
58
+    $Cache->cache_value('stats_torrent_count', $TorrentCount, 86400); // 1 day cache
59
+}
60
+
61
+if (($GroupCount = $Cache->get_value('stats_group_count')) === false) {
62
+    $DB->query("
63
+    SELECT COUNT(ID)
64
+    FROM torrents_group");
65
+    list($GroupCount) = $DB->next_record();
66
+    $Cache->cache_value('stats_group_count', $GroupCount, 86400); // 1 day cache
67
+}
68
+
69
+if (($TorrentSizeTotal = $Cache->get_value('stats_torrent_size_total')) === false) {
70
+    $DB->query("
71
+    SELECT SUM(Size)
72
+    FROM torrents");
73
+    list($TorrentSizeTotal) = $DB->next_record();
74
+    $Cache->cache_value('stats_torrent_size_total', $TorrentSizeTotal, 86400); // 1 day cache
75
+}
76
+?>
77
+        <li>Total Size of Torrents: <?=Format::get_size($TorrentSizeTotal)?> </li>
78
+<?php
79
+
80
+if (($ArtistCount = $Cache->get_value('stats_artist_count')) === false) {
81
+    $DB->query("
82
+    SELECT COUNT(ArtistID)
83
+    FROM artists_group");
84
+    list($ArtistCount) = $DB->next_record();
85
+    $Cache->cache_value('stats_artist_count', $ArtistCount, 86400); // 1 day cache
86
+}
87
+
88
+?>
89
+        <li>Torrents: <?=number_format($TorrentCount)?></li>
90
+        <li>Torrent Groups: <?=number_format($GroupCount)?></li>
91
+        <li>Artists: <?=number_format($ArtistCount)?></li>
92
+<?php
93
+// End Torrent Stats
94
+
95
+if (($RequestStats = $Cache->get_value('stats_requests')) === false) {
96
+    $DB->query("
97
+    SELECT COUNT(ID)
98
+    FROM requests");
99
+    list($RequestCount) = $DB->next_record();
100
+    $DB->query("
101
+    SELECT COUNT(ID)
102
+    FROM requests
103
+    WHERE FillerID > 0");
104
+    list($FilledCount) = $DB->next_record();
105
+    $Cache->cache_value('stats_requests', array($RequestCount, $FilledCount), 11280);
106
+} else {
107
+    list($RequestCount, $FilledCount) = $RequestStats;
108
+}
109
+
110
+// Do not divide by zero
111
+if ($RequestCount > 0) {
112
+    $RequestsFilledPercent = $FilledCount / $RequestCount * 100;
113
+} else {
114
+    $RequestsFilledPercent = 0;
115
+}
116
+
117
+?>
118
+        <li>Requests: <?=number_format($RequestCount)?> (<?=number_format($RequestsFilledPercent, 2)?>% filled)</li>
119
+<?php
120
+
121
+if ($SnatchStats = $Cache->get_value('stats_snatches')) {
122
+    ?>
123
+        <li>Snatches: <?=number_format($SnatchStats)?></li>
124
+<?php
125
+}
126
+
127
+if (($PeerStats = $Cache->get_value('stats_peers')) === false) {
128
+    // Cache lock!
129
+    $PeerStatsLocked = $Cache->get_value('stats_peers_lock');
130
+    if (!$PeerStatsLocked) {
131
+        $Cache->cache_value('stats_peers_lock', 1, 30);
132
+        $DB->query("
133
+      SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(uid)
134
+      FROM xbt_files_users
135
+      WHERE active = 1
136
+      GROUP BY Type");
137
+        $PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
138
+        $SeederCount = $PeerCount['Seeding'][1] ?: 0;
139
+        $LeecherCount = $PeerCount['Leeching'][1] ?: 0;
140
+        $Cache->cache_value('stats_peers', array($LeecherCount, $SeederCount), 604800); // 1 week cache
141
+        $Cache->delete_value('stats_peers_lock');
142
+    }
143
+} else {
144
+    $PeerStatsLocked = false;
145
+    list($LeecherCount, $SeederCount) = $PeerStats;
146
+}
147
+
148
+if (!$PeerStatsLocked) {
149
+    $Ratio = Format::get_ratio_html($SeederCount, $LeecherCount);
150
+    $PeerCount = number_format($SeederCount + $LeecherCount);
151
+    $SeederCount = number_format($SeederCount);
152
+    $LeecherCount = number_format($LeecherCount);
153
+} else {
154
+    $PeerCount = $SeederCount = $LeecherCount = $Ratio = 'Server busy';
155
+}
156
+?>
157
+        <li>Peers: <?=$PeerCount?></li>
158
+        <li>Seeders: <?=$SeederCount?></li>
159
+        <li>Leechers: <?=$LeecherCount?></li>
160
+        <li>Seeder/leecher ratio: <?=$Ratio?></li>
161
+      </ul>
162
+    </div>

+ 8
- 14
sections/rules/collages.php View File

@@ -9,34 +9,28 @@ View::show_header('Collection Rules');
9 9
   <div class="box pad rule_summary" style="padding: 10px 10px 10px 20px;">
10 10
     <ul>
11 11
       <li>
12
-      Collection vandalism is taken very seriously, resulting in collection editing privileges being removed (at a minimum).
12
+      Collection vandalism is taken very seriously, resulting in loss of collection editing privileges at a minimum.
13 13
       </li>
14 14
       <li>
15
-      A well-defined group of people, for instance Counter Culture Labs members, may create a Group Picks Theme collection with one pick per person, after having gained permission for the collection from Staff.
15
+      A well-defined group of people, for instance Counter Culture Labs members, may create a Group Picks collection with one pick per person, after having gained permission for the collection from staff. Please avoid making Group Picks without an affirmative staff PM reply to your request.
16 16
       </li>
17 17
       <li>
18
-      There may only be one collection per Theme. Dupe collections will be deleted. The collection that is allowed to stay will be determined at staff discretion, with priority given to the most well maintained and oldest collection.
18
+      There may only be one collection per Theme. Duplicate collections will be deleted. The collection allowed to stay is the best maintained and oldest collection. In a word, the most established one.
19 19
       </li>
20 20
       <li>
21
-      Theme collections must be sensible, and reasonably broad. Those that do not fit this description will be deleted.
21
+      Theme collections must be sensible and reasonably broad. Those that don't fit this description will be deleted. Note the conceptual space this rule allows.
22 22
       </li>
23 23
       <li>
24
-      Collections are <strong>not</strong> an alternative to the tagging system. A collection such as "fungi torrents" wouldn't be allowed, because it is far more appropriate to just tag the torrents as fungi. Of course, a "fungi rRNA barcodes" collection would be looked upon differently.
24
+      Collections are <strong>not</strong> an alternative to the tagging system. A collection such as Fungi Torrents wouldn't be allowed because we have the <strong class="important_text_alt">fungi</strong> tag. Naturally a Fungi rRNA Barcodes collection is different.
25 25
       </li>
26 26
       <li>
27
-      Collections should not be used to create lists of an artist's works, as the artist pages already exist for this purpose.
27
+      Every collection must have at least 3 torrent groups in it except for Personal ones.
28 28
       </li>
29 29
       <li>
30
-      Every collection must have at least 3 torrent groups in it, except for collections of type "Personal" and "Staff Picks."
30
+      Please check to see that a similar collection doesn't already exist. If one does, please contribute to that.
31 31
       </li>
32 32
       <li>
33
-      Check to see that a similar collection does not already exist. If a similar collection does exist, please contribute to the existing collection.
34
-      </li>
35
-      <li>
36
-      Give your collection an appropriate title and a decent description explaining its purpose.
37
-      </li>
38
-      <li>
39
-      Attempt to add a cover image to every torrent in your collection.
33
+      If you must make a new collection, please give it an appropriate title and a decent description explaining its purpose, and attempt to add a cover image to every torrent in it.
40 34
       </li>
41 35
     </ul>
42 36
   </div>

+ 7
- 7
sections/rules/ratio.php View File

@@ -8,7 +8,7 @@ View::show_header('Ratio Requirements');
8 8
   </div>
9 9
   <div class="box pad rule_summary">
10 10
     <br />
11
-    <strong>Ratio System Overview:</strong>
11
+    <strong>Ratio System Overview</strong>
12 12
     <br />
13 13
     <ul>
14 14
       <li>Your <strong>ratio</strong> is calculated by dividing the amount of data you&apos;ve uploaded by the amount of data you&apos;ve downloaded. You can view your ratio in the site header or in the &quot;stats&quot; section of your user profile.
@@ -21,7 +21,7 @@ View::show_header('Ratio Requirements');
21 21
     </ul>
22 22
     <br />
23 23
     <br />
24
-    <strong>Required Ratio Overview:</strong>
24
+    <strong>Required Ratio Overview</strong>
25 25
     <br />
26 26
     <ul>
27 27
       <li>Your required ratio represents the minimum ratio you must maintain to avoid ratio watch. You can view your required ratio in the site header after the word &quot;required&quot; or in the &quot;stats&quot; section of your user profile.
@@ -102,7 +102,7 @@ $GB = 1024*1024*1024;
102 102
     </div>
103 103
     <br />
104 104
     <br />
105
-    <strong>Required Ratio Calculation:</strong>
105
+    <strong>Required Ratio Calculation</strong>
106 106
     <br />
107 107
     <ul>
108 108
       <li>
@@ -137,7 +137,7 @@ $GB = 1024*1024*1024;
137 137
     </ul>
138 138
     <br />
139 139
     <br />
140
-    <strong>Required Ratio Details:</strong>
140
+    <strong>Required Ratio Details</strong>
141 141
     <br />
142 142
     <ul>
143 143
       <li>If you stop seeding for one week, your required ratio will become the maximum required ratio (0% seeded) for your amount downloaded bracket. Once you have resumed seeding for a 72 hour
@@ -152,7 +152,7 @@ $GB = 1024*1024*1024;
152 152
     </ul>
153 153
     <br>
154 154
     <br>
155
-    <strong>Required Ratio Example:</strong>
155
+    <strong>Required Ratio Example</strong>
156 156
     <br>
157 157
     <ul>
158 158
       <li>In this example, Alice has downloaded 65 GB. Alice falls into the 60&ndash;80 GiB amount downloaded bracket in the table above. Alice's maximum required ratio (0% seeded) is 0.40, and her minimum required ratio (100% seeded) is 0.10.
@@ -167,7 +167,7 @@ $GB = 1024*1024*1024;
167 167
     </ul>
168 168
     <br />
169 169
     <br />
170
-    <strong>Ratio Watch Overview:</strong>
170
+    <strong>Ratio Watch Overview</strong>
171 171
     <br />
172 172
     <ul>
173 173
       <li>Everyone gets to download their first 10 GiB before ratio watch eligibility begins.</li>
@@ -180,7 +180,7 @@ $GB = 1024*1024*1024;
180 180
     </ul>
181 181
     <br />
182 182
     <br />
183
-    <strong>Leaving Ratio Watch:</strong>
183
+    <strong>Leaving Ratio Watch</strong>
184 184
     <br />
185 185
     <ul>
186 186
       <li>To leave ratio watch, you must either raise your ratio by uploading more, or lower your required ratio by seeding more. Your ratio must be equal to or above your required ratio in

+ 2
- 2
sections/rules/requests.php View File

@@ -15,10 +15,10 @@ View::show_header('Request Rules');
15 15
         <strong>Do not make requests for torrents that break the rules.</strong> It is your responsibility that the request follows the rules. Your request will be deleted, and you will not get your bounty back. Requests cannot be more specific than the upload (and trumping) rules.
16 16
       </li>
17 17
       <li>
18
-        <strong>Put format specifics in the request description.</strong> If you're requesting a particular format, assembly level, etc., put that information in the request description. Do not put it in the title of the request.
18
+        <strong>Put format specifics in the request description.</strong> If you're requesting a particular platform, file format, etc., put that information in the request description. Do not put it in the title of the request.
19 19
       </li>
20 20
       <li>
21
-        <strong>Only one sequence per request.</strong> No requests for multiple sequences or vague requirements. You may ask for any of several formats, but you cannot demand all of them. For example, you may ask for either a FASTA or GenBank, but not both formats.
21
+        <strong>Only one torrent per request.</strong> No requests for multiple data or vague requirements. You may ask for any of several formats, but you cannot demand all of them. For example, you may ask for either a FASTA or a GenBank, but not both formats.
22 22
       </li>
23 23
       <li>
24 24
         <strong>When uploading to fill a request, use the [Upload request] link on the request's page.</strong> This will autofill some of the metadata for the torrent, such as title and artist. This prevents some errors that may cause your upload to break the rules, have your request unfilled, have your bounty removed, and possibly cause you to receive a warning.

BIN
static/common/logo.black.png View File


BIN
static/common/logo.purple.png View File


+ 13
- 5
static/styles/public/style.css View File

@@ -37,6 +37,10 @@ a:hover {
37 37
   text-decoration: underline;
38 38
 }
39 39
 
40
+p {
41
+  margin: 1em 0;
42
+}
43
+
40 44
 input[type="text"], input[type="password"], input[type="email"] {
41 45
   color: black;
42 46
   background-color: white;
@@ -76,7 +80,7 @@ input[type="text"]:invalid, input[type="password"]:invalid {
76 80
 }
77 81
 
78 82
 #recoverform .layout td:first-child {
79
-  width: 140px;
83
+  width: 100%;
80 84
   text-align: right;
81 85
   padding-right: 5px;
82 86
 }
@@ -100,7 +104,7 @@ input[type="text"]:invalid, input[type="password"]:invalid {
100 104
 
101 105
 #foot > span, #head > span {
102 106
   line-height: 30px;
103
-  margin: 10px;
107
+  margin: 1em;
104 108
 }
105 109
 
106 110
 #foot > span, #head > span {
@@ -123,7 +127,7 @@ input[type="text"]:invalid, input[type="password"]:invalid {
123 127
   background-size: contain;
124 128
   display: flex;
125 129
   align-items: center;
126
-  padding: 0 10%;
130
+  padding: 0 25%;
127 131
 }
128 132
 
129 133
 #maincontent {
@@ -138,11 +142,11 @@ input[type="text"]:invalid, input[type="password"]:invalid {
138 142
   background-repeat: no-repeat;
139 143
   background-position: center;
140 144
   background-size: contain;
141
-  margin: 0 0 0 auto;
145
+  margin: 1em 0;
142 146
 }
143 147
 
144 148
 .centered {
145
-  text-align: center;
149
+  /* text-align: center; */
146 150
   vertical-align: middle;
147 151
 }
148 152
 
@@ -159,3 +163,7 @@ input[type="text"]:invalid, input[type="password"]:invalid {
159 163
   color: red;
160 164
   font-weight: bold;
161 165
 }
166
+
167
+.notice {
168
+  width: 250px;
169
+}

Loading…
Cancel
Save