Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Custom Thumbnail Sorting  (Read 2106 times)

0 Members and 1 Guest are viewing this topic.

pftq

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Custom Thumbnail Sorting
« 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
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Custom Thumbnail Sorting
« Reply #1 on: September 02, 2008, 12:10:24 pm »

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

pftq

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Custom Thumbnail Sorting
« Reply #2 on: September 02, 2008, 03:39:35 pm »

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
Logged

Nibbler

  • Guest
Re: Custom Thumbnail Sorting
« Reply #3 on: September 02, 2008, 03:45:34 pm »

Look at the switch in index.php - you just need to copy/paste a case for your new meta album.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.