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: 191
Joined: Tue May 03, 2016 8:24 am

extracting "Title" from Image Title for SlideShow

Post by rogerl » Tue Jul 17, 2018 7:26 am

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: 14091
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo » Tue Jul 17, 2018 7:55 am

As far a I know there is no easy way to get meta data from the image with JavaScript.

User avatar
rogerl
 
 
Posts: 191
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl » Wed Jul 18, 2018 12:04 am

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: 14091
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo » Wed Jul 18, 2018 6:05 am

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: 191
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl » Wed Jul 18, 2018 6:18 am

So do you extract the Image description from exif data at all?

User avatar
Pablo
 
Posts: 14091
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo » Wed Jul 18, 2018 6:28 am

This is done via the Windows API when you load the image.

User avatar
rogerl
 
 
Posts: 191
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl » Wed Jul 18, 2018 7:05 am

OK, so how do I access that info for the slideshow?

User avatar
Pablo
 
Posts: 14091
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo » Wed Jul 18, 2018 7:17 am

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: 191
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl » Wed Jul 18, 2018 8:27 am

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: 14091
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: extracting "Title" from Image Title for SlideShow

Post by Pablo » Wed Jul 18, 2018 9:04 am

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: 191
Joined: Tue May 03, 2016 8:24 am

Re: extracting "Title" from Image Title for SlideShow

Post by rogerl » Wed Jul 18, 2018 11:51 am

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

Who is online

Users browsing this forum: No registered users and 6 guests