26

(8 replies, posted in Juicebox-Pro Support)

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">&nbsp;</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.

27

(15 replies, posted in Juicebox-Pro Support)

Again, yes, it was the browser cache.  Drupal has it's own cache which also needs to be cleared in situations like these but it was browser cache in this case.

28

(9 replies, posted in Juicebox-Pro Support)

Yes, caching.  I cleared Drupal cache but not Firefox cache.  Woke up at 3 a.m. thinking this.  Just cleared cache and it works fine.

Thanks for your assistance.

29

(15 replies, posted in Juicebox-Pro Support)

I am having the same image limit problem as mentioned in the earlier post.  I have juicebox installed on a Drupal 8.1 site.  I had the lite version but earlier today purchased the PRO version.  I uninstalled the Drupal module, then reinstalled it.  In configuration on Drupal I can see the settings for the PRO version so I am assuming it is working with the PRO version. 

In juiceboxbuilder on my PC I built a gallery with over a 100 pictures in it.  It runs fine on the PC.  I followed the uploading instructions and stuffed all the files in my /public_html/drupal8/jboxgalleries folder.  I used a subfolder under jboxgalleries for the first gallery with the thought that I might eventually have other galleries there.

I've double and triple checked all juicebox.js files.  There's one in sites/all /libraries/juicebox and another one in the uploaded gallery in a jbcore directory.  Viewing them all they say PRO version. 

http://www.fkelly.org/drupal8/node/19

will show you the gallery that is limited to 50.  There are 100 plus images in the images and thumbnail directory.  The config.xml file also lists the 100+ images. 

I've cleared cache a number of times.  I even had Drupal not cache the css and js files, thinking maybe these needed to be rebuilt.  Nothing.

30

(8 replies, posted in Juicebox-Pro Support)

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">&nbsp;</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?

31

(9 replies, posted in Juicebox-Pro Support)

Actually, I found this thread:
https://juicebox.net/forum/viewtopic.php?id=1400

which discusses pulling Google Photos in.  I am in the process of upgrading the Juicebox Pro.  I had to uninstall and reinstall the Juicebox module on Drupal to get it to recognize that I had the Pro version.  That seems to be working.  I just created a gallery with the pro version, which overcomes the 50 photo limit.  Uploaded it to my Drupal 8 site and it's running but only showing 50 photos, even though I can see that uploaded 125 or so.  I'll use the other thread to post my "use Google photos" question.  First I want to figure out what's going on with the 50 photo limit.  And of course it's Christmas eve.

by the way, I want to thank you and the people who do the support on the Drupal site.  I've come across so many dead end unsupported, buggy contributed modules on Drupal that having someone who actually answers questions and fixes bugs is tremendous.

32

(9 replies, posted in Juicebox-Pro Support)

Put the Javascript file in:

sites/all/libraries/juicebox

Drupal 8 doesn't seem to create sites/all by default.  So you need to use Cpanel or another file manager tool to create the directories and upload juicebox.js to it.

I posted this on the support page on Drupal too. 

Once you do this it works like a charm.  I've created articles with images in them and run it.  Also uploaded a gallery created with juiceboxbuilder and got that running, after some pathing madness.  Just purchased the Pro version and come here looking for help getting photos from Google to show.  But that's another thread I'm looking for.