Quote:
Originally Posted by cheykawebdesign
Hi, I installed this mod and its great, but does anyone know how to make the thumbnail image bigger? I uploaded a file and then uploaded a picture but it is to small... Am I missing where to change the thumbnail size? If it has to be manually changed/coded where would I start? I don't want to start editing templates and files if I totally missed where to do it.
Thanks
|
Actually I figured out how to get the main thumbnail bigger, I edited the size in the downloads.php but I need the smaller thumbnail bigger. When you click on the download you want you can read the description and view images at the bottom, under the "Images" titlebar, Right now the current thumbnail is 80px by 80px, This is the thumbnail I want to make bigger. The size I want my thumbnail is 300px by 300px any help from RS_Jelle or anyone else would be appreciated. If you don't know exactly just let me know what template it is in and I can figure it out.
UPDATE: I figured it out myself, there is 2 places to make edits to adjust both image sizes,
1) inside the download.php (This controls the main big thumbnail size)
search for:
PHP Code:
if ($width > 100)
{
$ratio = 100 / $width;
$newheight = $ratio * $height;
}
else
{
$newheight = $height;
}
$destimg = @imagecreatetruecolor(100, $newheight);
imagecopyresampled($destimg, $orig_image, 0, 0, 0, 0, 100, $newheight, imagesx($orig_image), imagesy($orig_image));
and replace with:
PHP Code:
$newwidth = 300;
$newheight = 300;
$destimg = @imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($destimg, $orig_image, 0, 0, 0, 0, $newwidth, $newheight, imagesx($orig_image), imagesy($orig_image));
2) inside the downloads2.css template (This controls the downloads small thumbnail size)
search for:
PHP Code:
width: {vb:stylevar profile_sidebar_avatar_maxWidth};
And adjust the height and width to what you want
(I have it set to auto because I hard coded the values in the downloads.php)
PHP Code:
width: auto;
height: auto;
It would be nice to add this feature in the admincp for options. I also tried have the thumbnail auto size down by percentage with still keeping the 300px height max. It worked great for the little thumbnail image description, but the main thumbnail image it made the layout/ decription all messed up. So I think its best to just set these 2 values so they don't change.
I hope this helped someone out.