Search Plugin: Direct link to image on "No Popup" option
Posted: 02 Jun 2012, 12:01
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:
to this:
Mabye the developers want to consider this in their regular release.
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));
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));
} }