Page 1 of 1
HiCan I set a
Posted: 25 Mar 2008, 10:24
by castep
Hi
Can I set a fixed (not random) image as subcategory thumbnail ?
Thanks
No, ... only if you
Posted: 25 Mar 2008, 13:28
by Jan
No, ... only if you know php and sql, you can change the SQL query...
or you change the parameters to folder icon and you replace the folder icon with your image
Jan
Yes, I know php and
Posted: 25 Mar 2008, 14:37
by castep
Yes, I know php and mysql. Can you give me more details?
...about the second choice, if i replace the folder icon, that image will be the same for all subcategory... indeed, I need a different (but not random) image for each subcategory.
Castep
Just change the foll
Posted: 25 Mar 2008, 14:42
by Jan
Just change the following code:
IN: components\com_phocagallery\models\category.php
ROW: 231
$query = 'SELECT id, filename' .
' FROM #__phocagallery' .
' WHERE catid = '.(int) $categoryid.
' AND published = 1'.
' ORDER BY RAND()';
to your own, e.g. you want the first picture of the category will be displayed:
$query = 'SELECT id, filename' .
' FROM #__phocagallery' .
' WHERE catid = '.(int) $categoryid.
' AND published = 1'.
' ORDER BY ordering';
Jan
If you have changed
Posted: 26 Mar 2008, 00:01
by Jan
If you have changed it in categories.php (image next to category in categories view) and in category.php ('folder image' in category view) you should get the first image, not random ???
I am trying it and it works...
did you change the _getRandomImageRecursive method?... Is there an image in your subcategory?
Jan