RSGallery2 Support Forums
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : November 22, 2008, 09:03:19 am
+  RSGallery2 Support Forums
|-+  RSgallery2 support forums
| |-+  RSgallery2 bugs & problems (Moderators: Jonah, Tomislav Ribicic, Daniel Tulp, Ronald Smit)
| | |-+  Thumbnail size on main gallery page
Advanced search
  « previous next »
Pages 1
Author
Topic: Thumbnail size on main gallery page  (Read 3864 times)
« on: February 23, 2006, 01:23:04 pm »
tinuviel
Guest


Email

Is it possible to change the size of the thumbnails, only on the main gallery page? Currently they are showing up as really tiny for me, and my client wants them to be much larger. Probably larger than the regular thumbnails in each category page. Anyone know how to do this?

I found the following code reference in administrator/components/com_rsgallery/config.rsgallery.php:

function getThumb($catid, $height = 0, $width = 0,$class = \"\"){
   global $database,$mosConfig_live_site, $mosConfig_absolute_path, $rsgConfig;
   //$imagepath = $rsgConfig->get( \'imagepath\' );
   //$thumbpath = $rsgConfig->get( \'thumbpath\' );
   
   $imgatt=\"\";
   if ($height>0)
      $imgatt.=\" height=\\\"$height\\\" \";
   if ($width>0)
      $imgatt.=\" width=\\\"$width\\\" \";
   if ($class> \"\")
      $imgatt.=\" class=\\\"$class\\\" \";
   else
      $imgatt.=\" class=\\\"RSgalthumb\\\" \";
   $database->setQuery(\"SELECT * FROM #__rsgallery as a, #__rsgalleryfiles as b WHERE a.id = b.gallery_id AND b.gallery_id = \'$catid\'\");
   $rows = $database->loadObjectList();
   if (!$rows)
      {
      $t_path = \"<img $imgatt src=\\\"\".$mosConfig_live_site.\"/components/com_rsgallery/images/no_pics.gif\\\" alt=\\\"No pictures in gallery\\\" border=\\\"1\\\" />\";
      }
   else
      {
      foreach ($rows as $row)
         {
         $t_path = \"<img $imgatt src=\\\"\".imgUtils::getImgThumb($row->name).\"\\\" alt=\\\"\\\" border=\\\"0\\\" />\";
         }
      }
   return $t_path;
   }

However, changing those to permanent values would be problematic when sometimes the dimensions are different, and I\'m not sure how to increase it dynamically. Thanks!
Logged
 
Reply #1
« on: February 23, 2006, 01:47:29 pm »
Ronald Smit Offline
Administrator
Hero Member
*****
Posts: 1214

View Profile WWW Email

Indeed the value is hardcoded for now.
You can find this in the file rsgallery2.html.php.
Lookup the function RSgalleryList().
Somewhere around line 1000 you will see a function call like this:
[code:1]<?php echo getThumb($row->id,50,0,\"\"«»); ?>[/code:1]

Change the second parameter from 50 to 0 and the thumb will follow the default settings from your configuration page.

Good luck,

Ronald Smit
RSGallery2 Developer
Logged

Ronald Smit
RSGallery2 Developer
FAQ|Known issues
 
Reply #2
« on: February 24, 2006, 04:04:57 am »
Jonah Offline
Administrator
Hero Member
*****
Posts: 1412

View Profile

bug submitted: http://forge.joomla.org/sf/go/artf3626
Logged

Due to time constraints, I have taken a step back from RSGallery2.  In the event of an emergency, you will need to PM me.
 
Print  Pages 1
« previous next »
Jump to: