Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Function to get a random file from an album  (Read 4798 times)

0 Members and 1 Guest are viewing this topic.

levy

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Function to get a random file from an album
« 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:
Code: [Select]
function get_random($album_id){
....
}
Thank you very much!

Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Function to get a random file from an album
« Reply #1 on: March 21, 2007, 03:41:28 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:
Code: [Select]
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.


Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Function to get a random file from an album
« Reply #2 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Function to get a random file from an album
« Reply #3 on: March 21, 2007, 09:03:23 am »

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.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Function to get a random file from an album
« Reply #4 on: March 21, 2007, 02:43:47 pm »

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.





Logged
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
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 15 queries.