image name

Admiror Gallery is free extension for Joomla! 1.6. Joomla! 1.7 and Joomla! 2.5 based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Post Reply
Message
Author
dandez
Posts: 3
Joined: Sun Oct 27, 2013 2:36 am

image name

#1 Post 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

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: image name

#2 Post 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.
Help Admiror Gallery become even better,
give us a review on JED

dandez
Posts: 3
Joined: Sun Oct 27, 2013 2:36 am

Re: image name

#3 Post 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.

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: image name

#4 Post 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.
Help Admiror Gallery become even better,
give us a review on JED

dandez
Posts: 3
Joined: Sun Oct 27, 2013 2:36 am

Re: image name

#5 Post 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

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: image name

#6 Post by Vasiljevski »

Code you need to edit is in :/plugins/content/admirorgallery/admirorgallery/templates/classic/index.php
Help Admiror Gallery become even better,
give us a review on JED

philadler
Komusubi
Komusubi
Posts: 25
Joined: Tue Dec 10, 2013 8:54 pm

Re: image name

#7 Post 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>?

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: image name

#8 Post by Vasiljevski »

Easy :)
Instead of

Code: Select all

$html.= $AG->writeDescription($imageName);
you can use:

Code: Select all

$html.=  '<span>' . $AG->writeDescription($imageName) . '</span>';
Help Admiror Gallery become even better,
give us a review on JED

Post Reply