Browse Source

A bit more consistency formatting

pjc 5 years ago
parent
commit
20b0b4b080

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

@@ -28,7 +28,7 @@
28 28
  * Example:
29 29
 
30 30
     View::parse('generic/reply/quickreply.php', array(
31
-      'InputTitle' => 'Post comment',
31
+      'InputTitle' => 'Post Comment',
32 32
       'InputName' => 'groupid',
33 33
       'InputID' => $GroupID,
34 34
       'TextareaCols' => 65,
@@ -50,7 +50,7 @@
50 50
     $InputAction = 'reply';
51 51
   }
52 52
   if (!isset($InputTitle)) {
53
-    $InputTitle = 'Post comment';
53
+    $InputTitle = 'Post Comment';
54 54
   }
55 55
 
56 56
   $ReplyText = new TEXTAREA_PREVIEW('body', 'quickpost', '',

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

@@ -83,11 +83,11 @@ View::show_header('Forums > '.$Forum['Name'].' > New Topic', 'comments,bbc
83 83
       <input type="hidden" name="forum" value="<?=$ForumID?>" />
84 84
       <table id="newthreadtext" class="layout">
85 85
         <tr>
86
-          <td class="label">Title:</td>
86
+          <td class="label">Title</td>
87 87
           <td><input id="title" class="required" type="text" name="title" style="width: 98%;" /></td>
88 88
         </tr>
89 89
         <tr>
90
-          <td class="label">Body:</td>
90
+          <td class="label">Body</td>
91 91
           <td><textarea id="posttext" class="required bbcode_editor" style="width: 98%;" onkeyup="resize('posttext');" name="body" cols="90" rows="8"></textarea></td>
92 92
         </tr>
93 93
         <tr>
@@ -139,11 +139,11 @@ if (check_perms('forums_polls_create')) {
139 139
           </td>
140 140
         </tr>
141 141
         <tr id="poll_question" class="hidden">
142
-          <td class="label">Question:</td>
142
+          <td class="label">Question</td>
143 143
           <td><input type="text" name="question" id="pollquestionfield" class="required" style="width: 98%;" /></td>
144 144
         </tr>
145 145
         <tr id="poll_answers" class="hidden">
146
-          <td class="label">Answers:</td>
146
+          <td class="label">Answers</td>
147 147
           <td id="answer_block">
148 148
             <input type="text" name="answers[]" class="required" style="width: 90%;" />
149 149
             <a href="#" onclick="AddAnswerField();return false;" class="brackets">+</a>
@@ -159,7 +159,7 @@ if (check_perms('forums_polls_create')) {
159 159
       <div id="buttons" class="center">
160 160
         <input type="button" value="Preview" onclick="Newthread_Preview(1);" id="newthreadpreviewbutton" />
161 161
         <input type="button" value="Editor" onclick="Newthread_Preview(0);" id="newthreadeditbutton" class="hidden" />
162
-        <input type="submit" class="submit" id="submit_button" value="Create thread" />
162
+        <input type="submit" class="submit" id="submit_button" value="Create" />
163 163
       </div>
164 164
     </form>
165 165
   </div>

+ 4
- 3
sections/requests/new_edit.php View File

@@ -343,9 +343,10 @@ View::show_header(($NewRequest ? 'Create Request' : 'Edit Request'), 'bbcode,req
343 343
             <input type="hidden" id="current_downloaded"
344 344
               value="<?= $LoggedUser['BytesDownloaded'] ?>" />
345 345
             <ul>
346
-              <!-- <li>Bounty: <span id="bounty_after_tax">90.00 MB</span></li> -->
347
-              <li>Uploaded: <span id="new_uploaded"><?= Format::get_size($LoggedUser['BytesUploaded']) ?></span></li>
348
-              <li>Ratio: <span id="new_ratio"><?= Format::get_ratio_html($LoggedUser['BytesUploaded'], $LoggedUser['BytesDownloaded']) ?></span></li>
346
+              <!-- @todo Return this feature
347
+              <li><strong>Bounty:</strong> <span id="bounty_after_tax">90.00 MB</span></li> -->
348
+              <li><strong>Uploaded:</strong> <span id="new_uploaded"><?= Format::get_size($LoggedUser['BytesUploaded']) ?></span></li>
349
+              <li><strong>Ratio:</strong> <span id="new_ratio"><?= Format::get_ratio_html($LoggedUser['BytesUploaded'], $LoggedUser['BytesDownloaded']) ?></span></li>
349 350
             </ul>
350 351
           </td>
351 352
         </tr>

+ 47
- 35
sections/requests/request.php View File

@@ -10,14 +10,14 @@ if (empty($_GET['id']) || !is_number($_GET['id'])) {
10 10
 
11 11
 $RequestID = $_GET['id'];
12 12
 
13
-//First things first, lets get the data for the request.
13
+// First things first, let's get the data for the request
14 14
 
15 15
 $Request = Requests::get_request($RequestID);
16 16
 if ($Request === false) {
17 17
   error(404);
18 18
 }
19 19
 
20
-//Convenience variables
20
+// Convenience variables
21 21
 $IsFilled = !empty($Request['TorrentID']);
22 22
 $CanVote = !$IsFilled && check_perms('site_vote');
23 23
 
@@ -29,7 +29,7 @@ if ($Request['CategoryID'] === '0') {
29 29
 
30 30
 $Title = empty($Request['Title']) ? (empty($Request['TitleRJ']) ? $Request['TitleJP'] : $Request['TitleRJ']) : $Request['Title'];
31 31
 
32
-//Do we need to get artists?
32
+// Do we need to get artists?
33 33
 $ArtistForm = Requests::get_artists($RequestID);
34 34
 $ArtistName = Artists::display_artists($ArtistForm, false, true);
35 35
 $ArtistLink = Artists::display_artists($ArtistForm, true, true);
@@ -61,7 +61,7 @@ if (!empty($Request['DLsiteID'])) {
61 61
 
62 62
 $DisplayLink .= $Extra;
63 63
 
64
-//Votes time
64
+// Votes time
65 65
 $RequestVotes = Requests::get_votes_array($RequestID);
66 66
 $VoteCount = count($RequestVotes['Voters']);
67 67
 $ProjectCanEdit = (check_perms('project_team') && !$IsFilled && ($Request['CategoryID'] === '0' || ($CategoryName === 'Music' && $Request['Year'] === '0')));
@@ -72,8 +72,8 @@ $CanEdit = ($UserCanEdit || $ProjectCanEdit || check_perms('site_moderate_reques
72 72
 list($NumComments, $Page, $Thread, $LastRead) = Comments::load('requests', $RequestID);
73 73
 
74 74
 View::show_header("View request: $FullName", 'comments,requests,bbcode,subscriptions');
75
-
76 75
 ?>
76
+
77 77
 <div class="thin">
78 78
   <div class="header">
79 79
     <h2><a href="requests.php">Requests</a> &gt; <?=$CategoryName?> &gt; <?=$DisplayLink?></h2>
@@ -125,7 +125,9 @@ $encoded_artist = urlencode($encoded_artist);
125 125
     </div>
126 126
 <?
127 127
   }
128
-  $ArtistVariant = "";
128
+
129
+  $ArtistVariant = "Author(s)";
130
+  /*
129 131
   switch ($CategoryName) {
130 132
     case "Movies":
131 133
       $ArtistVariant = "Idols";
@@ -145,13 +147,14 @@ $encoded_artist = urlencode($encoded_artist);
145 147
     default:
146 148
       $ArtistVariant = "Artists";
147 149
   }
150
+  */
148 151
 ?>
149 152
     <div class="box box_artists">
150
-      <div class="head"><strong><?=$ArtistVariant?></strong></div>
153
+      <div class="head"><strong><?= $ArtistVariant ?></strong></div>
151 154
       <ul class="stats nobullet">
152 155
 <?    foreach ($ArtistForm as $Artist) { ?>
153 156
         <li class="artist">
154
-          <?=Artists::display_artist($Artist)?>
157
+          <?= Artists::display_artist($Artist) ?>
155 158
         </li>
156 159
 <?    } ?>
157 160
       </ul>
@@ -163,7 +166,7 @@ $encoded_artist = urlencode($encoded_artist);
163 166
       $Split = Tags::get_name_and_class($TagName);
164 167
 ?>
165 168
         <li>
166
-          <a class="<?=$Split['class']?>" href="torrents.php?taglist=<?=$TagName?>"><?=display_str($Split['name'])?></a>
169
+          <a class="<?= $Split['class']?>" href="torrents.php?taglist=<?=$TagName?>"><?=display_str($Split['name']) ?></a>
167 170
           <br style="clear: both;" />
168 171
         </li>
169 172
 <?  } ?>
@@ -185,10 +188,10 @@ $encoded_artist = urlencode($encoded_artist);
185 188
 ?>
186 189
         <tr>
187 190
           <td>
188
-            <a href="user.php?id=<?=$User['UserID']?>"><?=($Boldify ? '<strong>' : '') . display_str($User['Username']) . ($Boldify ? '</strong>' : '')?></a>
191
+            <a href="user.php?id=<?= $User['UserID'] ?>"><?= ($Boldify ? '<strong>' : '') . display_str($User['Username']) . ($Boldify ? '</strong>' : '') ?></a>
189 192
           </td>
190 193
           <td class="number_column">
191
-            <?=($Boldify ? '<strong>' : '') . Format::get_size($User['Bounty']) . ($Boldify ? "</strong>\n" : "\n")?>
194
+            <?= ($Boldify ? '<strong>' : '') . Format::get_size($User['Bounty']) . ($Boldify ? "</strong>\n" : "\n") ?>
192 195
           </td>
193 196
         </tr>
194 197
 <?  }
@@ -198,10 +201,10 @@ $encoded_artist = urlencode($encoded_artist);
198 201
       if ($User['UserID'] === $LoggedUser['ID']) { ?>
199 202
         <tr>
200 203
           <td>
201
-            <a href="user.php?id=<?=$User['UserID']?>"><strong><?=display_str($User['Username'])?></strong></a>
204
+            <a href="user.php?id=<?= $User['UserID'] ?>"><strong><?= display_str($User['Username']) ?></strong></a>
202 205
           </td>
203 206
           <td class="number_column">
204
-            <strong><?=Format::get_size($User['Bounty'])?></strong>
207
+            <strong><?= Format::get_size($User['Bounty']) ?></strong>
205 208
           </td>
206 209
         </tr>
207 210
 <?      }
@@ -213,31 +216,34 @@ $encoded_artist = urlencode($encoded_artist);
213 216
   </div>
214 217
   <div class="main_column">
215 218
     <div class="box">
216
-    <div class="head"><strong>Information</strong></div>
219
+    <div class="head"><strong>Info</strong></div>
217 220
     <div class="pad">
218 221
     <table class="layout">
219 222
       <tr>
220 223
         <td class="label">Created</td>
221 224
         <td>
222
-          <?=time_diff($Request['TimeAdded'])?> by <strong><?=Users::format_username($Request['UserID'], false, false, false)?></strong>
225
+          <?= time_diff($Request['TimeAdded']) ?> by <strong><?= Users::format_username($Request['UserID'], false, false, false) ?></strong>
223 226
         </td>
224 227
       </tr>
225 228
 <?  if ($CategoryName == 'Movies') {
226 229
     if (!empty($Request['CatalogueNumber'])) { ?>
227 230
       <tr>
228 231
         <td class="label">Catalogue number</td>
229
-        <td><?=$Request['CatalogueNumber']?></td>
232
+        <td><?= $Request['CatalogueNumber'] ?></td>
230 233
       </tr>
231 234
 <?
232 235
     }
233
-  } elseif ($CategoryName == 'Games') {
236
+  }
237
+  /*
238
+  elseif ($CategoryName == 'Games') {
234 239
     if (!empty($Request['DLSiteID'])) { ?>
235 240
       <tr>
236 241
         <td class="label">DLSite ID</td>
237
-        <td><?=$Request['DLSiteID']?></td>
242
+        <td><?= $Request['DLSiteID'] ?></td>
238 243
       </tr>
239 244
 <?  }
240 245
   }
246
+  */
241 247
 /*
242 248
   $Worldcat = '';
243 249
   $OCLC = str_replace(' ', '', $Request['OCLC']);
@@ -263,43 +269,45 @@ $encoded_artist = urlencode($encoded_artist);
263 269
   if ($Request['GroupID']) {
264 270
 ?>
265 271
       <tr>
266
-        <td class="label">Torrent group</td>
267
-        <td><a href="torrents.php?id=<?=$Request['GroupID']?>">torrents.php?id=<?=$Request['GroupID']?></a></td>
272
+        <td class="label">Torrent Group</td>
273
+        <td><a href="torrents.php?id=<?= $Request['GroupID'] ?>">torrents.php?id=<?= $Request['GroupID'] ?></a></td>
268 274
       </tr>
269 275
 <?  } ?>
270 276
       <tr>
271 277
         <td class="label">Votes</td>
272 278
         <td>
273
-          <span id="votecount"><?=number_format($VoteCount)?></span>
279
+          <span id="votecount"><?= number_format($VoteCount) ?></span>
274 280
 <?  if ($CanVote) { ?>
275 281
           &nbsp;&nbsp;<a href="javascript:Vote(0)" class="brackets"><strong>+</strong></a>
276
-          <strong>Costs <?=Format::get_size($MinimumVote, 0)?></strong>
282
+          <strong>Costs <?= Format::get_size($MinimumVote, 0) ?></strong>
277 283
 <?  } ?>
278 284
         </td>
279 285
       </tr>
280 286
 <?  if ($Request['LastVote'] > $Request['TimeAdded']) { ?>
281 287
       <tr>
282
-        <td class="label">Last voted</td>
283
-        <td><?=time_diff($Request['LastVote'])?></td>
288
+        <td class="label">Last Voted</td>
289
+        <td><?= time_diff($Request['LastVote']) ?></td>
284 290
       </tr>
285 291
 <?
286 292
   }
287 293
   if ($CanVote) {
288 294
 ?>
289 295
       <tr id="voting">
290
-        <td class="label tooltip" title="These units are in base 2, not base 10. For example, there are 1,024 MiB in 1 GiB.">Custom vote</td>
296
+        <td class="label">Custom Vote</td>
291 297
         <td>
298
+          These units are in base 2, not base 10, e.g., there are 1,024 MiB in 1 GiB
292 299
           <input type="text" id="amount_box" size="8" onchange="Calculate();" />
293 300
           <select id="unit" name="unit" onchange="Calculate();">
294 301
             <option value="mb">MiB</option>
295 302
             <option value="gb">GiB</option>
296 303
           </select>
297 304
           <input type="button" value="Preview" onclick="Calculate();" />
298
-          <strong><?=($RequestTax * 100)?>% of this is deducted as tax by the system.</strong>
305
+          <strong>The system deducts <?= ($RequestTax * 100) ?>% as tax</strong>
306
+
299 307
         </td>
300 308
       </tr>
301 309
       <tr>
302
-        <td class="label">Post vote information</td>
310
+        <td class="label">New Stats</td>
303 311
         <td>
304 312
           <form class="add_form" name="request" action="requests.php" method="get" id="request_form">
305 313
             <input type="hidden" name="action" value="vote" />
@@ -312,10 +320,13 @@ $encoded_artist = urlencode($encoded_artist);
312 320
             <input type="hidden" id="current_downloaded" value="<?=$LoggedUser['BytesDownloaded']?>" />
313 321
             <input type="hidden" id="current_rr" value="<?=(float)$LoggedUser['RequiredRatio']?>" />
314 322
             <input id="total_bounty" type="hidden" value="<?=$RequestVotes['TotalBounty']?>" />
315
-            Bounty after tax: <strong><span id="bounty_after_tax">0.00 MiB</span></strong><br />
316
-            If you add the entered <strong><span id="new_bounty">0.00 MiB</span></strong> of bounty, your new stats will be: <br />
317
-            Uploaded: <span id="new_uploaded"><?=Format::get_size($LoggedUser['BytesUploaded'])?></span><br />
318
-            Ratio: <span id="new_ratio"><?=Format::get_ratio_html($LoggedUser['BytesUploaded'],$LoggedUser['BytesDownloaded'])?></span>
323
+
324
+            <ul>
325
+              <!-- @todo Return this feature
326
+              <li><strong>Bounty:</strong> <span id="bounty_after_tax">0.00 MiB</span></li> -->
327
+              <li><strong>Uploaded:</strong> <span id="new_uploaded"><?= Format::get_size($LoggedUser['BytesUploaded']) ?></span></li>
328
+              <li><strong>Ratio:</strong> <span id="new_ratio"><?= Format::get_ratio_html($LoggedUser['BytesUploaded'],$LoggedUser['BytesDownloaded']) ?></span></li>
329
+  </ul>
319 330
             <input type="button" id="button" value="Vote!" disabled="disabled" onclick="Vote();" />
320 331
           </form>
321 332
         </td>
@@ -341,7 +352,7 @@ $encoded_artist = urlencode($encoded_artist);
341 352
       </tr>
342 353
 <?  } else { ?>
343 354
       <tr>
344
-        <td class="label" valign="top">Fill request</td>
355
+        <td class="label" valign="top">Fill Request</td>
345 356
         <td>
346 357
           <form class="edit_form" name="request" action="" method="post">
347 358
             <div class="field_div">
@@ -350,15 +361,16 @@ $encoded_artist = urlencode($encoded_artist);
350 361
               <input type="hidden" name="requestid" value="<?=$RequestID?>" />
351 362
               <input type="text" size="50" name="link"<?=(!empty($Link) ? " value=\"$Link\"" : '')?> />
352 363
               <br />
353
-              <strong>Should be the permalink (PL) to the torrent (e.g. <?=site_url()?>torrents.php?torrentid=xxxx).</strong>
364
+              <strong>Should be the permalink (PL) to the torrent, e.g.,
365
+                <pre><?= site_url() ?>torrents.php?torrentid=xxx</pre></strong>
354 366
             </div>
355 367
 <?    if (check_perms('site_moderate_requests')) { ?>
356 368
             <div class="field_div">
357
-              For user: <input type="text" size="25" name="user"<?=(!empty($FillerUsername) ? " value=\"$FillerUsername\"" : '')?> />
369
+            <strong>For User</strong> <input type="text" size="25" name="user"<?= (!empty($FillerUsername) ? " value=\"$FillerUsername\"" : '') ?> />
358 370
             </div>
359 371
 <?    } ?>
360 372
             <div class="submit_div">
361
-              <input type="submit" value="Fill request" />
373
+              <input type="submit" value="Fill" />
362 374
             </div>
363 375
           </form>
364 376
         </td>

+ 426
- 363
sections/torrents/details.php
File diff suppressed because it is too large
View File


+ 13
- 14
sections/upload/upload_handle.php View File

@@ -467,7 +467,6 @@ if (!isset($GroupID) || !$GroupID) {
467 467
         (GroupID, UserID, Time, Image)
468 468
       VALUES (?, ?, NOW(), ?)", $GroupID, $LoggedUser['ID'], $Screenshot);
469 469
         foreach ($Screenshots as $Screenshot) {
470
-            $DB->db_string($Screenshot); # Maybe unnecessary
471 470
             $DB->exec_prepared_query();
472 471
         }
473 472
     }
@@ -546,7 +545,7 @@ if ($DB->has_results()) {
546 545
 // Download doesn't count, upload does
547 546
 if (($TotalSize > 53687091200)) { # 50 GiB
548 547
   $T['FreeTorrent'] = '2';
549
-  $T['FreeLeechType'] = '2';
548
+    $T['FreeLeechType'] = '2';
550 549
 }
551 550
 
552 551
 // Torrent
@@ -770,18 +769,18 @@ if (!empty($ArtistsUnescaped)) {
770 769
         $SQL .= " OR Artists = '')) AND (";
771 770
     } else {
772 771
     */
773
-        $SQL .= " AND (";
774
-        if (!empty($GuestArtistNameList)) {
775
-            $SQL .= "(ExcludeVA = '0' AND (";
776
-            $SQL .= implode(' OR ', $GuestArtistNameList);
777
-            $SQL .= ')) OR ';
778
-        }
779
-        if (count($ArtistNameList) > 0) {
780
-            $SQL .= implode(' OR ', $ArtistNameList);
781
-            $SQL .= " OR ";
782
-        }
783
-        $SQL .= "Artists = '') AND (";
784
-    #}
772
+    $SQL .= " AND (";
773
+    if (!empty($GuestArtistNameList)) {
774
+        $SQL .= "(ExcludeVA = '0' AND (";
775
+        $SQL .= implode(' OR ', $GuestArtistNameList);
776
+        $SQL .= ')) OR ';
777
+    }
778
+    if (count($ArtistNameList) > 0) {
779
+        $SQL .= implode(' OR ', $ArtistNameList);
780
+        $SQL .= " OR ";
781
+    }
782
+    $SQL .= "Artists = '') AND (";
783
+#}
785 784
 } else {
786 785
     $SQL .= "AND (Artists = '') AND (";
787 786
 }

Loading…
Cancel
Save