Open external link by clicking on the thumbnail

Phoca Gallery - image gallery extension
zsolt
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 18 May 2009, 19:25

Open external link by clicking on the thumbnail

Post 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
levalencia1
Phoca Member
Phoca Member
Posts: 19
Joined: 26 Aug 2009, 15:41

Re: Open external link by clicking on the thumbnail

Post by levalencia1 »

Hi very cool I needed this

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

Thx
levalencia1
Phoca Member
Phoca Member
Posts: 19
Joined: 26 Aug 2009, 15:41

Re: Open external link by clicking on the thumbnail

Post by levalencia1 »

this didnt work
zsolt
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 18 May 2009, 19:25

Re: Open external link by clicking on the thumbnail

Post 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!
zsolt
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 18 May 2009, 19:25

Re: Open external link by clicking on the thumbnail

Post 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
Post Reply