An old topic I know... but a feature I would like to make use of and found this post while searching...
Would this be considered for core code? (with a volunteer offering to look at it?)
Basic thoughts:
- 2 (hidden in 1.5.x) new config options (under Album List View in 1.6):
- Category Custom Thumbnail Album - 'category_thumb_album' (saved as aid)
- Show Thumbnail for Empty Category - 'category_thumb_empty' (default to 0, 1 if desired)
- An album defined using normal albmgr process) to hold custom thumbnails - the aid would be saved in 'category_thumb_album' via config panel. (The album CAN be hidden - visible to ADMINS only... so no one else will see the album - it still will display the thumbnail from my testing.)
- A mod to catmgr.php (or related functions) where developing the dropdown for selecting a thumbnail for category - adding the pics from 'category_thumb_album' if specified to the list of possible choices... For a currently empty category, these would be the only choices (today there are no choices presented). The ability to select any existing picture in the category is of course preserved as well.
- A mod to index.php to still display category thumbnail if:
Category has no albums and no pictures - but cat thumbnail is specified, exists, and 'category_thumb_empty' is set... (this part is one line mod...)
The only piece I would still need to code is the catmgr mod... I did manual db updates for my example below.
I looked at doing as a plugin, and could certainly go that route to set the thumbnail - but any change to the category (description, etc) will undo the thumbnail setting (because catmgr doesn't see it as valid).... and no way to force the cat thumbnail to be displayed for an empty category that I see with current plugin points.
Why consider empty categories? I have 2 cases where I ran into this...
- A category that have only a minicms entry to display - with no albums under it... I use this for pointers to other galleries for example...
- A category that has only categories under it (which then may have albums) is still considered empty (how deep may vary based on the setting of 'subcat_level' - my description is based on default setting of 2...)
An example:
http://greggallery.gmcdesign.com. On the main page (index.php) - all of the category thumbs are added using this technique... There are several categories at top that are 'empty' - containing only minicms content... A number of 'normal' categories with albums... and one category with only subcats directly under it ('Skymasters')... A single 'Admin only' album contains the category thumbnails. A mod to index.php in place to allow the thumbnail display for empty category - without it . Based on 1.5.26. (mod will be provided based on more recent svn).
Thoughts, comments, feedback welcome...