It is currently Mon Nov 19, 2018 10:03 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: image name
PostPosted: Sun Oct 27, 2013 2:39 am 
Offline

Joined: Sun Oct 27, 2013 2:36 am
Posts: 3
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


Top
 Profile  
 
 Post subject: image name
PostPosted: Sun Oct 27, 2013 2:39 am 
Top  
 Post subject: Re: image name
PostPosted: Mon Oct 28, 2013 9:40 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
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: viewtopic.php?f=35&t=1067#p3806
At the bottom if a fix for striping file extensions.

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
 Post subject: Re: image name
PostPosted: Tue Nov 05, 2013 12:07 am 
Offline

Joined: Sun Oct 27, 2013 2:36 am
Posts: 3
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.


Top
 Profile  
 
 Post subject: Re: image name
PostPosted: Tue Nov 05, 2013 3:48 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
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:
// 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:
// 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


Top
 Profile  
 
 Post subject: Re: image name
PostPosted: Tue Nov 05, 2013 11:12 pm 
Offline

Joined: Sun Oct 27, 2013 2:36 am
Posts: 3
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


Top
 Profile  
 
 Post subject: Re: image name
PostPosted: Tue Nov 05, 2013 11:12 pm 
Top  
 Post subject: Re: image name
PostPosted: Wed Nov 06, 2013 5:32 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
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


Top
 Profile  
 
 Post subject: Re: image name
PostPosted: Tue Dec 10, 2013 10:17 pm 
Offline
Komusubi
Komusubi

Joined: Tue Dec 10, 2013 8:54 pm
Posts: 25
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:
// 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:
// 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>?


Top
 Profile  
 
 Post subject: Re: image name
PostPosted: Mon Dec 16, 2013 10:27 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Easy :)
Instead of
Code:
$html.= $AG->writeDescription($imageName);

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

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

This is the official Admiror Joomla! Community Forum. You are welcome to join the Admiror Joomla! Community. All Admiror Joomla! Extensions Users, Joomla! Developers, PHP or mySQL Developers are welcome to support & contribute to Admiror Joomla! Projects.

Joomla! is a free and open source content management system (CMS) for publishing content on the World Wide Web and intranets. With a vibrant volunteer community, user-friendly features and plenty of power, Joomla is perfect for your website!

Joomla! is written in PHP, uses object-oriented programming (OOP) techniques and software patterns, stores data in a MySQL database, and includes features such as page caching, RSS feeds, printable versions of pages, news flashes, blogs, polls, search, and support for language internationalization.

Joomla! is the property of Open Source Matters, Inc. All rights reserved. Read more about Joomla! at http://www.joomla.org/.


Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group