Wondering if anyone has this working.
I am using the Drupal 8 Juicebox module. I've uploaded a gallery created by JuiceboxPro and have that running, though it's showing just 50 pictures. Drupal knows I have the Pro version because it let's me set the configuration options for that.
I put my galleries in a folder right under Drupal 8, so:
public_html/drupal8/jboxgalleries/jboxaust
where jboxaust is the first gallery I created with jboxbuilder. Thought was I could create other galleries at that same level.
However, getting back to the point, when I follow the instructions in the original post in this thread I get no results. I am creating a Drupal article with the embed code as per:
<!--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-->
I also have created a config.php in the jboxgalleries directory with this in it:
?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 = '6218251177877809633'; // 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();
?>
I know that the Google userid and albumid are correct because I can use them standalone in the address bar of a browser window and see the album. For instance I can do:
http://picasaweb.google.com/data/feed/a … mgmax=1600
and get a list of photos in an album named 2015_Corning (which of course has that albumid).
I'm also a bit unsure about what the config.php program is doing. Is it outputting an xml file to a browser window or saving one?