Gallery2:Modules:keyalbum - Gallery Codex
Personal tools

Gallery2:Modules:keyalbum

From Gallery Codex

Keyword Albums Module

Browse your photos / items by keywords.

Description

Adds a dynamic album view that shows items based on a query on keywords.

To view a keyword album, use a URL like:

 yourgallery2/main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=travel

For multiple keywords, use a URL like:

 yourgallery2/main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=travel,usa,maine
 --or--
 yourgallery2/main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=travel;usa;maine

If the URL Rewrite module is in use, activate the rule for keyword albums to use URLs like:

 yourgallery2/key/travel

For multiple keywords using the URL Rewrite module, use a URL like:

 yourgallery2/key/travel,usa,maine
 --or--
 yourgallery2/key/travel;usa;maine

Features

  • Ability to split keywords on semicolons, commas or spaces
  • Ability to show links to keyword album as lists or "clouds"
    • A collection of words. Words that occur more frequently are displayed in a larger font.
  • Position the keyword album block like all other blocks
  • Change the sort order of a dynamic album
  • Change all albums setting just like a regular album (rows, columns, frames, block, etc)

Installation

  • Install and activate the module in site admin -> modules
  • If upgrading from a previous version of the module you might have to uninstall and reinstall it to get the keyword cloud to show.

Typical configuration

  • Configure the sort order, theme and theme settings in Site Admin. Also there is an option here to show links into keyword albums with item summary info (usually shown with thumbnails).
  • The module also provides a block which can be selected in theme settings. The block can show links into keyword albums for keywords of the current item, or a select list using all available keywords. The list of all keywords is cached and refreshed from the database once per day. Edit root album -> theme tab -> 'Blocks to show in the sidebar'. Add the keyword album links block.
  • Select the keyword albums link block and a configuration box will show various parameters. Select the 'Show keyword cloud instead of select list'. Move the block to a position on the sidebar where you would like.

Requested Features

  • Make the workaround for "linkitems" (from the notes below) a supported feature. This would save us work by preventing us from editing the link after creating it just to name it properly. Add the ability to choose (by title) an item from the keyword album results list that will represent the results list.
  • Make keywords for albums independent from keywords for photos, optionally
    • This can either be separating the two in different domains or providing a way later to filter by type (i.e. I want only albums tagged family)
  • When choosing a keyword from the combo box in the left pane, be able to bring only albums or only photos
    • As it is now, if I select "family", it will bring albums tagged "family" mixed with photos tagged "family", side by side, in a big mess. This may be desirable, then there should be a configure option to control it.
    • Optionally, the combo could have extra controls to ask the type (albums, photos or both) while selecting the keyword
  • Be able to create a normal/static album, and inside it "add items" like normal photos and sub-albums, but also add a virtual item that will bring all the keyword items from the entire galery and show them together/mixed with the real items. Also, be able to filter by only albums / only photos.
    • with and/or rules
  • Be able to receive indications of keywords from visitors (that would have to be reviewed by you before being applied unless you can trust the logged in person in some way)
  • Permissions for keyalbum (restrict to registered users only)
    • This can be easy if you consider that the keyalbum will be a normal static album with virtual items added inside. It is not so easy if you talk about restricting permissions on the dinamicaly-created keyword albuns (and maybe this becomes less important with the static album possibility).
      • Photos are often tagged with people's names so that authorized users are able to search for pictures of their friends. However this can sometimes lead to identity theft or other unwanted activities by anonymous users. Search can be restricted to registered users but the keyword album has no access controls.

Words from a heavy gallery user (may help with new ideas for this module)

I and my family (wife, kids) take *a lot* of pictures. It's incredibly cheap, nowadays. From all I take, I really print on paper about 10% or less (the better ones), the rest comes just "because we can". But we save all of them. So, every week or two, I unload a full memory card and start over again. We do that for years now, and we have kind of a timeline of our lives in pictures. A lot of hard drive space (a dedicated big fat disk for that).

In the past, I used gallery1 to put those pictures online so my (and my wife's) parents could see us and our adventures. In the beginning, it was all fun. Upload all pictures and spend hours separating each one in each album (trips, family, friends, hobbies, etc.), publics and privates, rotating, putting comments, etc. Then I started delaying to do everything together on each 3 or 4 full memory cards, and eventually I stopped. Just thinking about doing that was enough to avoid it. Today I have more than a year of pictures offline, because putting them online would be a huge task. Changing the structure of the gallery at this time would be very strange, so I just stopped.

Keywords may be a solution for that. I switched to gallery2, after learning that it had keywords support (which I still don't know exactly how it differs from tags) thinking about doing it this way:

  • Start a new gallery, not importing the old albums
  • Create a (possibly with no direct public access) parent-album called "time-line"
  • Each time I unload a new memory card, I create a new sub-album there (say "from august 20 to september 05")
    • This is easy and quick to do, unload, create album, upload, forget
    • Albuns in this level would be just sequential pictures, with no re-organizing in any way, even private pictures
    • This order of events would be interesting on itself, this is something I do not have today (once I separate them into categories, the original order is lost)
  • Tag each picture so I can group them later, on the keyalbums
    • This will be a huge task, but smaller than before
    • I can do it later if I'm in a hurry, at least I will have photos online for ourselves in timeline the album
    • Visitors that will have access to this timeline albuns would help me tag photos (this would be GOOD!!)
    • There could be a big-nice-easy-interface to put tags, like checkboxing a lot of pictures at once and putting a common tag on them, on a screen with say 10 columns per 50 lines, with mini thumbnails, with all tags available on-screen (or some other nice and fancy ajax thing that could let me drag tags or whatelse), being able to put a different keyword on a different set of photos in each pass, etc.
  • Create static/keyalbums in public places and "add keyword items" inside them to show the photos already organized by the keywords I put on them before
    • this albums would be "live", just changing keywords on the timeline albums would make them re-organize themselves
  • Have a way to manage this albums when they get very big
    • Maybe some criteria that would make just some part show up (like "all photos with keyword XXX but with $date1 < date < $date2)
    • If I do not have that, when my daughter have 15 years (she's 3 now) her keyword album will have 1000 or more pages, not very reasonable
    • Eventually the list of keywords itself will become very big, and it would be very nice to have a page to manage your keywords (and have statistics about how many picutres/albums have each keyword, etc.).
    • Also, with a big number of keywords in place, it becomes necessary to have them available to pick from in all places, rather than having a text box where you can enter them in free form (or maybe both).

I think the point is clear now. Have a way to upload fast and arrange later. If I have more ideas, I will update this list. If anyone have any other idea, please modify the list (or the text). Eventually this bla bla should go away and keep just the list, but I felt better to explain it for now.


I have the opposite need, I have 60,000 images each with multiple IPTC keywords, and would like to either parse that on upload and place the photos in matching albums, or generate virtual albums based on the embeded keywords.

Bugs

  • Currently there are no known issues for this module.

Notes

  • Click "edit captions" for an album to add keywords for many items at once.
  • See also Gallery2:Modules:tags module
  • If you have the "linkitems" module installed, it is possible to make "linkitems" that point to keyalbums (simply enter the full url to your keyalbum as the "external url"). After you have created the linkitem, you can then edit the item to change the title of the item so that it contains your keywords. Unfortunately, there is no workaround (yet) for the thumbnail. Currently, it will display a "chain" thumbnail.