You're welcome!
I'm glad it's working now. Thank you for letting me know.
You are not logged in. Please login or register.
Juicebox Support Forum → Posts by Steven @ Juicebox
You're welcome!
I'm glad it's working now. Thank you for letting me know.
Judging by the vertical nature of the Button Bar, it looks like a dimensional/timing problem (maybe the tab's dimensions are not fully set up when the gallery is loaded).
Additionally, if I resize the browser window (forcing the gallery to be redrawn with new dimensions), the main image and the Button Bar are both displayed correctly.
Thinking about my original suggestion, it looks like adding code such as:
<script>
loadGallery('aluminium/', 'juicebox-container-1');
</script>
.. in each tab will still load all galleries as soon as the web page is loaded (so galleries 2, 3 and 4 may still be loaded within hidden tabs). It looks like tabs 2, 3 and 4 may not be visible when the web page is initially loaded but all the HTML and JavaScript code within the tabs will be parsed by the browser on load.
However, loading only one 'juicebox.js file per page, embedding each gallery into a unique container and using a loadGallery() function are still steps in the right direction so all your work so far has not been in vain.
Here's perhaps a better suggestion which should hopefully work (and load each gallery on demand only after the parent tab is visible, i.e. when a tab is clicked).
Create a click handler for your tab headers and run the loadGallery() function to load the gallery corresponding to the selected tab.
Remove the individual calls to the loadGallery() function (but leave the gallery container divs in place) and add the following code just below the loadGallery() function itself.
$(document).ready(function() {
$("li[role='presentation'] a").click(function() {
var gallery = $(this).attr('aria-controls');
var base = gallery + '/';
var container = 'juicebox-' + gallery;
loadGallery(base, container);
});
});
(The code above extracts the gallery name from your conveniently named 'aria-contols' attribute and uses it to form the baseUrl and containerId.)
If this does not work, then you might need to introduce a slight delay before loading the gallery (to ensure that the tab's dimensions are set up) so try this (which has a delay of 200ms before loading the gallery).
$(document).ready(function() {
$("li[role='presentation'] a").click(function() {
window.setTimeout(function() {
var gallery = $(this).attr('aria-controls');
var base = gallery + '/';
var container = 'juicebox-' + gallery;
loadGallery(base, container);
}, 200);
});
});
I hope this helps to resolve your problem.
The icons within a Juicebox gallery are characters in a custom font and the font files are stored in the 'jbcore/classic/fonts/' folder.
However, looking at the 'fonts' folder in your own gallery's 'jbcore' folder, it looks like only the 'juicebox.eot' file is present and the SVG, TTF and WOFF files are missing.
Try reuploading the 'jbcore' folder to your web server and, afterwards, make sure that there are four files inside the 'fonts' folder.
(You might also need to clear your browser's cache before reloading your gallery's web page.)
I hope this helps.
The SimpleViewer skin for jAlbum used a third-party audio player embedded in the main album page so the audio track did not change when new galleries were selected.
The Juicebox skin does not feature a third-party audio player and, as you have discovered, adding an audio track to each individual Juicebox gallery will result in the audio tracks overlapping each other when new galleries are selected.
Unfortunately, there is no Juicebox-Pro API method to specifically stop audio from playing. There is just a toggleAudio() method and no way to easily track the status of the audio (to determine whether it is playing or not). The only way I've found to stop audio from one gallery before loading another relies on the Button Bar being visible in the galleries (to check if the Audio Button has the '.jb-status-playing' class) and invloves iterating over all '.jb-bb-btn-audio' elements to stop those that are playing.
Try opening your album's 'index.html' file and the following code immediately after the function loadContent(galleryPath, galleryCount) { line:
if (jb) {
$('.jb-bb-btn-audio').each(function() {
if ($(this).hasClass('jb-status-playing')) {
jb.toggleAudio();
}
});
}
(You can add this code to the skin's template 'index.htt' file if you like and the code will automatically be included in the album's 'index.html' file each time you edit or create a new project.)
I hope this helps.
First of all, when embedding multiple galleries into a single web page, there are a couple of things to note:
(1) The 'juicebox.js' file should be loaded only once per web page (from within one of your gallery folders), rather than once per gallery.
(2) Each gallery should be embedded into a container with a unique name. At the moment, all of your galleries are embedded into containers with a 'containerId' and <div> 'id' of "juicebox-container". There should be no duplicate 'is' on a web page.
The cause of your problem is likely to be #2 above.
It is possible that when the second tab on your page is selected (for example), the corresponding gallery is embedded into the first <div id="juicebox-container"> that the browser finds on the page (which is in the first tab and is now hidden from view).
Hopefully embedding your galleries into containers with unique names will help.
Another possible cause for your problem is that all your galleries are loaded as soon as your web page is loaded but, when the web page is loaded, only the first tab is visible and has dimensions. The other tabs are initially hidden and essentially have zero dimensions. The galleries on the other tabs have galleryWidth and galleryHeight of 100% so, when the web page is loaded, Juicebox calculates their dimensions to be 100 % of zero (which is zero, resulting in a non-visible gallery).
Here are a couple of things to try.
(1) Give your galleries fixed pixel dimensions rather than percentage dimensions (at least for testing purposes), to see if this helps.
(2) Alternatively, if you want to keep the gallery dimensions at 100% (for the galleries to be responsive), then you'll need to load them only after the selected tab is visible and has been given dimensions on your web page.
Put the gallery embedding code into a JavaScript function (with parameters for the baseUrl and containerId) and load the function (to load a specific gallery into the correct container) when a tab is selected.
For example, you could use something like the following (outside the tabs on your web page, perhaps in the <head> section):
<script src="aluminium/jbcore/juicebox.js"></script>
<script>
function loadGallery(base, container) {
new juicebox({
baseUrl : base,
containerId: container,
galleryWidth: "100%",
galleryHeight: "100%",
backgroundColor: "rgba(34,34,34,0)"
});
}
</script>
Now, inside the first tab (where you currently have each gallery's embedding code), use something like:
<div id="juicebox-container-1"></div>
<script>
loadGallery('aluminium/', 'juicebox-container-1');
</script>
... and inside the second tab, use something like:
<div id="juicebox-container-2"></div>
<script>
loadGallery('glass/', 'juicebox-container-2');
</script>
... etc.
(You can insert each gallery's SEO content code inside the corresponding <div> containers. I just left this out in my sample code above for clarity.)
I hope this helps and points you in the right direction.
You're welcome!
I'm glad you've now got a PHP script which works as you like.
I hope you have a great Christmas, too!
With Juicebox-Pro, you can change the way that Juicebox preloads images via the imagePreloading configuration option.
Possible values are:
PAGE - Preloads all images in the current thumbnail page. Unloads all images in the previous thumbnail page.
NEXT - Preloads image after currently viewed image. Unloads previously viewed images.
ALL - Preloads all images in gallery. Maximum usability. Images never unloaded. Not good for large galleries (image count > 50).
These values are noted in the Main Image section of the Config Options page.
This configuration option can be changed only in Juicebox-Pro (but not in Juicebox-Lite, the free version, where the default value of PAGE is always used).
No problem.
Just create a new thread for each issue and I'll do my best to help you out.
If you just want to use the filename for the image title (and have no image caption), then, in the original code, change:
echo '<title></title>';
echo '<caption></caption>';
... to:
echo '<title><![CDATA[' . pathinfo($gallery[$i], PATHINFO_FILENAME) . ']]></title>';
echo '<caption></caption>';
Here's the complete code:
<?php
header("Content-type: application/xml");
function GetDirArray($folder)
{
$handle=opendir($folder);
while ($file=readdir($handle))
{
if ($file!="." && $file!="..")
{
$ret[count($ret)]=$file;
}
}
closedir($handle);
sort($ret);
return $ret;
}
$gallery=GetDirArray('images');
$gallery=array_reverse($gallery);
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<juiceboxgallery useFlickr="false" maxThumbColumns="7" captionPosition="BELOW_IMAGE" buttonBarPosition="OVERLAY_IMAGE" galleryTitlePosition="NONE" backgroundColor="rgba(18,18,18,1)" topBackColor="rgba(0,0,0,0.5)" thumbFrameColor="rgba(204,204,204,1)" thumbHoverFrameWidth="3" thumbSelectedFrameWidth="5" topAreaHeight="5" stagePadding="10" showOpenButton="true" showExpandButton="false" showThumbsButton="true" showImageOverlay="ALWAYS" showOverlayOnLoad="true" showImageNumber="false" maxCaptionHeight="50" captionHAlign="CENTER" showSplashPage="NEVER" showInfoButton="false" screenMode="LARGE" showSmallPagingText="false" showSmallThumbsButton="false" showSmallThumbsOnLoad="false" backButtonUseIcon="true" showImageNav="ALWAYS" captionBackColor="rgba(0,0,0,0.4)" useLargeImages="false" resizeOnImport="true" maxImageWidth="2048" maxImageHeight="1536" showNavButtons="false" flickrShowTitle="false" showAutoPlayButton="false" useFullscreenExpand="false" useThumbDots="false" expandInNewPage="TRUE" showThumbsOnLoad="true" galleryTitle="The Neighbourhood Gallery" enableDirectLinks="false" imageNavPosition="IMAGE" thumbNavPosition="CENTER" buttonBarHAlign="RIGHT">';
for ($i=0; $i<sizeof($gallery); $i++)
{
echo '<image imageURL="images/'.$gallery[$i].'" thumbURL="images/'.$gallery[$i].'" linkURL="" linkTarget="">';
echo '<title><![CDATA[' . pathinfo($gallery[$i], PATHINFO_FILENAME) . ']]></title>';
echo '<caption></caption>';
echo '</image>';
}
echo '</juiceboxgallery>';
?>
and that worked a bit..
If you still want to reverse the order of the images, replace:
$gallery=GetDirArray('images');
... with:
$gallery = GetDirArray('images');
$gallery = array_reverse($gallery);
but I cant see the caption at all?
Your PHP script does not populate the image titles or captions with anything at all. They are currently empty.
As an example, if you want to display the filename (without the file extension) as the image title and the IPTC Description (embedded within the image) as the image caption, then replace:
echo '<title></title>';
echo '<caption></caption>';
... with:
echo '<title><![CDATA[' . pathinfo($gallery[$i], PATHINFO_FILENAME) . ']]></title>'; // Extract and use filename without file extension for image title
$caption = '';
$size = getimagesize('images/' . $gallery[$i], $info); // Puts image info into $info array
if(isset($info['APP13'])) { // If IPTC data is present in image info...
$iptc = iptcparse($info['APP13']); // Put IPTC data into $iptc array
$caption = $iptc['2#120']; // Use IPTC Description as image caption
$caption = preg_replace('/\r\n|\r|\n/', '<br />', $caption); // Ensure line feeds and carriage returns from IPTC Description are respected
$caption = preg_replace('/\p{Cc}+/u', '', $caption); // Strip control characters from image caption
}
echo '<caption><![CDATA[' . $caption[0] . ']]></caption>'; // Display image caption
With your current gallery settings, you'll likely need to increase the maxCaptionHeight value (from 50 to something larger, such as the default value of 120) to accommodate both an image title and an image caption (for both to be visible).
I hope this helps.
You're welcome.
I'm glad that everything seems to have sorted itself out. Thank you for letting me know.
It sounds very much like some server caching was going on.
I have an account with a web host that uses Varnish server caching. It can be very useful but it can also be a hindrance when developing a web site as it means that after I upload a new version of a file to my web server, the new version is not seen (and the old version is still served) for about 20 minutes afterwards. For this reason, I have Varnish disabled.
Your album is certainly using Juicebox-Pro v1.5.1 and the galleries within the album are definitely using the Pro files.
Your second gallery ('Childrens Ward On The Asylum') displays 54 images (if the gallery was using Juicebox-Lite, only 50 images would be displayed) and thumbsPosition="LEFT" (a Pro only configuration option) is active.
The only problem I can see with this particular gallery is that the audioUrlMp3 has been set as: "gallerysoundtrack.mp3" . (with double-quotes, a tab character and a dot at the end).
Change "gallerysoundtrack.mp3" . to just gallerysoundtrack.mp3 and your audio track should play (as long as the file is in the correct location on your web server).
If you still see Juicebox-Lite galleries within your album (signified by the Juicebox logo in the lower right corner of the galleries), then the problem is more than likely to be a caching issue (either server caching or client-side browser caching).
Check with your web host to see if server caching is used on your web hosting account (and, if so, ask if it could be disabled, at least for testing purposes) and make sure that you clear the cache of any browser that might have been used to view your site whilst Juicebox-Lite files were in place.
Hopefully this will help.
(1) As you are using a PHP file to dynamically generate the gallery's XML content (configUrl : 'config.php',) Juicebox does not use your 'config.xml' file at all.
If you want the configuration options from your 'config.xml' file to be used in your gallery, you'l need to copy them across into your 'config.php' file (as attributes to the opening <juiceboxgallery> tag).
(2) The PHP script will read the directory and display the images in alphabetical order.
If you would like to reverse this order, use PHP's array_reverse function on the array of images before the loop which outputs the <image> tags.
You can manipulate the array using other functions (built-in PHP functions or custom functions) to sort the images in any order you like.
Try something like the following (which incorporates both of my suggestions above):
<?php
header("Content-type: application/xml");
function GetDirArray($folder)
{
$handle=opendir($folder);
while ($file=readdir($handle))
{
if ($file!="." && $file!="..")
{
$ret[count($ret)]=$file;
}
}
closedir($handle);
sort($ret);
return $ret;
}
$gallery=GetDirArray('images');
$gallery=array_reverse($gallery);
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<juiceboxgallery useFlickr="false" maxThumbColumns="7" captionPosition="BELOW_IMAGE" buttonBarPosition="OVERLAY_IMAGE" galleryTitlePosition="NONE" backgroundColor="rgba(18,18,18,1)" topBackColor="rgba(0,0,0,0.5)" thumbFrameColor="rgba(204,204,204,1)" thumbHoverFrameWidth="3" thumbSelectedFrameWidth="5" topAreaHeight="5" stagePadding="10" showOpenButton="true" showExpandButton="false" showThumbsButton="true" showImageOverlay="ALWAYS" showOverlayOnLoad="true" showImageNumber="false" maxCaptionHeight="50" captionHAlign="CENTER" showSplashPage="NEVER" showInfoButton="false" screenMode="LARGE" showSmallPagingText="false" showSmallThumbsButton="false" showSmallThumbsOnLoad="false" backButtonUseIcon="true" showImageNav="ALWAYS" captionBackColor="rgba(0,0,0,0.4)" useLargeImages="false" resizeOnImport="true" maxImageWidth="2048" maxImageHeight="1536" showNavButtons="false" flickrShowTitle="false" showAutoPlayButton="false" useFullscreenExpand="false" useThumbDots="false" expandInNewPage="TRUE" showThumbsOnLoad="true" galleryTitle="The Neighbourhood Gallery" enableDirectLinks="false" imageNavPosition="IMAGE" thumbNavPosition="CENTER" buttonBarHAlign="RIGHT">';
for ($i=0; $i<sizeof($gallery); $i++)
{
echo '<image imageURL="images/'.$gallery[$i].'" thumbURL="images/'.$gallery[$i].'" linkURL="" linkTarget="">';
echo '<title></title>';
echo '<caption></caption>';
echo '</image>';
}
echo '</juiceboxgallery>';
?>
If you have successfully upgraded the skin from Juicebox-Lite to Juicebox-Pro, then there should be no Lite 'jbcore' folder in the skin and jAlbum will have no option but to use the Pro 'jbcore' folder in the resulting gallery so there really ought to be no Lite 'jbcore' folder anywhere, except possibly already on your web server.
If you've ever used Juicebox-Lite and are upgrading a gallery to Juicebox-Pro then please check the following.
(1) Make sure when you upload your gallery to your web server that the Lite 'jbcore' folder is being overwritten with the Pro version. (It is possible that your FTP program might be set to not overwrite any existing files and folders.)
(2) Try clearing your browser's cache before reloading your gallery's web page to ensure that your browser is using the latest Pro files from your web server (instead of perhaps using older, cached Lite files).
If this does not help, then please post back with the URL to your gallery so that I can check it out for myself and hopefully help further.
That's great! Thank you for letting me know.
I'm glad the fix was an easy one!
This has nothing to do with the password for any of your galleries and is an Adobe AIR problem.
First of all, with JuiceboxBuilder-Pro closed, please manually delete the following folders:
~/Library/Application Support/Adobe/AIR/ELS/JuiceboxBuilder-Pro
~/Library/Preferences/JuiceboxBuilder-Pro
If this does not help, then please try the "Fixing Mac EncryptedLocalStore database access error" procedure outlined in this Adobe forum thread. Please note that a couple of posts later in that thread, a user claims that it is necessary to reboot your computer after the deletions.
This should hopefully solve your problem.
I have found only one other user who has reported such a problem in this forum, here.
This user's workaround was to uninstall Adobe AIR and then download and install an earlier version of AIR (from the Adobe AIR archive page).
I would not normally recommend using an older version of any software but if it helps to get someone back up and running, then it might be a useful piece of information.
I hope that the suggestions above help.
Unfortunately, it looks like Juicebox would not be a suitable candidate for an AMP page.
According to this AMP support page:
AMP pages can’t include any author-written JavaScript.
Also, the AMP specifications page notes that the <script> tag is:
Prohibited unless the type is application/ld+json.
This means that you would not be able to load the required Juicebox 'javascript.js' file in an AMP page.
I do not know how your Flickr descriptions have been populated (maybe generated automatically by Flickr or entered manually by yourself) but Juicebox will just display whatever the Flickr descriptions are.
It sounds like you might need to change the Flickr descriptions for your images in the Flickr interface.
Juicebox will display only the Flickr titles (for the image titles) and the Flickr descriptions (for the image captions).
It is not possible for Juicebox to extract information from any other Flickr field for use in the Juicebox caption area.
If you used the PHP suggestion (instead of using Flickr as a source for your gallery), then you could use PHP to extract certain embedded IPTC metadata from the images (such as the 'CreationDate') and then use this information as image titles or captions.
Knowledge of PHP would be required but it should certainly be possible.
If you'd like to look into this further, please see the PHP support page for the iptcparse function.
It might be a bit of work initially to write the script but it might prevent you from having to manually edit the Flickr descriptions for all your images.
I have found that the source of the text that you say is oversized comes from the site's General Settings > Site Title Can you confirm that is what you see as well or are you seeing something that seems to be from another source?
Attached to this post is a screenshot of what I see when I visit your web page in Mobile Safari on an iPod Touch 6 running iOS 11.2.
The only large text on my iPod Touch is the "Call Us NOW" text and this is not connected to the gallery and its size should not be related to whether or not WP-Juicebox is active.
Here are some observations on your web page which might help to solve some problems.
(1) When I check the code on your web page with the W3C Markup Validation Service , many HTML errors are reported. A lot of these errors are likely to be related to your current theme so it might be difficult to fix them but they should be fixed. HTML errors (such as stray or missing tags) can cause layout problems and some browsers may be more tolerant towards HTML errors than others, resulting in inconsistent results across different platforms.
(2) Your Juicebox gallery's JavaScript and CSS files have been modified. At the very least, the comments have been removed from the top of the files (and the CSS file looks to have been minified). Because of this, I cannot check the versions of the files being used or their integrity. If you have any plugins installed which modify JavaScript and CSS files, I would recommend making exclusions for your gallery's 'juicebox.js' and 'theme.css' files. It would be wise to leave your gallery's 'jbcore' folder intact (especially whilst troubleshooting problems).
(3) The icons on your gallery's Button Bar and the Splash Page image in Small Screen Mode are offset. This is due to custom CSS conflicting with the gallery's own CSS. For example, in your 'style.css' file, you have the following code:
.wpb_wrapper div{border:none!important;padding:0!important;}
These custom CSS rules with !important affect all div containers within the .wpb_wrapper class, including those within your gallery (which affects the layout of elements within the gallery). Juicebox has no option but to inherit such CSS rules. Please check your CSS for any custom rules which might be applied to all div, img or p tags which could potentially interfere with your gallery's layout.
I'm not sure if these notes are highlighting different problems from the large text one you quoted above but resolving them should certainly help and be a few steps in the right direction.
... from android it says below thumbs (1 of 1), can I get rid of this?
You can disable the thumbnail paging text (e.g. "1 of 1") in Small Screen Mode by setting showSmallPagingText="FALSE" in JuiceboxBuilder-Pro's 'Customize -> Thumbnails' section.
I actually would have captions from flickr but for some reason only the uploaded date would show, not the imagedate?
I'm not sure how you have entered your Flickr titles and descriptions but you might need to set flickrShowDescription="TRUE" in JuiceboxBuilder-Pro's 'Customize -> Flickr' section.
(The default value for flickrShowTitle is TRUE but the default value for flickrShowDescription is FALSE.)
That's great! Thank you for letting me know.
I'm really not sure what might have caused your problem (unless your gallery folder was located inside a Google Drive folder) but I'm glad you now have a way to clear the problem if it ever happens again.
The php didnt work.
Using a PHP file to dynamically generate a gallery's XML configuration file is a tried and tested method which should work fine. In fact, WP-Juicebox (the dedicated Juicebox plugin for WordPress) uses this method to display all galleries created by the plugin. It's also mentioned in this FAQ:
Can Juicebox handle a custom data source, for example RSS or Instagram?
When adding the configUrl entry to your gallery's embedding code, make sure that you separate all your embedding code parameters with commas, for example:
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
new juicebox({
containerId: "juicebox-container",
configUrl: "config.php",
galleryWidth: "100%",
galleryHeight: "100%",
backgroundColor: "#222222"
});
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->
Also, please note that the configUrl value is a path to a file. It can be a relative path (relative to the web page containing the embedding code) or an absolute path. For example, if you use:
configUrl: "config.php",
... then your PHP script should be named "config.php" and located in the same directory as the web page containing the embedding code.
Flickr worked excellent but do you know if there is any way to get the image in fullsize WITHOUT open the Flickr-page? Or a download button for fullsize image?
This is just the way that Juicebox works and it cannot be changed: the Open Image button redirects to the Flick page containing the image and the Download Button is disabled for Flickr galleries (as Flickr does not seem to like images hosted on their servers from being downloaded via PHP).
If you want to be able to open an image in a new tab or have the Download Button active (to allow users to download the images), then you'll need to host the images yourself.
Maybe you could give the PHP suggestion another try. It should work fine. If you run into any difficulties, just let me know and I'll try to help you further. (If possible, please provide the PHP code you are using and post the URL to your gallery's web page on your web server. Thank you.)
You're welcome! I hope you're able to use one of these ideas.
I would recommend just installing the Juicebox Lightroom Plugin afresh on your new computer.
For each licensed copy, you can install and use JuiceboxBuilder-Pro (and the Pro plugins) on up to 3 different computers, as noted in this FAQ:
Can I install on multiple computers?
If you still have your Juicebox-Pro zip file available, you can copy it to a USB flash drive and transfer it to your new computer.
If your zip file is not the current version (v1.5.1), then I would take this opportunity to download and install the latest version on your new computer.
If necessary, you can download Juicebox-Pro v1.5.1 using your original download link. Upgrades are free within the same version number and the download link always points towards the latest version rather than the version you purchased.
If you cannot find your original download link or if it has expired, then please let me know and I can send you a new one.
Once you transfer the Juicebox-Pro zip file to your new computer (or download it directly onto your new computer), just follow the installation instructions on the plugin's support page here.
Hopefully these notes will help.
However, if you get stuck with anything, just let me know how far into the process you get and what seems to be the problem and I'll do my best to help you out further.
Unfortunately, there is no BuildGallery script for Juicebox but there are perhaps a few alternatives you might like to consider.
(1) You could source your gallery with images from a Flickr account and then just upload images to your Flickr account to automatically have them appear in your gallery (without the need to modify or update any gallery files).
(2) You could use a PHP script (to dynamically generate a 'config.xml' file each time the gallery is viewed) to display images from a designated folder on your web server. You could then upload new images to this folder (via FTP) for the images to appear in your gallery.
(3) You could use Showkase (in its Gallery Manager theme) to manage your gallery online through a web browser interface. (The Showkase interface is optimized for desktop rather than mobile so navigating around it on a mobile device might not be ideal but it should work fine.)
Further information on #2 can be found in this forum post (scroll down to the answer to Query #3).
I hope these suggestions point you in the right direction.
Juicebox Support Forum → Posts by Steven @ Juicebox
Powered by PunBB, supported by Informer Technologies, Inc.