Page 1 of 1
image name
Posted: Sun Oct 27, 2013 2:39 am
by dandez
Hello is there any way to add the image name (or file name) under each image in the gallery?
I mean something like here:
http://szyciefiran.com.pl/galeria.html
Regards
Dan
Re: image name
Posted: Mon Oct 28, 2013 9:40 am
by Vasiljevski
You can use Admiror Gallery Image Manager and add Image name (Caption) under each image.
As you can see, currently full image name is show: image.jpg, but after you add a caption in Admiror Gallery Image Manager that value will be shown.
Also there is an option to add different caption depending on the language
If you just wanted to remove extension from the file name, you can checkout this topic:
http://www.vasiljevski.com/forum/viewto ... 1067#p3806
At the bottom if a fix for striping file extensions.
Re: image name
Posted: Tue Nov 05, 2013 12:07 am
by dandez
Ok but let say tha in this gallery for example I have captions set:
http://www.strony-joomla.pl/test/index. ... ny-galeria
In result the albums captions are ok but when I enter the one level deeper into any of the albums the captions disappear for the images even though I have them all set under images.
Re: image name
Posted: Tue Nov 05, 2013 3:48 pm
by Vasiljevski
If you altered the classic template, can you send me the template you are using?
If you use default classic template, try changing this part:
Code: Select all
// Loops over the array of images inside target gallery folder, adding wrapper with SPAN tag and write Popup thumbs inside this wrapper
if (!empty($AG->images)) {
foreach ($AG->images as $imageKey => $imageName) {
$html.= '<span class="ag_thumb' . $AG->params['template'] . '">';
$html.= $AG->writePopupThumb($imageName);
$html.='</span>';
}
}
to:
Code: Select all
// Loops over the array of images inside target gallery folder, adding wrapper with SPAN tag and write Popup thumbs inside this wrapper
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);
$html.='</span>';
}
}
This will add image names under every image. You can also wrap it in some tag like <span> or <p> to be able to center it.
Re: image name
Posted: Tue Nov 05, 2013 11:12 pm
by dandez
Where to find this code?
I've browsed album and template file and couldn't find it
The website is life now on:
http://szyciefiran.com.pl/firany-galeria.html
Best Regards
Dan
Re: image name
Posted: Wed Nov 06, 2013 5:32 pm
by Vasiljevski
Code you need to edit is in :/plugins/content/admirorgallery/admirorgallery/templates/classic/index.php
Re: image name
Posted: Tue Dec 10, 2013 10:17 pm
by philadler
Vasiljevski wrote:If you altered the classic template, can you send me the template you are using?
If you use default classic template, try changing this part:
Code: Select all
// Loops over the array of images inside target gallery folder, adding wrapper with SPAN tag and write Popup thumbs inside this wrapper
if (!empty($AG->images)) {
foreach ($AG->images as $imageKey => $imageName) {
$html.= '<span class="ag_thumb' . $AG->params['template'] . '">';
$html.= $AG->writePopupThumb($imageName);
$html.='</span>';
}
}
to:
Code: Select all
// Loops over the array of images inside target gallery folder, adding wrapper with SPAN tag and write Popup thumbs inside this wrapper
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);
$html.='</span>';
}
}
This will add image names under every image. You can also wrap it in some tag like <span> or <p> to be able to center it.
How do you wrap it in <span> or <a>?
Re: image name
Posted: Mon Dec 16, 2013 10:27 am
by Vasiljevski
Easy

Instead of
Code: Select all
$html.= $AG->writeDescription($imageName);
you can use:
Code: Select all
$html.= '<span>' . $AG->writeDescription($imageName) . '</span>';