You're welcome!
I'm glad I was able to help and that you can use my suggested workaround.
You are not logged in. Please login or register.
Juicebox Support Forum → Posts by Steven @ Juicebox
You're welcome!
I'm glad I was able to help and that you can use my suggested workaround.
I think I know what the problem is.
A gallery's 'config.xml' file holds image size information and when you load a gallery, the image size information held in the 'config.xml' file will be used (or gallery default values, rather than custom default values, if image size information is not explicitly specified).
Custom default values will work only if you create a gallery from scratch using JuiceboxBuidler-Pro.
Try saving custom default values and then close and reopen JuiceboxBuilder-Pro and check the image sizes (click 'New Gallery'). You will probably find that they are your own values.
One possible way to workaround this would be to add the image size information to your gallery's 'config.xml' file before you open the gallery in JuiceboxBuilder-Pro.
As you initially create your galleries with the Lightroom plugin, you could add the image size information to all your gallery 'config.xml' files by adding the required configuration options to the template file that the plugin uses to create the XML files.
Open the 'juicebox_pro.lrwebengine/config.xml' file in a plain text editor and add the following on line 34 (currently a blank line just below "<juiceboxbuilder"), changing the values as required.
maxImageWidth="1024"
maxImageHeight="768"
imageQuality="80"
thumbWidth="85"
thumbHeight="85"
thumbQuality="90"
useSmallImages="true"
smallImageWidth="800"
smallImageHeight="600"
smallImageQuality="80"
useLargeImages="true"
largeImageWidth="2048"
largeImageHeight="1536"
largeImageQuality="80"
Each time a new gallery is created with the Lightroom plugin, the image sizes will be in the 'config.xml' file ready for JuiceboxBuilder-Pro.
The code I posted above is actually already set up to display the galleryDescription below each gallery.
You can enter a galleryDescription for each gallery in JuiceboxBuilder-Pro's 'Customize -> General' section.
Alternatively, if you want the same text to be displayed in the footer regardless of the gallery currently being displayed, then you can replace the #footer div with something like the following:
<div id="footer">
<div id="description" style="padding: 10px 40px;">Custom text goes here.</div>
</div>
... and then remove (or comment out) the following line:
$('#description').css('padding', desc ? '10px 40px' : '0px').html(desc);
I cannot see the title of the splash image gallery in the white stripe across the image in the left column (its 3/4 of the way down in the white bar) nor can I find any way to to fix this problem.
This problem is due to some custom CSS code in your 'colorado.css' file which is overriding the gallery's own CSS, specifically lines 683 - 695:
#sidebar h3 {
font-size:12px;
color:#990000;
font-weight:bold;
margin:5px 70px 2px 70px;
background-color:white;
border-style:inset;
border-width:1px;
border-color:#400000;
padding-top:1px;
padding-bottom:1px;
padding-left:20px;
}
Juicebox uses an <h3> tag for the Splash page and the Juicebox gallery is nested within the #sidebar container so the gallery is inheriting the rules above. Try applying your custom CSS rules to only those elements on your web page which require them by using further CSS selectors (ids or classes).
question 1) whenever juicebox updates I will only have to update this file to keep my current galleries on countyfairgrounds.net working? That would be nice. -
Yes. If all your galleries share a single 'jbcore' folder, then you would just need to update that single 'jbcore' folder to upgrade all your galleries when a new version of Juicebox is released.
2) I do not understand how to do this - more explanation please.
All you need to do is upload a single instance of the 'jbcore' folder and point each gallery's embedding code towards it.
If you choose to upload your 'jbcore' folder to this location: http://www.countyfairgrounds.net/jbcore
... then you can start each gallery's embedding code with the line:
<script src="/jbcore/juicebox.js"></script>
like here - http://www.countyfairgrounds.net/jbcore - that is what I am going to do now. ...hope that is right....
That is absolutely fine. It does not matter where the 'jbcore' folder is located on your web server as long as the path in the embedding code points towards it correctly.
Your Colorado gallery currently uses the 'jbcore' folder in the 'colorado' directory but you could change the following (on the 'colorado.php' page):
<script src="jbcore/juicebox.js"></script>
... to:
<script src="/jbcore/juicebox.js"></script>
... for the Colorado gallery to use the shared 'jbcore' folder in your root directory instead (and then you could safely delete the 'jbcore' folder from the 'colorado' directory).
Juicebox-Pro does not feature such functionality.
You could perhaps set it up manually but it could turn out to be a complex task and programming knowledge (HTML, JavaScript and PHP) would likely be required.
You would need to add a guest book to the web page containing your gallery and this would require a server-side scripting language (such as PHP) to store the comments in a database or file on your server. Try a web search with terms such as 'PHP guest book' to get you started.
If you wanted the comments to be specific to a particular image in a gallery (rather than just relating to the gallery as a whole), then you could determine the current image being displayed in the gallery using the Juicebox-Pro API (specifically the getImageIndex() method) and then perhaps somehow integrate this into the guest book you choose to use (if it is flexible enough to allow such modifications).
It would not be a quick or easy task (as Juicebox-Pro was not designed with this in mind) but I hope this points you in the right direction.
Maybe you could build a web site with WordPress. You could create your galleries with the WP-Juicebox plugin and just use WordPress's own built-in commenting system (although the comments would be per page or post rather than per image in a gallery).
I have just double-checked this functionality and it works OK for myself in JuicboxBuilder-Pro v1.4.3.
Please ensure that you are using the latest version of JuiceboxBuilder-Pro (v1.4.3).
If necessary, instructions for upgrading can be found here.
Also, after clicking 'Save Defaults' and then clicking 'OK' in the 'Save Image Size Defaults' pop-up window, be sure to click 'OK' in the 'Set Image Sizes' parent window (the window with the 'Save Defaults' text).
The easiest thing to do might be to just use the code <img src="mylogo.png" /> and then place the 'mylogo.png' file inside the gallery folder after the gallery has been created (and when the gallery folder exists).
The logo will not show up in the live preview window but it will display fine in the gallery itself.
Ordinarily, in order to have the logo display in the live preview window, it would be necessary to add this extra resource file to the plugin's 'manifest.lrweb' file (to let Lightroom know about the image file for use in preview mode) but this cannot be done as the 'manifest.lrweb' file is compiled and cannot be modified.
However, as the 'jbcore' folder is already included as a resource folder, you could add your 'mylogo.png' file to the 'juicebox_pro.lrwebengine/jbcore/' folder and then use the code <img src="jbcore/mylogo.png" />.
Then logo will be displayed in the live preview window and when the gallery is created, the logo file will automatically be copied across into the gallery's 'jbcore' folder.
If your WordPress widget accepts HTML code (like the standard Text widget does), then there is no reason why you cannot paste your gallery's embedding code in there.
If embedding a gallery into a widget, I would recommend using the baseUrl method of embedding as documented here.
This will prevent problems with knowing where to upload your gallery files to as the baseUrl will define the path to the gallery folder.
Essentially, the baseUrl method allows you to keep all the gallery files inside the gallery folder and you would upload the complete gallery folder (not just the contents) to your web server and paste the baseUrl embedding code into your widget. It does not matter where on your web server you upload your gallery folder to as long as the two paths in the embedding code (the path to the 'juicebox.js' file and the baseUrl itself, pointing towards the gallery folder) are correct.
For example, you could upload a gallery folder (in this example named 'web') to your web space's root directory and paste the following code into your widget.
<!--START JUICEBOX EMBED-->
<script src="/web/jbcore/juicebox.js"></script>
<script>
new juicebox({
baseUrl: "/web/",
containerId: "juicebox-container",
galleryWidth: "100%",
galleryHeight: "250",
backgroundColor: "#222222"
});
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->
(The leading slash in the paths denotes your root directory.)
You could certainly just copy the structure of your colorado page/gallery for each of the other state pages.
To embed a new gallery for a different state, copy the gallery files into the '/state/' folder and use the exact same embedding code (no changes at all) that you use on your 'colorado.php' page on the '/state/state.php' page.
As you plan to have multiple galleries on your web site, you could have all your galleries share a single 'jbcore' folder if you like. Please see here for details.
Essentially, all you would need to do is use a single 'jbcore' folder on your web server and ensure that the path to the 'jbcore/juicebox.js' file is correct in each gallery's embedding code.
This is not necessary at all but it does mean that you would be able to upgrade all the galleries on your web server at once (when a new version of Juicebox is released) by simply replacing a single 'jbcore' folder.
Please see these two FAQs which should hopefully help.
How do I change the order of images from Flickr?
How do I change the order of images in a Flickr Photo Set?
Please note that flickrSort is a Pro-only configuration option (which is not supported by Juicebox-Lite).
Make sure that your Back Button Url actually starts with http://
If if does not, then it will be treated as a relative path and will be tagged on to the end of the current web page URL.
I have just double-checked the current version of the Lightroom plugin (from the Juicebox-Pro v1.4.3.2 zip package) and entering an absolute Back Button Url such as http://www.example.com/index.html seems to work as expected so please double-check your Back Button Url entry. Try completely clearing your Back Button Url input field (to make sure there is no text hiding before of after your Url and then enter http://www.lauralei.com/CubaCosta15/
This should hopefully work fine.
Unfortunately, Juicebox was not designed with such functionality in mind and trying to implement it (especially within a Drupal environment) would be quite difficult.
The only way I have been able to achieve this is as follows:
(1) Create a sample gallery with JuiceboxBuilder-Pro
(2) Set imageClickMode="OPEN_URL" (so that the corresponding linkURL is opened when the image is clicked)
(2) Set all your linkURLs (in the gallery's XML file) to linkURL="javascript: func();" (to run the JavaScript func() function in the gallery's index page when the image is clicked)
(3) Set all your linkTargets (also in the gallery's XML file) to linkTarget="_self"
(4) Use the following code as your gallery's 'index.html' file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" id="jb-viewport" content="minimal-ui" />
<style type="text/css">
body {
margin: 0px;
}
</style>
<script type="text/javascript" src="jbcore/juicebox.js"></script>
<script type="text/javascript">
var jb = new juicebox({
containerId: "juicebox-container",
galleryHeight: "400",
galleryWidth: "600",
imageClickMode: "OPEN_URL",
showExpandButton: "TRUE"
});
var fullscreen = false;
jb.onExpand = function(expanded) {
fullscreen = expanded;
}
function func() {
if (!fullscreen) {
jb.toggleExpand();
}
}
</script>
<title>Test</title>
</head>
<body>
<div id="juicebox-container"></div>
</body>
</html>
This would be difficult to implement within Drupal (even more so when using the Juicebox module) and there may be problems that might need to be overcome. (This will not work in conjunction with a baseUrl and nothing happens when you click an image once the gallery has been expanded.)
If you decide to proceed further, I hope that my suggestion above points you in the right direction but I would recommend that you use the Expand Button only to expand the close the gallery.
The path to the 'juicebox.js' file in your gallery's embedding code is incorrect.
Your gallery uses the following code:
<script src="jbcore/juicebox.js"></script>
... so your 'juicebox.js' file should be located here (but it is not): http://www.countyfairgrounds.net/colora … uicebox.js
Please check the location of your gallery files on your web server and the path to the 'juicebox.js' file.
- I have Juicebox-Pro installed on my desktop and laptop, and both machines were having the same issue.
- I downloaded Juicebox-Lite from the link you provided, and it loaded all images normally, via drag and drop and Browse methods
It certainly sounds like the problem was with the version of JuiceboxBuilder-Pro which you have installed on both your computers (v1.4.0). I think the problem you were experiencing might have been caused by the following bug (in relation to the issue raised in this Adobe forum thread) which was fixed in JuiceboxBuilder v1.4.1 (both Lite and Pro).
FIXED - Image import failing for bad EXIF data [JuiceboxBuilder]
Please see the Version History for a full list of changes between versions.
Hopefully, all will be well now that you have JuiceboxBuilder-Pro v1.4.3 installed.
Thank you for your reply,
You're welcome.
it sounds like the best way for my client to get the control that they would want would be to use flickr.
I agree. I think it is probably easier to upload and manage images in Flickr than in the WordPress Media Library (although it is obviously another web site to log into and another step in the workflow). Juicebox-Pro has many built-in Flickr configuration options so it should be relatively easy for your client to display tagged images or a Flickr Set.
First of all, please try upgrading JuiceboxBuilder-Pro to the latest version (v1.4.3) to ensure that any bugs which were present in previous versions but which have since been fixed are not contributing to your problem.
Instructions for downloading the latest version and for upgrading JuiceboxBuilder-Pro can be found here.
If you are trying to add many images at once, Adobe AIR may not be able to allocate enough memory for the task at hand. Even if your computer has plenty of free RAM, Adobe AIR applications are limited to around 1GB of memory allocation.
If the images you are currently trying to add to your project are much larger than images you have used in the past, then this might be a possible cause for your problem. This might account for not being able to add large batches of images at once but would not explain the maximum of 14 images. This sounds more like JuiceboxBuilder-Pro might be trying to process a corrupt image and then just gets stuck. Maybe there is a corrupt image somewhere within your batch of images. Try adding the images in a different order to see if JuiceboxBuilder-Pro always gets stuck on the same image.
Also, try installing and using JuiceboxBuilder-Lite (which comes with Juicebox-Lite) to see if the problem happens with both the Lite and Pro applications. JuiceboxBuilder-Lite and JuiceboxBuilder-Pro can be installed and run side by side on the same computer without any issues. Juicebox-Lite can be downloaded from the link on this web page.
Maybe something has happened to your JuiceboxBuilder-Pro installation which is causing the problem and a clean install might help. If all is well with JuiceboxBuilder-Lite but the problem continues with JuiceboxBuilder-Pro, then you might like to try re-installing JuiceboxBuilder-Pro from scratch.
(1) Uninstall JuiceboxBuilder-Pro.
Mac: Delete the 'JuiceboxBuilder-Pro' file from the Applications folder and empty your Trash.
Windows: Use the uninstaller in the 'Control Panel -> Programs -> Uninstall a program...' list.
(2) After uninstalling JuiceboxBuilder-Pro, please check that there are no files are left behind by manually deleting the following folders from your hard drive (if they exist):
Mac: /Users/your_username/Library/Application Support/Adobe/AIR/ELS/JuiceboxBuilder-Pro
Windows: C:\Program Files (x86)\JuiceboxBuilder-Pro
Windows: C:\Users\your_username\AppData\Roaming\Adobe\AIR\ELS\JuiceboxBuilder-Pro
Windows: C:\Users\your_username\AppData\Roaming\JuiceboxBuilder-Pro
Windows: C:\Users\your_username\My Documents\JuiceboxBuilder-Pro
You may need to show hidden files to find some of the above locations in Windows Explorer: http://windows.microsoft.com/en-gb/wind … dden-files
(3) Next, search your hard drive for the term 'JuiceboxBuilder-Pro' and delete any and all entries found (to be absolutely sure that nothing remains).
(4) Reinstall JuiceboxBuilder-Pro following the instructions here.
If you continue to experience difficulties, then it might help if I could see the problem for myself. If you like, please zip your images, upload the zip file somewhere and provide a download link so that I can try to replicate the problem myself and hopefully help further.
Also, please let me know exactly what happens when you say "it's only allowing me to add images by dragging them one at a time". Do you see any error messages on screen? If so, what do they say?
It is possible to change the "VIEW GALLERY" text only in Juicebox-Pro (but not in Juicebox-Lite, the free version) via the splashButtonText configuration option (in JuiceboxBuilder-Pro's 'Customize -> Splash Page' section).
For reference, the Splash Page configuration options for Juicebox-Pro can be found here.
The "Images" text can be changed in Juicebox-Lite using the languageList configuration option.
Please see the 'International Gallery Text' support section here for details.
You would use the following code as an attribute to the opening <juiceboxgallery> tag in your gallery's XML file, changing the text in bold to whatever you like.
languageList="Show Thumbnails|Hide Thumbnails|Expand Gallery|Close Gallery|Open Image in New Window|Images"
Because if I try to place a new picture somewhere in the body, it will add all pictures that were assigned to that specific page, is that correct?
Yes. That is correct. A WP-Juicebox gallery will display all images attached to the page or post containing the gallery (except the featured image if the 'Include Featured Image' checkbox is deselected).
You could certainly use images from a different source (such as a Flickr account).
You could also choose to not use WP-Juicebox and, instead, create a gallery with JuiceboxBuilder-Pro and embed the gallery in your WordPress page or post manually using the baseUrl method of embedding as documented here.
Essentially, once you have created a gallery with JuiceboxBuilder-Pro, you would upload the complete gallery folder (not just the contents) to your web server and paste the baseUrl embedding code into the body of your WordPress post (ensuring that the method of entry is 'Text' rather than 'Visual'). It does not matter where on your web server you upload your gallery folder to as long as the two paths in the embedding code (the path to the 'juicebox.js' file and the baseUrl itself, pointing towards the gallery folder) are correct.
It sounds like you are looking to have a small image link to your gallery on your main web page.
There are a couple of things you could do.
(1) Embed the gallery in your main page and set showSplashPage="ALWAYS". This will force Juicebox-Pro to displays the Splash Page rather than the gallery itself. The Splash Page is a placeholder for the gallery which, when clicked, will expand the gallery fullscreen. More information about the Splash Page can be found in the Screen Modes support section.
You can configure the Splash Page (to use a specific image and to change the text that is displayed) by using the available Splash Page configuration options (in JuiceboxBuilder-Pro's 'Customize -> Splash Page' section).
Please note that when the Splash Page is clicked, the gallery will expand fullscreen and only the gallery will be displayed. If you want other content to be displayed alongside the gallery, then you will need to implement the next suggestion.
(2) Use a standard HTML image link in your main page to open a page containing your gallery and whatever other content you like. This is essentially what we do on our demo page (but with some extra code to dim the image on hover).
An HTML image link would look something like the following:
<a href="http://www.example.com/gallery/index.html"><img src="http://www.example.com/images/image.jpg" width="100" height="80" alt="image" /></a>
Thank you for the suggestion.
Unfortunately, there are several different plugins which allow Media Library images to be tagged and they all do it differently so WP-Juicebox would need to support each plugin with this functionality individually.
I agree that it would be great if WordPress natively supported tagging images in the Media Library (without the need for a third-party plugin). Then WP-Juicebox could support tagging without having to request that users install a particular plugin.
To answer your query regarding adding and removing images, you can add images to a WP-Juicebox gallery by attaching them to the post containing the gallery. You could edit the post, click the 'Add Media' button and drag and drop your new images into the media window. Just close the media window after they have finished uploading. (There is no need to update the post itself.) Otherwise, you could upload your new images directly to the Media Library and attach them to the post (on the Media Library page). To remove images from a WP-Juicebox gallery, just unattach the images from the post (on the Media Library page) or delete the images from the Media Library.
You're welcome!
I'm glad I was able to point you in the right direction.
Incidentally, you could also use DOM techniques to build up a gallery's XML file rather than just echoing the required output. Either would work fine.
If you plan to use PHP and want to use DOM techniques, then the following should get you started. You'll need to create loops for setting configuration options (as attributes to the opening <juiceboxgallery> tag) and for iterating over images (and also extract the relevant data from your source) but this should give you the required structure for a Juicebox gallery's XML file.
<?php
header('Content-Type: application/xml');
$dom_doc = new DOMDocument('1.0', 'UTF-8');
$dom_doc->formatOutput = true;
$settings_tag = $dom_doc->createElement('juiceboxgallery');
// Do this for each configuration option (loop)
// Need to define $key, $value
$settings_tag->setAttribute($key, $value);
// Do this for each image (loop)
// Need to define $image_url, $thumbnail_url, $link_url, $link_target, $image_title, $image_caption
$image_element = $dom_doc->createElement('image');
$image_element->setAttribute('imageURL', $image_url);
$image_element->setAttribute('thumbURL', $thumbnail_url);
$image_element->setAttribute('linkURL', $link_url);
$image_element->setAttribute('linkTarget', $link_target);
$title_element = $dom_doc->createElement('title');
$title_text = $dom_doc->createCDATASection($image_title);
$title_element->appendChild($title_text);
$image_element->appendChild($title_element);
$caption_element = $dom_doc->createElement('caption');
$caption_text = $dom_doc->createCDATASection($image_caption);
$caption_element->appendChild($caption_text);
$image_element->appendChild($caption_element);
$settings_tag->appendChild($image_element);
$dom_doc->appendChild($settings_tag);
echo $dom_doc->saveXML();
?>
Now in the future if you could support reading JSON instead of or in addition to XML, then this would be terrific.
I do not know how likely this is to be implemented but I would certainly encourage you to post suggestions for future versions in the Feature Requests thread.
This keeps all the ideas together and ensures that they are not overlooked by the developers. Thank you.
When you publish or update a post containing a gallery shortcode, the post id is written to the gallery's XML file (in the 'wp-content/uploads/juicebox/' directory). The gallery will then be associated with that post and will display the images attached to it.
If you have the same gallery shortcode in multiple posts, then the post id which is written to the gallery's XML file will be that of the post which was most recently published or updated which contained its shortcode.
(Each gallery should be associated with only one post and you should not have the same gallery shortcode present in multiple posts.)
If WPML duplicates an original post to make a new translated copy, then the gallery shortcode will be present in two separate posts and I suspect that the post id associated with the gallery will be that of the new post. Therefore, when you try to view either post (the original or the new post), the gallery will display the images attached to the new post.
The fact that no images display suggests that there are no images actually attached to the new post.
To check, try editing the new post, click the 'Add Media' button and select 'Uploaded to this post' to see what images (if any) are attached to it.
It might still help if I could see your broken gallery live on your web server but I suspect that from what you are saying (and my notes above) that WP-Juicebox may not be compatible with WPML and would need to be rewritten to change the way it works.
Bear in mind that you could still embed a Juicebox gallery manually in a WordPress post using the baseUrl method documented here. Such a gallery should work fine with WPML.
I will certainly keep an eye on the thread you created in the WPML forum, though.
You can create individual galleries using JuiceboxBuilder-Pro.
An overview of JuiceboxBuilder-Pro can be found here and the User Guide can be found here.
Once you have built your galleries, you can view the source of the View Resizable Gallery with Top Menu Example web page in a browser and copy or modify it to suit your own needs (swapping the sample galleries for your own).
Alternatively, you might like to try the following.
Create as many individual galleries as you like and name the gallery folders 'gallery1', 'gallery2', etc.
Use the following code as an HTML file, place the file in the same directory as all your gallery folders and open the file in a browser. Each of your galleries will be represented by a link at the top of the page (using the Gallery Title as the link text) and you can switch between galleries using the links. The Gallery Description is used as the footer. You can edit the HTML file to change the 'Multiple Galleries' page title or the style of the page (e.g. colors) if you like.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" id="jb-viewport" content="minimal-ui" />
<style type="text/css">
html, body {
height: 100%;
overflow: hidden;
}
body {
background-color: #222222;
margin: 0px;
}
#header {
background-color: #222222;
color: #666666;
font-family: sans-serif;
font-size: 20px;
padding: 10px 0px;
text-align: center;
width: 100%;
}
#page {
font-size: 30px;
}
#menu {
padding: 10px 40px 0px 40px;
}
#footer {
background-color: #222222;
bottom: 0px;
color: #666666;
font-family: sans-serif;
font-size: 20px;
left: 0px;
position: relative;
text-align: center;
width: 100%;
}
#wrap {
margin: 0 auto;
width: 80%;
}
.gallery {
cursor: pointer;
}
a.gallery:hover {
color: #888888;
}
</style>
<script type="text/javascript" src="gallery1/jbcore/juicebox.js"></script>
<script type="text/javascript">
// Initialize Juicebox object variable name
var jb;
// Function to process all galleries
function doProcess(counter) {
$.get('gallery' + counter + '/config.xml', function(data) {
// Build gallery folder name
var name = 'gallery' + counter;
// Create space between links
if (counter > 1) {
$('#menu').append($('<span />').html(' '));
}
// Fetch Gallery Title from gallery XML file
var title = $.trim($(data).find('juiceboxgallery').attr('galleryTitle')) || 'Untitled';
// Fetch Gallery Description from gallery XML file
var description = $.trim($(data).find('juiceboxgallery').attr('galleryDescription')) || '';
// Add link to Document Object Model and register click handler to run loadGallery and doLayout functions when link is clicked
$('#menu').append($('<a />').attr('id', name).addClass('gallery').html(title).click(function() {
loadGallery(name, description);
doLayout();
}));
// Initially load first gallery
if (counter === 1) {
loadGallery(name, description);
}
}).done(function() {
// Process next gallery
doProcess(++counter);
}).fail(function() {
// Display message if no galleries found
if (counter === 1) {
$('#menu').append($('<span />').text('No galleries found.'));
}
// Show header and footer when all galleries have been processed
$('#header, #footer').show();
// Layout page and resize gallery
doLayout();
});
}
// Function to layout page and resize gallery
function doLayout() {
var windowHeight = parseInt(window.innerHeight ? window.innerHeight : $(window).height());
var headerHeight = parseInt($('#header').outerHeight(true));
var footerHeight = parseInt($('#footer').outerHeight(true));
var galleryHeight = windowHeight - headerHeight - footerHeight;
$('#wrap').height(galleryHeight);
if (jb) {
var galleryWidth = parseInt($('#wrap').innerWidth());
jb.setGallerySize(galleryWidth, galleryHeight);
}
}
// Function to load gallery, underline selected link and display Gallery Description in page footer
function loadGallery(base, desc) {
// Load gallery
jb = new juicebox({
backgroundColor: "#222222",
baseUrl: base + "/",
containerId: "juicebox-container",
galleryHeight: "100%",
galleryWidth: "100%"
});
// Underline selected link
$('.gallery').css('text-decoration', 'none');
$('#' + base).css('text-decoration', 'underline');
// Display Gallery Description in page footer
$('#description').css('padding', desc ? '10px 40px' : '0px').html(desc);
}
// Run following when Document Object Model is complete
$(document).ready(function() {
// Enter Page Title here
var page = "Multiple Galleries";
// Display Page Title in browser tab
document.title = page;
// Display Page Title in page header
$('#page').html(page);
// Hide header and footer until all galleries have been processed
$('#header, #footer').hide();
// Process all galleries
doProcess(1);
// Register resize handler to run doLayout function when browser window is resized
$(window).resize(doLayout);
});
</script>
<title></title>
</head>
<body>
<div id="header">
<div id="page"></div>
<div id="menu"></div>
</div>
<div id="wrap">
<div id="juicebox-container"></div>
</div>
<div id="footer">
<div id="description"></div>
</div>
</body>
</html>
@graphicsxp
Unfortunately, I am not familiar with the WPML plugin and it is not free so I am unable to download it to test.
Perhaps if I saw the problem live on one of your web pages I might be able to determine the cause of the problem.
It sounds like the plugin might be trying to translate the gallery's dynamically-generated XML file (created on-the-fly by the 'wp-juicebox/config.php' file). Does the plugin have an exclusion zone where you can add files or pages that you do not want to be translated? If so, try excluding the the 'wp-juicebox/config.php' file or even the entire contents of the 'wp-juicebox' plugin folder.
Juicebox Support Forum → Posts by Steven @ Juicebox
Powered by PunBB, supported by Informer Technologies, Inc.