Topic: Event -- upload direkt from Nikon D4 to FTP server ....

Hi,

how can i build a gallery ... to upload images live at a event from my Nikon D4 to my ftp server ???

Andy

Re: Event -- upload direkt from Nikon D4 to FTP server ....

You could create a gallery in advance (which would initially be empty) using the following embedding code:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.galleryURL="gallery.php";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

Next, create a file named 'gallery.php' containing the following code and put it in the same directory as the HTML page containing the embedding code.

<?php
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 '<simpleviewergallery title="SimpleViewer Gallery">';
for ($i=0; $i<sizeof($gallery); $i++)
{
    echo '<image imageURL="images/'.$gallery[$i].'" thumbURL="images/'.$gallery[$i].'" linkURL="" linkTarget="">';
    echo '<caption></caption>';
    echo '</image>';
}
echo '</simpleviewergallery>';
?>

Now, all you would need to do is upload your images to a folder named 'images' (in the same directory as the HTML and PHP pages) and the images will automatically be included in the gallery.

Steven Speirs
SimpleViewer Support Team.

Re: Event -- upload direkt from Nikon D4 to FTP server ....

Hi, thanks for the informationen, but i get : "Cannot Parse Gallery XML"

Folder:Test

folder images
folder thumbs
folder svcore
file gallery.xml
file swfobjekt.js
file gallery.php
file index.html
file viewer.swf

Andy

Re: Event -- upload direkt from Nikon D4 to FTP server ....

I have just tested this myself using exactly the code I posted and it works fine for me.
The only think I can think of it that your web host may be automatically adding code to your dynamically generated XML file which would result in a parsing error when SimpleViewer reads it.
You can check this theory by going directly to your 'gallery.php' file in a browser and then view the source of the page.
It should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<simpleviewergallery title="SimpleViewer Gallery">
    <image imageURL="images/tall.jpg" thumbURL="images/tall.jpg" linkURL="" linkTarget="">
        <caption></caption>
    </image>
    <image imageURL="images/wide.jpg" thumbURL="images/wide.jpg" linkURL="" linkTarget="">
        <caption></caption>
    </image>
</simpleviewergallery>

Do not worry about the lack of line breaks in your own code. I just put them in above to made the tags a little more readable.

Incidentally, it appears that you may be mixing versions of SimpleViewer.
In the folder whose contents you listed, you would not need the following:
thumbs (folder)
gallery.xml (file)
swfobject.js (file)
viewer.swf (file)

Steven Speirs
SimpleViewer Support Team.

Re: Event -- upload direkt from Nikon D4 to FTP server ....

Hi Steve,

thank you a lot for your information .... maybe I have no PHP4, PHP5 installed on my WebServer, I will call my Webhoster and ask.

Andy

I love SimpleViewer Pro:
www.andy-ridder.de/bali


EDIT: Just talk with my Webhoster ... tomorrow I will get PHP on my webserver, so I can test it again tomorrow.  smile  big_smile

Last edited by Andy Stuttgart (2012-06-09 07:13:39)

Re: Event -- upload direkt from Nikon D4 to FTP server ....

Hi Steve,


it is working now .. great ... PHP 4.4.9 is now installed on my webserver.  cool  cool

Thank you for this great support.  smile  smile

Andy

Re: Event -- upload direkt from Nikon D4 to FTP server ....

I am having an issue displaying my gallery on my new wordpress install also. I have followed your method above but no matter what I do, "gallery xml not found" keeps displaying.

I want to keep using the original method of creating galleries and using the standard method embed code to the page instead of using the WP Simpleviewer plugin.

My setup is currently this, maybe I have something in the wrong place?:
root:
gallery.php

Folder within root:
gallery

files within gallery folder:
gallery.xml
images folder
index.html
svscore folder
thumbs folder

my code within the wp site page:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="gallery/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.galleryURL="gallery.php";
simpleviewer.ready(function () {
simpleviewer.load("gallery/sv-container", "100%", "100%", "transparent", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

http://www.switchitupdesigns.com/testsi … -portfolio

Thank you!

Last edited by happypappy (2012-12-07 15:32:00)

Re: Event -- upload direkt from Nikon D4 to FTP server ....

@happypappy

The relative URLs within your embedding code are relative to the web page containing the embedding code.
If your 'gallery' folder and 'gallery.php' are in the root of your web space then use either absolute URLs (e.g. 'http://www.example.com/gallery.php') or use URLs with a leading slash to denote the root directory (e.g. '/gallery.php').

Steven Speirs
SimpleViewer Support Team.