extracting "Title" from Image Title for SlideShow

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
User avatar
rogerl
 
 
Posts: 196
Joined: Tue May 03, 2016 8:24 am

extracting "Title" from Image Title for SlideShow

Post by rogerl »

Currently using Fancybox as a Slideshow Lightbox and have the following code in my settings:

Code: Select all

beforeShow : function() {
			this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '')
                                                      }
This works great if I manually insert a title in the SlideShow image list but it will not extract the actual title in the image which I have already inserted using Windows Explorer.
Can you advise what variable I should be using to capture the actual image title.
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo »

As far a I know there is no easy way to get meta data from the image with JavaScript.
User avatar
rogerl
 
 
Posts: 196
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl »

Hi Pablo,
So if we select use image folder on server for SlideShow your script does not produce "Title" from image description?

Have come across open source "Exif.js" which could be useful. No idea how to apply it but might make a good addition to your code.
https://github.com/exif-js/exif-js
Regards
Roger
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo »

The slideshow does not use a script to get the title.

The "Exif.js' script looks complicated just to get the title.
User avatar
rogerl
 
 
Posts: 196
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl »

So do you extract the Image description from exif data at all?
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo »

This is done via the Windows API when you load the image.
User avatar
rogerl
 
 
Posts: 196
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl »

OK, so how do I access that info for the slideshow?
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo »

If the info is available then it will automatically populate the 'Title' field in the slideshow properties (when you add a new image).
User avatar
rogerl
 
 
Posts: 196
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl »

OK, so if I decide to use the other option and use an image folder on my server as in the advanced options do I still select the images for the list of images or do I leave it blank because I can't get that to work. I get:
Image
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo »

For the online option you do not need to add images locally.

Make sure the page extension is set to PHP.
User avatar
rogerl
 
 
Posts: 196
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl »

I was beginning to wonder - - Just couldn't lay my hands on the instructions. Was not a wasted exercise. Have found some interesting stuff along the way. Thanks for your patience.
Post Reply