Search…

X3 Photo Gallery Support Forums

Search…
 
traxnamibia
Experienced
Topic Author
Posts: 36
Joined: 17 May 2021, 08:16

Re: Attribute: data-embed-popup-caption-template

15 Nov 2021, 08:04

Hi Karl,

I have replaced the files app and the files config file (that's ALL), but I am now getting an 'Invalid Directory' error.

Please have a look at https://selfdrive.africa/nambots/lodging/aiaiba/_snippets/gallery1-embed.html and let me know what's up?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13146
Joined: 30 Sep 2006, 03:37

Re: Attribute: data-embed-popup-caption-template

15 Nov 2021, 08:52

traxnamibia wrote:I have replaced the files app and the files config file (that's ALL), but I am now getting an 'Invalid Directory' error.
I am not sure how/if/why it was working before, but below is the link to your files app, and it's empty:
https://selfdrive.africa/nambots/lodgin ... _files.php

So in Embed, you have data-embed-path="images/presentation", which means it's trying to load that path relative the Files app, but that folder does not exist. It would be here
https://selfdrive.africa/nambots/lodgin ... esentation

Or here, when Files app tries to load it:
https://selfdrive.africa/nambots/lodgin ... esentation

In either case, that path does not exist, and based on your settings, this is expected behavior. What is the actual path of "images/presentation" that you are trying to display? Files app must be able to access the folders you want to display, either by locating Files app in a parent location of the dirs you want to display, or by assiging the Files app ROOT config option to point to a specific parent dir so that it can access relative sub-directories.
 
traxnamibia
Experienced
Topic Author
Posts: 36
Joined: 17 May 2021, 08:16

Re: Attribute: data-embed-popup-caption-template

15 Nov 2021, 12:21

In either case, that path does not exist
I really don't get it - those locations exist:

eg:
https://selfdrive.africa/nambots/lodgin ... Lodge.webp
Would it help if I gave you FTP access?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13146
Joined: 30 Sep 2006, 03:37

Re: Attribute: data-embed-popup-caption-template

15 Nov 2021, 22:24

traxnamibia wrote:I really don't get it - those locations exist:
I figured it out ... An unfortunate circumstance. Since latest release, Files app automatically excludes paths that start with /_files*. Why? Because we need to exclude stuff created by Files app, for instance the new cached download/ZIP files that are named path/_files.zip. It's also useful if you want to add files or folders that you want to exclude from being viewed.

Unfortunately, your main parent dir of the app was called /_files/ and Files app therefore excluded all paths within from being read. I have temporarily renamed the folder from /_files/ to /zfiles/, you can check now that it works? PS! You would also need to amend attributes in the Embed app.

Sorry for this confusion. There could be room for improvement, as Files app should perhaps only exclude paths if /_files* is a child of the actual Files app root. However, it was perhaps a bit unfortunate that you chose the parent folder name "/_files/" which is what files app uses for the excluded storage dir /_files/_files/? Anyway, not your fault!
 
traxnamibia
Experienced
Topic Author
Posts: 36
Joined: 17 May 2021, 08:16

Re: Attribute: data-embed-popup-caption-template

16 Nov 2021, 01:12

:punch:
as simple as that!

Thanks!
 
traxnamibia
Experienced
Topic Author
Posts: 36
Joined: 17 May 2021, 08:16

Re: Attribute: data-embed-popup-caption-template

12 Dec 2021, 07:03

I have sent you a PM
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13146
Joined: 30 Sep 2006, 03:37

Re: Attribute: data-embed-popup-caption-template

12 Dec 2021, 08:36

traxnamibia wrote: I have sent you a PM
Sorry, I can't see any message from you ... Last message from you was 3 weeks ago ... Did I miss something?
 
traxnamibia
Experienced
Topic Author
Posts: 36
Joined: 17 May 2021, 08:16

Re: Attribute: data-embed-popup-caption-template

12 Dec 2021, 12:58

Sorry about that Carl - by the way, my name is Bruce and I love your diligence.

I finally got round to checking out your new IPTC fields and have the following report to make:

1.   8/10 Ain't bad! 
2.   See below... I have appended a working data-embed-popup-caption-template and can happily report that  8 out of 10 fields work perfectly. The two fields which don't work are sub-location and province-state.
3.  Initially, nothing displayed at all - I believe this was because of the hyphens in the field name, so I dropped the hyphens. I then got 8 fields to display.
4.  After dropping the hyphens I renamed the two fields to subLocation and provinceState . I did this in both data-embed-popup-caption-template and also in files.php. Definitely above and beyond my skill set, but a bit of copying and pasting with Notepad Plus Plus is quite useful sometimes!
5.  It seems it's not just the hyphens - something else in files.php is not quite right.
6. For what it's worth and from a selfish, personal level, these issues are unlikely to be an issue to me as Google's core C C C s (Creator, Credit and Copyright) are in place  and work perfectly. 

T H A N K S.
Code
data-embed-popup-caption-template="

<!--Testing-->

{{ @if (image.iptc) }}


{{ @if (image.iptc.title) }} <!-- [Exif Pilot: Object Name] [Irfanview:  Document Title] -->
<div class='popup-title'>{{ image.iptc.title }}</div>
{{/if}}

{{ @if (image.iptc.headline) }} <!-- [Exif Pilot: Headline] [Irfanview: Headline] -->
<div class='popup-title'>{{ image.iptc.headline }}</div>
{{/if}}

{{ @if (image.iptc.description) }} <!-- [Exif Pilot: Caption] [Irfanview: Caption (Description)] -->
<div class='popup-description'>{{ image.iptc.description }}</div>
{{/if}}

{{ @if (image.iptc.creator) }} <!-- [Exif Pilot: Byline Title] [Irfanview: Author Title] -->
<div class='popup-description'>{{ image.iptc.creator }}</div>
{{/if}}

{{ @if (image.iptc.credit) }} <!-- [Exif Pilot: Credit]  [Irfanview: Credit] -->
<div class='popup-description'>{{ image.iptc.credit }}</div>
{{/if}}

{{ @if (image.iptc.copyright) }} <!-- [Exif Pilot: Copyright] [Irfanview: Copyright] -->
<div class='popup-title'>{{ image.iptc.copyright }}</div>
{{/if}}

{{ @if (image.iptc.keywords) }} <!-- Exif Pilot: Keywords tab -->
<div class='popup-description'>{{ image.iptc.keywords }}</div>
{{/if}}

{{ @if (image.iptc.city) }} <!-- [Irfanview: City] -->
<div class='popup-description'>{{ image.iptc.city }}</div>
{{/if}}

<!--******************************************************* -->
<!-- hyphens were removed both here and in the files.php app, but the following 2 IPTC codes do not work just yet-->
{{ @if (image.iptc.subLocation) }} <!-- [Irfanview: Sublocation] (sub-location in files.php)  -->
<div class='popup-description'>{{ image.iptc.subLocation }}</div>
{{/if}}

{{ @if (image.iptc.provinceState) }} <!-- [Irfanview: Province-State] (province-state in files.php)-->
<div class='popup-description'>{{ image.iptc.provinceState }}</div>
{{/if}}
<!--******************************************************* -->

{{/if}}

"

 
traxnamibia
Experienced
Topic Author
Posts: 36
Joined: 17 May 2021, 08:16

Re: Attribute: data-embed-popup-caption-template

12 Dec 2021, 13:36

 
User avatar
mjau-mjau
X3 Wizard
Posts: 13146
Joined: 30 Sep 2006, 03:37

Re: Attribute: data-embed-popup-caption-template

12 Dec 2021, 21:33

traxnamibia wrote:I finally got round to checking out your new IPTC fields and have the following report to make:
I don't think you can just rename the items in files.php, since that's just 20% of the application whereas the Javascript is 80% or more. The templating issue is definitely related to the -hyphens in the item names, because you cannot use hyphens when referencing properties in dot-syntax (like the caption templates engine). You can use brackets though:
Code
{{ @if (image.iptc['sub-location']) }}
<div class='popup-description'>{{ image.iptc['sub-location'] }}</div>
{{/if}}
traxnamibia wrote:
Code
<!-- [Irfanview: Sublocation] (sub-location in files.php)  -->
<!-- [Irfanview: Province-State] (province-state in files.php)-->
The above doesn't really mean anything. In Files app, they are merely options and I will never use Capitalization in option items. Besides, there is no official reference, and the names are not used to display. And Irfanview uses -hypen in one and not the other ...

Thanks for posting! Should be looking into an Embed update soon, to follow advances in Files app.