Jan, thank you for the great component!
Is there a way to display an information about a format of original images (XX x XX pixels) and size (in Kb, e.g.) near the images in category list layout? This information is present in "Image Download" window, but it'd be great to show it also near the images in albums or as overlib effect.
Image size and format info
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Image size and format info
Hi there is no such possibility, this must be manually done in html/php...
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 20 Jul 2008, 12:49
Re: Image size and format info
Please, could you explain what files I must edit to add this information to the images?..
-
- Phoca Newbie
- Posts: 4
- Joined: 20 Jul 2008, 12:49
Re: Image size and format info
Ok, I've found a solution.
To add an information about size and format of original image as overlib effect in description field:
.../components/com_phocagallery/views/category/tmpl/default.php:
search for code (~ line #137):
and replace it onto:
To add an information about size and format of original image as overlib effect in description field:
.../components/com_phocagallery/views/category/tmpl/default.php:
search for code (~ line #137):
Code: Select all
} else if ((int)$value->overlib == 2){
echo " onmouseover=\"return overlib('".htmlspecialchars( addslashes($value->description))."', CAPTION, '". $value->title."', BELOW, RIGHT, FGCOLOR, '".$this->olfgcolor."', BGCOLOR, '".$this->olbgcolor."', TEXTCOLOR, '".$this->oltfcolor."', CAPCOLOR, '".$this->olcfcolor."');\"";
echo " onmouseout=\"return nd();\" ";
Code: Select all
} else if ((int)$value->overlib == 2){
// get original image format and size:
list($Image_width, $Image_height) = PhocaGalleryHelperFront::getImageSizePhoca($value->filename);
if (!isset($Image_width) || !isset($Image_height)) {
$Image_width = 0;
$Image_height = 0;
}
$Image_fsize = PhocaGalleryHelperFront::getFileSizePhoca($value->filename);
if( !isset($Image_fsize) ) {
$Image_fsize = 0;
}
echo " onmouseover=\"return overlib('".htmlspecialchars( addslashes($value->description) . "<div style=\"color:red;font-size:7pt;\">".JText::_('Image Format').": ".$Image_width." x ".$Image_height."<br />".JText::_('Image Size').": ".$Image_fsize."</div>")."', CAPTION, '". $value->title."', BELOW, RIGHT, FGCOLOR, '".$this->olfgcolor."', BGCOLOR, '".$this->olbgcolor."', TEXTCOLOR, '".$this->oltfcolor."', CAPCOLOR, '".$this->olcfcolor."');\"";
echo " onmouseout=\"return nd();\" ";
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Image size and format info
great...
Jan
Jan
If you find Phoca extensions useful, please support the project