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?
Posts: 32509
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