Sorry for the typo. I had the opening < in my config.php, just didn't copy it into the code I posted. I'll post again because I'm now getting a juicebox gallery with a juicebox error: config xml file not found. Here's config.php:
<?php
header('Content-type: application/xml');
$dom_doc = new DOMDocument('1.0', 'UTF-8');
$dom_doc->formatOutput = true;
$settings_tag = $dom_doc->createElement('juiceboxgallery');
$picasa_user_id = '113264882166353967951'; // Enter your Google+ User ID here
$picasa_album_name = '6218254396969323729'; // Enter your Google+ Album ID here
$attachments = array();
$picasa_feed = 'http://picasaweb.google.com/data/feed/api/user/' . $picasa_user_id . '/albumid/' . $picasa_album_name . '?kind=photo&imgmax=1600';
$entries = simplexml_load_file($picasa_feed);
if ($entries) {
foreach ($entries->entry as $entry) {
$attachments[] = $entry;
}
}
if ($attachments) {
foreach ($attachments as $attachment) {
$media_group = $attachment->children('http://search.yahoo.com/mrss/')->group;
$image_url = $media_group->content->attributes()->{'url'};
$image_element = $dom_doc->createElement('image');
$image_element->setAttribute('imageURL', $image_url);
$image_element->setAttribute('thumbURL', $media_group->thumbnail[1]->attributes()->{'url'});
$image_element->setAttribute('linkURL', $image_url);
$image_element->setAttribute('linkTarget', '_blank');
$title_element = $dom_doc->createElement('title');
$title_text = $dom_doc->createCDATASection($attachment->title);
$title_element->appendChild($title_text);
$image_element->appendChild($title_element);
$caption_element = $dom_doc->createElement('caption');
$caption_text = $dom_doc->createCDATASection($attachment->summary);
$caption_element->appendChild($caption_text);
$image_element->appendChild($caption_element);
$settings_tag->appendChild($image_element);
}
}
$dom_doc->appendChild($settings_tag);
echo $dom_doc->saveXML();
?>
and the corrected article with embedding code:
<!--START JUICEBOX EMBED--><script src="/drupal8/sites/all/libraries/juicebox/juicebox.js"></script><script>
new juicebox({
configUrl: '/drupal8/jboxgalleries/config.php',
containerId : "juicebox-container",
galleryWidth: "100%",
galleryHeight: "100%",
backgroundColor: "#222222"
});
</script>
<div id="juicebox-container"> </div>
<!--END JUICEBOX EMBED-->
Just noticed the single quotes around the configUrl and changed them to double. Recleared cache, still getting missing xml file message.
Also tried in Internet Explorer, Same error. Double, triple checked userid and album id ... tried a different album ID. Here's a url to see the message:
http://fkelly.org/drupal8/node/20
Thanks.