Module: Tags In Album

rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sun, 2010-11-14 06:54

This module will create a sidebar block on album pages which contains a list of tags used by items in that album (the contents of sub-albums are not included). It is only displayed on album pages, not photo or video pages.

Example:
[img]http://codex.gallery2.org/images/5/51/Tagsinalbum.jpg[/img]

It can be downloaded from this thread, or from my account on github.
---
Report Problems/Suggestions Here | Get latest version | Documentation | Coffee Fund | My Library | My GitHub

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2010-11-19 18:00

Woot! Good work.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sat, 2011-06-11 19:22

As requested by wdfw, I've added an option to this module to limit the number of tags displayed in the sidebar. By default, this option is disabled. To use it, log in as an admin and go to Settings -> Advanced and locate the tagsinalbum / max_display_tags record. If max_display_tags is 0, all tags will be displayed, if it's a value other then 0, then that is the maximum number of tags that will be displayed.

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sat, 2011-06-11 19:26

Here is the latest version of the TagsInAlbum module:
- I've updated the new fields in the module.info file to point to the correct web pages.
- I've reworked the database query to only return one record for each tag instead querying for all tags used by an album's children and then removing duplicates with PHP code. I've also reworked the database query to handle sorting the tags by name and to limit the number of tags returned if max_display_tags is set, instead of doing this with PHP code. Hopefully this'll speed things up for albums with large numbers of children.

This version has been tested with Gallery 3.0.2.

 
kukrapok
kukrapok's picture

Joined: 2011-07-16
Posts: 32
Posted: Mon, 2011-07-18 15:40

Hi rWatcher. Here with gallery 3.0.2, your module works well to display tags found in an album, but it won't show tags present in a specific image.

I found also problematic that this module adds yet another section to the side bar, I would merge this to the metadata section of Info module or even to the popular tags module section (to create a single tag section, then). That's another topic I guess.

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Mon, 2011-07-18 18:43
kukrapok wrote:
Hi rWatcher. Here with gallery 3.0.2, your module works well to display tags found in an album, but it won't show tags present in a specific image.

No, it doesn't. It displays a list of tags used by sub-items only, it does not display tags used by the current item. As photos and movies don't have sub items, this block is hidden when viewing them. If you want a separate block to list tags used by the current item, you could try displaytags:
http://gallery.menalto.com/node/89093

 
kukrapok
kukrapok's picture

Joined: 2011-07-16
Posts: 32
Posted: Tue, 2011-07-19 08:14

I see! I misunderstood the aim of this module. I finally merged some code found at http://gallery.menalto.com/node/96250 in my theme to avoid having 2 extra modules (tagsinalbum and displaytags) and extra sections in sidebar. Thanks for your work!