How to get full-size image path
Posted: 03 Apr 2009, 15:57
When a user is viewing photos in a popup, I want the large thumbnail image to link to the original full-size image instead of closing the popup. I changed this line in components/com_phocagallery/views/detail/tmpl/default.php :
FROM:
<div id="image-box" style="width:<?php echo $this->tmpl['realimagewidth'];?>px;"><a href="#" onclick="<?php echo $this->tmpl['detailwindowclose']; ?>"><?php echo JHTML::_( 'image.site', $this->file->linkthumbnailpath, ''); ?></a><?php
TO:
<div id="image-box" style="width:<?php echo $this->tmpl['realimagewidth'];?>px;"><a target=_blank href="<?php echo $this->file->filename;?>"><?php echo JHTML::_( 'image.site', $this->file->linkthumbnailpath, ''); ?></a><?php
but $this->file->filename does not contain the full path to the original image. I could use linkthumbnailpath and delete "thumbs/phoca_thumb_l_" from that string, but is there a more efficient way to get the full path to the original file?
FROM:
<div id="image-box" style="width:<?php echo $this->tmpl['realimagewidth'];?>px;"><a href="#" onclick="<?php echo $this->tmpl['detailwindowclose']; ?>"><?php echo JHTML::_( 'image.site', $this->file->linkthumbnailpath, ''); ?></a><?php
TO:
<div id="image-box" style="width:<?php echo $this->tmpl['realimagewidth'];?>px;"><a target=_blank href="<?php echo $this->file->filename;?>"><?php echo JHTML::_( 'image.site', $this->file->linkthumbnailpath, ''); ?></a><?php
but $this->file->filename does not contain the full path to the original image. I could use linkthumbnailpath and delete "thumbs/phoca_thumb_l_" from that string, but is there a more efficient way to get the full path to the original file?