coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: DaBe on January 09, 2008, 07:47:22 PM

Title: random image only from one album?
Post by: DaBe on January 09, 2008, 07:47:22 PM
Hello

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



                    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
Title: Re: random image only from one album?
Post by: just_some_guy 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.

Title: Re: random image only from one album?
Post by: phill104 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/
Title: Re: random image only from one album?
Post by: DaBe 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?
Title: Re: random image only from one album?
Post by: phill104 on January 10, 2008, 07:43:57 PM
You could try this plugin.

http://forum.coppermine-gallery.net/index.php?topic=38999.0
Title: Re: random image only from one album?
Post by: DaBe on January 10, 2008, 07:50:35 PM
wow..nice thx!