Page 1 of 1
shadow1 wrong image format
Posted: 08 Jul 2010, 02:01
by Athlon64M
Warning: getimagesize(/home/<username removed>/public_html/components/com_phocagallery/assets/images/shadow1.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/<username removed>/public_html/components/com_phocagallery/views/category/view.html.php on line 179
The shadow1 image comes in two formats, a .gif and a .png
I'm running Joomla 1.5.17 with Phoca Gallery 2.7.3
Is there some code I can edit to fix this?
Thanks.
Re: shadow1 wrong image format
Posted: 08 Jul 2010, 17:29
by Athlon64M
I also forgot to mention I upgraded from a 2.X.X Phoca Gallery to the latest release (2.7.3).
I looked at view.html.php, but there was no mention of jpg's or gif's or png's.
I'm not so familiar with php, so that may be why it doesn't make sense to me.
Here's the code if anyone is interested:
Code: Select all
// PARAMS - Background shadow
if ( $tmpl['displayimageshadow'] != 'none' ) {
// IE hack
$shadowPath = $path->image_abs_front . $tmpl['displayimageshadow'].'.'.$tmpl['formaticon'];
$shadowSize = getimagesize($shadowPath);
if (isset($shadowSize[0]) && isset($shadowSize[0])) {
$w = (int)$tmpl['imagewidth'] + 18 - (int)$shadowSize[0];
$h = (int)$tmpl['imageheight'] + 18 - (int)$shadowSize[1];
if ($w != 0) {$w = $w/2;} // plus or minus should be divided, not null
if ($h != 0) {$h = $h/2;}
} else {
$w = $h = 0;
}
$imageBgCSS = 'background: url(\''.JURI::base(true).'/components/com_phocagallery/assets/images/'.$tmpl['displayimageshadow'].'.'.$tmpl['formaticon'].'\') 50% 50% no-repeat;';
$imageBgCSSIE = 'background: url(\''.JURI::base(true).'/components/com_phocagallery/assets/images/'.$tmpl['displayimageshadow'].'.'.$tmpl['formaticon'].'\') '.$w.'px '.$h.'px no-repeat;';
} else {
$imageBgCSS = 'background: '.$image_background_color .';';
$imageBgCSSIE = 'background: '.$image_background_color .';';
}
Re: shadow1 wrong image format
Posted: 08 Jul 2010, 21:16
by Jan
Hi, check your settings (parameters component and parameters):
https://www.phoca.cz/documents/16-joomla ... -in-joomla
if you have not set .jpg to the icons - see parameters:
https://www.phoca.cz/documents/2-phoca-g ... -menu-item
In parameters you can set which format will have the standard icons and e.g. shadowbox images. As default, in Phoca Gallery are loaded .png and gif. But it can be loaded .jpg by some theme. So there is option to switch to jpg. But only in case you have loaded jpg icons and shadowboxes.
Jan
Re: shadow1 wrong image format
Posted: 09 Jul 2010, 03:15
by Athlon64M
Hey Jan, thanks so much for that tip. It worked, I'm just dumbfounded I didn't see that setting before.
Re: shadow1 wrong image format
Posted: 11 Jul 2010, 14:34
by Jan
Ok