Page 1 of 1

How to modify Phoca Gallery Search Plugin?

Posted: 31 Mar 2010, 23:12
by chandrasecar
How to make, that photos are displayed on page after search with preview possibility?

For example on this site it is introduced - http://www.anakaonews.com

It is necessary for my site - http://basemfoto.ru
On my site is installed Phoca Gallery Search Pluggin.

There is file in Joomla: /components/com_search/views/search/tmpl/default_results.php
This file shows results of search.

For example to show a picture it is necessary to write After line 42:

Code: Select all

<?php 
$v="<img src=' /images/phocagallery/thumbs/phoca_thumb_m_act-017.jpg'>";
echo $v;
?>
But for each result there should be shown own picture. The way to a picture should be read out from a database. But how?

There is one more file: /plugins/search/phocagallery.php
In this file written down SQL query to a database. See line 144.

Help please.

Re: How to modify Phoca Gallery Search Plugin?

Posted: 01 Apr 2010, 20:46
by Jan
Hi, I think you need to customize it, maybe the best way is to try contact the developer of the site you have added here :idea:

Jan

Re: How to modify Phoca Gallery Search Plugin?

Posted: 01 Apr 2010, 21:05
by chandrasecar
I am the developer. But I badly know PHP & SQL.

It is necessary to read out a picture title in PhocaGallery from a database. Picture name on FTP = picture title in PhocaGallery.
In the given example picture title and picture name is "act-017".
How into this code instead of "act-017" to insert the picture title?

Code: Select all

<?php
$v="<img src=' /images/phocagallery/thumbs/phoca_thumb_m_act-017.jpg'>";
echo $v;
?>
I think, It should work :idea:

Re: How to modify Phoca Gallery Search Plugin?

Posted: 02 Apr 2010, 12:02
by Jan
no experiences there, maybe some str_replace function to replace the image path string :idea: