Custom Thumbnail Sorting Custom Thumbnail Sorting
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Custom Thumbnail Sorting

Started by pftq, September 02, 2008, 07:17:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pftq

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

Abbas Ali

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.
Chief Geek at Ranium Systems

pftq

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

Nibbler

Look at the switch in index.php - you just need to copy/paste a case for your new meta album.