Hide empty albums from view

agentrickard

Joined: 2005-04-13
Posts: 2
Posted: Wed, 2005-04-13 13:33

This is almost covered in the thread:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=24568&highlight=empty+album

But not quite.

We have a very nice Drupal/G2 integration going here:
http://www.blufftontoday.com/gallery?g2_view=core:ShowItem&g2_itemId=241

One UI question. We have the default for this gallery set to "Create User Albums When First Accessed," and we still have a number of users who have not loaded photos in.

I have hacked the code to display a default "no images message," and that's ok, but we would prefer to hide empty galleries (and not include them in the total active gallery count). Users can click the Your Album link to access their empty galleries, so we don't need to present them on the page.

I couldn't find a way to omit the blanks from the list. The closest I came was wrapping the entire display block in an {if child.thumbnails} and assume that galleries with images would have thumbnails.

This didn't display blank galleries, but they were still counted.

Any ideas?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2005-04-17 22:52

It's a little tricky to hide them from the count because we do that based on permissions (and it's non trivial to do it efficiently). But you could just delete them, and the next time they go back to their own album it'll get recreated the next time the user shows up and wants to use their album. We could probably whip up an automated way to do that, I bet.

 
agentrickard

Joined: 2005-04-13
Posts: 2
Posted: Tue, 2005-04-19 13:35

Too many galleries to delete manually. It would be better to have a configuration option for the Album:

checkbox: "Show Empty Galleries"
default = no.

I suppose that qualifies as a feature request. :-)

 
jagr

Joined: 2003-04-22
Posts: 34
Posted: Fri, 2005-07-29 06:09
Quote:
I couldn't find a way to omit the blanks from the list. The closest I came was wrapping the entire display block in an {if child.thumbnails} and assume that galleries with images would have thumbnails.

Hi,
I would like to do this (wrap a display block in an {if child.thumbnails} to achieve this. The album count is not so important.

Could you guide me to the file to edit and where the display block is located? Thanks.

 
bberglund

Joined: 2006-12-15
Posts: 1
Posted: Fri, 2006-12-15 15:09

This would be a great feature to have... Removing albums or hiding them if no pictures exist.

 
iamcanadian2222
iamcanadian2222's picture

Joined: 2007-01-17
Posts: 24
Posted: Mon, 2007-12-03 21:20

Has any progress been made on this?

 
iamcanadian2222
iamcanadian2222's picture

Joined: 2007-01-17
Posts: 24
Posted: Fri, 2007-12-14 21:10

Does anyone respond to these forums? Or are all the questions I have just unsolvable. ;)

 
mcnever

Joined: 2009-11-02
Posts: 1
Posted: Mon, 2009-11-02 20:56

Any progress on this?

Thanks
Jason

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-02 21:08

Try searching the forums (yeah, I know that's how you found this 4+ year old thread) but someone did post a hack on how to do this. If I run across it, I'll post back in here.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-02 21:09

Ah, read this thread:
http://gallery.menalto.com/node/60098
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here