Browse Source

Support arbitrary thumbnailing profiles

spaghetti 7 years ago
parent
commit
dd5fa382c4

+ 7
- 16
classes/imagetools.class.php View File

7
 class ImageTools {
7
 class ImageTools {
8
 
8
 
9
   /**
9
   /**
10
-   * Create image proxy URL
11
-   * @param string $Url image URL
12
-   * @return image proxy URL
10
+   * Determine the image URL. This takes care of the image proxy and thumbnailing.
11
+   * @param string $Url
12
+   * @param string $Thumb image proxy scale profile to use
13
+   * @return string
13
    */
14
    */
14
-  public static function proxy_url($Url, $Thumb = false) {
15
+  public static function process($Url = '', $Thumb = false) {
16
+    if (!$Url) return '';
15
     if (preg_match('/^https:\/\/('.SITE_DOMAIN.'|'.IMAGE_DOMAIN.')\//', $Url) || $Url[0]=='/') {
17
     if (preg_match('/^https:\/\/('.SITE_DOMAIN.'|'.IMAGE_DOMAIN.')\//', $Url) || $Url[0]=='/') {
16
       if (strpos($Url, '?') === false) $Url .= '?';
18
       if (strpos($Url, '?') === false) $Url .= '?';
17
       return $Url;
19
       return $Url;
18
     } else {
20
     } else {
19
-      return 'https://'.IMAGE_DOMAIN.($Thumb?'/thumb/':'/').'?h='.rawurlencode(base64_encode(hash_hmac('sha256', $Url, IMAGE_PSK, true))).'&i='.urlencode($Url);
21
+      return 'https://'.IMAGE_DOMAIN.($Thumb?"/$Thumb/":'/').'?h='.rawurlencode(base64_encode(hash_hmac('sha256', $Url, IMAGE_PSK, true))).'&i='.urlencode($Url);
20
     }
22
     }
21
   }
23
   }
22
 
24
 
23
-  /**
24
-   * Determine the image URL. This takes care of the image proxy and thumbnailing.
25
-   * @param string $Url
26
-   * @param bool $Thumb
27
-   * @return string
28
-   */
29
-  public static function process($Url = '', $Thumb = false) {
30
-    // TODO: Thumbnailing
31
-    return $Url ? self::proxy_url($Url, $Thumb) : '';
32
-  }
33
-
34
   /**
25
   /**
35
    * Checks if a link's host is (not) good, otherwise displays an error.
26
    * Checks if a link's host is (not) good, otherwise displays an error.
36
    * @param string $Url Link to an image
27
    * @param string $Url Link to an image

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

732
                 }
732
                 }
733
                 $Str .= '"';
733
                 $Str .= '"';
734
                 if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
734
                 if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
735
-                  $Str .= " onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($Group['WikiImage'], true)."\" onmouseleave=\"ungetCover(event)\"";
735
+                  $Str .= " onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($Group['WikiImage'], 'thumb')."\" onmouseleave=\"ungetCover(event)\"";
736
                 }
736
                 }
737
                 $Name = empty($Group['Name']) ? (empty($Group['NameRJ']) ? $Group['NameJP'] : $Group['NameRJ']) : $Group['Name'];
737
                 $Name = empty($Group['Name']) ? (empty($Group['NameRJ']) ? $Group['NameJP'] : $Group['NameRJ']) : $Group['Name'];
738
                 $Str .= '>'.$Name.'</a>';
738
                 $Str .= '>'.$Name.'</a>';

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

521
    * @return string
521
    * @return string
522
    */
522
    */
523
   public static function show_avatar($Avatar, $UserID, $Username, $Setting, $Size = 150, $ReturnHTML = true) {
523
   public static function show_avatar($Avatar, $UserID, $Username, $Setting, $Size = 150, $ReturnHTML = true) {
524
-    $Avatar = ImageTools::process($Avatar);
524
+    $Avatar = ImageTools::process($Avatar, 'avatar');
525
     $Style = 'style="max-height: 400px;"';
525
     $Style = 'style="max-height: 400px;"';
526
     $AvatarMouseOverText = '';
526
     $AvatarMouseOverText = '';
527
     $SecondAvatar = '';
527
     $SecondAvatar = '';
538
       $AvatarMouseOverText = "alt=\"$Username's avatar\"";
538
       $AvatarMouseOverText = "alt=\"$Username's avatar\"";
539
     }
539
     }
540
     if ($EnabledRewards['HasSecondAvatar'] && !empty($Rewards['SecondAvatar'])) {
540
     if ($EnabledRewards['HasSecondAvatar'] && !empty($Rewards['SecondAvatar'])) {
541
-      $SecondAvatar = ' data-gazelle-second-avatar="' . ImageTools::process($Rewards['SecondAvatar']) . '"';
541
+      $SecondAvatar = ' data-gazelle-second-avatar="' . ImageTools::process($Rewards['SecondAvatar'], 'avatar') . '"';
542
     }
542
     }
543
     // case 1 is avatars disabled
543
     // case 1 is avatars disabled
544
     switch ($Setting) {
544
     switch ($Setting) {

+ 3
- 3
sections/artist/artist.php View File

206
 
206
 
207
     $DisplayName .= "<a href=\"torrents.php?id=$GroupID\" class=\"tooltip\" title=\"View torrent group\" ";
207
     $DisplayName .= "<a href=\"torrents.php?id=$GroupID\" class=\"tooltip\" title=\"View torrent group\" ";
208
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
208
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
209
-      $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover()" ';
209
+      $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, 'thumb').'" onmouseleave="ungetCover()" ';
210
     }
210
     }
211
 
211
 
212
     $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
212
     $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
312
 
312
 
313
     $DisplayName .= "<a class=\"torrent_name\" href=\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID#torrent$TorrentID\" ";
313
     $DisplayName .= "<a class=\"torrent_name\" href=\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID#torrent$TorrentID\" ";
314
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
314
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
315
-      $DisplayName .= "onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($WikiImage, true)."\" onmouseleave=\"ungetCover(event)\" ";
315
+      $DisplayName .= "onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($WikiImage, 'thumb')."\" onmouseleave=\"ungetCover(event)\" ";
316
     }
316
     }
317
 
317
 
318
     $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
318
     $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
463
     <div class="box box_image">
463
     <div class="box box_image">
464
       <div class="head"><strong><?=$Name?></strong></div>
464
       <div class="head"><strong><?=$Name?></strong></div>
465
       <div style="text-align: center; padding: 10px 0px;">
465
       <div style="text-align: center; padding: 10px 0px;">
466
-        <img style="max-width: 220px;" class="lightbox-init" src="<?=ImageTools::process($Image, true)?>" alt="<?=$Name?>" />
466
+        <img style="max-width: 220px;" class="lightbox-init" src="<?=ImageTools::process($Image, 'thumb')?>" alt="<?=$Name?>" />
467
       </div>
467
       </div>
468
     </div>
468
     </div>
469
 <?  } ?>
469
 <?  } ?>

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

52
 
52
 
53
   $DisplayName = "<a href=\"torrents.php?id=$ID\" class=\"tooltip\" title=\"View torrent group\" ";
53
   $DisplayName = "<a href=\"torrents.php?id=$ID\" class=\"tooltip\" title=\"View torrent group\" ";
54
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
54
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
55
-    $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover(event)" ';
55
+    $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, 'thumb').'" onmouseleave="ungetCover(event)" ';
56
   }
56
   }
57
   $DisplayName .= "dir=\"ltr\">$Name</a>";
57
   $DisplayName .= "dir=\"ltr\">$Name</a>";
58
   if ($Year > 0) {
58
   if ($Year > 0) {

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

54
 
54
 
55
   $DisplayName = "<a href=\"torrents.php?id=$ID\" class=\"tooltip\" title=\"View torrent group\" ";
55
   $DisplayName = "<a href=\"torrents.php?id=$ID\" class=\"tooltip\" title=\"View torrent group\" ";
56
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
56
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
57
-    $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover(event)" ';
57
+    $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, 'thumb').'" onmouseleave="ungetCover(event)" ';
58
   }
58
   }
59
   $DisplayName .= "dir=\"ltr\">$LangName</a>";
59
   $DisplayName .= "dir=\"ltr\">$LangName</a>";
60
   if ($Year > 0) {
60
   if ($Year > 0) {

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

248
     <li class="image_group_<?=$GroupID?>">
248
     <li class="image_group_<?=$GroupID?>">
249
       <a href="torrents.php?id=<?=$GroupID?>" class="bookmark_<?=$GroupID?>">
249
       <a href="torrents.php?id=<?=$GroupID?>" class="bookmark_<?=$GroupID?>">
250
 <?  if ($WikiImage) { ?>
250
 <?  if ($WikiImage) { ?>
251
-        <img class="tooltip_interactive" src="<?=ImageTools::process($WikiImage, true)?>" alt="<?=$DisplayName?>" title="<?=$DisplayName?> <br /> <?=$Tags?>" data-title-plain="<?="$DisplayName ($PlainTags)"?>" width="118" />
251
+        <img class="tooltip_interactive" src="<?=ImageTools::process($WikiImage, 'thumb')?>" alt="<?=$DisplayName?>" title="<?=$DisplayName?> <br /> <?=$Tags?>" data-title-plain="<?="$DisplayName ($PlainTags)"?>" width="118" />
252
 <?  } else { ?>
252
 <?  } else { ?>
253
         <div style="width: 107px; padding: 5px;"><?=$DisplayName?></div>
253
         <div style="width: 107px; padding: 5px;"><?=$DisplayName?></div>
254
 <?  } ?>
254
 <?  } ?>
260
 <?  if (!$WikiImage) {
260
 <?  if (!$WikiImage) {
261
       $WikiImage = STATIC_SERVER.'common/noartwork/nocover.png';
261
       $WikiImage = STATIC_SERVER.'common/noartwork/nocover.png';
262
 } ?>
262
 } ?>
263
-        <img class="tooltip_interactive" src="<?=ImageTools::process($WikiImage, true)?>" alt="<?=$DisplayName?>" title="<?=$DisplayName?> <br /> <?=$Tags?>" data-title-plain="<?="$DisplayName ($PlainTags)"?>" width="100%" />
263
+        <img class="tooltip_interactive" src="<?=ImageTools::process($WikiImage, 'thumb')?>" alt="<?=$DisplayName?>" title="<?=$DisplayName?> <br /> <?=$Tags?>" data-title-plain="<?="$DisplayName ($PlainTags)"?>" width="100%" />
264
       </a>
264
       </a>
265
     </div>
265
     </div>
266
 
266
 

+ 1
- 1
sections/collages/artist_collage.php View File

47
         <li class="image_group_<?=$Artist['ArtistID']?>">
47
         <li class="image_group_<?=$Artist['ArtistID']?>">
48
           <a href="artist.php?id=<?=$Artist['ArtistID']?>">
48
           <a href="artist.php?id=<?=$Artist['ArtistID']?>">
49
 <?  if ($Artist['Image']) { ?>
49
 <?  if ($Artist['Image']) { ?>
50
-            <img class="tooltip" src="<?=ImageTools::process($Artist['Image'], true)?>" alt="<?=$Artist['Name']?>" title="<?=$Artist['Name']?>" width="118" />
50
+            <img class="tooltip" src="<?=ImageTools::process($Artist['Image'], 'thumb')?>" alt="<?=$Artist['Name']?>" title="<?=$Artist['Name']?>" width="118" />
51
 <?  } else { ?>
51
 <?  } else { ?>
52
             <span style="width: 107px; padding: 5px;"><?=$Artist['Name']?></span>
52
             <span style="width: 107px; padding: 5px;"><?=$Artist['Name']?></span>
53
 <?  } ?>
53
 <?  } ?>

+ 2
- 2
sections/collages/torrent_collage.php View File

71
 
71
 
72
   $DisplayName .= "<a href=\"torrents.php?id=$GroupID\" ";
72
   $DisplayName .= "<a href=\"torrents.php?id=$GroupID\" ";
73
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
73
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
74
-    $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover(event)" ';
74
+    $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, 'thumb').'" onmouseleave="ungetCover(event)" ';
75
   }
75
   }
76
   $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
76
   $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
77
   $DisplayName .= "dir=\"ltr\">$GroupName</a>";
77
   $DisplayName .= "dir=\"ltr\">$GroupName</a>";
244
 <?  if (!$WikiImage) {
244
 <?  if (!$WikiImage) {
245
       $WikiImage = STATIC_SERVER.'common/noartwork/nocover.png';
245
       $WikiImage = STATIC_SERVER.'common/noartwork/nocover.png';
246
     } ?>
246
     } ?>
247
-            <img class="tooltip_interactive" src="<?=ImageTools::process($WikiImage, true)?>" alt="<?=$DisplayName?>" title="<?=$DisplayName?> <br /> <div class='tags'><?=$Tags?></div>" data-title-plain="<?="$DisplayName ($PlainTags)"?>" width="100%" />
247
+            <img class="tooltip_interactive" src="<?=ImageTools::process($WikiImage, 'thumb')?>" alt="<?=$DisplayName?>" title="<?=$DisplayName?> <br /> <div class='tags'><?=$Tags?></div>" data-title-plain="<?="$DisplayName ($PlainTags)"?>" width="100%" />
248
           </a>
248
           </a>
249
         </div>
249
         </div>
250
 <?
250
 <?

+ 1
- 1
sections/index/private.php View File

153
     $DisplayTime = '('.str_replace(['year','month','week','day','hour','min','Just now','s',' '],['y','M','w','d','h','m','0m'],time_diff($ExpiryTime, 1, false)).') ';
153
     $DisplayTime = '('.str_replace(['year','month','week','day','hour','min','Just now','s',' '],['y','M','w','d','h','m','0m'],time_diff($ExpiryTime, 1, false)).') ';
154
     $DisplayName = '<a href="torrents.php?torrentid='.$ID.'"';
154
     $DisplayName = '<a href="torrents.php?torrentid='.$ID.'"';
155
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
155
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
156
-      $DisplayName .= " onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($Image, true)."\" onmouseleave=\"ungetCover(event)\"";
156
+      $DisplayName .= " onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($Image, 'thumb')."\" onmouseleave=\"ungetCover(event)\"";
157
     }
157
     }
158
     $DisplayName .= '>'.$Name.'</a>';
158
     $DisplayName .= '>'.$Name.'</a>';
159
 ?>
159
 ?>

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

117
 <?
117
 <?
118
     if (!empty($Request['Image'])) {
118
     if (!empty($Request['Image'])) {
119
 ?>
119
 ?>
120
-          <img style="width: 100%;" src="<?=ImageTools::process($Request['Image'], true)?>" lightbox-img="<?=ImageTools::process($Request['Image'])?>" alt="<?=$FullName?>" class="lightbox-init" />
120
+          <img style="width: 100%;" src="<?=ImageTools::process($Request['Image'], 'thumb')?>" lightbox-img="<?=ImageTools::process($Request['Image'])?>" alt="<?=$FullName?>" class="lightbox-init" />
121
 <?    } else { ?>
121
 <?    } else { ?>
122
           <img style="width: 100%;" src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$Request['CategoryID'] - 1]?>" alt="<?=$CategoryName?>" class="tooltip" title="<?=$CategoryName?>" height="220" border="0" />
122
           <img style="width: 100%;" src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$Request['CategoryID'] - 1]?>" alt="<?=$CategoryName?>" class="tooltip" title="<?=$CategoryName?>" height="220" border="0" />
123
 <?    } ?>
123
 <?    } ?>

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

41
 foreach ($Torrents as $Torrent) {
41
 foreach ($Torrents as $Torrent) {
42
   $DisplayName = "<a href=\"torrents.php?id=$Torrent[ID]&torrentid=$Torrent[TorrentID]\" ";
42
   $DisplayName = "<a href=\"torrents.php?id=$Torrent[ID]&torrentid=$Torrent[TorrentID]\" ";
43
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
43
   if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
44
-    $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($Torrent['WikiImage'], true).'" onmouseleave="ungetCover(event)" ';
44
+    $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($Torrent['WikiImage'], 'thumb').'" onmouseleave="ungetCover(event)" ';
45
   }
45
   }
46
   $DisplayName .= "dir=\"ltr\">$Torrent[Name]</a>";
46
   $DisplayName .= "dir=\"ltr\">$Torrent[Name]</a>";
47
 
47
 

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

466
 
466
 
467
     $DisplayName .= "<a href=\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID\" class=\"tooltip\" title=\"View torrent\" ";
467
     $DisplayName .= "<a href=\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID\" class=\"tooltip\" title=\"View torrent\" ";
468
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
468
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
469
-      $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover()" ';
469
+      $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, 'thumb').'" onmouseleave="ungetCover()" ';
470
     }
470
     }
471
 
471
 
472
 
472
 

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

524
     $CoverArt = $GroupInfo['WikiImage'];
524
     $CoverArt = $GroupInfo['WikiImage'];
525
     $DisplayName .= "<a class=\"torrent_title\" href=\"torrents.php?id=$GroupID\" ";
525
     $DisplayName .= "<a class=\"torrent_title\" href=\"torrents.php?id=$GroupID\" ";
526
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
526
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
527
-      $DisplayName .= "onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($CoverArt, true)."\" onmouseleave=\"ungetCover(event)\" ";
527
+      $DisplayName .= "onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($CoverArt, 'thumb')."\" onmouseleave=\"ungetCover(event)\" ";
528
     }
528
     }
529
     $DisplayName .= "dir=\"ltr\">$GroupName</a>";
529
     $DisplayName .= "dir=\"ltr\">$GroupName</a>";
530
     if ($GroupYear) {
530
     if ($GroupYear) {
643
     $CoverArt = $GroupInfo['WikiImage'];
643
     $CoverArt = $GroupInfo['WikiImage'];
644
     $DisplayName .= "<a class=\"torrent_name\" href=\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID#torrent$TorrentID\" ";
644
     $DisplayName .= "<a class=\"torrent_name\" href=\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID#torrent$TorrentID\" ";
645
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
645
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
646
-      $DisplayName .= "onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($CoverArt, true)."\" onmouseleave=\"ungetCover(event)\" ";
646
+      $DisplayName .= "onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($CoverArt, 'thumb')."\" onmouseleave=\"ungetCover(event)\" ";
647
     }
647
     }
648
     $DisplayName .= "dir=\"ltr\">$GroupName</a>";
648
     $DisplayName .= "dir=\"ltr\">$GroupName</a>";
649
     if (isset($GroupedCategories[$CategoryID - 1])) {
649
     if (isset($GroupedCategories[$CategoryID - 1])) {

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

186
 <div id="covers">
186
 <div id="covers">
187
 <div id="cover_div_<?=$Index?>">
187
 <div id="cover_div_<?=$Index?>">
188
 <?  if ($WikiImage != '') { ?>
188
 <?  if ($WikiImage != '') { ?>
189
-      <div><img width="100%" class="lightbox-init" src="<?=ImageTools::process($WikiImage, true)?>" lightbox-img="<?=ImageTools::process($WikiImage)?>" alt="<?=$AltName?>" /></div>
189
+      <div><img width="100%" class="lightbox-init" src="<?=ImageTools::process($WikiImage, 'thumb')?>" lightbox-img="<?=ImageTools::process($WikiImage)?>" alt="<?=$AltName?>" /></div>
190
 <?  } else { ?>
190
 <?  } else { ?>
191
       <div><img width="100%" src="<?=STATIC_SERVER?>common/noartwork/nocover.png" alt="<?=$Categories[$GroupCategoryID - 1]?>" class="brackets tooltip" title="<?=$Categories[$GroupCategoryID - 1]?>" /></div>
191
       <div><img width="100%" src="<?=STATIC_SERVER?>common/noartwork/nocover.png" alt="<?=$Categories[$GroupCategoryID - 1]?>" class="brackets tooltip" title="<?=$Categories[$GroupCategoryID - 1]?>" /></div>
192
 <?
192
 <?
201
         <div>
201
         <div>
202
 <?
202
 <?
203
           if (empty($LoggedUser['ShowExtraCovers'])) {
203
           if (empty($LoggedUser['ShowExtraCovers'])) {
204
-            $Src = 'src="" data-gazelle-temp-src="' . ImageTools::process($Image, true) . '" lightbox-img="'.ImageTools::process($Image).'"';
204
+            $Src = 'src="" data-gazelle-temp-src="' . ImageTools::process($Image, 'thumb') . '" lightbox-img="'.ImageTools::process($Image).'"';
205
           } else {
205
           } else {
206
-            $Src = 'src="' . ImageTools::process($Image, true) . '" lightbox-img="'.ImageTools::process($Image).'"';
206
+            $Src = 'src="' . ImageTools::process($Image, 'thumb') . '" lightbox-img="'.ImageTools::process($Image).'"';
207
           }
207
           }
208
 ?>
208
 ?>
209
           <img id="cover_<?=$Index?>" class="lightbox-init" width="100%" <?=$Src?> alt="<?=$Summary?>" />
209
           <img id="cover_<?=$Index?>" class="lightbox-init" width="100%" <?=$Src?> alt="<?=$Summary?>" />
778
 <?
778
 <?
779
     foreach($Screenshots as $Screenshot) {
779
     foreach($Screenshots as $Screenshot) {
780
       $SSURL = ImageTools::process($Screenshot['Image']);
780
       $SSURL = ImageTools::process($Screenshot['Image']);
781
-      $ThumbURL = ImageTools::process($Screenshot['Image'], true);
781
+      $ThumbURL = ImageTools::process($Screenshot['Image'], 'thumb');
782
       if (check_perms('users_mod')) {
782
       if (check_perms('users_mod')) {
783
         ?><img class='tooltip lightbox-init' title='<?=Users::format_username($Screenshot['UserID'], false, false, false)?> - <?=time_diff($Screenshot['Time'])?>' lightbox-img="<?=$SSURL?>" src="<?=$ThumbURL?>" /><?
783
         ?><img class='tooltip lightbox-init' title='<?=Users::format_username($Screenshot['UserID'], false, false, false)?> - <?=time_diff($Screenshot['Time'])?>' lightbox-img="<?=$SSURL?>" src="<?=$ThumbURL?>" /><?
784
       } else {
784
       } else {

+ 1
- 1
sections/torrents/editgroup.php View File

134
   }
134
   }
135
 
135
 
136
   foreach($Screenshots as $i => $Screenshot) {
136
   foreach($Screenshots as $i => $Screenshot) {
137
-    $SSURL = ImageTools::process($Screenshot['Image'], true);
137
+    $SSURL = ImageTools::process($Screenshot['Image'], 'thumb');
138
 ?>
138
 ?>
139
             <div>
139
             <div>
140
               <input type="text" size="45" id="ss_<?=$i?>" name="screenshots[]" value="<?=$Screenshot['Image']?>"/>
140
               <input type="text" size="45" id="ss_<?=$i?>" name="screenshots[]" value="<?=$Screenshot['Image']?>"/>

+ 1
- 1
sections/torrents/notify.php View File

265
       }
265
       }
266
       $DisplayName .= "<a href=\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID#torrent$TorrentID\" ";
266
       $DisplayName .= "<a href=\"torrents.php?id=$GroupID&amp;torrentid=$TorrentID#torrent$TorrentID\" ";
267
       if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
267
       if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
268
-         $DisplayName .= "onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($GroupInfo['WikiImage'], true)."\" onmouseleave=\"ungetCover(event)\" ";
268
+         $DisplayName .= "onmouseover=\"getCover(event)\" data-cover=\"".ImageTools::process($GroupInfo['WikiImage'], 'thumb')."\" onmouseleave=\"ungetCover(event)\" ";
269
       }
269
       }
270
       $DisplayName .= "class=\"tooltip\" title=\"View torrent\" dir=\"ltr\">" . $GroupInfo['Name'] . '</a>';
270
       $DisplayName .= "class=\"tooltip\" title=\"View torrent\" dir=\"ltr\">" . $GroupInfo['Name'] . '</a>';
271
 
271
 

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

509
     $DisplayName = Artists::display_artists($Artists);
509
     $DisplayName = Artists::display_artists($Artists);
510
     $DisplayName .= '<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$TorrentID.'" ';
510
     $DisplayName .= '<a href="torrents.php?id='.$GroupID.'&amp;torrentid='.$TorrentID.'" ';
511
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
511
     if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
512
-      $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, true).'" onmouseleave="ungetCover()" ';
512
+      $DisplayName .= 'onmouseover="getCover(event)" data-cover="'.ImageTools::process($WikiImage, 'thumb').'" onmouseleave="ungetCover()" ';
513
     }
513
     }
514
     $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
514
     $GroupName = empty($GroupName) ? (empty($GroupNameRJ) ? $GroupNameJP : $GroupNameRJ) : $GroupName;
515
     $DisplayName .= 'dir="ltr">'.$GroupName.'</a>';
515
     $DisplayName .= 'dir="ltr">'.$GroupName.'</a>';

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

723
  ?>
723
  ?>
724
       <div style='width: 100px;' class='collage_image' >
724
       <div style='width: 100px;' class='collage_image' >
725
         <a href="torrents.php?id=<?=$RS['ID']?>">
725
         <a href="torrents.php?id=<?=$RS['ID']?>">
726
-          <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%" />
726
+          <img class="tooltip" title="<?=display_str($RS['Artist'])?><?=display_str($RSName)?>" src="<?=ImageTools::process($RS['WikiImage'], 'thumb')?>" alt="<?=display_str($RS['Artist'])?><?=display_str($RSName)?>" width="100%" />
727
         </a>
727
         </a>
728
       </div>
728
       </div>
729
 <?    } ?>
729
 <?    } ?>
770
 ?>
770
 ?>
771
       <div style='width: 100px;' class='collage_image' >
771
       <div style='width: 100px;' class='collage_image' >
772
         <a href="torrents.php?id=<?=$RU['ID']?>">
772
         <a href="torrents.php?id=<?=$RU['ID']?>">
773
-          <img class="tooltip" title="<?=$RU['Artist']?><?=$RUName?>" src="<?=ImageTools::process($RU['WikiImage'], true)?>" alt="<?=$RU['Artist']?><?=$RUName?>" width="100%" />
773
+          <img class="tooltip" title="<?=$RU['Artist']?><?=$RUName?>" src="<?=ImageTools::process($RU['WikiImage'], 'thumb')?>" alt="<?=$RU['Artist']?><?=$RUName?>" width="100%" />
774
         </a>
774
         </a>
775
       </div>
775
       </div>
776
 <?    } ?>
776
 <?    } ?>
824
 ?>
824
 ?>
825
       <div class="collage_image">
825
       <div class="collage_image">
826
         <a href="torrents.php?id=<?=$GroupID?>">
826
         <a href="torrents.php?id=<?=$GroupID?>">
827
-          <img class="tooltip" title="<?=$Name?>" src="<?=ImageTools::process($C['WikiImage'], true)?>" alt="<?=$Name?>" width="100%" />
827
+          <img class="tooltip" title="<?=$Name?>" src="<?=ImageTools::process($C['WikiImage'], 'thumb')?>" alt="<?=$Name?>" width="100%" />
828
         </a>
828
         </a>
829
       </div>
829
       </div>
830
 <?  } ?>
830
 <?  } ?>

Loading…
Cancel
Save