Omg! Thx so much mate for this help! Now it works with php 7.4. I changed this code:
$ret[count($ret)]=$file;
to
$ret[]=$file;
The other code made the gallery to behave weird =).
Thx again! =) Im closing this one! Have a nice weekend!
You are not logged in. Please login or register.
Juicebox Support Forum → Posts by movietajm
Pages 1
Omg! Thx so much mate for this help! Now it works with php 7.4. I changed this code:
$ret[count($ret)]=$file;
to
$ret[]=$file;
The other code made the gallery to behave weird =).
Thx again! =) Im closing this one! Have a nice weekend!
Ok, thx mate. Here is the 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="45" 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>';
?>
Ok thx. I have made testmaps here for you:
https://zeerux.com/php-test-71 working! (check https://zeerux.com/php-test-71/info.php)
https://zeerux.com/php-test-74 not working! (check https://zeerux.com/php-test-74/info.php)
(its the exact same folders, I have used modified the .htaccess for specified php-versions.
Hi. I have been running Juicebox Pro with PHP 5.6 for several years and now it was time to upgrade. So I discovered that if I use PHP 7.0 or PHP 7.1 everything works perfect but if I use PHP 7.2, 7.3 och 7.4 I get this message on the gallery:
"Juicebox Error: Config XML file not found." If I change back to 7.1 the gallery works again?
EXCELLENT! Exact how I want it! Thx for all your help! This case is now solved =) Have a nice christmas!
Ah nice. But its enough with the title from the filename since its datebased. What code can I use the if I only want imagetitel
? (filename without extension) thx again!
I used this 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');
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="10" 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>';
?>
and that worked a bit.. but I cant see the caption at all?
Ive got it to work but I have several problems.
1. If you check http://zeerux.com/galleri/ you can see the following problems that has something to do with the config.php file:
1.1 The title of the gallery is visible and the buttons float both over image and beside it. The galleryfile got the buttons over the image and caption from the image under the image.
1.2. It seems like something overwrites my settings?
2. If I upload a image, it lands as thumb nr2? I want new images to get as first image.
this is my config.php:
<?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');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<juiceboxgallery galleryTitle="The Neighbourhood Gallery">';
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>';
?>
this is my index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>The Neighbourhood Gallery</title>
<meta charset="utf-8" />
<meta name="description" content="" />
<!-- START OPEN GRAPH TAGS-->
<meta property="og:title" content="The Neighbourhood Gallery" />
<meta property="og:type" content="website" />
<meta property="og:url" content="" />
<meta property="og:image" content="" />
<meta property="og:description" content="" />
<!-- END OPEN GRAPH TAGS-->
<style type="text/css">
body {
margin: 0px;
}
</style>
</head>
<body>
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
new juicebox({
configUrl : 'config.php',
containerId: 'juicebox-container',
galleryWidth: '100%',
galleryHeight: '100%',
backgroundColor: 'rgba(18,18,18,1)'
});
</script>
<div id="juicebox-container">
<!-- Image gallery content for non-javascript devices -->
<noscript>
<h1>The Neighbourhood Gallery</h1>
<p></p>
</noscript>
</div>
<!--END JUICEBOX EMBED-->
</body>
</html>
and this is my config.xml
<?xml version="1.0" encoding="UTF-8"?>
<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"/>
Yeah, but then it only shows the date for the upload, not the date that the picture was taken
Excellent! Thx! I will give php one more try.
Btw. If you check http://zeerux.com/galleri/index.html the gallery seems fine from pc but from android it says below thumbs (1 of 1), can I get rid of this? I actually would have captions from flickr but for some reason only the uploaded date would show, not the imagedate?
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?
Ok. Thx. Will try php first and then Flickr!
Hi. I used to have SimpleViewer and I had BuildGallery to manually upload photos from my cellphone and then run the buildscript. How do I do this with Juicebox?
Pages 1
Juicebox Support Forum → Posts by movietajm
Powered by PunBB, supported by Informer Technologies, Inc.