View Full Version : Wrong thumbernail format on index page
January 14th, 2011, 03:28 PM
At my site the thumbernail to the right of the comments on the index page has wrong size. Please se attacment. The attacment show the same image with red around in lastest photo section and the image right to comments in the comments section on index page. The images properties is wrong in the comments page. Why and how do I cange it.
In the Photopost AdminCP I have set the following:
Upload Photo Options -> Use uniform thumbnail feature? = Yes
Upload Photo Options -> Uniform thumbnail height? = 78
Upload Photo options -> Uniform thumbnail width? = 120
I have tryed to use the function Photopost -> AdminCP -> Scan Database -> Rebuild all thumbnails. But without succes.
January 14th, 2011, 05:27 PM
Nothing is wrong there. Photos in comments pal or category list are avatar size meaning they are half the size of your thumbnail setting.
January 14th, 2011, 05:42 PM
The problem is not the size but the relationship between height and width.
The image with a red circle around is heigher whan width when uploaded. In the lastest photo it is heigher whan width. But next to comments it is widther whan heigh. Then I run the Photopost as a standalone the image contain the same properties but in large images, medium and thumbernail images. You can see this at Godt Foto - Hoved Indeks (http://www.godtfoto.dk).
What can I do so the image contain the relationship between height and width?
January 14th, 2011, 05:55 PM
well the avatar is simply half of the thumbnail size in our code. Meaning if you have a thumbnail which is 120x53 then it should be scaled to 60x27
However on your site your posting you have modified the code from what I see because yours are actually scaled to .75 not .5 so your running modified code there.
without a real url I cant see your page source to actually comment.
January 15th, 2011, 12:58 AM
You can see it on my testsite A community photo gallery - Godtfoto Beta (http://www.fotoboks.dk/galleri)
Can you tell me how to have more space between the border and text in custompal box in the sidebar?
If I want some layout change or mod change, do you know if it is possible to pay someone to do the coding. Do you have any recommendation.
January 15th, 2011, 08:47 AM
here is the code here
if ( $avatar == 1 )
if ( $thumbh < $thumbw )
$scaleFactor = $thumbw / $Globals['previewwidth'];
$scaleFactor = $thumbh / $Globals['previewwidth'];
if ( $thumbh && $thumbw && !is_multimedia($bigimage) )
$imgh = round( $thumbh / $scaleFactor ) * .5;
$imgw = round( $thumbw / $scaleFactor ) * .5;
$imgsize = "height=\"$imgh\" width=\"$imgw\"";
$imgsize = "width=\"50\" height=\"37\"";
The problem really is the height and width statements for that photo your talking about are empty. Therefore its virtually impossible to scale it so its hardcoded as a safely measure.
The real resolution here would be to figure out why the image in question has no height or width stored in the database for it.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.