Now i want someone to help me modify this query so it shows only pictures from the same name as the category name of phoca to the joomla category so if the name of the joomla category is potatoes and i have a phoca category by the name of potatoes display pictures from the potatoes gallery is this possible
I was thinking if i tweek this peace of code in the php file of the module it might work but im not really good at this im still a newbie
Here is the code:
is around line 517 i hope it helps
Code: Select all
if ($image_ordering == 9) {
$imageOrdering = ' ORDER BY RAND()';
} else {
$imageOrdering = ' ORDER BY a.'.PhocaGalleryOrdering::getOrderingString($image_ordering);
}
$image = '';
$query = 'SELECT cc.id AS idcat, a.id AS idimage'
.' FROM #__phocagallery_categories AS cc'
.' LEFT JOIN #__phocagallery AS a ON a.catid = cc.id'
.' WHERE a.published = 1'
.' AND a.approved = 1'
.' AND cc.published = 1'
.' AND cc.id IN ('.$implodeAllowedCategoriesArray.')' // not images from not accessable categories
.$imageOrdering
.' LIMIT ' . $limit_start . ',' . $limit_count ;