I would like to migrate albums of my users from g1 to g2.
I guess i need to do some modification to the migration module, to import everything from root/ into something_i_specify/<username>/ .
the question is how to do it with Confirmimport.inc?
i think after checking the code, that by modifing this part:
/*
* if the album's parent is not in the list of sourcealbums,
* load it into the targeted G2 top album as set in $destinationAlbumID
*/
$targetAlbumID = $newAlbumInstanceId = $isHiddenAlbum = false;
if (!in_array($album['parentAlbumName'], array_keys($form['sourceAlbums']))) {
$targetAlbumID = $destinationAlbumID;
with changing the last line to : $targetAlbumID = $album['owner'];
could do the trick..but..
1. what if that album is not exist? :o
then it should create that with the appropiate permissions..i guess the code could be taken from the "useralbums" module to actually create that..
i'm just thinkin "loudly" ;>
2.what if the user does not exist? :o
then the user should be created too,_with the right username and userid_..otherwise it's bad to have an album associated a non-existant user :o
Anyone willing to help out? ;)
Posts: 974
Uh, why don't you turn on the user-album-creation module, import all your users, then import their albums one user at a time into the automatically created user albums?
If you import all the users first then all the users will be there for their albums.
Posts: 560
true.
i've managed to do what i wanted with usage of $userName..
and then did some trick so that migration mod. is capable of getting usernames from (phpbb) embeddded installation too..
thanks.