I Steven and thank you for the quick reply!
Ok I have been giving this some thought and have also been reading the excellent documentation.
Your idea of having a JB outside the Wordpress environment is not bad at second though.
I said second because of course this defeats the purpose of using Wordpress as a CMS, after all I would like my client to be able to manage his content and also images from WP.
But looking at the PRO options I could write a PHP page that spits out the XML file using `configUrl: 'config.php'
Config.php would have to access the WP database and write the nodes of a certain gallery, created by the client in the backend.
I still have to do some research on how to do that but it's a good idea.
So basically in a WP page or post I link my thumbnails to for example:
<a href="/photos/?id=6"><img src="wp-content/uploads/image5.jpg" /></a>
That way a page with a 100% Juicebox with all the photos I want to show is accessible from mysite.com/photos/ and a specific ID could be passed with PHP's GET. I could pass this with a technique I used before like this:
<?php
// capture image ID with GET, check if it's an integer
$img_id = isset($_GET['id']) ? (int) $_GET['id'] : null;
if (!$img_id) {
// if the ID is not set or not an integer, use the first image ID
$img_id = 0;
// NOTE: JB will automatically default to 0 when the ID is out of range, example ID 1000
}
?>
<!DOCTYPE html>
<html lang="en">
<body>
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
var img_id = <?php echo json_encode($img_id); ?>;
new juicebox({
containerId: 'juicebox-container',
firstImageIndex: img_id
});
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->
</body>
</html>
When a GET variable is provided (clicking on a thumbnail in a post or page) I could show a home / back button.
What do you think, would that work?