Page 1 of 1

Search Plugin: Direct link to image on "No Popup" option

Posted: 02 Jun 2012, 12:01
by caro23
Hello all,

The search plugin usually links to the category page. However, when using the "No pupop" detail view option, one can link directly to the picture instead.

Solution: change line 223 in /plugins/search/phocagallery/phocagallery.php:

Code: Select all

$listImages[$key]->href = JRoute::_(PhocaGalleryRoute::getCategoryRoute($value->catid, $value->catalias));
to this:

Code: Select all

// If the detail window is not a pupop (7) then we can directly link to the image itself.
if ($paramsC->get('detail_window') == 7)  {
   $listImages[$key]->href = JRoute::_(PhocaGalleryRoute::getImageRoute($value->id, $value->catid, $value->slug, $value->catalias));
}
else {
    $listImages[$key]->href = JRoute::_(PhocaGalleryRoute::getCategoryRoute($value->catid, $value->catalias));
}						}
Mabye the developers want to consider this in their regular release.

Re: Search Plugin: Direct link to image on "No Popup" option

Posted: 06 Jun 2012, 16:28
by Jan
Hi,

thank you for this info, I will change it for the next release.

Jan

Re: Search Plugin: Direct link to image on "No Popup" option

Posted: 11 Dec 2013, 22:57
by RickIngham
Sorry to bring this to the top again but I wandered if anyone had any success linking image results to a lightbox/modalbox instead of it going to category view. In my opinion a search engine that takes you to a page with lots of results isnt really much help.

Re: Search Plugin: Direct link to image on "No Popup" option

Posted: 25 Dec 2013, 16:36
by Jan
Hi, search component - this is the one which displayed the search outcomes does not have any lightbox feature - so this needs to be customized in the search component - see similar posts where I have explained it. The search outcomes are rendered by other component and if it is running, you cannot do any changes in Phoca Gallery as it does not run in case of search outcomes - so for this you need to customize the core joomla search component (see similar posts in the forum).

Jan

Re: Search Plugin: Direct link to image on "No Popup" option

Posted: 29 Dec 2013, 23:55
by RickIngham
Thanks Jan but I have searched the forum many times and have not found any posts explaining that. There are similar questions but nothing specifically explaining how to make it open a lightbox (or similar)

Re: Search Plugin: Direct link to image on "No Popup" option

Posted: 30 Dec 2013, 00:56
by Jan
Hi, yes, there is no guide how to do it (I think), because it cannot be done in any Phoca extension. This needs to be done directly in com_search component.

In fact you need to load there:
- some javascript library (popup)
- add the event (onclick, rel, etc. depends on used library) to a tag
- ...

Jan