Custom integration using Gallery APIs

okeyplus

Joined: 2004-02-18
Posts: 2
Posted: Tue, 2006-04-18 19:52

Hi, I hope this is the right place to ask this question, and I apologize if it isn't.

I'm looking to migrate a pretty large set of photo galleries that are running a custom photogallery script to Gallery2. I'd like to know whether the tasks I'd like to accomplish can be done via the Gallery 2 API, and if so, where I can start. Since the original gallery is custom, I plan to write my own migration script, so I hope that the following actions are viable through the API:

* Create registered users programatically, without sending them an e-mail.
* Create albums and subalbums programatically, associated with the newly created users
* Copy world-readable images from a remote webserver, maintaining their creation time, if they don't happen to have exif timestamps (Gallery2 shouldn't think that they were added "today" at runtime)
* Create anonymous (not from registered users) comments for items programatically, along with timestamp, ip, etc

Bonus nice-to-have feature: convert HTML in comments to BBCode programatically on the fly

I should note that I'm an experienced developer, so don't be afraid to get technical on me :)

From what I understand, it's not encouraged to go rooting around in the database; developers are instead encouraged to use the APIs. So will that be adequate for what I need?

Thanks!
Vladimir

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-04-19 08:42

- i guess this should rather be in the migrate to g2 forum
- you should look at the coppermine -> g2 import module. and maybe also at the migrate module (g1 -> g2 import)