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: API ? Adding pictures to gallery programtically ?  (Read 3588 times)

0 Members and 1 Guest are viewing this topic.

evilc

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
API ? Adding pictures to gallery programtically ?
« on: August 17, 2005, 10:11:45 pm »

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

Aditya Mooley

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 781
    • My Sweet Home
Re: API ? Adding pictures to gallery programtically ?
« Reply #1 on: August 18, 2005, 07:02:44 am »

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.
Logged
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

evilc

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: API ? Adding pictures to gallery programtically ?
« Reply #2 on: August 18, 2005, 03:19:27 pm »

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

Nibbler

  • Guest
Re: API ? Adding pictures to gallery programtically ?
« Reply #3 on: August 18, 2005, 03:48:24 pm »

Yes, the pid based link is to displayimage.php?pos=-[pid]
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.