Create User Albums only when users want to use it

Black-y
Black-y's picture

Joined: 2005-01-03
Posts: 5
Posted: Mon, 2005-01-03 09:40

Hello,

this seems to be addressed mainly @mindless. ;)

While working on embedding gallery2 into PostNuke and watching over the code of the useralbum module, I noticed that gallery would create an album for every single user that will be imported from the existing PostNuke users, if this mod is activated. If it's not, no user albums will be created at all.

In the first case (Activated User Album module), hundreds (Or even tens of thousands) empty user albums would be created, which most of them would stay empty forever.

Well, probably no one would look through masses of empty galleries to find some that're populated.

In the second case (User Album module isn't activated), users would have to request their user album when they want to use one, and some admin has to create it for them.

So, neither of these seems to be the perfect solution.

What about the option to create an user album at the time the user wants to use it?

When a user clicks on "Your Album", then he could be asked if he wants to create his personal album. If he does, it will be created like it is done now. This should prevent the creation of masses of unused albums.

As a very nice side-effect, we then know which of the albums is the users personal album! So we don't have to "guess" which album could be the user-album. If you "guess" with "ORDER BY [GalleryEntity::creationTimestamp]'" you'll run into trouble sooner or later. If the user album gets deleted, he can't get a new one... Only an admin can create a new one for him. Even worse if he owns other albums in the meantime. Then even if some admin creates him a new user album: If the user tries "Your Album", he will end up in one of the albums owned by him prior to the creation of his new user album, but never again in his user album.

So you've just to store some UserAlbum->AlbumID pair for the user album when it's created, so your module can identify it absolutely and everything should be fine. :)

Then also some admin can delete user albums that stay empty for some time, and the user can create it again if he needs to.

Phew, I hope this was not too much problem-discussion. :D

PS: Demo of gallery2 integration into PostNuke should be up, soon.

Greets,
Michael Ritter

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-01-04 05:02

This is a great idea. I like it. Would you please file it as a feature request on sf.net/projects/gallery so that we don't lose track of it? Thanks!

 
Black-y
Black-y's picture

Joined: 2005-01-03
Posts: 5
Posted: Tue, 2005-01-04 10:33
 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-01-18 05:47

i've just committed most of this.. i think i covered everything except user confirmation of creating the album.. it just does it. give it a try..

 
anonymous11234

Joined: 2002-12-05
Posts: 135
Posted: Tue, 2005-01-18 14:43

This was one of things on my site http://woodshopphotos.com/gallery/ that is challenging for me. I have over 450 + users and a LOT of dead albums with nothing in them. I have users who create accounts and then for whatever reason do not upload any images and it creates an empty one.

I would love to see that change in my G2 http://www.wreckdive.net/gallery2 gallery.

Either way keep up the great work!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-01-18 19:34

maybe you misunderstood.. there is now a selection for creating user albums when first accessed instead of when the user is created. so if a new user is created but they never click "Your Album" then the album isn't created.