Links to phocadownload search do not open directly - SOLVED
Posted: 13 Jul 2020, 03:25
When I search for a file, the result link takes me to the category or the file information, but the user needs the result link to open directly, I found this solution and I bring it here for whoever needs it.
Search this line in plugin phocadownload.php:
$listFiles[$key]->href = JRoute::_(PhocaDownloadRoute::getCategoryRoute($value->catid, $value->catalias))
And change to:
$listFiles[$key]->href = JRoute::_(PhocaDownloadRoute::getCategoryRoute($value->catid, $value->catalias)).'?download='.$value->slug;
Search this line in plugin phocadownload.php:
$listFiles[$key]->href = JRoute::_(PhocaDownloadRoute::getCategoryRoute($value->catid, $value->catalias))
And change to:
$listFiles[$key]->href = JRoute::_(PhocaDownloadRoute::getCategoryRoute($value->catid, $value->catalias)).'?download='.$value->slug;