Function to get a random file from an album Function to get a random file from an album
 

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

Function to get a random file from an album

Started by levy, March 21, 2007, 03:24:24 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

levy

Can anybody help me to write a function which get a random file from the id of an album? (include function to connect to db)
Example:

function get_random($album_id){
....
}

Thank you very much!


vuud

Quote from: levy on March 21, 2007, 03:24:24 AM
Can anybody help me to write a function which get a random file from the id of an album? (include function to connect to db)
Example:

function get_random($album_id){
....
}

Thank you very much!




This are is for CpmFetch - which does what you want... without needing to write a function.

http://cpmfetch.fistfullofcode.com

Otherwise, you are in the wrong forum.


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

levy

I need only a function to get only 1 file. cpmFetch is so complex, i cannot get 1 random file from an album by cpmFetch.

Joachim Müller

If you don't have a question on cpmFetch but want to come up with a custom script then you're on the wrong sub-board. You shouldn't have posted here in the first place.
If you need that particular function, then just write the code - don't expect to be spoon-fed. If you can't code, then use cpmFetch. That's all we could say.

vuud

Quote from: levy on March 21, 2007, 05:56:46 AM
I need only a function to get only 1 file. cpmFetch is so complex, i cannot get 1 random file from an album by cpmFetch.

Yes cpmfetch can give you one image

You say its too complex, but you come here asking for someone to write the code for you??  *beep* is CpmFetch??

The code written for you.  That's what it is.

I absolutely guarantee you, using cpmfetch will take less lines of code that coding it yourself.  Or anyone else coding it for you.





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco