Browse Source

Add Romaji titles

spaghetti 8 years ago
parent
commit
7336fb839c

+ 1
- 0
classes/requests.class.php View File

94
           LastVote,
94
           LastVote,
95
           CategoryID,
95
           CategoryID,
96
           Title,
96
           Title,
97
+          TitleRJ,
97
           TitleJP,
98
           TitleJP,
98
           Image,
99
           Image,
99
           Description,
100
           Description,

+ 2
- 1
classes/text.class.php View File

736
                 if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
736
                 if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
737
                   $Str .= " onmouseover=\"getCover(event)\" cover=\"".ImageTools::process($Group['WikiImage'], true)."\" onmouseleave=\"ungetCover(event)\"";
737
                   $Str .= " onmouseover=\"getCover(event)\" cover=\"".ImageTools::process($Group['WikiImage'], true)."\" onmouseleave=\"ungetCover(event)\"";
738
                 }
738
                 }
739
-                $Str .= '>'.$Group['Name'].'</a>';
739
+                $Name = empty($Group['Name']) ? (empty($Group['NameRJ']) ? $Group['NameJP'] : $Group['NameRJ']) : $Group['Name'];
740
+                $Str .= '>'.$Name.'</a>';
740
               } else {
741
               } else {
741
                 $Str .= '[torrent]'.str_replace('[inlineurl]', '', $Block['Val']).'[/torrent]';
742
                 $Str .= '[torrent]'.str_replace('[inlineurl]', '', $Block['Val']).'[/torrent]';
742
               }
743
               }

+ 29
- 9
classes/torrent_form.class.php View File

216
         </td>
216
         </td>
217
       </tr>
217
       </tr>
218
       <tr id="title_tr">
218
       <tr id="title_tr">
219
-        <td class="label">Title:</td>
219
+        <td class="label">English Title:</td>
220
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?>/></td>
220
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?>/></td>
221
       </tr>
221
       </tr>
222
-      <tr>
222
+      <tr id="title_rj_tr">
223
+        <td class="label">Romaji Title:</td>
224
+        <td><input type="text" id="title_rj" name="title_rj" size="60" value="<?=display_str($Torrent['TitleRJ']) ?>" <?=$this->Disabled?>/></td>
225
+      </tr>
226
+      <tr id="title_jp_tr">
223
         <td class="label">Japanese Title:</td>
227
         <td class="label">Japanese Title:</td>
224
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
228
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
225
       </tr>
229
       </tr>
474
         </td>
478
         </td>
475
       </tr>
479
       </tr>
476
       <tr id="title_tr">
480
       <tr id="title_tr">
477
-        <td class="label">Title:</td>
481
+        <td class="label">English Title:</td>
478
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?>/></td>
482
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?>/></td>
479
       </tr>
483
       </tr>
480
-      <tr>
484
+      <tr id="title_rj_tr">
485
+        <td class="label">Romaji Title:</td>
486
+        <td><input type="text" id="title_rj" name="title_rj" size="60" value="<?=display_str($Torrent['TitleRJ']) ?>" <?=$this->Disabled?>/></td>
487
+      </tr>
488
+      <tr id="title_jp_tr">
481
         <td class="label">Japanese Title:</td>
489
         <td class="label">Japanese Title:</td>
482
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
490
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
483
       </tr>
491
       </tr>
723
         </td>
731
         </td>
724
       </tr>
732
       </tr>
725
       <tr id="title_tr">
733
       <tr id="title_tr">
726
-        <td class="label">Title:</td>
734
+        <td class="label">English Title:</td>
727
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?> /></td>
735
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?> /></td>
728
       </tr>
736
       </tr>
729
-      <tr>
737
+      <tr id="title_rj_tr">
738
+        <td class="label">Romaji Title:</td>
739
+        <td><input type="text" id="title_rj" name="title_rj" size="60" value="<?=display_str($Torrent['TitleRJ']) ?>" <?=$this->Disabled?>/></td>
740
+      </tr>
741
+      <tr id="title_jp_tr">
730
         <td class="label">Japanese Title:</td>
742
         <td class="label">Japanese Title:</td>
731
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
743
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
732
       </tr>
744
       </tr>
895
         <td class="label">Title:</td>
907
         <td class="label">Title:</td>
896
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?> /></td>
908
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?> /></td>
897
       </tr>
909
       </tr>
898
-      <tr>
910
+      <tr id="title_rj_tr">
911
+        <td class="label">Romaji Title:</td>
912
+        <td><input type="text" id="title_rj" name="title_rj" size="60" value="<?=display_str($Torrent['TitleRJ']) ?>" <?=$this->Disabled?>/></td>
913
+      </tr>
914
+      <tr id="title_jp_tr">
899
         <td class="label">Japanese Title:</td>
915
         <td class="label">Japanese Title:</td>
900
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP'])?>" <?=$this->Disabled?>/></td>
916
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP'])?>" <?=$this->Disabled?>/></td>
901
       </tr>
917
       </tr>
961
 ?>    <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
977
 ?>    <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
962
 <?    if ($this->NewTorrent) { ?>
978
 <?    if ($this->NewTorrent) { ?>
963
       <tr id="title_tr">
979
       <tr id="title_tr">
964
-        <td class="label">Title:</td>
980
+        <td class="label">English Title:</td>
965
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title'])?>" <?=$this->Disabled?> /></td>
981
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title'])?>" <?=$this->Disabled?> /></td>
966
       </tr>
982
       </tr>
967
-      <tr>
983
+      <tr id="title_rj_tr">
984
+        <td class="label">Romaji Title:</td>
985
+        <td><input type="text" id="title_rj" name="title_rj" size="60" value="<?=display_str($Torrent['TitleRJ']) ?>" <?=$this->Disabled?>/></td>
986
+      </tr>
987
+      <tr id="title_jp_tr">
968
         <td class="label">Japanese Title:</td>
988
         <td class="label">Japanese Title:</td>
969
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP'])?>" <?=$this->Disabled?> /></td>
989
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP'])?>" <?=$this->Disabled?> /></td>
970
       </tr>
990
       </tr>

+ 3
- 1
classes/torrents.class.php View File

81
       $QueryID = G::$DB->get_query_id();
81
       $QueryID = G::$DB->get_query_id();
82
       G::$DB->query("
82
       G::$DB->query("
83
         SELECT
83
         SELECT
84
-          ID, Name, Year, CatalogueNumber, Pages, Studio, Series, DLSiteID, TagList, WikiImage, CategoryID
84
+          ID, Name, NameRJ, NameJP, Year, CatalogueNumber, Pages, Studio, Series, DLSiteID, TagList, WikiImage, CategoryID
85
         FROM torrents_group
85
         FROM torrents_group
86
         WHERE ID IN ($IDs)");
86
         WHERE ID IN ($IDs)");
87
 
87
 
177
     return array(
177
     return array(
178
       'GroupID' => $Group['ID'],
178
       'GroupID' => $Group['ID'],
179
       'GroupName' => $Group['Name'],
179
       'GroupName' => $Group['Name'],
180
+      'GroupNameRJ' => $Group['NameRJ'],
181
+      'GroupNameJP' => $Group['NameJP'],
180
       'GroupYear' => $Group['Year'],
182
       'GroupYear' => $Group['Year'],
181
       'GroupCategoryID' => $Group['CategoryID'],
183
       'GroupCategoryID' => $Group['CategoryID'],
182
       'GroupCatalogueNumber' => $Group['CatalogueNumber'],
184
       'GroupCatalogueNumber' => $Group['CatalogueNumber'],

+ 4
- 1
classes/torrentsearch.class.php View File

51
     'dlsiteid' => 1,
51
     'dlsiteid' => 1,
52
     'filelist' => 1,
52
     'filelist' => 1,
53
     'groupname' => 1,
53
     'groupname' => 1,
54
+    'groupnamerj' => 1,
54
     'groupnamejp' => 1,
55
     'groupnamejp' => 1,
56
+    'advgroupname' => 1,
55
     'language' => 1,
57
     'language' => 1,
56
     'media' => 1,
58
     'media' => 1,
57
     'resolution' => 1,
59
     'resolution' => 1,
74
 
76
 
75
   // Some form field names don't match the ones in the index
77
   // Some form field names don't match the ones in the index
76
   private static $FormsToFields = array(
78
   private static $FormsToFields = array(
77
-    'searchstr' => '(groupname,groupnamejp,artistname,studio,series,dlsiteid,cataloguenumber,yearfulltext)');
79
+    'searchstr' => '(groupname,groupnamerj,groupnamejp,artistname,studio,series,dlsiteid,cataloguenumber,yearfulltext)',
80
+    'advgroupname' => '(groupname,groupnamerj,groupnamejp)');
78
 
81
 
79
   // Specify the operator type to use for fields. Empty key sets the default
82
   // Specify the operator type to use for fields. Empty key sets the default
80
   private static $FieldOperators = array(
83
   private static $FieldOperators = array(

+ 7
- 1
sections/artist/artist.php View File

77
         r.ID,
77
         r.ID,
78
         r.CategoryID,
78
         r.CategoryID,
79
         r.Title,
79
         r.Title,
80
+        r.TitleRJ,
80
         r.TitleJP,
81
         r.TitleJP,
81
         r.CatalogueNumber,
82
         r.CatalogueNumber,
82
         r.DLSiteID,
83
         r.DLSiteID,
212
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
213
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
213
       $DisplayName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover()" ';
214
       $DisplayName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover()" ';
214
     }
215
     }
216
+
217
+    $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
218
+
215
     $DisplayName .= "dir=\"ltr\">$GroupName</a>";
219
     $DisplayName .= "dir=\"ltr\">$GroupName</a>";
216
 
220
 
217
     if ($GroupYear) {
221
     if ($GroupYear) {
312
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
316
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
313
       $DisplayName .= "onmouseover=\"getCover(event)\" cover=\"".ImageTools::process($WikiImage, true)."\" onmouseleave=\"ungetCover(event)\" ";
317
       $DisplayName .= "onmouseover=\"getCover(event)\" cover=\"".ImageTools::process($WikiImage, true)."\" onmouseleave=\"ungetCover(event)\" ";
314
     }
318
     }
319
+
320
+    $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
315
     $DisplayName .= "dir=\"ltr\">$GroupName</a>";
321
     $DisplayName .= "dir=\"ltr\">$GroupName</a>";
316
 
322
 
317
     if ($GroupYear) {
323
     if ($GroupYear) {
713
   $Tags = Requests::get_tags(array_keys($Requests));
719
   $Tags = Requests::get_tags(array_keys($Requests));
714
   foreach ($Requests as $RequestID => $Request) {
720
   foreach ($Requests as $RequestID => $Request) {
715
       $CategoryName = $Categories[$Request['CategoryID'] - 1];
721
       $CategoryName = $Categories[$Request['CategoryID'] - 1];
716
-      $Title = display_str($Request['Title']);
722
+      $Title = empty($Request['Title']) ? (empty($Request['TitleRJ']) ? display_str($Request['TitleJP']) : display_str($Request['TitleRJ'])) : display_str($Request['Title']);
717
       if ($CategoryName != 'Other') {
723
       if ($CategoryName != 'Other') {
718
         $ArtistForm = Requests::get_artists($RequestID);
724
         $ArtistForm = Requests::get_artists($RequestID);
719
         $ArtistLink = Artists::display_artists($ArtistForm, true, true);
725
         $ArtistLink = Artists::display_artists($ArtistForm, true, true);

+ 2
- 0
sections/bookmarks/torrents.php View File

72
 
72
 
73
   $DisplayName = Artists::display_artists($Artists);
73
   $DisplayName = Artists::display_artists($Artists);
74
 
74
 
75
+  $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
76
+
75
   $DisplayName .= '<a href="torrents.php?id='.$GroupID.'" class="tooltip" title="View torrent group" dir="ltr">'.$GroupName.'</a>';
77
   $DisplayName .= '<a href="torrents.php?id='.$GroupID.'" class="tooltip" title="View torrent group" dir="ltr">'.$GroupName.'</a>';
76
   if ($GroupYear > 0) {
78
   if ($GroupYear > 0) {
77
     $DisplayName = "$DisplayName [$GroupYear]";
79
     $DisplayName = "$DisplayName [$GroupYear]";

+ 1
- 0
sections/collages/torrent_collage.php View File

74
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
74
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
75
     $DisplayName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover(event)" ';
75
     $DisplayName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover(event)" ';
76
   }
76
   }
77
+  $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
77
   $DisplayName .= "dir=\"ltr\">$GroupName</a>";
78
   $DisplayName .= "dir=\"ltr\">$GroupName</a>";
78
   if ($GroupYear > 0) {
79
   if ($GroupYear > 0) {
79
     $DisplayName = "$DisplayName [$GroupYear]";
80
     $DisplayName = "$DisplayName [$GroupYear]";

+ 10
- 2
sections/requests/new_edit.php View File

33
     // Define these variables to simplify _GET['groupid'] requests later on
33
     // Define these variables to simplify _GET['groupid'] requests later on
34
     $CategoryID = $Request['CategoryID'];
34
     $CategoryID = $Request['CategoryID'];
35
     $Title = $Request['Title'];
35
     $Title = $Request['Title'];
36
+    $TitleRJ = $Request['TitleRJ'];
36
     $TitleJP = $Request['TitleJP'];
37
     $TitleJP = $Request['TitleJP'];
37
     $CatalogueNumber = $Request['CatalogueNumber'];
38
     $CatalogueNumber = $Request['CatalogueNumber'];
38
     $DLsiteID = $Request['DLsiteID'];
39
     $DLsiteID = $Request['DLsiteID'];
75
   $DB->query("
76
   $DB->query("
76
     SELECT
77
     SELECT
77
       tg.Name,
78
       tg.Name,
79
+      tg.NameRJ,
78
       tg.NameJP,
80
       tg.NameJP,
79
       tg.Year,
81
       tg.Year,
80
       tg.Studio,
82
       tg.Studio,
88
       JOIN torrents_tags AS tt ON tt.GroupID = tg.ID
90
       JOIN torrents_tags AS tt ON tt.GroupID = tg.ID
89
       JOIN tags AS t ON t.ID = tt.TagID
91
       JOIN tags AS t ON t.ID = tt.TagID
90
     WHERE tg.ID = ".$_GET['groupid']);
92
     WHERE tg.ID = ".$_GET['groupid']);
91
-  if (list($Title, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
93
+  if (list($Title, $TitleRJ, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
92
     $GroupID = trim($_REQUEST['groupid']);
94
     $GroupID = trim($_REQUEST['groupid']);
93
     $CategoryName = $Categories[$CategoryID - 1];
95
     $CategoryName = $Categories[$CategoryID - 1];
94
     $Disabled = 'readonly="readonly"';
96
     $Disabled = 'readonly="readonly"';
173
             <input type="text" id="title" name="title" size="45" value="<?=(!empty($Title) ? $Title : '')?>" <?=$Disabled?>/>
175
             <input type="text" id="title" name="title" size="45" value="<?=(!empty($Title) ? $Title : '')?>" <?=$Disabled?>/>
174
           </td>
176
           </td>
175
         </tr>
177
         </tr>
178
+        <tr>
179
+          <td class="label">Romaji Title</td>
180
+          <td>
181
+            <input type="text" id="title_rj" name="title_rj" size="45" value="<?=(!empty($TitleRJ) ? $TitleRJ : '')?>" <?=$Disabled?>/>
182
+          </td>
183
+        </tr>
176
         <tr>
184
         <tr>
177
           <td class="label">Japanese Title</td>
185
           <td class="label">Japanese Title</td>
178
           <td>
186
           <td>
179
-            <input type="text" id="title_jp" name="title_jp" size="45" value="<?=isset($TitleJP)?$TitleJP:''?>" <?=$Disabled?>/>
187
+            <input type="text" id="title_jp" name="title_jp" size="45" value="<?=!empty($TitleJP)?$TitleJP:''?>" <?=$Disabled?>/>
180
           </td>
188
           </td>
181
         </tr>
189
         </tr>
182
         <tr id="dlsiteid_tr">
190
         <tr id="dlsiteid_tr">

+ 17
- 7
sections/requests/request.php View File

27
   $CategoryName = $Categories[$Request['CategoryID'] - 1];
27
   $CategoryName = $Categories[$Request['CategoryID'] - 1];
28
 }
28
 }
29
 
29
 
30
+$Title = empty($Request['Title']) ? (empty($Request['TitleRJ']) ? $Request['TitleJP'] : $Request['TitleRJ']) : $Request['Title'];
31
+
30
 //Do we need to get artists?
32
 //Do we need to get artists?
31
 if ($CategoryName != 'Other') {
33
 if ($CategoryName != 'Other') {
32
   $ArtistForm = Requests::get_artists($RequestID);
34
   $ArtistForm = Requests::get_artists($RequestID);
34
   $ArtistLink = Artists::display_artists($ArtistForm, true, true);
36
   $ArtistLink = Artists::display_artists($ArtistForm, true, true);
35
 
37
 
36
   if ($IsFilled) {
38
   if ($IsFilled) {
37
-    $DisplayLink = "$ArtistLink<a href=\"torrents.php?torrentid=$Request[TorrentID]\" dir=\"ltr\">$Request[Title]</a>";
39
+    $DisplayLink = "$ArtistLink<a href=\"torrents.php?torrentid=$Request[TorrentID]\" dir=\"ltr\">$Title</a>";
38
   } else {
40
   } else {
39
-    $DisplayLink = $ArtistLink.'<span dir="ltr">'.$Request['Title']."</span>";
41
+    $DisplayLink = $ArtistLink.'<span dir="ltr">'.$Title."</span>";
40
   }
42
   }
41
 
43
 
42
-  $FullName = $ArtistName.$Request['Title'];
44
+  $FullName = $ArtistName.$Title;
43
 
45
 
44
 } else {
46
 } else {
45
   if ($IsFilled) {
47
   if ($IsFilled) {
46
-    $DisplayLink = "<a href=\"torrents.php?torrentid=$Request[TorrentID]\" dir=\"ltr\">$Request[Title]</a>";
48
+    $DisplayLink = "<a href=\"torrents.php?torrentid=$Request[TorrentID]\" dir=\"ltr\">$Title</a>";
47
   } else {
49
   } else {
48
-    $DisplayLink = "<span dir=\"ltr\">$Request[Title]</span>";
50
+    $DisplayLink = "<span dir=\"ltr\">$Title</span>";
49
   }
51
   }
50
-  $FullName = $Request['Title'];
52
+  $FullName = $Title;
51
 }
53
 }
52
 
54
 
53
-$Extra = '<br />'.$Request['TitleJP'];
55
+$Extra = "";
56
+
57
+if (!empty($Request['TitleRJ']) && $Request['TitleRJ'] != $Title) {
58
+  $Extra .= '<br />' . $Request['TitleRJ'];
59
+}
60
+
61
+if (!empty($Request['TitleJP']) && $Request['TitleJP'] != $Title) {
62
+  $Extra .= '<br />' . $Request['TitleJP'];
63
+}
54
 
64
 
55
 if (!empty($Request['CatalogueNumber'])) {
65
 if (!empty($Request['CatalogueNumber'])) {
56
   $Extra .= "<br />[$Request[CatalogueNumber]]";
66
   $Extra .= "<br />[$Request[CatalogueNumber]]";

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

491
       $IsFilled = false;
491
       $IsFilled = false;
492
     }
492
     }
493
 
493
 
494
+    $Title = empty($Request['Title']) ? (empty($Request['TitleRJ']) ? $Request['TitleJP'] : $Request['TitleRJ']) : $Request['Title'];
495
+
494
     if ($CategoryName != 'Other') {
496
     if ($CategoryName != 'Other') {
495
       $ArtistForm = Requests::get_artists($RequestID);
497
       $ArtistForm = Requests::get_artists($RequestID);
496
       $ArtistLink = Artists::display_artists($ArtistForm, true, true);
498
       $ArtistLink = Artists::display_artists($ArtistForm, true, true);
498
       if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
500
       if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
499
         $FullName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($Request['Image']).'" onmouseleave="ungetCover(event)" ';
501
         $FullName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($Request['Image']).'" onmouseleave="ungetCover(event)" ';
500
       }
502
       }
501
-      $FullName .= "dir=\"ltr\">$Request[Title]</span></a>";
503
+      $FullName .= "dir=\"ltr\">$Title</span></a>";
502
 
504
 
503
       $ExtraInfo = '';
505
       $ExtraInfo = '';
504
 
506
 
513
         $FullName .= " $ExtraInfo";
515
         $FullName .= " $ExtraInfo";
514
       }
516
       }
515
     } else {
517
     } else {
516
-      $FullName = "<a href=\"requests.php?action=view&amp;id=$RequestID\" dir=\"ltr\">$Request[Title]</a>";
518
+      $FullName = "<a href=\"requests.php?action=view&amp;id=$RequestID\" dir=\"ltr\">$Title</a>";
517
     }
519
     }
518
     $Tags = $Request['Tags'];
520
     $Tags = $Request['Tags'];
519
 ?>
521
 ?>

+ 16
- 11
sections/requests/take_new_edit.php View File

53
   error(0);
53
   error(0);
54
 }
54
 }
55
 
55
 
56
-if (empty($_POST['title'])) {
57
-  $Err = 'You forgot to enter the title!';
58
-} else {
56
+if (empty($_POST['title']) && empty($_POST['title_rj']) && empty($_POST['title_jp'])) {
57
+  $Err = 'You must enter at least one title!';
58
+}
59
+
60
+if (!empty($_POST['title'])) {
59
   $Title = trim($_POST['title']);
61
   $Title = trim($_POST['title']);
60
 }
62
 }
61
 
63
 
62
-if (empty($_POST['title_jp'])) {
63
-  $Err = 'You forgot to enter the Japanese title!';
64
-} else {
64
+if (!empty($_POST['title_rj'])) {
65
+  $TitleRJ = trim($_POST['title_rj']);
66
+}
67
+
68
+if (!empty($_POST['title_jp'])) {
65
   $TitleJP = trim($_POST['title_jp']);
69
   $TitleJP = trim($_POST['title_jp']);
66
 }
70
 }
67
 
71
 
240
 if ($NewRequest) {
244
 if ($NewRequest) {
241
   $DB->query('
245
   $DB->query('
242
     INSERT INTO requests (
246
     INSERT INTO requests (
243
-      UserID, TimeAdded, LastVote, CategoryID, Title, TitleJP, Image, Description,
247
+      UserID, TimeAdded, LastVote, CategoryID, Title, TitleRJ, TitleJP, Image, Description,
244
       CatalogueNumber, DLSiteID, Visible, GroupID)
248
       CatalogueNumber, DLSiteID, Visible, GroupID)
245
     VALUES
249
     VALUES
246
-      ('.$LoggedUser['ID'].", '".sqltime()."', '".sqltime()."', $CategoryID, '".db_string($Title)."', '".db_string($TitleJP)."', '".db_string($Image)."', '".db_string($Description)."',
250
+      ('.$LoggedUser['ID'].", '".sqltime()."', '".sqltime()."', $CategoryID, '".db_string($Title)."', '".db_string($TitleRJ)."', '".db_string($TitleJP)."', '".db_string($Image)."', '".db_string($Description)."',
247
           '".db_string($CatalogueNumber)."', '".db_string($DLSiteID)."', '1', '$GroupID')");
251
           '".db_string($CatalogueNumber)."', '".db_string($DLSiteID)."', '1', '$GroupID')");
248
 
252
 
249
   $RequestID = $DB->inserted_id();
253
   $RequestID = $DB->inserted_id();
253
     UPDATE requests
257
     UPDATE requests
254
     SET CategoryID = $CategoryID,
258
     SET CategoryID = $CategoryID,
255
       Title = '".db_string($Title)."',
259
       Title = '".db_string($Title)."',
260
+      TitleRJ = '".db_string($TitleRJ)."',
256
       TitleJP = '".db_string($TitleJP)."',
261
       TitleJP = '".db_string($TitleJP)."',
257
       Image = '".db_string($Image)."',
262
       Image = '".db_string($Image)."',
258
       Description = '".db_string($Description)."',
263
       Description = '".db_string($Description)."',
409
     WHERE ID = ".$LoggedUser['ID']);
414
     WHERE ID = ".$LoggedUser['ID']);
410
   $Cache->delete_value('user_stats_'.$LoggedUser['ID']);
415
   $Cache->delete_value('user_stats_'.$LoggedUser['ID']);
411
 
416
 
412
-
417
+  $AnnounceTitle = empty($Title) ? (empty($TitleRJ) ? $TitleJP : $TitleRJ) : $Title;
413
 
418
 
414
   if ($CategoryName != 'Other') {
419
   if ($CategoryName != 'Other') {
415
-    $Announce = "\"$Title\"".(isset($ArtistForm)?(' - '.Artists::display_artists($ArtistForm, false, false)):'').' '.site_url()."requests.php?action=view&id=$RequestID - ".implode(' ', $Tags);
420
+    $Announce = "\"$AnnounceTitle\"".(isset($ArtistForm)?(' - '.Artists::display_artists($ArtistForm, false, false)):'').' '.site_url()."requests.php?action=view&id=$RequestID - ".implode(' ', $Tags);
416
   } else {
421
   } else {
417
-    $Announce = "\"$Title\" - ".site_url()."requests.php?action=view&id=$RequestID - ".implode(' ', $Tags);
422
+    $Announce = "\"$AnnounceTitle\" - ".site_url()."requests.php?action=view&id=$RequestID - ".implode(' ', $Tags);
418
   }
423
   }
419
   send_irc('PRIVMSG '.BOT_REQUEST_CHAN.' '.$Announce);
424
   send_irc('PRIVMSG '.BOT_REQUEST_CHAN.' '.$Announce);
420
 
425
 

+ 7
- 2
sections/top10/torrents.php View File

153
     t.ID,
153
     t.ID,
154
     g.ID,
154
     g.ID,
155
     g.Name,
155
     g.Name,
156
+    g.NameRJ,
157
+    g.NameJP,
156
     g.CategoryID,
158
     g.CategoryID,
157
     g.WikiImage,
159
     g.WikiImage,
158
     g.TagList,
160
     g.TagList,
447
   $Artists = Artists::get_artists($GroupIDs);
449
   $Artists = Artists::get_artists($GroupIDs);
448
 
450
 
449
   foreach ($Details as $Detail) {
451
   foreach ($Details as $Detail) {
450
-    list($TorrentID, $GroupID, $GroupName, $GroupCategoryID, $WikiImage, $TagsList,
452
+    list($TorrentID, $GroupID, $GroupName, $GroupNameRJ, $GroupNameJP, $GroupCategoryID, $WikiImage, $TagsList,
451
       $Media, $Year, $Snatched, $Seeders, $Leechers, $Data, $Size) = $Detail;
453
       $Media, $Year, $Snatched, $Seeders, $Leechers, $Data, $Size) = $Detail;
452
 
454
 
453
     $IsBookmarked = Bookmarks::has_bookmarked('torrent', $GroupID);
455
     $IsBookmarked = Bookmarks::has_bookmarked('torrent', $GroupID);
466
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
468
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
467
       $DisplayName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover()" ';
469
       $DisplayName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover()" ';
468
     }
470
     }
469
-    $DisplayName .= "dir=\"ltr\">$GroupName</a>";
471
+
472
+
473
+    $Name = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
474
+    $DisplayName .= "dir=\"ltr\">$Name</a>";
470
 
475
 
471
     // append extra info to torrent title
476
     // append extra info to torrent title
472
     $ExtraInfo = '';
477
     $ExtraInfo = '';

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

179
         <tr id="album_torrent_name" class="ftr_advanced<?=$HideAdvanced?>">
179
         <tr id="album_torrent_name" class="ftr_advanced<?=$HideAdvanced?>">
180
           <td class="label"><!--Torrent name:--></td>
180
           <td class="label"><!--Torrent name:--></td>
181
           <td colspan="3" class="ft_groupname">
181
           <td colspan="3" class="ft_groupname">
182
-            <input type="search" spellcheck="false" size="65" name="groupname" class="inputtext smaller fti_advanced" placeholder="Torrent name" value="<?Format::form('groupname')?>" />
182
+            <input type="search" spellcheck="false" size="65" name="advgroupname" class="inputtext smaller fti_advanced" placeholder="Torrent name" value="<?Format::form('advgroupname')?>" />
183
           </td>
183
           </td>
184
         </tr>
184
         </tr>
185
         <tr id="catalogue_number" class="ftr_advanced<?=$HideAdvanced?>">
185
         <tr id="catalogue_number" class="ftr_advanced<?=$HideAdvanced?>">
482
   $GroupPages = $GroupInfo['Pages'];
482
   $GroupPages = $GroupInfo['Pages'];
483
   $GroupStudio = $GroupInfo['Studio'];
483
   $GroupStudio = $GroupInfo['Studio'];
484
   $GroupDLsiteID = $GroupInfo['DLSiteID'];
484
   $GroupDLsiteID = $GroupInfo['DLSiteID'];
485
-  $GroupName = $GroupInfo['Name'];
485
+  $GroupName = empty($GroupInfo['Name']) ? (empty($GroupInfo['NameRJ']) ? $GroupInfo['NameJP'] : $GroupInfo['NameRJ']) : $GroupInfo['Name'];
486
   if ($GroupResults) {
486
   if ($GroupResults) {
487
     $Torrents = $GroupInfo['Torrents'];
487
     $Torrents = $GroupInfo['Torrents'];
488
     $GroupTime = $MaxSize = $TotalLeechers = $TotalSeeders = $TotalSnatched = 0;
488
     $GroupTime = $MaxSize = $TotalLeechers = $TotalSeeders = $TotalSnatched = 0;

+ 13
- 1
sections/torrents/details.php View File

21
 $TorrentList = $TorrentCache[1];
21
 $TorrentList = $TorrentCache[1];
22
 
22
 
23
 // Group details
23
 // Group details
24
-list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupNameJP, $GroupYear,
24
+list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupNameRJ, $GroupNameJP, $GroupYear,
25
   $GroupStudio, $GroupSeries, $GroupCatalogueNumber, $GroupPages, $GroupCategoryID,
25
   $GroupStudio, $GroupSeries, $GroupCatalogueNumber, $GroupPages, $GroupCategoryID,
26
   $GroupDLsiteID, $GroupTime, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs,
26
   $GroupDLsiteID, $GroupTime, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs,
27
   $TagPositiveVotes, $TagNegativeVotes, $Screenshots, $GroupFlags) = array_values($TorrentDetails);
27
   $TagPositiveVotes, $TagNegativeVotes, $Screenshots, $GroupFlags) = array_values($TorrentDetails);
28
 
28
 
29
+if (!$GroupName) {
30
+  if (!$GroupNameRJ) {
31
+    $GroupName = $GroupNameJP;
32
+  } else {
33
+    $GroupName = $GroupNameRJ;
34
+  }
35
+}
36
+
29
 $DisplayName = "<span dir=\"ltr\">$GroupName</span><br />";
37
 $DisplayName = "<span dir=\"ltr\">$GroupName</span><br />";
30
 $AltName = $GroupName; // Goes in the alt text of the image
38
 $AltName = $GroupName; // Goes in the alt text of the image
31
 $Title = $GroupName; // goes in <title>
39
 $Title = $GroupName; // goes in <title>
33
 
41
 
34
 $Artists = Artists::get_artist($GroupID);
42
 $Artists = Artists::get_artist($GroupID);
35
 
43
 
44
+if ($GroupNameRJ && $GroupNameRJ != $GroupName) {
45
+  $DisplayName .= "<span dir=\"ltr\">$GroupNameRJ</span><br />";
46
+}
47
+
36
 if ($GroupNameJP && $GroupNameJP != $GroupName) {
48
 if ($GroupNameJP && $GroupNameJP != $GroupName) {
37
   $DisplayName .= "<span dir=\"ltr\">$GroupNameJP</span><br />";
49
   $DisplayName .= "<span dir=\"ltr\">$GroupNameJP</span><br />";
38
 }
50
 }

+ 9
- 2
sections/torrents/editgroup.php View File

40
 $DB->query("
40
 $DB->query("
41
   SELECT
41
   SELECT
42
     tg.Name,
42
     tg.Name,
43
+    tg.NameRJ,
43
     tg.NameJP,
44
     tg.NameJP,
44
     wt.Image,
45
     wt.Image,
45
     wt.Body,
46
     wt.Body,
59
 if (!$DB->has_results()) {
60
 if (!$DB->has_results()) {
60
   error(404);
61
   error(404);
61
 }
62
 }
62
-list($Name, $NameJP, $Image, $Body, $WikiImage, $WikiBody, $Year, $Studio, $Series, $DLsiteID, $CatalogueNumber, $Pages, $CategoryID, $DLsiteID) = $DB->next_record();
63
+list($Name, $NameRJ, $NameJP, $Image, $Body, $WikiImage, $WikiBody, $Year, $Studio, $Series, $DLsiteID, $CatalogueNumber, $Pages, $CategoryID, $DLsiteID) = $DB->next_record();
63
 
64
 
64
 $DB->query("
65
 $DB->query("
65
   SELECT
66
   SELECT
296
           <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
297
           <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
297
           <input type="hidden" name="groupid" value="<?=$GroupID?>" />
298
           <input type="hidden" name="groupid" value="<?=$GroupID?>" />
298
           <tr>
299
           <tr>
299
-            <td class="label">Title: </td>
300
+            <td class="label">English Title: </td>
300
             <td>
301
             <td>
301
               <input type="text" name="name" size="70" value="<?=$Name?>" />
302
               <input type="text" name="name" size="70" value="<?=$Name?>" />
302
             </td>
303
             </td>
303
           </tr>
304
           </tr>
305
+          <tr>
306
+            <td class="label">Romaji Title: </td>
307
+            <td>
308
+              <input type="text" name="namerj" size="70" value="<?=$NameRJ?>" />
309
+            </td>
310
+          </tr>
304
           <tr>
311
           <tr>
305
             <td class="label">Japanese Title: </td>
312
             <td class="label">Japanese Title: </td>
306
             <td>
313
             <td>

+ 1
- 0
sections/torrents/functions.php View File

22
     $SQL .= "
22
     $SQL .= "
23
         g.ID,
23
         g.ID,
24
         g.Name,
24
         g.Name,
25
+        g.NameRJ,
25
         g.NameJP,
26
         g.NameJP,
26
         g.Year,
27
         g.Year,
27
         g.Studio,
28
         g.Studio,

+ 25
- 11
sections/torrents/rename.php View File

4
 $GroupID = $_POST['groupid'];
4
 $GroupID = $_POST['groupid'];
5
 $OldGroupID = $GroupID;
5
 $OldGroupID = $GroupID;
6
 $NewName = $_POST['name'];
6
 $NewName = $_POST['name'];
7
+$NewRJ = $_POST['namerj'];
7
 $NewJP = $_POST['namejp'];
8
 $NewJP = $_POST['namejp'];
8
 
9
 
9
 $DB->query("
10
 $DB->query("
17
   error(404);
18
   error(404);
18
 }
19
 }
19
 
20
 
20
-if (empty($NewName) || empty($NewJP)) {
21
-  error('Torrent groups must have a name');
22
-}
23
-
24
 if (!($Contributed || check_perms('torrents_edit'))) {
21
 if (!($Contributed || check_perms('torrents_edit'))) {
25
   error(403);
22
   error(403);
26
 }
23
 }
27
 
24
 
28
-$DB->query("
29
-  SELECT Name
30
-  FROM torrents_group
31
-  WHERE ID = $GroupID");
32
-list($OldName) = $DB->next_record(MYSQLI_NUM, false);
25
+if (empty($NewName) && empty($NewRJ) && empty($NewJP)) {
26
+  error('Torrent groups must have a name');
27
+}
33
 
28
 
34
 $DB->query("
29
 $DB->query("
35
   UPDATE torrents_group
30
   UPDATE torrents_group
36
   SET Name = '".db_string($NewName)."',
31
   SET Name = '".db_string($NewName)."',
32
+  NameRJ = '".db_string($NewRJ)."',
37
   NameJP = '".db_string($NewJP)."'
33
   NameJP = '".db_string($NewJP)."'
38
   WHERE ID = '$GroupID'");
34
   WHERE ID = '$GroupID'");
39
 $Cache->delete_value("torrents_details_$GroupID");
35
 $Cache->delete_value("torrents_details_$GroupID");
40
 
36
 
41
 Torrents::update_hash($GroupID);
37
 Torrents::update_hash($GroupID);
42
 
38
 
43
-Misc::write_log("Torrent Group $GroupID ($OldName) was renamed to \"$NewName\" from \"$OldName\" by ".$LoggedUser['Username']);
44
-Torrents::write_group_log($GroupID, 0, $LoggedUser['ID'], "renamed to \"$NewName\" from \"$OldName\"", 0);
39
+$DB->query("
40
+  SELECT Name, NameRJ, NameJP
41
+  FROM torrents_group
42
+  WHERE ID = $GroupID");
43
+list($OldName, $OldRJ, $OldJP) = $DB->next_record(MYSQLI_NUM, false);
44
+
45
+if ($OldName != $NewName) {
46
+  Misc::write_log("Torrent Group $GroupID ($OldName)'s title was changed to \"$NewName\" from \"$OldName\" by ".$LoggedUser['Username']);
47
+  Torrents::write_group_log($GroupID, 0, $LoggedUser['ID'], "title changed to \"$NewName\" from \"$OldName\"", 0);
48
+}
49
+
50
+if ($OldRJ != $NewRJ) {
51
+  Misc::write_log("Torrent Group $GroupID ($OldRJ)'s romaji title was changed to \"$NewRJ\" from \"$OldRJ\" by ".$LoggedUser['Username']);
52
+  Torrents::write_group_log($GroupID, 0, $LoggedUser['ID'], "romaji title changed to \"$NewRJ\" from \"$OldRJ\"", 0);
53
+}
54
+
55
+if ($OldJP != $NewJP) {
56
+  Misc::write_log("Torrent Group $GroupID ($OldJP)'s japanese title was changed to \"$NewJP\" from \"$OldJP\" by ".$LoggedUser['Username']);
57
+  Torrents::write_group_log($GroupID, 0, $LoggedUser['ID'], "japanese title changed to \"$NewJP\" from \"$OldJP\"", 0);
58
+}
45
 
59
 
46
 header("Location: torrents.php?id=$GroupID");
60
 header("Location: torrents.php?id=$GroupID");

+ 1
- 0
sections/torrents/user.php View File

515
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
515
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
516
       $DisplayName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($WikiImage).'" onmouseleave="ungetCover()" ';
516
       $DisplayName .= 'onmouseover="getCover(event)" cover="'.ImageTools::process($WikiImage).'" onmouseleave="ungetCover()" ';
517
     }
517
     }
518
+    $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
518
     $DisplayName .= 'dir="ltr">'.$GroupName.'</a>';
519
     $DisplayName .= 'dir="ltr">'.$GroupName.'</a>';
519
     if ($GroupYear) {
520
     if ($GroupYear) {
520
       $DisplayName .= " [$GroupYear]";
521
       $DisplayName .= " [$GroupYear]";

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

38
 $TypeID = $_POST['type'] + 1;
38
 $TypeID = $_POST['type'] + 1;
39
 $Properties['CategoryName'] = $Type;
39
 $Properties['CategoryName'] = $Type;
40
 $Properties['Title'] = $_POST['title'];
40
 $Properties['Title'] = $_POST['title'];
41
+$Properties['TitleRJ'] = $_POST['title_rj'];
41
 $Properties['TitleJP'] = $_POST['title_jp'];
42
 $Properties['TitleJP'] = $_POST['title_jp'];
42
 $Properties['Year'] = $_POST['year'];
43
 $Properties['Year'] = $_POST['year'];
43
 
44
 
145
   default:
146
   default:
146
     if (!isset($_POST['groupid']) || !$_POST['groupid']) {
147
     if (!isset($_POST['groupid']) || !$_POST['groupid']) {
147
       $Validate->SetFields('title',
148
       $Validate->SetFields('title',
148
-        '1','string','Title must be between 1 and 200 characters.', array('maxlength'=>200, 'minlength'=>1));
149
+        '0','string','Title must be between 1 and 300 characters.', array('maxlength'=>300, 'minlength'=>1));
150
+      $Validate->SetFields('title_rj',
151
+        '0','string', 'Romaji Title must be between 1 and 300 characters.', array('maxlength'=>300, 'minlength'=>1));
149
 
152
 
150
-    if (isset($_POST['title_jp'])) {
151
       $Validate->SetFields('title_jp',
153
       $Validate->SetFields('title_jp',
152
-        '1','string','Japanese Title must be between 1 and 512 bytes.', array('maxlength'=>512, 'minlength'=>1));
153
-    }
154
+        '0','string','Japanese Title must be between 1 and 512 bytes.', array('maxlength'=>512, 'minlength'=>1));
154
 
155
 
155
       $Validate->SetFields('tags',
156
       $Validate->SetFields('tags',
156
         '1','string','You must enter at least five tag. Maximum length is 1500 characters.', array('maxlength'=>1500, 'minlength'=>2));
157
         '1','string','You must enter at least five tag. Maximum length is 1500 characters.', array('maxlength'=>1500, 'minlength'=>2));
174
   $Err = 'You must enter at least 5 tags.';
175
   $Err = 'You must enter at least 5 tags.';
175
 }
176
 }
176
 
177
 
178
+if (!(isset($_POST['title']) || isset($_POST['title_rj']) || isset($_POST['title_jp']))) {
179
+  $Err = 'You must enter at least one title.';
180
+}
181
+
177
 $File = $_FILES['file_input']; // This is our torrent file
182
 $File = $_FILES['file_input']; // This is our torrent file
178
 $TorrentName = $File['tmp_name'];
183
 $TorrentName = $File['tmp_name'];
179
 
184
 
448
   // Create torrent group
453
   // Create torrent group
449
   $DB->query("
454
   $DB->query("
450
     INSERT INTO torrents_group
455
     INSERT INTO torrents_group
451
-      (CategoryID, Name, NameJP, Year, Series, Studio, CatalogueNumber, Pages, Time, WikiBody, WikiImage, DLsiteID)
456
+      (CategoryID, Name, NameRJ, NameJP, Year, Series, Studio, CatalogueNumber, Pages, Time, WikiBody, WikiImage, DLsiteID)
452
     VALUES
457
     VALUES
453
-      ($TypeID, ".$T['Title'].", ".$T['TitleJP'].", ".$T['Year'].", ".$T['Series'].", ".$T['Studio'].", ".$T['CatalogueNumber'].", " . $T['Pages'] . ", '".sqltime()."', '".db_string($Body)."', ".$T['Image'].", ".$T['DLsiteID'].")");
458
+      ($TypeID, ".$T['Title'].", ".$T['TitleRJ'].", ".$T['TitleJP'].", ".$T['Year'].", ".$T['Series'].", ".$T['Studio'].", ".$T['CatalogueNumber'].", " . $T['Pages'] . ", '".sqltime()."', '".db_string($Body)."', ".$T['Image'].", ".$T['DLsiteID'].")");
454
   $GroupID = $DB->inserted_id();
459
   $GroupID = $DB->inserted_id();
455
   if ($Type == 'Movies' || $Type == 'Anime' || $Type == 'Manga' || $Type == 'Games') {
460
   if ($Type == 'Movies' || $Type == 'Anime' || $Type == 'Manga' || $Type == 'Games') {
456
     foreach ($ArtistForm as $Num => $Artist) {
461
     foreach ($ArtistForm as $Num => $Artist) {
696
 if ($Type != 'Other') {
701
 if ($Type != 'Other') {
697
   $Announce .= Artists::display_artists($ArtistForm, false);
702
   $Announce .= Artists::display_artists($ArtistForm, false);
698
 }
703
 }
699
-$Announce .= trim($Properties['Title']).' ';
704
+$Announce .= empty($Properties['Title']) ? (empty($Properties['TitleRJ']) ? trim($Properties['TitleJP']) : trim($Properties['TitleRJ'])) : trim($Properties['Title']);
705
+$Announce .= ' ';
700
 if ($Type != 'Other') {
706
 if ($Type != 'Other') {
701
   $Announce .= '['.Torrents::torrent_info($Properties, false, false, false).']';
707
   $Announce .= '['.Torrents::torrent_info($Properties, false, false, false).']';
702
 }
708
 }

+ 14
- 4
sections/user/user.php View File

690
       SELECT
690
       SELECT
691
         g.ID,
691
         g.ID,
692
         g.Name,
692
         g.Name,
693
+        g.NameRJ,
694
+        g.NameJP,
693
         g.WikiImage
695
         g.WikiImage
694
       FROM xbt_snatched AS s
696
       FROM xbt_snatched AS s
695
         INNER JOIN torrents AS t ON t.ID = s.fid
697
         INNER JOIN torrents AS t ON t.ID = s.fid
715
       <span style="float: right;"><a onclick="$('#recent_snatches_images').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); wall('#recent_snatches_images', '.collage_image', [2,3]); return false;" class="brackets">Show</a></span>&nbsp;
717
       <span style="float: right;"><a onclick="$('#recent_snatches_images').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); wall('#recent_snatches_images', '.collage_image', [2,3]); return false;" class="brackets">Show</a></span>&nbsp;
716
     </div>
718
     </div>
717
     <div id="recent_snatches_images" class="collage_images hidden">
719
     <div id="recent_snatches_images" class="collage_images hidden">
718
-<?    foreach ($RecentSnatches as $RS) { ?>
720
+<?    foreach ($RecentSnatches as $RS) {
721
+        $RSName = empty($RS['Name']) ? (empty($RS['NameRJ']) ? $RS['NameJP'] : $RS['NameRJ']) : $RS['Name'];
722
+ ?>
719
       <div style='width: 100px;' class='collage_image' >
723
       <div style='width: 100px;' class='collage_image' >
720
         <a href="torrents.php?id=<?=$RS['ID']?>">
724
         <a href="torrents.php?id=<?=$RS['ID']?>">
721
-          <img class="tooltip" title="<?=display_str($RS['Artist'])?><?=display_str($RS['Name'])?>" src="<?=ImageTools::process($RS['WikiImage'], true)?>" alt="<?=display_str($RS['Artist'])?><?=display_str($RS['Name'])?>" width="100%" />
725
+          <img class="tooltip" title="<?=display_str($RS['Artist'])?><?=display_str($RSName)?>" src="<?=ImageTools::process($RS['WikiImage'], true)?>" alt="<?=display_str($RS['Artist'])?><?=display_str($RSName)?>" width="100%" />
722
         </a>
726
         </a>
723
       </div>
727
       </div>
724
 <?    } ?>
728
 <?    } ?>
735
       SELECT
739
       SELECT
736
         g.ID,
740
         g.ID,
737
         g.Name,
741
         g.Name,
742
+        g.NameRJ,
743
+        g.NameJP,
738
         g.WikiImage
744
         g.WikiImage
739
       FROM torrents_group AS g
745
       FROM torrents_group AS g
740
         INNER JOIN torrents AS t ON t.GroupID = g.ID
746
         INNER JOIN torrents AS t ON t.GroupID = g.ID
758
       <span style="float: right;"><a onclick="$('#recent_uploads_images').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); wall('#recent_uploads_images', '.collage_image', [2,3]); return false;" class="brackets">Show</a></span>&nbsp;
764
       <span style="float: right;"><a onclick="$('#recent_uploads_images').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); wall('#recent_uploads_images', '.collage_image', [2,3]); return false;" class="brackets">Show</a></span>&nbsp;
759
     </div>
765
     </div>
760
     <div id="recent_uploads_images" class="collage_images hidden">
766
     <div id="recent_uploads_images" class="collage_images hidden">
761
-<?    foreach ($RecentUploads as $RU) { ?>
767
+<?    foreach ($RecentUploads as $RU) {
768
+        $RUName = empty($RU['Name']) ? (empty($RU['NameRJ']) ? $RU['NameJP'] : $RU['NameRJ']) : $RU['Name'];
769
+?>
762
       <div style='width: 100px;' class='collage_image' >
770
       <div style='width: 100px;' class='collage_image' >
763
         <a href="torrents.php?id=<?=$RU['ID']?>">
771
         <a href="torrents.php?id=<?=$RU['ID']?>">
764
-          <img class="tooltip" title="<?=$RU['Artist']?><?=$RU['Name']?>" src="<?=ImageTools::process($RU['WikiImage'], true)?>" alt="<?=$RU['Artist']?><?=$RU['Name']?>" width="100%" />
772
+          <img class="tooltip" title="<?=$RU['Artist']?><?=$RUName?>" src="<?=ImageTools::process($RU['WikiImage'], true)?>" alt="<?=$RU['Artist']?><?=$RUName?>" width="100%" />
765
         </a>
773
         </a>
766
       </div>
774
       </div>
767
 <?    } ?>
775
 <?    } ?>
912
       } elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
920
       } elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
913
         $FullName = "<a href=\"requests.php?action=view&amp;id=$RequestID\">$Request[Title] [$Request[Year]]</a>";
921
         $FullName = "<a href=\"requests.php?action=view&amp;id=$RequestID\">$Request[Title] [$Request[Year]]</a>";
914
       } else {
922
       } else {
923
+        if (!$Request['Title']) { $Request['Title'] = $Request['TitleRJ']; }
924
+        if (!$Request['Title']) { $Request['Title'] = $Request['TitleJP']; }
915
         $FullName = "<a href=\"requests.php?action=view&amp;id=$RequestID\">$Request[Title]</a>";
925
         $FullName = "<a href=\"requests.php?action=view&amp;id=$RequestID\">$Request[Title]</a>";
916
       }
926
       }
917
 ?>
927
 ?>

Loading…
Cancel
Save