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: random image only from one album?  (Read 3862 times)

0 Members and 1 Guest are viewing this topic.

DaBe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 110
random image only from one album?
« on: January 09, 2008, 07:47:22 pm »

Hello

How I can display only the random images from one album on the frontpage?

Code: [Select]

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



is there the code or what other...?

pls help
« Last Edit: January 11, 2008, 07:50:55 am by Joachim Müller »
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: random image only from one album?
« Reply #1 on: January 09, 2008, 08:54:08 pm »

Yes. The code that you have found is simply telling coppermine to activate the "Random" section on the front page. You will need to find the code for calling up the images. Probebly the simplest way to make it for one album only would to add. WHERE aid= the id of the album to the database query.

Logged
Tambien, Hablo Espaņol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: random image only from one album?
« Reply #2 on: January 09, 2008, 08:59:22 pm »

The frontpage of what? Your site or coppermine?

If it's the frontpage of your site take a look at cpmfetch by vuud.

http://cpmfetch.fistfullofcode.com/
Logged
It is a mistake to think you can solve any major problems just with potatoes.

DaBe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 110
Re: random image only from one album?
« Reply #3 on: January 10, 2008, 07:06:22 pm »

on the frontpage from the coppermine gallery..

thx both

just some guy ..im noob in the php...in which database query i must take it in?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: random image only from one album?
« Reply #4 on: January 10, 2008, 07:43:57 pm »

Logged
It is a mistake to think you can solve any major problems just with potatoes.

DaBe

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 110
Re: random image only from one album?
« Reply #5 on: January 10, 2008, 07:50:35 pm »

wow..nice thx!
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.