Search…

X3 Photo Gallery Support Forums

Search…
 
A_W
Topic Author
Posts: 1
Joined: 16 Jul 2021, 10:19

Embed photo gallery not working

16 Jul 2021, 12:14

I try to use the Embed app for the first time without success.
I downloaded index.php from your site and installed as Myindex.php in the root of my site.
I bought a Files license and installed it.
I made a directory Files in the root of my website.
In directory Files I made a new folder Vecht and uploaded images to this folder.
The files app works as expected if I open Myindex.php file and browse to my Vecht folder, I see the images nicely displayed.
Next I created a file index.html in the Files folder of my website with this code:
<!DOCTYPE HTML>
<html>
<head>
<title>Files embed demo</title>


<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/embed.phot ... ed.min.css">
</head>
<body>
<p>This is a test of the <a href="viewtopic.php?f=67&t=10180">embed gallery</a></p>
<div class="embed" data-embed-app="/Myindex.php data-embed-path="Vecht">
</div>
<script src="https://cdn.jsdelivr.net/npm/embed.phot ... "></script>
</body>
</html>

If I open that file on my site I get this message:
SyntaxError: Unexpected token < in JSON at position 0
I tries other values:
data-embed-path="Files/Vecht" and data-embed-path="./Files/Vecht" but thes strings leads to the same message.

I did only install Files, nothing for /Embed/ is that correctly?

What do I wrongly?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Embed photo gallery not working

16 Jul 2021, 23:54

Hi. Thanks for taking the time to try Embed app. Could you please try one thing first: Download this Files app index.php that was modified slightly for usage with Embed. There are a few lines of code in current Files app that are not compatible with Embed, which will be resolved in next Files app release.

I'm not sure the above is related to your issue though, as it sounds like one of your paths might be wrong. Do you have a link to your Embed test and Files app so I can take a look? Feel free to send in PM or by email. I'll be online a while today, and you can also reach me on chat (for example from the chat icon bottom right on this forum).

I can't see anything specifically wrong in your examples. It would perhaps have been easier to first drop Files app index directly into the /files/ dir, and the use the below:
Code
data-embed-app="/files/index.php"