API ? Adding pictures to gallery programtically ? API ? Adding pictures to gallery programtically ?
 

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

API ? Adding pictures to gallery programtically ?

Started by evilc, August 17, 2005, 10:11:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

evilc

What I would like is a way to tie coppermine into my open source project.
I need some system whereby I can insert a picture into the coppermine gallery and get a link (ID, whatever) back so I can register that picture as belonging to my program.
Imagine as if you were trying to add an upload image feature for the "post" page (ie the one I am using to write this post now) on a message board - the user could click the upload button that pulls up a browse window, you select the file and it inserts a bbcode img link to the image into the post.
Obviously on submit you would need to upload the image to coppermine, get back it's ID and assemble the bbcode img tag to link to it.

Is there some mechanism to allow things like this planned ?

Aditya Mooley

Here's the API for CPG
http://forum.coppermine-gallery.net/index.php?topic=17097.0

It's a very basic API which will allow you to upload the image and get the list of all the categories and its albums.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

evilc

nice, thanks.
Seems like it may well do what I want.
An Add Album call may be nice, so that my prog can add albums as needed...

One thing I saw that concerned me is that pictures seem to have a gallery and position Id for thier link.
The upload picture seems to return a PID.

Is it possible to link to a picture using just it's PID ? I would much rather do that as a PID would be correct even if the picture got moved surely.

Nibbler

Yes, the pid based link is to displayimage.php?pos=-[pid]