Browse Source

Further integrate Skeleton and fix a large swath of minor bugs

biotorrents 3 years ago
parent
commit
63fe3124b5
41 changed files with 511 additions and 1728 deletions
  1. 2
    2
      classes/torrent_form.class.php
  2. 2
    2
      classes/util.php
  3. 1
    1
      design/privatefooter.php
  4. 1
    0
      design/publicfooter.php
  5. 4
    1
      design/publicheader.php
  6. 1
    1
      design/views/generic/reply/quickreply.php
  7. 1
    1
      sections/better/better.php
  8. 2
    2
      sections/better/index.php
  9. 19
    20
      sections/better/literature.php
  10. 9
    9
      sections/better/single.php
  11. 5
    6
      sections/collages/torrent_collage.php
  12. 113
    64
      sections/comments/comments.php
  13. 11
    2
      sections/comments/index.php
  14. 2
    2
      sections/forums/newthread.php
  15. 47
    36
      sections/friends/friends.php
  16. 11
    4
      sections/login/login.php
  17. 2
    1
      sections/register/step1.php
  18. 12
    11
      sections/reportsv2/report.php
  19. 3
    4
      sections/reportsv2/takereport.php
  20. 5
    5
      sections/requests/request.php
  21. 1
    1
      sections/rules/clients.php
  22. 9
    9
      sections/tools/tools.php
  23. 1
    1
      sections/top10/donors.php
  24. 1
    1
      sections/top10/tags.php
  25. 1
    1
      sections/top10/users.php
  26. 2
    2
      sections/torrents/details.php
  27. 2
    2
      sections/upload/index.php
  28. 2
    2
      sections/user/user.php
  29. 59
    55
      sections/userhistory/subscriptions.php
  30. 1
    1
      sections/wiki/article.php
  31. BIN
      static/common/logos/torrents.bio.png
  32. 0
    23
      static/functions/vendor/biojs/cytoscape.js
  33. 0
    1335
      static/functions/vendor/biojs/ntseq.js
  34. 7
    0
      static/styles/bookish/scss/colors.scss
  35. 3
    2
      static/styles/bookish/scss/fonts.scss
  36. 18
    20
      static/styles/bookish/scss/layout.scss
  37. 11
    10
      static/styles/bookish/scss/menus.scss
  38. 58
    75
      static/styles/bookish/scss/tables.scss
  39. 14
    0
      static/styles/global/scss/layout.scss
  40. 49
    5
      static/styles/global/scss/skeleton-fixes.scss
  41. 19
    9
      static/styles/public/scss/public.scss

+ 2
- 2
classes/torrent_form.class.php View File

388
 
388
 
389
         echo <<<HTML
389
         echo <<<HTML
390
               <tr>
390
               <tr>
391
-                <td>
392
-                  <input id="post" type="submit" value="$Value" />
391
+                <td class="center">
392
+                  <input id="post" type="submit" value="$Value" class="button-primary" />
393
                 </td>
393
                 </td>
394
               </tr>
394
               </tr>
395
             </table> <!-- torrent_form -->
395
             </table> <!-- torrent_form -->

+ 2
- 2
classes/util.php View File

383
      * Append $Log
383
      * Append $Log
384
      * Formerly in sections/error/index.php
384
      * Formerly in sections/error/index.php
385
      */
385
      */
386
-    if ($Log ?? false) {
386
+    if ($Log) {
387
         $Message .= " <a href='log.php?search=$Title'>Search Log</a>";
387
         $Message .= " <a href='log.php?search=$Title'>Search Log</a>";
388
     }
388
     }
389
 
389
 
390
     /**
390
     /**
391
      * Append $Debug
391
      * Append $Debug
392
      */
392
      */
393
-    if ($Debug ?? false) {
393
+    if ($Debug) {
394
         $DateTime = strftime('%c', $_SERVER['REQUEST_TIME']);
394
         $DateTime = strftime('%c', $_SERVER['REQUEST_TIME']);
395
         $BackTrace = debug_string_backtrace();
395
         $BackTrace = debug_string_backtrace();
396
 
396
 

+ 1
- 1
design/privatefooter.php View File

6
 
6
 
7
 # End <div#content>, begin <footer>
7
 # End <div#content>, begin <footer>
8
 # This needs to be <main>, in each page
8
 # This needs to be <main>, in each page
9
-echo $HTML = '</div></main><footer class="halfwide">';
9
+echo $HTML = '</div></main><footer>';
10
 
10
 
11
 # Disclaimer
11
 # Disclaimer
12
 #if (!empty($Options['disclaimer'])) {
12
 #if (!empty($Options['disclaimer'])) {

+ 1
- 0
design/publicfooter.php View File

8
 
8
 
9
 <footer>
9
 <footer>
10
   <a href="https://github.com/biotorrents/gazelle" target="_blank">GitHub</a>
10
   <a href="https://github.com/biotorrents/gazelle" target="_blank">GitHub</a>
11
+  <a href="https://docs.biotorrents.de" target="_blank">API</a>
11
   <a href="/legal.php?p=privacy">Privacy</a>
12
   <a href="/legal.php?p=privacy">Privacy</a>
12
   <a href="/legal.php?p=dmca">DMCA</a>
13
   <a href="/legal.php?p=dmca">DMCA</a>
13
 </footer>
14
 </footer>

+ 4
- 1
design/publicheader.php View File

41
 }
41
 }
42
 
42
 
43
 # Load CSS
43
 # Load CSS
44
-$Styles = ['vendor/normalize', 'global', 'public'];
44
+$Styles = ['vendor/normalize', 'vendor/skeleton', 'global', 'public'];
45
 foreach ($Styles as $Style) {
45
 foreach ($Styles as $Style) {
46
     echo View::pushAsset(
46
     echo View::pushAsset(
47
         "$ENV->STATIC_SERVER/styles/$Style.css",
47
         "$ENV->STATIC_SERVER/styles/$Style.css",
68
     echo '<a href="register.php">Register</a>';
68
     echo '<a href="register.php">Register</a>';
69
 }
69
 }
70
 
70
 
71
+/*
71
 $Email = $ENV->HELP->Email;
72
 $Email = $ENV->HELP->Email;
72
 $Subject = $ENV->HELP->Subject;
73
 $Subject = $ENV->HELP->Subject;
73
 $Body = $ENV->HELP->Body;
74
 $Body = $ENV->HELP->Body;
74
 echo "<a href='mailto:$Email?subject=$Subject&body=$Body'>Support</a>";
75
 echo "<a href='mailto:$Email?subject=$Subject&body=$Body'>Support</a>";
76
+*/
75
 
77
 
76
 echo <<<HTML
78
 echo <<<HTML
79
+    <a href="https://github.com/biotorrents/gazelle/issues" target="_blank">Support</a>
77
   </header>
80
   </header>
78
 
81
 
79
 <main>
82
 <main>

+ 1
- 1
design/views/generic/reply/quickreply.php View File

200
           class="hidden button_preview_<?=$ReplyText->getID()?>"
200
           class="hidden button_preview_<?=$ReplyText->getID()?>"
201
           tabindex="1" />
201
           tabindex="1" />
202
 
202
 
203
-        <input type="submit" value="Post" id="submit_button" tabindex="1" />
203
+        <input type="submit" class="button-primary" value="Post" id="submit_button" tabindex="1" />
204
       </div>
204
       </div>
205
     </form>
205
     </form>
206
   </div>
206
   </div>

+ 1
- 1
sections/better/better.php View File

42
 
42
 
43
     <tr class="row">
43
     <tr class="row">
44
       <td class="nobr">
44
       <td class="nobr">
45
-        <a href="better.php?method=screenshots&filter=all">Publications</a>
45
+        <a href="better.php?method=literature&filter=all">Publications</a>
46
       </td>
46
       </td>
47
 
47
 
48
       <td class="nobr">
48
       <td class="nobr">

+ 2
- 2
sections/better/index.php View File

9
       require_once SERVER_ROOT.'/sections/better/single.php';
9
       require_once SERVER_ROOT.'/sections/better/single.php';
10
       break;
10
       break;
11
   
11
   
12
-    case 'screenshots':
13
-      require_once SERVER_ROOT.'/sections/better/screenshots.php';
12
+    case 'literature':
13
+      require_once SERVER_ROOT.'/sections/better/literature.php';
14
       break;
14
       break;
15
 
15
 
16
     case 'covers':
16
     case 'covers':

sections/better/screenshots.php → sections/better/literature.php View File

3
 
3
 
4
 $All = (!empty($_GET['filter']) && $_GET['filter'] === 'all');
4
 $All = (!empty($_GET['filter']) && $_GET['filter'] === 'all');
5
 $Join = $All
5
 $Join = $All
6
-? ''
7
-: (
8
-    'JOIN torrents AS t ON t.GroupID=tg.ID
9
-    JOIN xbt_snatched AS x ON x.fid = t.ID AND x.uid = '
10
-    . $LoggedUser['ID']
11
-);
6
+    ? ''
7
+    : ("
8
+        JOIN `torrents` AS t ON t.`GroupID` = tg.`id`
9
+        JOIN `xbt_snatched` AS x ON x.`fid` = t.`ID`
10
+        AND x.`uid` = '$LoggedUser[ID]'
11
+    ");
12
 
12
 
13
 View::show_header('Torrent groups with no publications');
13
 View::show_header('Torrent groups with no publications');
14
 
14
 
15
 $DB->query("
15
 $DB->query("
16
 SELECT SQL_CALC_FOUND_ROWS
16
 SELECT SQL_CALC_FOUND_ROWS
17
-  tg.`ID`
17
+  tg.`id`
18
 FROM
18
 FROM
19
   `torrents_group` AS tg
19
   `torrents_group` AS tg
20
 $Join
20
 $Join
21
 WHERE
21
 WHERE
22
-  tg.`ID` NOT IN(
22
+  tg.`id` NOT IN(
23
   SELECT DISTINCT
23
   SELECT DISTINCT
24
-    `TorrentID`
24
+    `group_id`
25
   FROM
25
   FROM
26
-    `torrents_doi`
26
+    `literature`
27
   )
27
   )
28
 ORDER BY
28
 ORDER BY
29
   RAND()
29
   RAND()
30
 LIMIT 20
30
 LIMIT 20
31
 ");
31
 ");
32
 
32
 
33
-$Groups = $DB->to_array('ID', MYSQLI_ASSOC);
33
+$Groups = $DB->to_array('id', MYSQLI_ASSOC);
34
 $DB->query('SELECT FOUND_ROWS()');
34
 $DB->query('SELECT FOUND_ROWS()');
35
 list($NumResults) = $DB->next_record();
35
 list($NumResults) = $DB->next_record();
36
-$Results = Torrents::get_groups(array_keys($Groups));
37
-?>
36
+$Results = Torrents::get_groups(array_keys($Groups)); ?>
38
 
37
 
39
 <div class="header">
38
 <div class="header">
40
   <?php if ($All) { ?>
39
   <?php if ($All) { ?>
67
     <?php
66
     <?php
68
 foreach ($Results as $Result) {
67
 foreach ($Results as $Result) {
69
     extract($Result);
68
     extract($Result);
70
-    $LangName = $Name ? $Name : ($Title2 ? $Title2 : $NameJP);
71
-    $TorrentTags = new Tags($TagList);
69
+    $LangName = $title ? $title : ($subject ? $subject : $object);
70
+    $TorrentTags = new Tags($tag_list);
72
 
71
 
73
-    $DisplayName = "<a href='torrents.php?id=$ID' ";
72
+    $DisplayName = "<a href='torrents.php?id=$id' ";
74
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
73
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
75
-        $DisplayName .= 'data-cover="'.ImageTools::process($WikiImage, 'thumb').'" ';
74
+        $DisplayName .= 'data-cover="'.ImageTools::process($picture, 'thumb').'" ';
76
     }
75
     }
77
     $DisplayName .= ">$LangName</a>";
76
     $DisplayName .= ">$LangName</a>";
78
 
77
 
79
-    if ($Year > 0) {
80
-        $DisplayName .= " [$Year]";
78
+    if ($year > 0) {
79
+        $DisplayName .= " [$year]";
81
     } ?>
80
     } ?>
82
 
81
 
83
     <tr class="torrent">
82
     <tr class="torrent">
84
       <td>
83
       <td>
85
-        <div class="<?=Format::css_category($CategoryID)?>"></div>
84
+        <div class="<?=Format::css_category($category_id)?>"></div>
86
       </td>
85
       </td>
87
 
86
 
88
       <td>
87
       <td>

+ 9
- 9
sections/better/single.php View File

1
 <?php
1
 <?php
2
+declare(strict_types = 1);
3
+
2
 if (($Results = $Cache->get_value('better_single_groupids')) === false) {
4
 if (($Results = $Cache->get_value('better_single_groupids')) === false) {
3
     $DB->query("
5
     $DB->query("
4
     SELECT
6
     SELECT
5
-      t.ID AS TorrentID,
6
-      t.GroupID AS GroupID
7
-    FROM xbt_files_users AS x
8
-      JOIN torrents AS t ON t.ID=x.fid
9
-    GROUP BY x.fid
10
-    HAVING COUNT(x.uid) = 1
7
+      t.`ID` AS `TorrentID`,
8
+      t.`GroupID` AS `GroupID`
9
+    FROM `xbt_files_users` AS x
10
+      JOIN `torrents` AS t ON t.`ID`=x.`fid`
11
+    GROUP BY x.`fid`
12
+    HAVING COUNT(x.`uid`) = 1
11
     LIMIT 30");
13
     LIMIT 30");
12
 
14
 
13
     $Results = $DB->to_pair('GroupID', 'TorrentID', false);
15
     $Results = $DB->to_pair('GroupID', 'TorrentID', false);
15
 }
17
 }
16
 
18
 
17
 $Groups = Torrents::get_groups(array_keys($Results));
19
 $Groups = Torrents::get_groups(array_keys($Results));
18
-
19
-View::show_header('Single seeder torrents');
20
-?>
20
+View::show_header('Single seeder torrents'); ?>
21
 
21
 
22
 <div class="header">
22
 <div class="header">
23
   <h2>
23
   <h2>

+ 5
- 6
sections/collages/torrent_collage.php View File

580
             value="<?=$LoggedUser['AuthKey']?>" />
580
             value="<?=$LoggedUser['AuthKey']?>" />
581
           <input type="hidden" name="collageid"
581
           <input type="hidden" name="collageid"
582
             value="<?=$CollageID?>" />
582
             value="<?=$CollageID?>" />
583
-          <div>
584
-            <input type="text" size="20" name="url" />
585
-          </div>
583
+
586
           <div class="submit_div">
584
           <div class="submit_div">
587
-            <input type="submit" value="Add" />
585
+            <input type="text" size="20" name="url" />
586
+            <input type="submit" class="button-primary" value="Add" />
588
           </div>
587
           </div>
589
-          <span style="font-style: italic;">Enter the URL of a torrent group on the site.</span>
588
+          <p>Enter the URL of a torrent group on the site.</p>
590
         </form>
589
         </form>
591
       </div>
590
       </div>
592
 
591
 
668
             <textarea name="body" cols="24" rows="5"></textarea>
667
             <textarea name="body" cols="24" rows="5"></textarea>
669
           </div>
668
           </div>
670
           <div class="submit_div">
669
           <div class="submit_div">
671
-            <input type="submit" id="submit_button" value="Post" />
670
+            <input type="submit" id="submit_button" class="button-primary" value="Post" />
672
           </div>
671
           </div>
673
         </div>
672
         </div>
674
       </form>
673
       </form>

+ 113
- 64
sections/comments/comments.php View File

1
 <?
1
 <?
2
-/*
2
+declare(strict_types=1);
3
+
4
+/**
3
  * $_REQUEST['action'] is artist, collages, requests or torrents (default torrents)
5
  * $_REQUEST['action'] is artist, collages, requests or torrents (default torrents)
4
  * $_REQUEST['type'] depends on the page:
6
  * $_REQUEST['type'] depends on the page:
5
  *     collages:
7
  *     collages:
16
 // User ID
18
 // User ID
17
 if (isset($_GET['id']) && is_number($_GET['id'])) {
19
 if (isset($_GET['id']) && is_number($_GET['id'])) {
18
   $UserID = (int)$_GET['id'];
20
   $UserID = (int)$_GET['id'];
19
-
20
   $UserInfo = Users::user_info($UserID);
21
   $UserInfo = Users::user_info($UserID);
21
-
22
   $Username = $UserInfo['Username'];
22
   $Username = $UserInfo['Username'];
23
-  if ($LoggedUser['ID'] == $UserID) {
23
+
24
+  if ($LoggedUser['ID'] === $UserID) {
24
     $Self = true;
25
     $Self = true;
25
   } else {
26
   } else {
26
     $Self = false;
27
     $Self = false;
27
   }
28
   }
29
+
28
   $Perms = Permissions::get_permissions($UserInfo['PermissionID']);
30
   $Perms = Permissions::get_permissions($UserInfo['PermissionID']);
29
   $UserClass = $Perms['Class'];
31
   $UserClass = $Perms['Class'];
32
+
30
   if (!check_paranoia('torrentcomments', $UserInfo['Paranoia'], $UserClass, $UserID)) {
33
   if (!check_paranoia('torrentcomments', $UserInfo['Paranoia'], $UserClass, $UserID)) {
31
     error(403);
34
     error(403);
32
   }
35
   }
49
 } else {
52
 } else {
50
   $Action = $_REQUEST['action'];
53
   $Action = $_REQUEST['action'];
51
 }
54
 }
55
+
52
 if (!isset($_REQUEST['type'])) {
56
 if (!isset($_REQUEST['type'])) {
53
   $Type = 'default';
57
   $Type = 'default';
54
 } else {
58
 } else {
55
   $Type = $_REQUEST['type'];
59
   $Type = $_REQUEST['type'];
56
 }
60
 }
57
 
61
 
62
+
58
 // Construct the SQL query
63
 // Construct the SQL query
64
+
59
 $Conditions = $Join = [];
65
 $Conditions = $Join = [];
60
 switch ($Action) {
66
 switch ($Action) {
67
+  # artist comments
61
   case 'artist':
68
   case 'artist':
62
-    $Field1 = 'artists_group.ArtistID';
63
-    $Field2 = 'artists_group.Name';
64
-    $Table = 'artists_group';
69
+    $Field1 = '`artists_group`.`ArtistID`';
70
+    $Field2 = '`artists_group`.`Name`';
71
+    $Table = '`artists_group`';
65
     $Title = 'Artist comments left by ' . ($Self ? 'you' : $Username);
72
     $Title = 'Artist comments left by ' . ($Self ? 'you' : $Username);
66
     $Header = 'Artist comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
73
     $Header = 'Artist comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
67
-    $Conditions[] = "comments.AuthorID = $UserID";
74
+    $Conditions[] = "`comments`.`AuthorID` = $UserID";
68
     break;
75
     break;
76
+
77
+  
78
+  # collage comments
69
   case 'collages':
79
   case 'collages':
70
-    $Field1 = 'collages.ID';
71
-    $Field2 = 'collages.Name';
72
-    $Table = 'collages';
73
-    $Conditions[] = "collages.Deleted = '0'";
80
+    $Field1 = '`collages`.`ID`';
81
+    $Field2 = '`collages`.`Name`';
82
+    $Table = '`collages`';
83
+    $Conditions[] = "`collages`.`Deleted` = '0'";
84
+
74
     if ($Type == 'created') {
85
     if ($Type == 'created') {
75
-      $Conditions[] = "collages.UserID = $UserID";
76
-      $Conditions[] = "comments.AuthorID != $UserID";
86
+      $Conditions[] = "`collages`.`UserID` = $UserID";
87
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
77
       $Title = 'Comments left on collages ' . ($Self ? 'you' : $Username) . ' created';
88
       $Title = 'Comments left on collages ' . ($Self ? 'you' : $Username) . ' created';
78
       $Header = 'Comments left on collages ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false)) . ' created';
89
       $Header = 'Comments left on collages ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false)) . ' created';
79
     } elseif ($Type == 'contributed') {
90
     } elseif ($Type == 'contributed') {
80
-      $Conditions[] = 'IF(collages.CategoryID = ' . array_search('Artists', $CollageCats) . ', collages_artists.ArtistID, collages_torrents.GroupID) IS NOT NULL';
81
-      $Conditions[] = "comments.AuthorID != $UserID";
82
-      $Join[] = "LEFT JOIN collages_torrents ON collages_torrents.CollageID = collages.ID AND collages_torrents.UserID = $UserID";
83
-      $Join[] = "LEFT JOIN collages_artists ON collages_artists.CollageID = collages.ID AND collages_artists.UserID = $UserID";
91
+      $Conditions[] = 'IF(`collages`.`CategoryID` = ' . array_search('Artists', $CollageCats) . ', `collages_artists`.`ArtistID`, `collages_torrents`.`GroupID`) IS NOT NULL';
92
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
93
+      $Join[] = "LEFT JOIN `collages_torrents` ON `collages_torrents`.`CollageID` = `collages`.`ID` AND `collages_torrents`.`UserID` = $UserID";
94
+      $Join[] = "LEFT JOIN `collages_artists` ON `collages_artists`.`CollageID` = `collages`.`ID` AND `collages_artists`.`UserID` = $UserID";
84
       $Title = 'Comments left on collages ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to';
95
       $Title = 'Comments left on collages ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to';
85
       $Header = 'Comments left on collages ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false).' has') . ' contributed to';
96
       $Header = 'Comments left on collages ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false).' has') . ' contributed to';
86
     } else {
97
     } else {
87
       $Type = 'default';
98
       $Type = 'default';
88
-      $Conditions[] = "comments.AuthorID = $UserID";
99
+      $Conditions[] = "`comments`.`AuthorID` = $UserID";
89
       $Title = 'Collage comments left by ' . ($Self ? 'you' : $Username);
100
       $Title = 'Collage comments left by ' . ($Self ? 'you' : $Username);
90
       $Header = 'Collage comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
101
       $Header = 'Collage comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
91
     }
102
     }
92
     break;
103
     break;
104
+
105
+
106
+  # request comments
93
   case 'requests':
107
   case 'requests':
94
-    $Field1 = 'requests.ID';
95
-    $Field2 = 'requests.Title';
108
+    $Field1 = '`requests`.`ID`';
109
+    $Field2 = '`requests`.`Title`';
96
     $Table = 'requests';
110
     $Table = 'requests';
111
+
97
     if ($Type == 'created') {
112
     if ($Type == 'created') {
98
-      $Conditions[] = "requests.UserID = $UserID";
99
-      $Conditions[] = "comments.AuthorID != $UserID";
113
+      $Conditions[] = "`requests`.`UserID` = $UserID";
114
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
100
       $Title = 'Comments left on requests ' . ($Self ? 'you' : $Username) . ' created';
115
       $Title = 'Comments left on requests ' . ($Self ? 'you' : $Username) . ' created';
101
       $Header = 'Comments left on requests ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false)) . ' created';
116
       $Header = 'Comments left on requests ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false)) . ' created';
102
     } elseif ($Type == 'voted') {
117
     } elseif ($Type == 'voted') {
103
-      $Conditions[] = "requests_votes.UserID = $UserID";
104
-      $Conditions[] = "comments.AuthorID != $UserID";
105
-      $Join[] = 'JOIN requests_votes ON requests_votes.RequestID = requests.ID';
118
+      $Conditions[] = "`requests_votes`.`UserID` = $UserID";
119
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
120
+      $Join[] = 'JOIN `requests_votes` ON `requests_votes`.`RequestID` = `requests`.`ID`';
106
       $Title = 'Comments left on requests ' . ($Self ? 'you\'ve' : $Username . ' has') . ' voted on';
121
       $Title = 'Comments left on requests ' . ($Self ? 'you\'ve' : $Username . ' has') . ' voted on';
107
       $Header = 'Comments left on requests ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false) . ' has') . ' voted on';
122
       $Header = 'Comments left on requests ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false) . ' has') . ' voted on';
108
     } else {
123
     } else {
109
       $Type = 'default';
124
       $Type = 'default';
110
-      $Conditions[] = "comments.AuthorID = $UserID";
125
+      $Conditions[] = "`comments`.`AuthorID` = $UserID";
111
       $Title = 'Request comments left by ' . ($Self ? 'you' : $Username);
126
       $Title = 'Request comments left by ' . ($Self ? 'you' : $Username);
112
       $Header = 'Request comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
127
       $Header = 'Request comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
113
     }
128
     }
114
     break;
129
     break;
130
+
131
+
132
+  # torrent comments
115
   case 'torrents':
133
   case 'torrents':
116
   default:
134
   default:
117
     $Action = 'torrents';
135
     $Action = 'torrents';
118
-    $Field1 = 'torrents.GroupID';
119
-    $Field2 = "COALESCE(NULLIF(tg.Name,''),NULLIF(tg.Title2,''),tg.NameJP) AS Name";
120
-    $Table = 'torrents';
121
-    $Join[] = 'JOIN torrents_group AS tg ON torrents.GroupID = tg.ID';
136
+    $Field1 = '`torrents`.`GroupID`';
137
+    $Field2 = "COALESCE(NULLIF(tg.`title`,''),NULLIF(tg.`subject`,''),tg.`object`) AS Name";
138
+    $Table = '`torrents`';
139
+    $Join[] = 'JOIN `torrents_group` AS tg ON `torrents`.`GroupID` = tg.`id`';
140
+
122
     if ($Type == 'uploaded') {
141
     if ($Type == 'uploaded') {
123
-      $Conditions[] = "torrents.UserID = $UserID";
124
-      $Conditions[] = 'comments.AddedTime > torrents.Time';
125
-      $Conditions[] = "comments.AuthorID != $UserID";
142
+      $Conditions[] = "`torrents`.`UserID` = $UserID";
143
+      $Conditions[] = '`comments`.`AddedTime` > `torrents`.`Time`';
144
+      $Conditions[] = "`comments`.`AuthorID` != $UserID";
126
       $Title = 'Comments left on torrents ' . ($Self ? 'you\'ve' : $Username . ' has') . ' uploaded';
145
       $Title = 'Comments left on torrents ' . ($Self ? 'you\'ve' : $Username . ' has') . ' uploaded';
127
       $Header = 'Comments left on torrents ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false) . ' has') . ' uploaded';
146
       $Header = 'Comments left on torrents ' . ($Self ? 'you\'ve' : Users::format_username($UserID, false, false, false) . ' has') . ' uploaded';
128
     } else {
147
     } else {
129
       $Type = 'default';
148
       $Type = 'default';
130
-      $Conditions[] = "comments.AuthorID = $UserID";
149
+      $Conditions[] = "`comments`.`AuthorID` = $UserID";
131
       $Title = 'Torrent comments left by ' . ($Self ? 'you' : $Username);
150
       $Title = 'Torrent comments left by ' . ($Self ? 'you' : $Username);
132
       $Header = 'Torrent comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
151
       $Header = 'Torrent comments left by ' . ($Self ? 'you' : Users::format_username($UserID, false, false, false));
133
     }
152
     }
134
     break;
153
     break;
135
 }
154
 }
136
-$Join[] = "JOIN comments ON comments.Page = '$Action' AND comments.PageID = $Field1";
155
+
156
+# end SQL query constructor
157
+
158
+
159
+$Join[] = "JOIN `comments` ON `comments`.`Page` = '$Action' AND `comments`.`PageID` = $Field1";
137
 $Join = implode("\n\t\t", $Join);
160
 $Join = implode("\n\t\t", $Join);
138
 $Conditions = implode(" AND ", $Conditions);
161
 $Conditions = implode(" AND ", $Conditions);
139
 $Conditions = ($Conditions ? 'WHERE ' . $Conditions : '');
162
 $Conditions = ($Conditions ? 'WHERE ' . $Conditions : '');
141
 $SQL = "
164
 $SQL = "
142
   SELECT
165
   SELECT
143
     SQL_CALC_FOUND_ROWS
166
     SQL_CALC_FOUND_ROWS
144
-    comments.AuthorID,
145
-    comments.Page,
146
-    comments.PageID,
167
+    `comments`.`AuthorID`,
168
+    `comments`.`Page`,
169
+    `comments`.`PageID`,
147
     $Field2,
170
     $Field2,
148
-    comments.ID,
149
-    comments.Body,
150
-    comments.AddedTime,
151
-    comments.EditedTime,
152
-    comments.EditedUserID
171
+    `comments`.`ID`,
172
+    `comments`.`Body`,
173
+    `comments`.`AddedTime`,
174
+    `comments`.`EditedTime`,
175
+    `comments`.`EditedUserID`
153
   FROM $Table
176
   FROM $Table
154
     $Join
177
     $Join
155
   $Conditions
178
   $Conditions
156
-  GROUP BY comments.ID
157
-  ORDER BY comments.ID DESC
179
+  GROUP BY `comments`.`ID`
180
+  ORDER BY `comments`.`ID` DESC
158
   LIMIT $Limit";
181
   LIMIT $Limit";
159
 
182
 
160
 $Comments = $DB->query($SQL);
183
 $Comments = $DB->query($SQL);
163
 $DB->query("SELECT FOUND_ROWS()");
186
 $DB->query("SELECT FOUND_ROWS()");
164
 list($Results) = $DB->next_record();
187
 list($Results) = $DB->next_record();
165
 $Pages = Format::get_pages($Page, $Results, $PerPage, 11);
188
 $Pages = Format::get_pages($Page, $Results, $PerPage, 11);
166
-
167
 $DB->set_query_id($Comments);
189
 $DB->set_query_id($Comments);
168
-if ($Action == 'requests') {
190
+
191
+# Remove the weird comment headings on torrent and request comments
192
+/*
193
+if ($Action === 'requests') {
169
   $RequestIDs = array_flip(array_flip($DB->collect('PageID')));
194
   $RequestIDs = array_flip(array_flip($DB->collect('PageID')));
170
   $Artists = [];
195
   $Artists = [];
196
+
171
   foreach ($RequestIDs as $RequestID) {
197
   foreach ($RequestIDs as $RequestID) {
172
     $Artists[$RequestID] = Requests::get_artists($RequestID);
198
     $Artists[$RequestID] = Requests::get_artists($RequestID);
173
   }
199
   }
174
   $DB->set_query_id($Comments);
200
   $DB->set_query_id($Comments);
175
-} elseif ($Action == 'torrents') {
201
+} elseif ($Action === 'torrents') {
176
   $GroupIDs = array_flip(array_flip($DB->collect('PageID')));
202
   $GroupIDs = array_flip(array_flip($DB->collect('PageID')));
177
   $Artists = Artists::get_artists($GroupIDs);
203
   $Artists = Artists::get_artists($GroupIDs);
178
   $DB->set_query_id($Comments);
204
   $DB->set_query_id($Comments);
179
 }
205
 }
206
+*/
207
+
208
+# Replace the "shifting" main links with regular static ones
209
+# There are already shifting supplemental links for each type
210
+$ActionLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '" class="brackets">Torrent comments</a>';
211
+$ActionLinks[] = '<a href="comments.php?action=collages' . $LinkID . '" class="brackets">Collections comments</a>';
212
+$ActionLinks[] = '<a href="comments.php?action=requests' . $LinkID . '" class="brackets">Request comments</a>';
213
+$ActionLinks[] = '<a href="comments.php?action=artist' . $LinkID . '" class="brackets">Artist comments</a>';
180
 
214
 
215
+/*
181
 $LinkID = (!$Self ? '&amp;id=' . $UserID : '');
216
 $LinkID = (!$Self ? '&amp;id=' . $UserID : '');
182
 $ActionLinks = $TypeLinks = [];
217
 $ActionLinks = $TypeLinks = [];
183
-if ($Action != 'artist') {
218
+if ($Action !== 'artist') {
184
   $ActionLinks[] = '<a href="comments.php?action=artist' . $LinkID . '" class="brackets">Artist comments</a>';
219
   $ActionLinks[] = '<a href="comments.php?action=artist' . $LinkID . '" class="brackets">Artist comments</a>';
185
 }
220
 }
186
-if ($Action != 'collages') {
221
+
222
+if ($Action !== 'collages') {
187
   $ActionLinks[] = '<a href="comments.php?action=collages' . $LinkID . '" class="brackets">Collections comments</a>';
223
   $ActionLinks[] = '<a href="comments.php?action=collages' . $LinkID . '" class="brackets">Collections comments</a>';
188
 }
224
 }
189
-if ($Action != 'requests') {
225
+
226
+if ($Action !== 'requests') {
190
   $ActionLinks[] = '<a href="comments.php?action=requests' . $LinkID . '" class="brackets">Request comments</a>';
227
   $ActionLinks[] = '<a href="comments.php?action=requests' . $LinkID . '" class="brackets">Request comments</a>';
191
 }
228
 }
192
-if ($Action != 'torrents') {
229
+
230
+if ($Action !== 'torrents') {
193
   $ActionLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '" class="brackets">Torrent comments</a>';
231
   $ActionLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '" class="brackets">Torrent comments</a>';
194
 }
232
 }
233
+*/
234
+
195
 switch ($Action) {
235
 switch ($Action) {
196
   case 'collages':
236
   case 'collages':
197
     $BaseLink = 'comments.php?action=collages' . $LinkID;
237
     $BaseLink = 'comments.php?action=collages' . $LinkID;
198
-    if ($Type != 'default') {
238
+    if ($Type !== 'default') {
199
       $TypeLinks[] = '<a href="' . $BaseLink . '" class="brackets">Display collage comments ' . ($Self ? 'you\'ve' : $Username . ' has') . ' made</a>';
239
       $TypeLinks[] = '<a href="' . $BaseLink . '" class="brackets">Display collage comments ' . ($Self ? 'you\'ve' : $Username . ' has') . ' made</a>';
200
     }
240
     }
201
-    if ($Type != 'created') {
241
+
242
+    if ($Type !== 'created') {
202
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=created" class="brackets">Display comments left on ' . ($Self ? 'your collections' : 'collections created by ' .$Username) . '</a>';
243
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=created" class="brackets">Display comments left on ' . ($Self ? 'your collections' : 'collections created by ' .$Username) . '</a>';
203
     }
244
     }
204
-    if ($Type != 'contributed') {
245
+
246
+    if ($Type !== 'contributed') {
205
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=contributed" class="brackets">Display comments left on collections ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to</a>';
247
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=contributed" class="brackets">Display comments left on collections ' . ($Self ? 'you\'ve' : $Username . ' has') . ' contributed to</a>';
206
     }
248
     }
207
     break;
249
     break;
250
+
208
   case 'requests':
251
   case 'requests':
209
     $BaseLink = 'comments.php?action=requests' . $LinkID;
252
     $BaseLink = 'comments.php?action=requests' . $LinkID;
210
-    if ($Type != 'default') {
253
+    if ($Type !== 'default') {
211
       $TypeLinks[] = '<a href="' . $BaseLink . '" class="brackets">Display request comments you\'ve made</a>';
254
       $TypeLinks[] = '<a href="' . $BaseLink . '" class="brackets">Display request comments you\'ve made</a>';
212
     }
255
     }
213
-    if ($Type != 'created') {
256
+
257
+    if ($Type !== 'created') {
214
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=created" class="brackets">Display comments left on your requests</a>';
258
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=created" class="brackets">Display comments left on your requests</a>';
215
     }
259
     }
216
-    if ($Type != 'voted') {
260
+
261
+    if ($Type !== 'voted') {
217
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=voted" class="brackets">Display comments left on requests you\'ve voted on</a>';
262
       $TypeLinks[] = '<a href="' . $BaseLink . '&amp;type=voted" class="brackets">Display comments left on requests you\'ve voted on</a>';
218
     }
263
     }
219
     break;
264
     break;
265
+
220
   case 'torrents':
266
   case 'torrents':
221
-    if ($Type != 'default') {
267
+    if ($Type !== 'default') {
222
       $TypeLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '" class="brackets">Display comments you have made</a>';
268
       $TypeLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '" class="brackets">Display comments you have made</a>';
223
     }
269
     }
224
-    if ($Type != 'uploaded') {
270
+
271
+    if ($Type !== 'uploaded') {
225
       $TypeLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '&amp;type=uploaded" class="brackets">Display comments left on your uploads</a>';
272
       $TypeLinks[] = '<a href="comments.php?action=torrents' . $LinkID . '&amp;type=uploaded" class="brackets">Display comments left on your uploads</a>';
226
     }
273
     }
227
     break;
274
     break;
250
       case 'artist':
297
       case 'artist':
251
         $Header = " on <a href=\"artist.php?id=$PageID\">$Name</a>";
298
         $Header = " on <a href=\"artist.php?id=$PageID\">$Name</a>";
252
         break;
299
         break;
300
+
253
       case 'collages':
301
       case 'collages':
254
         $Header = " on <a href=\"collages.php?id=$PageID\">$Name</a>";
302
         $Header = " on <a href=\"collages.php?id=$PageID\">$Name</a>";
255
         break;
303
         break;
304
+
256
       case 'requests':
305
       case 'requests':
257
         $Header = ' on ' . Artists::display_artists($Artists[$PageID]) . " <a href=\"requests.php?action=view&id=$PageID\">$Name</a>";
306
         $Header = ' on ' . Artists::display_artists($Artists[$PageID]) . " <a href=\"requests.php?action=view&id=$PageID\">$Name</a>";
258
         break;
307
         break;
308
+
259
       case 'torrents':
309
       case 'torrents':
260
         $Header = ' on ' . Artists::display_artists($Artists[$PageID]) . " <a href=\"torrents.php?id=$PageID\">$Name</a>";
310
         $Header = ' on ' . Artists::display_artists($Artists[$PageID]) . " <a href=\"torrents.php?id=$PageID\">$Name</a>";
261
         break;
311
         break;
263
     CommentsView::render_comment($AuthorID, $PostID, $Body, $AddedTime, $EditedUserID, $EditedTime, $Link, false, $Header, false);
313
     CommentsView::render_comment($AuthorID, $PostID, $Body, $AddedTime, $EditedUserID, $EditedTime, $Link, false, $Header, false);
264
   }
314
   }
265
 } else { ?>
315
 } else { ?>
266
-  <div class="center">No results.</div>
316
+  <h2 class="center">No results.</h2>
267
 <? } ?>
317
 <? } ?>
268
   <div class="linkbox">
318
   <div class="linkbox">
269
     <?=$Pages?>
319
     <?=$Pages?>
270
   </div>
320
   </div>
271
 </div>
321
 </div>
272
-<?
273
-View::show_footer();
322
+<? View::show_footer();

+ 11
- 2
sections/comments/index.php View File

1
 <?
1
 <?
2
+declare(strict_types=1);
3
+
2
 enforce_login();
4
 enforce_login();
3
 
5
 
4
 // fix old links
6
 // fix old links
5
-if ($_REQUEST['action'] == 'artists') {
7
+if ($_REQUEST['action'] === 'artists') {
6
   $_REQUEST['action'] = 'artist';
8
   $_REQUEST['action'] = 'artist';
7
-} elseif ($_REQUEST['action'] == 'my_torrents') {
9
+} elseif ($_REQUEST['action'] === 'my_torrents') {
8
   $_REQUEST['action'] = 'torrents';
10
   $_REQUEST['action'] = 'torrents';
9
   $_REQUEST['type'] = 'uploaded';
11
   $_REQUEST['type'] = 'uploaded';
10
 }
12
 }
18
   case 'take_post':
20
   case 'take_post':
19
     require SERVER_ROOT . '/sections/comments/take_post.php';
21
     require SERVER_ROOT . '/sections/comments/take_post.php';
20
     break;
22
     break;
23
+
21
   case 'take_edit':
24
   case 'take_edit':
22
     require SERVER_ROOT . '/sections/comments/take_edit.php';
25
     require SERVER_ROOT . '/sections/comments/take_edit.php';
23
     break;
26
     break;
27
+
24
   case 'take_delete':
28
   case 'take_delete':
25
     require SERVER_ROOT . '/sections/comments/take_delete.php';
29
     require SERVER_ROOT . '/sections/comments/take_delete.php';
26
     break;
30
     break;
31
+
27
   case 'warn':
32
   case 'warn':
28
     require SERVER_ROOT . '/sections/comments/warn.php';
33
     require SERVER_ROOT . '/sections/comments/warn.php';
29
     break;
34
     break;
35
+
30
   case 'take_warn':
36
   case 'take_warn':
31
     require SERVER_ROOT . '/sections/comments/take_warn.php';
37
     require SERVER_ROOT . '/sections/comments/take_warn.php';
32
     break;
38
     break;
39
+
33
   case 'get':
40
   case 'get':
34
     require SERVER_ROOT . '/sections/comments/get.php';
41
     require SERVER_ROOT . '/sections/comments/get.php';
35
     break;
42
     break;
43
+
36
   case 'jump':
44
   case 'jump':
37
     require SERVER_ROOT . '/sections/comments/jump.php';
45
     require SERVER_ROOT . '/sections/comments/jump.php';
38
     break;
46
     break;
47
+    
39
   case 'artist':
48
   case 'artist':
40
   case 'collages':
49
   case 'collages':
41
   case 'requests':
50
   case 'requests':

+ 2
- 2
sections/forums/newthread.php View File

103
       <input type="hidden" name="auth"
103
       <input type="hidden" name="auth"
104
         value="<?=$LoggedUser['AuthKey']?>" />
104
         value="<?=$LoggedUser['AuthKey']?>" />
105
       <input type="hidden" name="forum" value="<?=$ForumID?>" />
105
       <input type="hidden" name="forum" value="<?=$ForumID?>" />
106
-      <table id="newthreadtext" class="layout">
106
+      <table id="newthreadtext" class="layout new_thread">
107
         <tr>
107
         <tr>
108
           <td class="label">Title</td>
108
           <td class="label">Title</td>
109
           <td><input id="title" class="required" type="text" name="title" style="width: 98%;" /></td>
109
           <td><input id="title" class="required" type="text" name="title" style="width: 98%;" /></td>
196
       <div id="buttons" class="center">
196
       <div id="buttons" class="center">
197
         <input type="button" value="Preview" onclick="Newthread_Preview(1);" id="newthreadpreviewbutton" />
197
         <input type="button" value="Preview" onclick="Newthread_Preview(1);" id="newthreadpreviewbutton" />
198
         <input type="button" value="Editor" onclick="Newthread_Preview(0);" id="newthreadeditbutton" class="hidden" />
198
         <input type="button" value="Editor" onclick="Newthread_Preview(0);" id="newthreadeditbutton" class="hidden" />
199
-        <input type="submit" class="submit" id="submit_button" value="Create" />
199
+        <input type="submit" class="submit button-primary" id="submit_button" value="Create" />
200
       </div>
200
       </div>
201
     </form>
201
     </form>
202
   </div>
202
   </div>

+ 47
- 36
sections/friends/friends.php View File

1
 <?php
1
 <?php
2
 #declare(strict_types=1);
2
 #declare(strict_types=1);
3
 
3
 
4
-/************************************************************************
5
-//------------// Main friends page //----------------------------------//
6
-This page lists a user's friends.
4
+/**
5
+ * Main friends page
6
+ * 
7
+ * This page lists a user's friends.
8
+ * There's no real point in caching this page.
9
+ * I doubt users load it that much.
10
+ */
7
 
11
 
8
-There's no real point in caching this page. I doubt users load it that
9
-much.
10
-************************************************************************/
12
+$ENV = ENV::go();
11
 
13
 
12
 // Number of users per page
14
 // Number of users per page
13
 define('FRIENDS_PER_PAGE', '20');
15
 define('FRIENDS_PER_PAGE', '20');
14
-include_once(SERVER_ROOT.'/classes/paranoia.class.php');
15
-
16
-
16
+include_once "$ENV->SERVER_ROOT/classes/paranoia.class.php";
17
 
17
 
18
 View::show_header('Friends');
18
 View::show_header('Friends');
19
 
19
 
20
-
21
 $UserID = $LoggedUser['ID'];
20
 $UserID = $LoggedUser['ID'];
22
-
23
-
24
 list($Page, $Limit) = Format::page_limit(FRIENDS_PER_PAGE);
21
 list($Page, $Limit) = Format::page_limit(FRIENDS_PER_PAGE);
25
 
22
 
26
 // Main query
23
 // Main query
27
 $DB->query("
24
 $DB->query("
28
   SELECT
25
   SELECT
29
     SQL_CALC_FOUND_ROWS
26
     SQL_CALC_FOUND_ROWS
30
-    f.FriendID,
31
-    f.Comment,
32
-    m.Username,
33
-    m.Uploaded,
34
-    m.Downloaded,
35
-    m.PermissionID,
36
-    m.Paranoia,
37
-    m.LastAccess,
38
-    i.Avatar
39
-  FROM friends AS f
40
-    JOIN users_main AS m ON f.FriendID = m.ID
41
-    JOIN users_info AS i ON f.FriendID = i.UserID
42
-  WHERE f.UserID = '$UserID'
43
-  ORDER BY Username
27
+    f.`FriendID`,
28
+    f.`Comment`,
29
+    m.`Username`,
30
+    m.`Uploaded`,
31
+    m.`Downloaded`,
32
+    m.`PermissionID`,
33
+    m.`Paranoia`,
34
+    m.`LastAccess`,
35
+    i.`Avatar`
36
+  FROM `friends` AS f
37
+    JOIN `users_main` AS m ON f.`FriendID` = m.`ID`
38
+    JOIN `users_info` AS i ON f.`FriendID` = i.`UserID`
39
+  WHERE f.`UserID` = '$UserID'
40
+  ORDER BY `Username`
44
   LIMIT $Limit");
41
   LIMIT $Limit");
45
 $Friends = $DB->to_array(false, MYSQLI_BOTH, array(6, 'Paranoia'));
42
 $Friends = $DB->to_array(false, MYSQLI_BOTH, array(6, 'Paranoia'));
46
 
43
 
48
 $DB->query('SELECT FOUND_ROWS()');
45
 $DB->query('SELECT FOUND_ROWS()');
49
 list($Results) = $DB->next_record();
46
 list($Results) = $DB->next_record();
50
 
47
 
51
-// Start printing stuff
52
-?>
48
+// Start printing stuff ?>
49
+
53
 <div>
50
 <div>
54
   <div class="header">
51
   <div class="header">
55
     <h2>Friends List</h2>
52
     <h2>Friends List</h2>
56
   </div>
53
   </div>
54
+
57
   <div class="linkbox">
55
   <div class="linkbox">
58
     <?php
56
     <?php
59
 // Pagination
57
 // Pagination
60
 $Pages = Format::get_pages($Page, $Results, FRIENDS_PER_PAGE, 9);
58
 $Pages = Format::get_pages($Page, $Results, FRIENDS_PER_PAGE, 9);
61
-echo $Pages;
62
-?>
59
+echo $Pages; ?>
63
   </div>
60
   </div>
61
+
64
   <div class="box pad">
62
   <div class="box pad">
65
     <?php
63
     <?php
66
-if ($Results == 0) {
64
+if ($Results === 0) {
67
     echo '<p>You have no friends! :(</p>';
65
     echo '<p>You have no friends! :(</p>';
68
 }
66
 }
67
+
69
 // Start printing out friends
68
 // Start printing out friends
70
 foreach ($Friends as $Friend) {
69
 foreach ($Friends as $Friend) {
71
     list($FriendID, $Comment, $Username, $Uploaded, $Downloaded, $Class, $Paranoia, $LastAccess, $Avatar) = $Friend; ?>
70
     list($FriendID, $Comment, $Username, $Uploaded, $Downloaded, $Class, $Paranoia, $LastAccess, $Avatar) = $Friend; ?>
80
               &nbsp;Ratio: <strong><?=Format::get_ratio_html($Uploaded, $Downloaded)?></strong>
79
               &nbsp;Ratio: <strong><?=Format::get_ratio_html($Uploaded, $Downloaded)?></strong>
81
               <?php
80
               <?php
82
   }
81
   }
82
+
83
     if (check_paranoia('uploaded', $Paranoia, $Class, $FriendID)) {
83
     if (check_paranoia('uploaded', $Paranoia, $Class, $FriendID)) {
84
         ?>
84
         ?>
85
               &nbsp;Up: <strong><?=Format::get_size($Uploaded)?></strong>
85
               &nbsp;Up: <strong><?=Format::get_size($Uploaded)?></strong>
86
               <?php
86
               <?php
87
     }
87
     }
88
+
88
     if (check_paranoia('downloaded', $Paranoia, $Class, $FriendID)) {
89
     if (check_paranoia('downloaded', $Paranoia, $Class, $FriendID)) {
89
         ?>
90
         ?>
90
               &nbsp;Down: <strong><?=Format::get_size($Downloaded)?></strong>
91
               &nbsp;Down: <strong><?=Format::get_size($Downloaded)?></strong>
106
             <input type="hidden" name="friendid"
107
             <input type="hidden" name="friendid"
107
               value="<?=$FriendID?>" />
108
               value="<?=$FriendID?>" />
108
 
109
 
109
-            <textarea name="comment" rows="4"
110
-              cols="65"><?=$Comment?></textarea>
110
+            <textarea
111
+              name = "comment"
112
+              rows = "5"
113
+              cols = "50"
114
+              placeholder ="Your saved notes about this friend"
115
+              ><?=$Comment?></textarea>
111
           </td>
116
           </td>
112
           <td class="left" valign="top">
117
           <td class="left" valign="top">
113
-            <input type="submit" name="action" value="Update" /><br />
114
-            <input type="submit" name="action" value="Remove friend" /><br />
115
-            <input type="submit" name="action" value="Contact" /><br />
118
+          <p>
119
+            <input type="submit" name="action" value="Update" />
120
+            <input type="submit" name="action" value="Remove friend" />
121
+          </p>
122
+
123
+          <p>
124
+            <input type="submit" name="action" class="button-primary" value="Contact" />
125
+          </p>
126
+
116
           </td>
127
           </td>
117
         </tr>
128
         </tr>
118
       </table>
129
       </table>

+ 11
- 4
sections/login/login.php View File

39
   </aside>
39
   </aside>
40
   <?php } ?>
40
   <?php } ?>
41
 
41
 
42
-  <table>
42
+  <br />
43
+  <table class="login_form">
43
     <tr>
44
     <tr>
44
       <td colspan="2">
45
       <td colspan="2">
45
         <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="username"
46
         <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" name="username"
46
           id="username" class="inputtext" required="required" maxlength="20" pattern="[A-Za-z0-9_?]{1,20}"
47
           id="username" class="inputtext" required="required" maxlength="20" pattern="[A-Za-z0-9_?]{1,20}"
47
-          autofocus="autofocus" placeholder="Username" size="40" autocomplete="username" />
48
+          autofocus="autofocus" placeholder="Username" size="35" autocomplete="username" />
48
       </td>
49
       </td>
49
     </tr>
50
     </tr>
50
 
51
 
69
     </tr>
70
     </tr>
70
 
71
 
71
     <tr>
72
     <tr>
72
-      <td colspan="2">
73
-        <input type="submit" name="login" value="Log In" class="submit" />
73
+      <td colspan="4">
74
+        <input type="submit" name="login" value="Log In" class="submit button-primary" />
75
+
76
+        <?php if ($ENV->OPEN_REGISTRATION) { ?>
77
+          &ensp;
78
+          <a href="/register.php" class="button">Register</a>
79
+          <?php } ?>
74
       </td>
80
       </td>
81
+
75
     </tr>
82
     </tr>
76
   </table>
83
   </table>
77
 </form>
84
 </form>

+ 2
- 1
sections/register/step1.php View File

39
           <strong>Don't choose one associated with your real name.</strong>
39
           <strong>Don't choose one associated with your real name.</strong>
40
           If you do, we won't be changing it for you.
40
           If you do, we won't be changing it for you.
41
         </p>
41
         </p>
42
+        <br />
42
 
43
 
43
         <input type="text" name="username" id="username" class="inputtext" placeholder="Username"
44
         <input type="text" name="username" id="username" class="inputtext" placeholder="Username"
44
           value="<?=(!empty($_REQUEST['username']) ? display_str($_REQUEST['username']) : '')?>" />
45
           value="<?=(!empty($_REQUEST['username']) ? display_str($_REQUEST['username']) : '')?>" />
96
     </tr>
97
     </tr>
97
 
98
 
98
     <tr>
99
     <tr>
99
-      <td colspan="2" align="right"><input type="submit" name="submit" value="Submit" class="submit" /></td>
100
+      <td colspan="2" align="right"><input type="submit" name="submit" value="Submit" class="submit button-primary" /></td>
100
     </tr>
101
     </tr>
101
   </table>
102
   </table>
102
 </form>
103
 </form>

+ 12
- 11
sections/reportsv2/report.php View File

1
 <?php
1
 <?php
2
 #declare(strict_types=1);
2
 #declare(strict_types=1);
3
 
3
 
4
-/*
4
+/**
5
  * This is the frontend of reporting a torrent, it's what users see when
5
  * This is the frontend of reporting a torrent, it's what users see when
6
  * they visit reportsv2.php?id=xxx
6
  * they visit reportsv2.php?id=xxx
7
  */
7
  */
8
 
8
 
9
-include(SERVER_ROOT.'/sections/torrents/functions.php');
9
+$ENV = ENV::go();
10
+
11
+require_once "$ENV->SERVER_ROOT/sections/torrents/functions.php";
10
 
12
 
11
 // If we're not coming from torrents.php, check we're being returned because of an error.
13
 // If we're not coming from torrents.php, check we're being returned because of an error.
12
 if (!isset($_GET['id']) || !is_number($_GET['id'])) {
14
 if (!isset($_GET['id']) || !is_number($_GET['id'])) {
16
 } else {
18
 } else {
17
     $TorrentID = $_GET['id'];
19
     $TorrentID = $_GET['id'];
18
     $DB->query("
20
     $DB->query("
19
-    SELECT tg.CategoryID, t.GroupID, u.Username
20
-    FROM torrents_group AS tg
21
-      LEFT JOIN torrents AS t ON t.GroupID = tg.ID
22
-      LEFT JOIN users_main AS u ON t.UserID = u.ID
23
-    WHERE t.ID = " . $_GET['id']);
21
+    SELECT tg.`category_id`, t.`GroupID`, u.`Username`
22
+    FROM `torrents_group` AS tg
23
+      LEFT JOIN `torrents` AS t ON t.`GroupID` = tg.`id`
24
+      LEFT JOIN `users_main` AS u ON t.`UserID` = u.`ID`
25
+    WHERE t.`ID` = " . $_GET['id']);
24
     list($CategoryID, $GroupID, $Username) = $DB->next_record();
26
     list($CategoryID, $GroupID, $Username) = $DB->next_record();
25
     $Artists = Artists::get_artist($GroupID);
27
     $Artists = Artists::get_artist($GroupID);
26
     $TorrentCache = get_group_info($GroupID, true);
28
     $TorrentCache = get_group_info($GroupID, true);
137
 
139
 
138
       <div id="dynamic_form">
140
       <div id="dynamic_form">
139
 <?php
141
 <?php
140
-        /*
142
+        /**
141
          * THIS IS WHERE SEXY AJAX COMES IN
143
          * THIS IS WHERE SEXY AJAX COMES IN
142
          * The following malarky is needed so that if you get sent back here, the fields are filled in.
144
          * The following malarky is needed so that if you get sent back here, the fields are filled in.
143
          */
145
          */
149
         <input id="extra" type="hidden" name="extra" value="<?=(!empty($_POST['extra']) ? display_str($_POST['extra']) : '')?>" />
151
         <input id="extra" type="hidden" name="extra" value="<?=(!empty($_POST['extra']) ? display_str($_POST['extra']) : '')?>" />
150
       </div>
152
       </div>
151
     </div>
153
     </div>
152
-  <input type="submit" value="Report" />
154
+  <input type="submit" class="button-primary" value="Report" />
153
   </form>
155
   </form>
154
 </div>
156
 </div>
155
-<?php
156
-View::show_footer();
157
+<?php View::show_footer();

+ 3
- 4
sections/reportsv2/takereport.php View File

1
 <?
1
 <?
2
-/*
2
+
3
+/**
3
  * This page handles the backend from when a user submits a report.
4
  * This page handles the backend from when a user submits a report.
4
  * It checks for (in order):
5
  * It checks for (in order):
5
  * 1. The usual POST injections, then checks that things.
6
  * 1. The usual POST injections, then checks that things.
56
   } else {
57
   } else {
57
     $Err = 'The permalink was incorrect. It should look like '.site_url().'torrents.php?torrentid=12345';
58
     $Err = 'The permalink was incorrect. It should look like '.site_url().'torrents.php?torrentid=12345';
58
   }
59
   }
59
-} else {
60
-  $ExtraIDs = '';
61
 }
60
 }
62
 
61
 
63
 if (!empty($_POST['link'])) {
62
 if (!empty($_POST['link'])) {
108
 list($GroupID) = $DB->next_record();
107
 list($GroupID) = $DB->next_record();
109
 
108
 
110
 if (!empty($Err)) {
109
 if (!empty($Err)) {
111
-  error($Err);
110
+  error($Error = $Err, $Debug = false);
112
   include(SERVER_ROOT.'/sections/reportsv2/report.php');
111
   include(SERVER_ROOT.'/sections/reportsv2/report.php');
113
   error();
112
   error();
114
 }
113
 }

+ 5
- 5
sections/requests/request.php View File

244
     <div class="box">
244
     <div class="box">
245
       <div class="head"><strong>Info</strong></div>
245
       <div class="head"><strong>Info</strong></div>
246
       <div class="pad">
246
       <div class="pad">
247
-        <table class="layout">
247
+        <table class="layout request_form">
248
           <tr>
248
           <tr>
249
             <td class="label">Created</td>
249
             <td class="label">Created</td>
250
             <td>
250
             <td>
318
           <tr id="voting">
318
           <tr id="voting">
319
             <td class="label">Custom Vote</td>
319
             <td class="label">Custom Vote</td>
320
             <td>
320
             <td>
321
-              These units are in base 2, not base 10, e.g., there are 1,024 MiB in 1 GiB
321
+              These units are in base 2, not base 10, e.g., there are 1,024 MiB in 1 GiB.
322
+              <strong>The system deducts <?= ($RequestTax * 100) ?>% as tax.</strong>
323
+              <br />
324
+
322
               <input type="text" id="amount_box" size="8" onchange="Calculate();" />
325
               <input type="text" id="amount_box" size="8" onchange="Calculate();" />
323
               <select id="unit" name="unit" onchange="Calculate();">
326
               <select id="unit" name="unit" onchange="Calculate();">
324
                 <option value="mb">MiB</option>
327
                 <option value="mb">MiB</option>
325
                 <option value="gb">GiB</option>
328
                 <option value="gb">GiB</option>
326
               </select>
329
               </select>
327
               <input type="button" value="Preview" onclick="Calculate();" />
330
               <input type="button" value="Preview" onclick="Calculate();" />
328
-              <strong>The system deducts <?= ($RequestTax * 100) ?>%
329
-                as tax</strong>
330
-
331
             </td>
331
             </td>
332
           </tr>
332
           </tr>
333
           <tr>
333
           <tr>

+ 1
- 1
sections/rules/clients.php View File

34
   </p>
34
   </p>
35
   <br />
35
   <br />
36
 
36
 
37
-  <table>
37
+  <table class="clients_table">
38
     <tr class="colhead">
38
     <tr class="colhead">
39
       <td>
39
       <td>
40
         <strong>Allowed Clients</strong>
40
         <strong>Allowed Clients</strong>

+ 9
- 9
sections/tools/tools.php View File

53
   if ($ToolsHTML) {
53
   if ($ToolsHTML) {
54
       ?>
54
       ?>
55
     <div class="permission_subcontainer">
55
     <div class="permission_subcontainer">
56
-      <table class="layout">
56
+      <table class="layout admin_tools">
57
         <tr class="colhead">
57
         <tr class="colhead">
58
           <td>Administration</td>
58
           <td>Administration</td>
59
         </tr>
59
         </tr>
72
   if ($ToolsHTML) {
72
   if ($ToolsHTML) {
73
       ?>
73
       ?>
74
     <div class="permission_subcontainer">
74
     <div class="permission_subcontainer">
75
-      <table class="layout">
75
+      <table class="layout admin_tools">
76
         <tr class="colhead">
76
         <tr class="colhead">
77
           <td>Announcements</td>
77
           <td>Announcements</td>
78
         </tr>
78
         </tr>
89
   if ($ToolsHTML) {
89
   if ($ToolsHTML) {
90
       ?>
90
       ?>
91
     <div class="permission_subcontainer">
91
     <div class="permission_subcontainer">
92
-      <table class="layout">
92
+      <table class="layout admin_tools">
93
         <tr class="colhead">
93
         <tr class="colhead">
94
           <td>Community</td>
94
           <td>Community</td>
95
         </tr>
95
         </tr>
107
   if ($ToolsHTML) {
107
   if ($ToolsHTML) {
108
       ?>
108
       ?>
109
     <div class="permission_subcontainer">
109
     <div class="permission_subcontainer">
110
-      <table class="layout">
110
+      <table class="layout admin_tools">
111
         <tr class="colhead">
111
         <tr class="colhead">
112
           <td>Finances</td>
112
           <td>Finances</td>
113
         </tr>
113
         </tr>
130
   if ($ToolsHTML) {
130
   if ($ToolsHTML) {
131
       ?>
131
       ?>
132
     <div class="permission_subcontainer">
132
     <div class="permission_subcontainer">
133
-      <table class="layout">
133
+      <table class="layout admin_tools">
134
         <tr class="colhead">
134
         <tr class="colhead">
135
           <td>Queue</td>
135
           <td>Queue</td>
136
         </tr>
136
         </tr>
149
   if ($ToolsHTML) {
149
   if ($ToolsHTML) {
150
       ?>
150
       ?>
151
     <div class="permission_subcontainer">
151
     <div class="permission_subcontainer">
152
-      <table class="layout">
152
+      <table class="layout admin_tools">
153
         <tr class="colhead">
153
         <tr class="colhead">
154
           <td>Managers</td>
154
           <td>Managers</td>
155
         </tr>
155
         </tr>
171
   if ($ToolsHTML) {
171
   if ($ToolsHTML) {
172
       ?>
172
       ?>
173
     <div class="permission_subcontainer">
173
     <div class="permission_subcontainer">
174
-      <table class="layout">
174
+      <table class="layout admin_tools">
175
         <tr class="colhead">
175
         <tr class="colhead">
176
           <td>Development</td>
176
           <td>Development</td>
177
         </tr>
177
         </tr>
200
   if ($ToolsHTML) {
200
   if ($ToolsHTML) {
201
       ?>
201
       ?>
202
     <div class="permission_subcontainer">
202
     <div class="permission_subcontainer">
203
-      <table class="layout">
203
+      <table class="layout admin_tools">
204
         <tr class="colhead">
204
         <tr class="colhead">
205
           <td>Site Information</td>
205
           <td>Site Information</td>
206
         </tr>
206
         </tr>
224
   if ($ToolsHTML) {
224
   if ($ToolsHTML) {
225
       ?>
225
       ?>
226
     <div class="permission_subcontainer">
226
     <div class="permission_subcontainer">
227
-      <table class="layout">
227
+      <table class="layout admin_tools">
228
         <tr class="colhead">
228
         <tr class="colhead">
229
           <td>Torrents</td>
229
           <td>Torrents</td>
230
         </tr>
230
         </tr>

+ 1
- 1
sections/top10/donors.php View File

65
     </small>
65
     </small>
66
   </h3>
66
   </h3>
67
 
67
 
68
-  <table class="border">
68
+  <table class="border top10_table">
69
     <tr class="colhead">
69
     <tr class="colhead">
70
       <td class="center">Position</td>
70
       <td class="center">Position</td>
71
       <td>User</td>
71
       <td>User</td>

+ 1
- 1
sections/top10/tags.php View File

108
     </small>
108
     </small>
109
   </h3>
109
   </h3>
110
 
110
 
111
-  <table class="border">
111
+  <table class="border top10_table">
112
     <tr class="colhead">
112
     <tr class="colhead">
113
       <td class="center">Rank</td>
113
       <td class="center">Rank</td>
114
       <td>Tag</td>
114
       <td>Tag</td>

+ 1
- 1
sections/top10/users.php View File

130
       <?php } ?>
130
       <?php } ?>
131
     </small>
131
     </small>
132
   </h3>
132
   </h3>
133
-  <table class="border">
133
+  <table class="border top10_table">
134
     <tr class="colhead">
134
     <tr class="colhead">
135
       <td class="center">Rank</td>
135
       <td class="center">Rank</td>
136
       <td>User</td>
136
       <td>User</td>

+ 2
- 2
sections/torrents/details.php View File

322
             value="<?=$GroupID?>" />
322
             value="<?=$GroupID?>" />
323
           <input type="text" id="artist" name="artistname[]" <?php Users::has_autocomplete_enabled('other'); ?>
323
           <input type="text" id="artist" name="artistname[]" <?php Users::has_autocomplete_enabled('other'); ?>
324
           />
324
           />
325
-          <input type="submit" value="Add" />
325
+          <input type="submit" class="button-primary" value="Add" />
326
         </form>
326
         </form>
327
       </div>
327
       </div>
328
     </div>
328
     </div>
396
             value="<?=$GroupID?>" />
396
             value="<?=$GroupID?>" />
397
           <input type="text" name="tagname" id="tagname" <?php Users::has_autocomplete_enabled('other'); ?>
397
           <input type="text" name="tagname" id="tagname" <?php Users::has_autocomplete_enabled('other'); ?>
398
           />
398
           />
399
-          <input type="submit" value="Add" />
399
+          <input type="submit" class="button-primary" value="Add" />
400
         </form>
400
         </form>
401
         <br />
401
         <br />
402
         <strong><a href="rules.php?p=tag" class="brackets">View tagging rules</a></strong>
402
         <strong><a href="rules.php?p=tag" class="brackets">View tagging rules</a></strong>

+ 2
- 2
sections/upload/index.php View File

3
 
3
 
4
 enforce_login();
4
 enforce_login();
5
 if (!check_perms('site_upload')) {
5
 if (!check_perms('site_upload')) {
6
-    error(403);
6
+    error('Please read the site wiki for information on how to become a Member and gain upload privileges.', $Debug = false);
7
 }
7
 }
8
 
8
 
9
 if ($LoggedUser['DisableUpload']) {
9
 if ($LoggedUser['DisableUpload']) {
10
-    error('Your upload privileges have been revoked.');
10
+    error('Your upload privileges have been revoked.', $Debug = false);
11
 }
11
 }
12
 
12
 
13
 // Build the page
13
 // Build the page

+ 2
- 2
sections/user/user.php View File

1514
       <?php } ?>
1514
       <?php } ?>
1515
     </table>
1515
     </table>
1516
     <?php if (check_perms('users_disable_any')) { ?>
1516
     <?php if (check_perms('users_disable_any')) { ?>
1517
-    <table class="layout box">
1517
+    <table class="layout box" id="user_lock_account">
1518
       <tr class="colhead">
1518
       <tr class="colhead">
1519
         <td colspan="2">
1519
         <td colspan="2">
1520
           Lock Account
1520
           Lock Account
1703
 
1703
 
1704
       <tr>
1704
       <tr>
1705
         <td align="right" colspan="2">
1705
         <td align="right" colspan="2">
1706
-          <input type="submit" value="Save changes" />
1706
+          <input type="submit" class="button-primary" value="Save changes" />
1707
         </td>
1707
         </td>
1708
       </tr>
1708
       </tr>
1709
     </table>
1709
     </table>

+ 59
- 55
sections/userhistory/subscriptions.php View File

1
 <?php
1
 <?php
2
 #declare(strict_types=1);
2
 #declare(strict_types=1);
3
 
3
 
4
-/*
4
+/**
5
  * User subscription page
5
  * User subscription page
6
  */
6
  */
7
 
7
 
38
 $DB->query("
38
 $DB->query("
39
   (SELECT
39
   (SELECT
40
     SQL_CALC_FOUND_ROWS
40
     SQL_CALC_FOUND_ROWS
41
-    s.Page,
42
-    s.PageID,
43
-    lr.PostID,
41
+    s.`Page`,
42
+    s.`PageID`,
43
+    lr.`PostID`,
44
     null AS ForumID,
44
     null AS ForumID,
45
     null AS ForumName,
45
     null AS ForumName,
46
-    IF(s.Page = 'artist', a.Name, co.Name) AS Name,
47
-    c.ID AS LastPost,
48
-    c.AddedTime AS LastPostTime,
49
-    c_lr.Body AS LastReadBody,
50
-    c_lr.EditedTime AS LastReadEditedTime,
51
-    um.ID AS LastReadUserID,
52
-    um.Username AS LastReadUsername,
53
-    ui.Avatar AS LastReadAvatar,
54
-    c_lr.EditedUserID AS LastReadEditedUserID
55
-  FROM users_subscriptions_comments AS s
56
-    LEFT JOIN users_comments_last_read AS lr ON lr.UserID = $LoggedUser[ID] AND lr.Page = s.Page AND lr.PageID = s.PageID
57
-    LEFT JOIN artists_group AS a ON s.Page = 'artist' AND a.ArtistID = s.PageID
58
-    LEFT JOIN collages AS co ON s.Page = 'collages' AND co.ID = s.PageID
59
-    LEFT JOIN comments AS c ON c.ID = (
60
-          SELECT MAX(ID)
61
-          FROM comments
62
-          WHERE Page = s.Page
63
-            AND PageID = s.PageID
46
+    IF(s.`Page` = 'artist', a.`Name`, co.`Name`) AS Name,
47
+    c.`ID` AS LastPost,
48
+    c.`AddedTime` AS LastPostTime,
49
+    c_lr.`Body` AS LastReadBody,
50
+    c_lr.`EditedTime` AS LastReadEditedTime,
51
+    um.`ID` AS LastReadUserID,
52
+    um.`Username` AS LastReadUsername,
53
+    ui.`Avatar` AS LastReadAvatar,
54
+    c_lr.`EditedUserID` AS LastReadEditedUserID
55
+  FROM `users_subscriptions_comments` AS s
56
+    LEFT JOIN `users_comments_last_read` AS lr ON lr.`UserID` = $LoggedUser[ID] AND lr.`Page` = s.`Page` AND lr.`PageID` = s.`PageID`
57
+    LEFT JOIN `artists_group` AS a ON s.`Page` = 'artist' AND a.`ArtistID` = s.`PageID`
58
+    LEFT JOIN `collages` AS co ON s.`Page` = 'collages' AND co.`ID` = s.`PageID`
59
+    LEFT JOIN `comments` AS c ON c.`ID` = (
60
+          SELECT MAX(`ID`)
61
+          FROM `comments`
62
+          WHERE `Page` = s.`Page`
63
+            AND `PageID` = s.`PageID`
64
         )
64
         )
65
-    LEFT JOIN comments AS c_lr ON c_lr.ID = lr.PostID
66
-    LEFT JOIN users_main AS um ON um.ID = c_lr.AuthorID
67
-    LEFT JOIN users_info AS ui ON ui.UserID = um.ID
68
-  WHERE s.UserID = $LoggedUser[ID] AND s.Page IN ('artist', 'collages', 'requests', 'torrents') AND (s.Page != 'collages' OR co.Deleted = '0')" . ($ShowUnread ? ' AND c.ID > IF(lr.PostID IS NULL, 0, lr.PostID)' : '') . "
69
-  GROUP BY s.PageID)
65
+    LEFT JOIN `comments` AS c_lr ON c_lr.`ID` = lr.`PostID`
66
+    LEFT JOIN `users_main` AS um ON um.`ID` = c_lr.`AuthorID`
67
+    LEFT JOIN `users_info` AS ui ON ui.`UserID` = um.`ID`
68
+  WHERE s.`UserID` = $LoggedUser[ID] AND s.`Page` IN ('artist', 'collages', 'requests', 'torrents') AND (s.`Page` != 'collages' OR co.`Deleted` = '0')" . ($ShowUnread ? ' AND c.`ID` > IF(lr.`PostID` IS NULL, 0, lr.`PostID`)' : '') . "
69
+  GROUP BY s.`PageID`)
70
   UNION ALL
70
   UNION ALL
71
-  (SELECT 'forums', s.TopicID, lr.PostID, f.ID, f.Name, t.Title, p.ID, p.AddedTime, p_lr.Body, p_lr.EditedTime, um.ID, um.Username, ui.Avatar, p_lr.EditedUserID
72
-  FROM users_subscriptions AS s
73
-    LEFT JOIN forums_last_read_topics AS lr ON lr.UserID = $LoggedUser[ID] AND s.TopicID = lr.TopicID
74
-    LEFT JOIN forums_topics AS t ON t.ID = s.TopicID
75
-    LEFT JOIN forums AS f ON f.ID = t.ForumID
76
-    LEFT JOIN forums_posts AS p ON p.ID = (
77
-          SELECT MAX(ID)
78
-          FROM forums_posts
79
-          WHERE TopicID = s.TopicID
71
+  (SELECT 'forums', s.`TopicID`, lr.`PostID`, f.`ID`, f.`Name`, t.`Title`, p.`ID`, p.`AddedTime`, p_lr.`Body`, p_lr.`EditedTime`, um.`ID`, um.`Username`, ui.`Avatar`, p_lr.`EditedUserID`
72
+  FROM `users_subscriptions` AS s
73
+    LEFT JOIN `forums_last_read_topics` AS lr ON lr.`UserID` = $LoggedUser[ID] AND s.`TopicID` = lr.`TopicID`
74
+    LEFT JOIN `forums_topics` AS t ON t.`ID` = s.`TopicID`
75
+    LEFT JOIN `forums` AS f ON f.`ID` = t.`ForumID`
76
+    LEFT JOIN `forums_posts` AS p ON p.`ID` = (
77
+          SELECT MAX(`ID`)
78
+          FROM `forums_posts`
79
+          WHERE `TopicID` = s.`TopicID`
80
         )
80
         )
81
-    LEFT JOIN forums_posts AS p_lr ON p_lr.ID = lr.PostID
82
-    LEFT JOIN users_main AS um ON um.ID = p_lr.AuthorID
83
-    LEFT JOIN users_info AS ui ON ui.UserID = um.ID
84
-  WHERE s.UserID = $LoggedUser[ID]" .
85
-    ($ShowUnread ? " AND p.ID > IF(t.IsLocked = '1' AND t.IsSticky = '0'" . ", p.ID, IF(lr.PostID IS NULL, 0, lr.PostID))" : '') .
81
+    LEFT JOIN `forums_posts` AS p_lr ON p_lr.`ID` = lr.`PostID`
82
+    LEFT JOIN `users_main` AS um ON um.`ID` = p_lr.`AuthorID`
83
+    LEFT JOIN `users_info` AS ui ON ui.`UserID` = um.`ID`
84
+  WHERE s.`UserID` = $LoggedUser[ID]" .
85
+    ($ShowUnread ? " AND p.`ID` > IF(t.`IsLocked` = '1' AND t.`IsSticky` = '0'" . ", p.`ID`, IF(lr.`PostID` IS NULL, 0, lr.`PostID`))" : '') .
86
     ' AND ' . Forums::user_forums_sql() . "
86
     ' AND ' . Forums::user_forums_sql() . "
87
-  GROUP BY t.ID)
88
-  ORDER BY LastPostTime DESC
87
+  GROUP BY t.`ID`)
88
+  ORDER BY `LastPostTime` DESC
89
   LIMIT $Limit");
89
   LIMIT $Limit");
90
 
90
 
91
 $Results = $DB->to_array(false, MYSQLI_ASSOC, false);
91
 $Results = $DB->to_array(false, MYSQLI_ASSOC, false);
162
         $Links = 'Artist: <a href="artist.php?id=' . $Result['PageID'] . '">' . display_str($Result['Name']) . '</a>';
162
         $Links = 'Artist: <a href="artist.php?id=' . $Result['PageID'] . '">' . display_str($Result['Name']) . '</a>';
163
         $JumpLink = 'artist.php?id=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
163
         $JumpLink = 'artist.php?id=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
164
         break;
164
         break;
165
+
166
+
165
       case 'collages':
167
       case 'collages':
166
         $Links = 'Collage: <a href="collages.php?id=' . $Result['PageID'] . '">' . display_str($Result['Name']) . '</a>';
168
         $Links = 'Collage: <a href="collages.php?id=' . $Result['PageID'] . '">' . display_str($Result['Name']) . '</a>';
167
         $JumpLink = 'collages.php?action=comments&collageid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
169
         $JumpLink = 'collages.php?action=comments&collageid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
168
         break;
170
         break;
171
+
172
+
169
       case 'requests':
173
       case 'requests':
170
         if (!isset($Requests[$Result['PageID']])) {
174
         if (!isset($Requests[$Result['PageID']])) {
171
             continue;
175
             continue;
172
         }
176
         }
177
+
173
         $Request = $Requests[$Result['PageID']];
178
         $Request = $Requests[$Result['PageID']];
174
         $CategoryName = $Categories[$CategoryID - 1];
179
         $CategoryName = $Categories[$CategoryID - 1];
175
 
180
 
176
         $Links = 'Request: ';
181
         $Links = 'Request: ';
177
-        /*
178
-        if ($CategoryName == 'Music' || $CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
179
-            $Links .= ($CategoryName == 'Music' ? Artists::display_artists(Requests::get_artists($Result['PageID'])) : '') . '<a href="requests.php?action=view&amp;id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
180
-        } else {
181
-          */
182
             $Links .= '<a href="requests.php?action=view&amp;id=' . $Result['PageID'] . '">' . $Request['Title'] . "</a>";
182
             $Links .= '<a href="requests.php?action=view&amp;id=' . $Result['PageID'] . '">' . $Request['Title'] . "</a>";
183
-        #} # else
184
         $JumpLink = 'requests.php?action=view&amp;id=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
183
         $JumpLink = 'requests.php?action=view&amp;id=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
185
         break;
184
         break;
185
+
186
+
186
       case 'torrents':
187
       case 'torrents':
187
         if (!isset($TorrentGroups[$Result['PageID']])) {
188
         if (!isset($TorrentGroups[$Result['PageID']])) {
188
             continue;
189
             continue;
189
         }
190
         }
191
+
190
         $GroupInfo = $TorrentGroups[$Result['PageID']];
192
         $GroupInfo = $TorrentGroups[$Result['PageID']];
191
-        $Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['ID'] . '" dir="ltr">' . $GroupInfo['Name'] . '</a>';
192
-        if ($GroupInfo['Year'] > 0) {
193
-            $Links .= " [" . $GroupInfo['Year'] . "]";
194
-        }
195
-        if ($GroupInfo['ReleaseType'] > 0) {
196
-            $Links .= " [" . $ReleaseTypes[$GroupInfo['ReleaseType']] . "]";
193
+        $Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['id'] . '" dir="ltr">' . $GroupInfo['title'] . '</a>';
194
+       
195
+        if ($GroupInfo['year'] > 0) {
196
+            $Links .= " [" . $GroupInfo['year'] . "]";
197
         }
197
         }
198
+
198
         $JumpLink = 'torrents.php?id=' . $GroupInfo['ID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
199
         $JumpLink = 'torrents.php?id=' . $GroupInfo['ID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
199
         break;
200
         break;
201
+
202
+
200
       case 'forums':
203
       case 'forums':
201
         $Links = 'Forums: <a href="forums.php?action=viewforum&amp;forumid=' . $Result['ForumID'] . '">' . display_str($Result['ForumName']) . '</a> &gt; ' .
204
         $Links = 'Forums: <a href="forums.php?action=viewforum&amp;forumid=' . $Result['ForumID'] . '">' . display_str($Result['ForumName']) . '</a> &gt; ' .
202
           '<a href="forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] .
205
           '<a href="forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] .
205
           '</a>';
208
           '</a>';
206
         $JumpLink = 'forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
209
         $JumpLink = 'forums.php?action=viewthread&amp;threadid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
207
         break;
210
         break;
211
+
208
       default:
212
       default:
209
         error(0);
213
         error(0);
210
     } ?>
214
     } ?>

+ 1
- 1
sections/wiki/article.php View File

83
         <form class="search_form" name="articles" action="wiki.php" method="get">
83
         <form class="search_form" name="articles" action="wiki.php" method="get">
84
           <input type="hidden" name="action" value="search" />
84
           <input type="hidden" name="action" value="search" />
85
           <input type="search" placeholder="Search articles" name="search" size="20" />
85
           <input type="search" placeholder="Search articles" name="search" size="20" />
86
-          <input value="Search" type="submit" class="hidden" />
86
+          <input value="Search" type="submit" class="hidden button-primary" />
87
         </form>
87
         </form>
88
 
88
 
89
         <br style="line-height: 10px;" />
89
         <br style="line-height: 10px;" />

BIN
static/common/logos/torrents.bio.png View File


+ 0
- 23
static/functions/vendor/biojs/cytoscape.js
File diff suppressed because it is too large
View File


+ 0
- 1335
static/functions/vendor/biojs/ntseq.js
File diff suppressed because it is too large
View File


+ 7
- 0
static/styles/bookish/scss/colors.scss View File

17
 $lb800: #0277bd;
17
 $lb800: #0277bd;
18
 $lb900: #01579b;
18
 $lb900: #01579b;
19
 
19
 
20
+/* Skeleton CSS */
21
+$SkeletonDefault: #33c3f0;
22
+$SkeletonFocus: #1eaedb;
23
+$SkeletonHalfdark: scale-color($SkeletonFocus, $lightness: -50%);
24
+
20
 /* The shadow under floating elements */
25
 /* The shadow under floating elements */
21
 $shadow: 2px 2px 10px -2px slategray;
26
 $shadow: 2px 2px 10px -2px slategray;
22
 
27
 
25
  */
30
  */
26
 
31
 
27
 /* Alternating tables */
32
 /* Alternating tables */
33
+/*
28
 #request_table .request:nth-of-type(even) {
34
 #request_table .request:nth-of-type(even) {
29
     background: white;
35
     background: white;
30
 }
36
 }
32
 #request_table .request:nth-of-type(odd) {
38
 #request_table .request:nth-of-type(odd) {
33
     background: whitesmoke;
39
     background: whitesmoke;
34
 }
40
 }
41
+*/
35
 
42
 
36
 /**
43
 /**
37
  * RGB color intensity border
44
  * RGB color intensity border

+ 3
- 2
static/styles/bookish/scss/fonts.scss View File

42
 }
42
 }
43
 
43
 
44
 a:hover {
44
 a:hover {
45
-    color: $lb900;
45
+    color: $SkeletonFocus;
46
+    /* color: $lb900; */
46
     text-decoration: none;
47
     text-decoration: none;
47
 }
48
 }
48
 
49
 
102
 }
103
 }
103
 
104
 
104
 ul {
105
 ul {
105
-    margin-left: 1rem;
106
+    margin-left: 0.5rem;
106
 }
107
 }
107
 
108
 
108
 /* Markdown Extra new features */
109
 /* Markdown Extra new features */

+ 18
- 20
static/styles/bookish/scss/layout.scss View File

26
 
26
 
27
 /* Logo */
27
 /* Logo */
28
 #logo {
28
 #logo {
29
-    background: url("/static/common/logos/bookish.png") no-repeat center;
29
+    background: url("/static/common/logos/torrents.bio.png") no-repeat center;
30
     background-size: contain;
30
     background-size: contain;
31
     width: 250px;
31
     width: 250px;
32
     height: 50px;
32
     height: 50px;
33
-    margin: 0 0 0 10%;
33
+    margin: 0.5rem 0 0.25rem 10%;
34
 
34
 
35
     a {
35
     a {
36
         border: none;
36
         border: none;
44
     }
44
     }
45
 }
45
 }
46
 
46
 
47
-/* Content container */
48
-.box {
49
-    background-color: white;
50
-    /* border: 2px solid rgba(0, 0, 0, 0.01); */
51
-    margin: auto;
52
-    margin-bottom: 1rem;
53
-    width: 100%;
54
-}
55
-
56
 /* Main column and sidebar */
47
 /* Main column and sidebar */
57
 @mixin column-flex($width) {
48
 @mixin column-flex($width) {
58
     display: flex;
49
     display: flex;
76
     float: right;
67
     float: right;
77
 }
68
 }
78
 
69
 
70
+/* Box: soon to be <section> */
71
+.box {
72
+    margin-bottom: 1rem;
73
+}
74
+
79
 /* Links */
75
 /* Links */
80
 div.linkbox {
76
 div.linkbox {
81
     text-align: center;
77
     text-align: center;
96
     margin-top: 1rem;
92
     margin-top: 1rem;
97
 }
93
 }
98
 
94
 
99
-/* Torrents page */
95
+/**
96
+ * Torrents page
97
+ */
98
+
100
 .show_torrents {
99
 .show_torrents {
101
     width: 21px;
100
     width: 21px;
102
     height: 28px;
101
     height: 28px;
143
     text-align: center;
142
     text-align: center;
144
 }
143
 }
145
 
144
 
146
-.torrent_table,
147
-.torrent_table td {
148
-    border: none;
149
-}
145
+/**
146
+ * Text elements
147
+ */
150
 
148
 
151
-/* Text elements */
152
 p {
149
 p {
153
-    margin: 1em 0.5rem;
150
+    margin-bottom: 1rem;
154
 }
151
 }
155
 
152
 
156
 li {
153
 li {
157
-    margin: 0.5em 2rem;
154
+    margin: 0 1rem;
158
 }
155
 }
159
 
156
 
160
 .torrent_title {
157
 .torrent_title {
241
 
238
 
242
 .center_poll {
239
 .center_poll {
243
     height: 0.75rem;
240
     height: 0.75rem;
244
-    background: $lb50;
241
+    background: $SkeletonDefault;
242
+    /* background: $lb50; */
245
     border-radius: 0;
243
     border-radius: 0;
246
     float: left;
244
     float: left;
247
     margin: 0.25rem 0;
245
     margin: 0.25rem 0;

+ 11
- 10
static/styles/bookish/scss/menus.scss View File

3
  */
3
  */
4
 
4
 
5
 #menu {
5
 #menu {
6
-    background-color: $lb900;
6
+    background-color: $SkeletonHalfdark;
7
+    /* background-color: $lb900; */
7
     font-size: 1rem;
8
     font-size: 1rem;
8
     text-align: center;
9
     text-align: center;
9
     width: 100%;
10
     width: 100%;
36
     max-width: 2.5rem;
37
     max-width: 2.5rem;
37
 }
38
 }
38
 
39
 
39
-#menu ul li a.active {
40
-    background-color: $lb700;
40
+#menu ul li a:active {
41
+    background-color: $SkeletonFocus;
42
+    /* background-color: $lb700; */
41
 }
43
 }
42
 
44
 
43
 #menu ul li a:hover {
45
 #menu ul li a:hover {
44
-    background-color: $lb700;
46
+    background-color: $SkeletonFocus;
47
+    /* background-color: $lb700; */
45
     color: white;
48
     color: white;
46
     text-decoration: none;
49
     text-decoration: none;
47
 }
50
 }
48
 
51
 
49
 /* Dropdown */
52
 /* Dropdown */
50
 #menu .nav_dropdown {
53
 #menu .nav_dropdown {
51
-    background: #01579b;
54
+    background-color: $SkeletonHalfdark;
52
     margin-top: 0;
55
     margin-top: 0;
53
 }
56
 }
54
 
57
 
55
 .nav_dropdown > div {
58
 .nav_dropdown > div {
56
     box-shadow: $shadow;
59
     box-shadow: $shadow;
57
     position: absolute;
60
     position: absolute;
58
-    background-color: #01579b;
61
+    background-color: $SkeletonHalfdark;
59
     width: 100%;
62
     width: 100%;
60
     z-index: 99999;
63
     z-index: 99999;
61
     margin-top: 2.5rem;
64
     margin-top: 2.5rem;
85
 
88
 
86
 #searchbars {
89
 #searchbars {
87
     text-align: center;
90
     text-align: center;
88
-    background-color: $lb200;
89
-    box-shadow: $shadow;
90
     box-sizing: content-box;
91
     box-sizing: content-box;
91
     padding: 0.5rem 10%;
92
     padding: 0.5rem 10%;
92
     display: flex;
93
     display: flex;
133
 }
134
 }
134
 
135
 
135
 #searchbars ul li ul li {
136
 #searchbars ul li ul li {
136
-    margin: 0 0 0 0;
137
+    margin: 0;
137
     padding: 0;
138
     padding: 0;
138
     display: block;
139
     display: block;
139
     width: 100%;
140
     width: 100%;
152
  */
153
  */
153
 #userinfo {
154
 #userinfo {
154
     color: black;
155
     color: black;
155
-    padding: 0.5em 0;
156
+    /* padding: 0.5em 0; */
156
     width: 100%;
157
     width: 100%;
157
     text-align: center;
158
     text-align: center;
158
 }
159
 }

+ 58
- 75
static/styles/bookish/scss/tables.scss View File

1
-@mixin center-all {
1
+/**
2
+ * Tables
3
+ */
4
+
5
+@mixin alternating-rows {
6
+    tr:nth-child(2n) {
7
+        background: whitesmoke;
8
+    }
9
+
10
+    tr:nth-child(2n-1) {
11
+        background: white;
12
+    }
2
 }
13
 }
3
 
14
 
15
+/* Every table */
4
 table {
16
 table {
5
     width: 100%;
17
     width: 100%;
6
 
18
 
8
         font-size: 120%;
20
         font-size: 120%;
9
     }
21
     }
10
 
22
 
11
-    /*
12
-    tr {
13
-        background-color: white;
23
+    td,
24
+    td:first-child {
25
+        padding: 0.5rem !important;
26
+    }
27
+}
28
+
29
+/* Special tables */
30
+.torrent_table,
31
+.collage_table,
32
+.request_table,
33
+.top10_table {
34
+    @include alternating-rows;
35
+
36
+    th,
37
+    td {
38
+        border-bottom: 1px solid #e1e1e1;
39
+    }
40
+}
41
+
42
+.torrent_table,
43
+.collage_table {
44
+    div.tags {
45
+        font-weight: normal;
46
+        max-width: 500px;
47
+    }
48
+
49
+    span {
50
+        float: right;
14
     }
51
     }
15
-    */
16
 }
52
 }
17
 
53
 
18
 /**
54
 /**
19
  * Torrent form
55
  * Torrent form
20
  */
56
  */
57
+
21
 .torrent_form,
58
 .torrent_form,
22
 #dynamic_form {
59
 #dynamic_form {
23
     /* margin-bottom: 2rem; */
60
     /* margin-bottom: 2rem; */
35
  * colhead
72
  * colhead
36
  * The main table heading.
73
  * The main table heading.
37
  */
74
  */
75
+
38
 .colhead {
76
 .colhead {
39
     padding: 0.5em 0;
77
     padding: 0.5em 0;
40
     border-bottom: 1px solid #e1e1e1;
78
     border-bottom: 1px solid #e1e1e1;
56
 }
94
 }
57
 
95
 
58
 /* Torrent and collage tables */
96
 /* Torrent and collage tables */
59
-.torrent_table,
60
-.collage_table {
61
-    tr:nth-child(2n) {
62
-        background-color: whitesmoke;
63
-    }
64
-
65
-    tr:nth-child(2n-1) {
66
-        background-color: white;
67
-    }
68
-
69
-    div.tags {
70
-        font-weight: normal;
71
-        max-width: 500px;
72
-    }
73
-
74
-    span {
75
-        float: right;
76
-    }
77
-}
78
-
79
-/*
80
-.torrent_table,
81
-.collage_table {
82
-    tr.group {
83
-        background-color: white;
84
-
85
-        td.center:first-child {
86
-            padding: 3px;
87
-            width: 21px;
88
-        }
89
-    }
90
-
91
-    tr.group_torrent {
92
-        background-color: white;
93
-
94
-        span {
95
-            float: right;
96
-        }
97
-    }
98
-
99
-    tr.torrent {
100
-        background-color: white;
101
-    }
102
-
103
-    tr.torrent:nth-child(2n),
104
-    tr.row:nth-child(2n) {
105
-        background-color: whitesmoke;
106
-    }
107
-
108
-    tr.torrent:nth-child(2n-1),
109
-    tr.row:nth-child(2n-1) {
110
-        background-color: white;
111
-    }
112
-
113
-    tr .center,
114
-    td {
115
-        vertical-align: middle;
116
-        /* text-align: center; * /
117
-    }
118
-    div.tags {
119
-        font-weight: normal;
120
-        max-width: 500px;
121
-    }
122
-}
123
-*/
124
-
125
 .torrent_table .group_torrent .torrent span {
97
 .torrent_table .group_torrent .torrent span {
126
     font-weight: normal;
98
     font-weight: normal;
127
     float: right;
99
     float: right;
128
 }
100
 }
129
 
101
 
130
-/* Forums */
102
+/**
103
+ * Forums
104
+ */
105
+
106
+@mixin forum-post($color) {
107
+    background-color: $color;
108
+    border-bottom: 1px solid #e1e1e1;
109
+    font-size: 120%;
110
+}
111
+
131
 .forum_post .colhead_dark {
112
 .forum_post .colhead_dark {
132
-    background: $lb100;
113
+    @include forum-post(white);
114
+    /* background: $lb100; */
133
 }
115
 }
134
 
116
 
135
 .forum_post.staff_post .colhead_dark {
117
 .forum_post.staff_post .colhead_dark {
136
-    background: $lb200;
118
+    @include forum-post(whitesmoke);
119
+    /* background: $lb200; */
137
 }
120
 }
138
 
121
 
139
 .forum_post.sticky_post {
122
 .forum_post.sticky_post {
140
-    border: 2px solid $lb200;
123
+    border: 2px solid $SkeletonDefault;
141
 }
124
 }
142
 
125
 
143
 td.label {
126
 td.label {

+ 14
- 0
static/styles/global/scss/layout.scss View File

59
     &.upload_notice {
59
     &.upload_notice {
60
         @include transparent-border($R: 255, $A: 0.5);
60
         @include transparent-border($R: 255, $A: 0.5);
61
         margin: 1rem auto;
61
         margin: 1rem auto;
62
+        padding-top: 1rem;
62
         text-align: center;
63
         text-align: center;
63
     }
64
     }
64
 
65
 
76
     }
77
     }
77
 }
78
 }
78
 
79
 
80
+/**
81
+ * Footer
82
+ */
83
+
84
+footer {
85
+    margin-top: 2rem;
86
+    width: 100%;
87
+
88
+    p {
89
+        text-align: center;
90
+    }
91
+}
92
+
79
 /*
93
 /*
80
  * Misc
94
  * Misc
81
  */
95
  */

+ 49
- 5
static/styles/global/scss/skeleton-fixes.scss View File

1
 /**
1
 /**
2
  * Fixes needed to use skeleton.css
2
  * Fixes needed to use skeleton.css
3
- * to its best advantage
3
+ * to its best no-fuss advantage
4
  */
4
  */
5
 
5
 
6
 /* Set heading fonts 50% of default and bump down a level */
6
 /* Set heading fonts 50% of default and bump down a level */
66
     }
66
     }
67
 }
67
 }
68
 
68
 
69
+/* Forum list headings */
69
 table.forum_index {
70
 table.forum_index {
70
     h4 {
71
     h4 {
71
         margin: 0 !important;
72
         margin: 0 !important;
72
     }
73
     }
73
 }
74
 }
74
 
75
 
76
+/* Checkbox and radio labels */
75
 label,
77
 label,
76
 legend {
78
 legend {
77
     display: inline !important;
79
     display: inline !important;
78
 }
80
 }
79
 
81
 
82
+/* Tables usually containing forms */
83
+/* browse */
80
 table.torrent_search,
84
 table.torrent_search,
81
-table.torrent_requests {
85
+/* request search */ table.torrent_requests,
86
+/* forum list */ table.forum_index,
87
+/* upload form */ table.torrent_form,
88
+/* new request? */ table.request_form,
89
+/* forum thread */ table.new_thread,
90
+/* toolbox */ table.admin_tools,
91
+/* BP */ table.store_table,
92
+/* rule sections */ div.rule_table,
93
+/* client rules */ table.clients_table,
94
+/* login */ table.login_form,
95
+/* requests? */form.create_form,
96
+/* top10 */ form.search_form,
97
+/* start user management */
98
+table#user_info_box,
99
+table#warn_user_box,
100
+table#user_lock_account,
101
+table#user_privs_box,
102
+table#session_box,
103
+table#donation_box,
104
+table#donor_points_box,
105
+table#submit_box
106
+/* end user management */ {
82
     th,
107
     th,
83
     td {
108
     td {
84
         border-bottom: 0 !important;
109
         border-bottom: 0 !important;
86
     }
111
     }
87
 }
112
 }
88
 
113
 
114
+/* Duplicate input rules here */
89
 input,
115
 input,
90
 input[type="search"],
116
 input[type="search"],
91
 input[type="text"] {
117
 input[type="text"] {
92
     margin: 0 !important;
118
     margin: 0 !important;
93
 }
119
 }
94
 
120
 
95
-ul {
96
-    list-style: circle !important;
121
+input,
122
+textarea,
123
+select,
124
+fieldset {
125
+    margin-bottom: 0 !important;
97
 }
126
 }
98
 
127
 
128
+/* Block elements */
99
 pre,
129
 pre,
100
 blockquote,
130
 blockquote,
101
 dl,
131
 dl,
102
 figure,
132
 figure,
103
 table,
133
 table,
104
-p,
105
 ul,
134
 ul,
106
 ol,
135
 ol,
107
 form {
136
 form {
108
     margin-bottom: 0 !important;
137
     margin-bottom: 0 !important;
109
 }
138
 }
110
 
139
 
140
+/* Inline code */
111
 code {
141
 code {
112
     padding: 0 !important;
142
     padding: 0 !important;
113
 }
143
 }
144
+
145
+/* Unordered lists */
146
+ul {
147
+    list-style: circle outside !important;
148
+}
149
+
150
+/* Nested lists */
151
+ul ul,
152
+ul ol,
153
+ol ol,
154
+ol ul {
155
+    margin: 0 !important;
156
+    font-size: 100% !important;
157
+}

+ 19
- 9
static/styles/public/scss/public.scss View File

1
+/* Skeleton CSS */
2
+$SkeletonDefault: #33c3f0;
3
+$SkeletonFocus: #1eaedb;
4
+$SkeletonHalfdark: scale-color($SkeletonFocus, $lightness: -50%);
5
+
1
 * {
6
 * {
2
     margin: 0;
7
     margin: 0;
3
     padding: 0;
8
     padding: 0;
49
 }
54
 }
50
 
55
 
51
 ul {
56
 ul {
52
-    margin-left: 2rem;
57
+    margin-left: 0.5rem;
58
+
59
+    li {
60
+        margin-bottom: 0;
61
+    }
53
 
62
 
54
     &.p li {
63
     &.p li {
55
         margin-bottom: 1rem;
64
         margin-bottom: 1rem;
64
 /**
73
 /**
65
  * Inputs
74
  * Inputs
66
  */
75
  */
67
-
76
+/*
68
 input[type="text"],
77
 input[type="text"],
69
 input[type="password"],
78
 input[type="password"],
70
 input[type="email"] {
79
 input[type="email"] {
119
     text-align: right;
128
     text-align: right;
120
     padding-right: 5px;
129
     padding-right: 5px;
121
 }
130
 }
131
+*/
122
 
132
 
123
 /**
133
 /**
124
  * Layout
134
  * Layout
126
 
136
 
127
 header,
137
 header,
128
 footer {
138
 footer {
129
-    height: 2rem;
130
-    line-height: 2rem;
139
+    height: 2.5rem;
140
+    line-height: 2.5rem;
131
     width: 100%;
141
     width: 100%;
132
-    background: #01579b;
142
+    background: $SkeletonHalfdark;
133
     position: fixed;
143
     position: fixed;
134
     left: 0;
144
     left: 0;
135
 
145
 
156
 }
166
 }
157
 
167
 
158
 main {
168
 main {
159
-    width: 250px;
169
+    width: 25%;
160
     height: calc(80% - 60px);
170
     height: calc(80% - 60px);
161
     margin: 0 auto;
171
     margin: 0 auto;
162
     padding: 10% 0;
172
     padding: 10% 0;
163
 }
173
 }
164
 
174
 
165
 #logo {
175
 #logo {
166
-    width: 250px;
176
+    /* width: 250px; */
167
     height: 50px;
177
     height: 50px;
168
-    background-image: url("/static/common/logos/bookish.png");
178
+    background-image: url("/static/common/logos/torrents.bio.png");
169
     background-repeat: no-repeat;
179
     background-repeat: no-repeat;
170
     background-position: center;
180
     background-position: center;
171
     background-size: contain;
181
     background-size: contain;
215
     content: "℠";
225
     content: "℠";
216
     font-size: 0.75rem;
226
     font-size: 0.75rem;
217
     font-weight: normal;
227
     font-weight: normal;
218
-    margin-left: 100%;
228
+    margin-left: 93%;
219
 }
229
 }

Loading…
Cancel
Save