Hi all,
i'd like to configure PhocaGallery Image Module to show five first categories, one image per categories, ordered by date of creation desc.
For example, i have :
- cat1 created 1/12/14
- cat2 created 2/12/14
- cat3 created 3/12/14
- cat4 created 10/12/14
- cat5 created 11/12/14
- cat6 created 12/12/14
- cat7 created 5/12/14
- cat8 created 6/12/14
the module while display
img1/cat6 -- img1/cat5 -- img1/cat4 -- img1/cat8 -- img1/cat7
Do i have to rewrite default.php and the request ? or is it possible via parameters ?
Module to show categories ordered by date of creation
-
- Phoca Newbie
- Posts: 4
- Joined: 12 Jan 2015, 12:02
-
- Phoca Newbie
- Posts: 4
- Joined: 12 Jan 2015, 12:02
Re: Module to show categories ordered by date of creation
I found a good but not the best request i think
Now let's go to CSS ...
Code: Select all
$query = 'SELECT a.catid AS idcat, a.id AS idimage'
.' FROM #__phocagallery AS a'
.' WHERE a.catid IN ('
.' SELECT * FROM ('
.' SELECT cat.id'
.' FROM #__phocagallery_categories AS cat'
.' WHERE cat.published = 1'
.' ORDER BY cat.date DESC'
.' LIMIT ' . $limit_start . ',' . $limit_count.')'
.' AS temp)'
.' AND a.published = 1'
.' AND a.approved = 1'
.' GROUP BY a.catid';
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Module to show categories ordered by date of creation
Ok
If you find Phoca extensions useful, please support the project