forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: pftq on September 02, 2008, 07:17:02 am
-
I would like to use my own SQL query for pictures to display on the thumbnails page. Something like "Last uploaded" or "Top Rated" but using my own query (say I wanted to show Last uploaded videos only).
What file would I look to to insert an additional sorting option?
Thanks
-
You don't need sorting for that but you need to comeup with your own meta-album. Default meta albums in cpg are lastup, topn etc...and each of them is handled in function get_pic_data (include/functions.inc.php file). There are cases for each meta album in that function and you will need to add one new case for your videos only meta album.
Note that unless you are adept at php programming - it will be hard for you.
-
I've managed to do that already and going to thumbnails?album=custom works, but the Admin Config is ignoring it when I put .../custom,1/...
Is there somewhere else I need to edit as well?
Thanks again
-
Look at the switch in index.php - you just need to copy/paste a case for your new meta album.