coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: brem on September 07, 2006, 11:21:13 PM

Title: How to get the ids of the albums in the gallery?
Post by: brem on September 07, 2006, 11:21:13 PM
Well, title says it all.

thansk :P
Title: Re: How to get the ids of the albums in the gallery?
Post by: vuud on September 08, 2006, 01:28:22 AM
Quote from: brem on September 07, 2006, 11:21:13 PM
Well, title says it all.

thansk :P


What, you mean the album id's?  Like just a list...

1
2
3
4
5
6

etc?

Title: Re: How to get the ids of the albums in the gallery?
Post by: brem on September 08, 2006, 04:20:41 PM
Yes.

Because I can't (we can't) assume that all indexes are used. Some of them could have been erased during the lifetime of the gallery.


Title: Re: How to get the ids of the albums in the gallery?
Post by: Nibbler on September 08, 2006, 04:35:40 PM
Is this related to cpmFetch?

Just run an sql query to collect them all:

SELECT aid FROM {$CONFIG['TABLE_ALBUMS']}
Title: Re: How to get the ids of the albums in the gallery?
Post by: brem on September 08, 2006, 04:41:23 PM
True that. I just thought cmpfetch would have a ready function for that... since you can use indexes in parameters... i don't know... I guess I don't yet have set my mind on how I should be using coppermine / cmpfetch yet.

Basically, I want to be able to use coppermine, as a easy and ready mean to add, remove albums and media (pitures and video, sounds), but I want to use this content outside of coppermine, in a web application.

So I want the users of my application to be able to parse through albums and medias therein.
I know I can do it all by sql queries, but I'm lazy (a programmer quality), and I was hoping there would be an api to make it easier to retrieve information.

There. You have my story now. :)
Title: Re: How to get the ids of the albums in the gallery?
Post by: Joachim Müller on September 08, 2006, 06:13:29 PM
There's an api, but no api documentation yet ;)
Title: Re: How to get the ids of the albums in the gallery?
Post by: brem on September 08, 2006, 06:26:54 PM
Do I have to download the plug-ins package?
Title: Re: How to get the ids of the albums in the gallery?
Post by: Joachim Müller on September 08, 2006, 08:38:38 PM
no, not related.
Title: Re: How to get the ids of the albums in the gallery?
Post by: brem on September 08, 2006, 09:01:38 PM
GauGau, the API you are referring to, is it the "main" php files of coppermine or another package?

thanks...
Title: Re: How to get the ids of the albums in the gallery?
Post by: Joachim Müller on September 09, 2006, 05:43:54 AM
http://svn.sourceforge.net/viewvc/coppermine/trunk/devel/api/
Title: Re: How to get the ids of the albums in the gallery?
Post by: vuud on September 10, 2006, 05:07:18 PM
Quote from: brem on September 08, 2006, 04:20:41 PM
Yes.
Because I can't (we can't) assume that all indexes are used. Some of them could have been erased during the lifetime of the gallery.

Brem, I answered another question that could easily be modified to collect all of the Album Id's.  Not as good as a cpmFetch built in function, but it would work...

http://forum.coppermine-gallery.net/index.php?topic=36045.msg169416#msg169416
Title: Re: How to get the ids of the albums in the gallery?
Post by: brem on September 11, 2006, 04:14:37 PM
Muchos gracias, as they say in Mexico to both of you vudd and Gaugau. :)