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: Display last additions only at the mainpage?  (Read 3255 times)

0 Members and 1 Guest are viewing this topic.

lighter

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Display last additions only at the mainpage?
« on: April 15, 2004, 09:40:35 am »

How do i display the last additions, random files only at the main page?

I did a search and this was the closest i get.  :cry:

Display last uploads only in category/album pages
http://forum.coppermine-gallery.net/index.php?topic=2487&highlight=mainpage
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Display last additions only at the mainpage?
« Reply #1 on: April 15, 2004, 09:45:26 am »

use the code posted there for
Code: [Select]
case 'random':as well (not tested, but should work).

GauGau
Logged

lighter

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Display last additions only at the mainpage?
« Reply #2 on: April 15, 2004, 09:57:22 am »

Tried the code on index.php and it didnt work.

Instead, the last addition didnt load at mainpage, but loaded 2 times at category/album page.

Quote

            case 'random':
               if ($cat!=0) {
                display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                flush();
               }
                break;
Logged

lighter

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Display last additions only at the mainpage?
« Reply #3 on: April 27, 2004, 09:11:40 am »

*bump* anyone else?
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Display last additions only at the mainpage?
« Reply #4 on: April 27, 2004, 09:47:47 am »

Try this

Quote
            case 'lastup':
               if ($cat!=0) {
                display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                flush();
               }
                break;
Logged
SANIsoft PHP applications for E Biz
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.