Forums | Mahara Community

Support /
No option to display description in gallery of images

anonymous profile picture
Deleted user
Posts: 112

18 December 2013, 9:03 AM

I tried to add a gallery of images to a page.  All of the images have description for them, but none of the descriptions are displayed.  I can see an option to display description on a single image, but not the gallary of images.



Kristina Hoeppner's profile picture
Posts: 3728

22 December 2013, 1:28 PM

Hello Melissa,

There is already a wishlist item out there for this feature if you wish to add your weight to it:




anonymous profile picture
Deleted user
Posts: 112

23 December 2013, 7:42 AM

I fixed this on my local version.  It is a quick 5 minute fix.  I put the files that need to be changed, and what the new code should look like.

The following files need to be changed:

1.  artefact/file/blocktype/gallery/theme/raw/slideshow.tpl 2.  artifact/file/blocktype/gallery/theme/raw/squarethumbs.tpl 3. artifact/file/blocktype/gallery/theme/raw/thumbnails.tpl

New code should be:

<figure style="float:left;{if $frame} padding: 3px;{/if}">         <a rel="{$image.slimbox2}" href="{$}" title="{$image.title}" target="_blank">             <img src="{$image.source}" alt="{$image.description}" title="{$image.title}" {if $frame}class="frame"{/if} />         </a>         <figcaption>{$image.description}</figcaption> < /figure>

The fix is generally the same with all three files.  You are basically changing the <span> to be a figure, then putting the {$image.description} between the <figcaption>.

I did not add the GUI to indicate if the discription should appear or not appear.  I also wanted the description for my thumbnails and squarethumb displays, because my thumbnails are not really thumbnails, but more of a collage.

Don Presant's profile picture
Posts: 255

25 December 2013, 2:58 AM

Hi Melissa:

Just wanted to say that I'm very pleased to see your contributions here. Having another independent voice who can actually code is *great*.

This lack of description in galleries had been bothering me for some time and I'm happy it's relatively easy to fix. And I see you've updated my Bug #833867 from 2011!

I'd appreciate the chance to switch it on or off, but there may be a chance to do it when this improvement is rolled into... 1.9?

4 results