Page 1 of 1

Open external link by clicking on the thumbnail

Posted: 31 Aug 2009, 15:11
by zsolt
Give image an external url and choose target at phoca admin --> Click on image thumbnail to open link!

If somebody needs the same solution:

Open default.php from front/view/category/tmpl/

comment out line 108

Code: Select all

//echo ' href="'. $value->link.'"';
put this code to line 109

Code: Select all

echo ' href="http://'. $value->extlink1[0] .'" target="'.$value->extlink1[2].'"';
Comment out line 318 and 319 to disable link icon.

Use MVC, so :

Copy default.php to templates/your_template/html/com_phocagallery/category/

Regards,

Zsolt

Re: Open external link by clicking on the thumbnail

Posted: 31 Aug 2009, 17:59
by levalencia1
Hi very cool I needed this

Is front/view/category/tmpl/ on the root of joomla?

Thx

Re: Open external link by clicking on the thumbnail

Posted: 01 Sep 2009, 05:23
by levalencia1
this didnt work

Re: Open external link by clicking on the thumbnail

Posted: 02 Sep 2009, 17:42
by zsolt
levalencia1 wrote:Hi very cool I needed this

Is front/view/category/tmpl/ on the root of joomla?

Thx
This is from phoca install package!

Re: Open external link by clicking on the thumbnail

Posted: 02 Sep 2009, 17:46
by zsolt
Bugfix for subdirectories. They didn't work with the former code!

Code: Select all

if ($value->type == 1) {echo ' href="'. $value->link.'"';}
							
else {
echo ' href="http://'. $value->extlink1[0] .'" target="'.$value->extlink1[2].'"';
}
Zsolt