Migrate to gallery from phpwebsite photoalbum

Infern_0

Joined: 2007-04-10
Posts: 2
Posted: Tue, 2007-04-10 21:52

I want to migrate from the phpwebsite module photoalbum to a seperate gallery install.

I'm looking for the best way to convert, since all data is stored in mysql I can make some php scripts. The data is stored quite simple:

Table with all the albums, which contains basic info like:
- label
- extended info
- creator
- creation date
- update date
So which gallery function I have to use import the data. I'm looking for something like this:
while(fetch_rows(old_albums_table){
Gallery2::AddAlbum(label,extended info, creator ....)
}

Same for the photos it self, loop through the table and do something like:
Gallery2::AddItem(albumid, label, filename, thumb filename)

Can someone point me in the right direction?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-04-11 01:29

please take a look at the coppermine -> g2 import module as a tutorial.

you'll use GalleryCoreApi::addItemToAlbum (see modules/core/classes/GalleryCoreApi.class).

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage