[SOLVED] Explicitly set user album?

kbyrd

Joined: 2005-02-14
Posts: 6
Posted: Wed, 2005-02-16 14:57

In Gallery 1, I manually setup a per-user album. The top level gallery contained only one album per user. That user was the owner. I imported all these users into g2 along with the albums. I ended up with a duplicate set of "user albums" since I had the user album module turned on when I imported. I deleted the new, empty g2 user albums. The "Your Album" and "goto your album at login" functions don't work. Is there a way to designate an arbitrary album as the "user album"? I doesn't even have to be pretty, this was probably a one time occurence, so I'll muck around with SQL or data files if I need to. Thanks for all the hard work.
----

Gallery URL (optional):
Gallery version: CVS from 2/15/05
Webserver (with version): Apache2
Datatabase (with version): MySql

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-02-16 15:50

here's the sql.. you'll need to find the ids.. g_id in g2_User and g2_AlbumItem.. you can also find album ids in the url for "edit album" links, or in the view-album links if short urls is off.

insert into g2_PluginParameterMap values ('module', 'useralbum', 'albumId', {id of album}, {id of user});

you can visit lib/tools/test/index.php and click FlushCache test to clear any cached values.. you shouldn't need this when just adding values, but if you get any wrong and later need to change a value then you'll need to clear the cache to see the change.

 
kbyrd

Joined: 2005-02-14
Posts: 6
Posted: Wed, 2005-02-16 16:57
mindless wrote:
here's the sql.. you'll need to find the ids.. g_id in g2_User and g2_AlbumItem.. you can also find album ids in the url for "edit album" links, or in the view-album links if short urls is off.

insert into g2_PluginParameterMap values ('module', 'useralbum', 'albumId', {id of album}, {id of user});

you can visit lib/tools/test/index.php and click FlushCache test to clear any cached values.. you shouldn't need this when just adding values, but if you get any wrong and later need to change a value then you'll need to clear the cache to see the change.

Thanks, that did the trick.