Add captions below thumbnails -SOLVED

Everything to do with Templates and Templating for Admiror Gallery.
Post Reply
Message
Author
jantje88
Posts: 1
Joined: Sun May 05, 2013 12:19 pm

Add captions below thumbnails -SOLVED

#1 Post by jantje88 »

Just using Admiror Gallery 4.5.0 for an photo gallery. The only extra thing I want to do is put the caption of the image below the thumbnail instead of below on it in the pop-up.
I have tried to edit the template in plugins/content/admirorgallery/admirorgallery/templates/classic/index.php by line 47 and further

Code: Select all

if (!empty($AG->images)) {
    foreach ($AG->images as $imageKey => $imageName) {
        $html.= '<span class="ag_thumb' . $AG->params['template'] . '">';
		$html.= $AG->writePopupThumb($imageName);
		$html.= test caption;
        $html.='</span>';
The extra line "$html.= test caption;" puts the "test caption" text below every thumbnail. No I'm looking for the correct code to put the caption text filled in at the back-end of the component below it instead of this static text. Could anyone help me with this missing code line?

\\Edit: Found it here http://www.vasiljevski.com/forum/viewto ... &t=11#p454 :)

Admiror Gallery 5 - Fundraising Campaign

bingblink
Posts: 1
Joined: Sun Jun 02, 2013 12:27 pm

Re: Add captions below thumbnails -SOLVED

#2 Post by bingblink »

Thanks for the great fix!

However when I apply the same solution, the captions appear on the right of each thumbnail instead of below it.

Code: Select all

if (!empty($AG->images)) {
    foreach ($AG->images as $imageKey => $imageName) {
        $html.= '<span class="ag_thumb' . $AG->params['template'] . '">';
        $html.= $AG->writePopupThumb($imageName);
	$html.= $AG->writeDescription($imageName); // Bing: added this to include caption under thumbnails.
        $html.='</span>';
    }
}
Tried kekeljevic's solution (http://www.vasiljevski.com/forum/viewto ... p=455#p455) to use tables to display each thumbnail but that ended up displaying each thumbnail in a new line instead.

Any help will be greatly appreciated!

Edit: Issue solved! Realised I need to update the CSS class names in template.css in my custom template 'classic-captions'. To change all CSS class with 'classic' to 'classic-captions'.

Post Reply