Random image in categories view
Posted: 04 Mar 2009, 16:01
Hello,
since I was not satisfied by the solution suggested in FAQ, I apply the following change to the file
categories.php
for showing always the same thumbnail in categories view (the first one) instead the default image (folder).
function _getRandomImageRecursive($categoryid)
{
// We need to get a list of all phocagallery in the given category
$query = 'SELECT id, filename' .
' FROM #__phocagallery' .
' WHERE catid = '.(int) $categoryid.
' AND published = 1'.
' ORDER BY id ASC'; <<<<<-----------------------------------------
$images = $this->_getList($query, 0, 1);
since I was not satisfied by the solution suggested in FAQ, I apply the following change to the file
categories.php
for showing always the same thumbnail in categories view (the first one) instead the default image (folder).
function _getRandomImageRecursive($categoryid)
{
// We need to get a list of all phocagallery in the given category
$query = 'SELECT id, filename' .
' FROM #__phocagallery' .
' WHERE catid = '.(int) $categoryid.
' AND published = 1'.
' ORDER BY id ASC'; <<<<<-----------------------------------------
$images = $this->_getList($query, 0, 1);