SimpleViewer Theme

I have developed a new theme that wraps simpleviewer (flash photo viewer) quite nicely. Take a look at:
http://michaelsleman.com/zenphoto

I'd love to contribute this as a template that's packaged with zenphoto as it looks quite nice. Let me know where I can post the files.

Thanks
«1

Comments

  • I see a MySQL Error. Looks like it's having trouble connecting.
  • You can submit themes to the trac wiki. There is a page:

    http://www.zenphoto.org/trac/wiki/ZenphotoThemes

    which has a number of themes on it already. Just follow the outlines of the other themes on the page to get the structure (so it remains sort of consistent) and you can upload a zipped archive as an attachment to the page.

    Make sure you create a login account on the trac wiki too, so Tristan can keep an eye on who's changing what on the wiki.
  • Skwid Member
    Please post it on the wiki :)
  • sleman Member
    Theme submitted to the wiki, thanks for your interest.
  • Looks great! Its not working for me though. After the loading gallery message nothing shows up. I noticed that you had your url hard coded in the imagedata_xml.php file on line 26. Fixing that didn't help. Is it compatible with mysql table prefixes? Thats one change I have had to make with other themes. Is it compatible with subalbums? How about the zen video hack?
  • Skwid Member
    This is a great idea. I am working on making the theme even better by having all the files (with the swf etc) in the theme folder, using zenphoto's functions for thumbnail generation, and using the javascript from airtight to display the swf.
  • Skwid Member
    Hello again,

    I have basically rewritten the theme from scratch, I think it's now much cleaner and easier to use.
    You can see an example here: http://test.lostocean.net/zpsvn/
    Download here: http://www.zenphoto.org/trac/attachment/wiki/ZenphotoThemes/simpleviewer-1.1.zip

    Here are the advantages:
    - Works with subalbums !!
    - All the files are in the theme directory
    - Very simplified xml generation (uses zenphoto contexts)
    - No manual thumbnail generation
    - Can configure all the colors etc at the top of the album.php file
    - Uses a JS swf loader which prevents problems in IE7
    - The graphics have been made a little bit more consistent with the 'default' theme

    NOTE: Right now, the theme seems to work with the svn version of ZenPhoto, but not with 1.0.8.2 . I will try to fix that as soon as possible.

    Sleman, do you mind me updating your archive on the wiki, or do you want to keep two seperate themes ?

    Enjoy !
  • Awesome Skwid. While the original didn't work for me, this version is working perfectly.

    Using svn version with subalbums and Camino as my browser (Mozilla 1.8 gekko engine).

    Any chance we could get this working with the ZenVideo Hack? I haven't been able to find or mod a theme yet to do both subalbums and video.
  • I like what you have done with the image display. I know it is a lot to ask, but would you consider making a version with two-up albums on the album page like "sterile" or "audible.2"?
  • The album title and description on subalbums is formatted strangely see: http://albums.sbillard.org/China/.

    Also, the Gallery title is displayed over the thumbnails. Wouldn't it be more appropriate to show the album title. (Or omit this since the information is already at the head of the page.)

    Would it be possible to show the image description under full image?
  • I have tried adapting SimpleViewer to Effervescence. I am clearly missing something. The SimpleViewer application loads then shows a small X on the left and a large X on the right. I copied code from SimpleViewer: #index and #Flash from the CSS and the imagae body code from album.php:
    -------

    <?php if (!defined('WEBPATH')) die();

    // Overwrite the number of images per page to infinity
    $_zp_conf_vars['images_per_page'] = 10000;

    // Change the configuration here
    $backgroundColor = "#e3e2dd";

    $maxImageWidth="640";
    $maxImageHeight="640";

    $preloaderColor="0xFFFFFF";
    $textColor="0xFFFFFF";
    $frameColor="0xFFFFFF";

    $frameWidth="20";
    $stagePadding="40";

    $thumbnailColumns="3";
    $thumbnailRows="4";
    $navPosition="right";

    $enableRightClickOpen="true";

    $backgroundImagePath="";
    // Enf of config

    ?>

    ...

    <script type="text/javascript" src="<?php echo $_zp_themeroot ?>/swfobject.js"></script>

    ...

    <!-- Wrap Main Body -->
    <?php if (getNumImages() > 0) { /* Only print if we have images. */ ?>

    <div id="flash">SimpleViewer requires Macromedia Flash.
    Get Macromedia Flash. If you have Flash installed,
    click to view gallery.</div>
    <script type="text/javascript">
    var fo = new SWFObject("<?php echo $_zp_themeroot ?>/simpleviewer.swf", "viewer", "100%", "100%", "7", "<?php echo $backgroundColor ?>");
    fo.addVariable("preloaderColor", "<?php echo $preloaderColor ?>");
    fo.addVariable("xmlDataPath", "<?php echo getAlbumLinkURL()."?format=xml" ?>");
    fo.addVariable("width", "100%");
    fo.addVariable("height", "100%");
    fo.write("flash");
    </script>

    <?php } ?>

    ----------

    I suppose I am missing something, any idea what?
  • Skwid Member
    Well, you need to have the code for the xml feed etc in there, as well as the stuff for subalbums. Try taking the albums.php from the simpleviewer theme and changing only the div names etc to math effervescence. And then switch the stylesheet. You shouldn't have to modify the index.php from Effervescence.
  • dodo Member
    I don't understand how the theme works skwid. I run the svn zenphoto version but simpleviewer still only display two white crosses instead of my photos in the albums. Is there any manual script to run to make it work ? (you were speaking about "Very simplified xml generation").
    Or maybe is it an issue with my hoster (mod_rewrite is disabled here).
    Your demo gallery looks great anyway :)
  • Thanks, that did the trick.
  • Here is the modified Effervescence: http://albums.sbillard.org.

    One strange thing. No matter what I set the value of thumbnailRows I get 4 rows. I was hoping to use more of the space for thumbnails (since I shrunk the columns to 2 to allow more room for landscape images.)

    Also, any thoughts on how to add the image description to the caption? I'd like to display the image title with the image description under it. I read the FAQ regards to using CDATA, but I suspect I don't understand (or it conflicts with php) because when I attempted this only one thumbnail was displayed.
  • Skwid Member
    sbillard: Congrats on modifying the theme to suit your needs :) That looks great ! Please post it on the wiki :)

    dodo: Hum yes it might not work without mod_rewrite, I would have to check it out with the option disabled, but I don't really have time. All the xml generation is taken care of in album.php, there is nothing else to run.
  • Skwid Member
    sbillard: for the image description you might need to add a CDATA field in the xml generation, with both the title and the description.
  • I've added Effervescence_SimpleViewer to the WIKI pages.

    Skwid: I have not figured out how to make CDATA work. Everything I have tried breaks the viewer.
  • sleman Member
    Skwid, feel free to submit your modified template replacing mine. Great work.
  • Skwid Member
    Great. Thanks !
  • Well, since I posted Effervescence_SimpleViewer I have been trying to enhance it. I would like both the Image Title and the Image Description to be displayed as the caption.

    There is a line in album.php which passes the text of the caption to SimpleViewer:
    <?php while (next_image()): ?><image><filename><?php echo getFullImageURL();?></filename><caption><?php echo getImageTitle()?></caption></image><?php endwhile; ?></simpleviewerGallery><?php

    Clearly, the part to modify is the "echo getImageTitle()" bit. In fact I can change this to getImageDescription() and it gladly displays the description as the caption.

    So, I have tried to create my own function--getImageCaption() that would concatinate the title and description. I have run into multitudes of problems with this.

    First: Placing my code in the customfunctions.php file did not work. The behavior is as if the function could not be found. I have tried moving the "<?php require_once ('customfunctions.php'); ?>" line various places in album.php including duplicating it in each path. Some spots broke things entirely, others just stopped the display after the first thumbnail.

    Second: I placed my code in template-functions.php. I can get this to work, sort of. If I just replicate the code of getImageTitle in my function, then things work. If I try to return the two strings for title and descripton, nothing gets displayed.

    I may not have the correct PHP syntax for concatinating the strings, so if someone would kindly show me that I will try again. However, the end goal is to use the CDATA technique described in #13 here: http://www.airtightinteractive.com/simpleviewer/faq.html

    I'd really appreciate an expert's help.
  • Skwid Member
    Hum,

    I'm not sure I understand, but you should be able to just do:

    `<?php echo getImageTitle().' - '.getImageDescription() ?>`

    Tell me if this works for you.
  • nice gallery ^^
    :)
  • marmot Member
    Whenever I try to run simpleviewer, I get a single blank thumbnail and no pictures...example here...

    http://marmot-oo7.com/zenphoto/

    Has anyone else encountered this? A shot in the dark, I thought it could be permissions so I set everything to 777...but no luck.
  • Thanks for your help. Here is what I have ended up with.

    <caption><![CDATA[<u><b><i> "title="Open in a new window">
    <?php echo getImageTitle() ?>

    </u></i></b>
    <br></u><?php echo getImageDesc() ?>]]></caption>

    I am updating the theme on the WIKI. It now displays the image title with a link to the standard Effervessence image page. Then on a second line it displays the image description.
  • Please Help, I want to use simpleviewer or simpleviewer-Effervescence but I have only two white crosses. In one post you speak from:
    - Very simplified xml generation
    - No manual thumbnail generation
    It is possible to have more instruction ?
    my test site: "http://schiess.free.fr/zenphoto"

    Thanks in advance
  • What version of zenphoto do you have installed? I am running on the SVN, so I don't know if there are issues on previous versions.

    When I was having the X's, it was because I had botched the XML processing. However, that was because I had incorrectly modified the Effervescence theme with simpleviewer. If you have copied the themes from the WIKI to your server that should not be the issue.

    Also, my host allows for mod_rewrite to be enabled. You should check that.

    Does the Default theme work correctly?
  • I use zenphoto 1.0.8.2 with -Effervescence+SimpleViewer- or -SimpleViewer 1.1- from Wiki. The other themes (default, dark ..) work perfectly. I think my problem is how to use the xml processing ?
  • aschiess: You need to be running the SVN version of Zenphoto.

    Skwid: I have done some more modifications of the efferevescence_simpleviewer theme. But I am having some strange problems.

    Basically what I am trying to do is add pagination to the subalbums/simpleviewer page such that the Flash show is that 'last' page in the list. Sometimes it works and sometimes it does not.

    Visit http://www.albums.sbillard.org/Test Album/ and click on page 3. This works. visit http://www.albums.sbillard.org/Test Album/Bejing/ and click on page 3 and it does not work. Simpleviewer seems to be loading images, there are placeholders for all the thumbs, but nothing shows up.

    I know that the problem is related to pages, because I have put in a ?nopages parameter that supresses all the paging and shows the Flash at the bottom of the page. This works.

    However, I can't see what pages have to do with the images not showing.
    Any ideas? (code is on the Wiki if you wish to see what I have done.)
  • OK, found a work-a-round. Still don't know why the original code failed, but not an issue anymore.
Sign In or Register to comment.