zenphoto forums » Themes

SimpleViewer Theme

(42 posts)
  1. sleman

    Apprentice
    Joined: Apr '07
    Posts: 3

    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

    Posted 6 years ago #
  2. DarrellD

    Contributor
    Joined: Jan '06
    Posts: 300

    I see a MySQL Error. Looks like it's having trouble connecting.

    Posted 6 years ago #
  3. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    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.

    Posted 6 years ago #
  4. Skwid

    Senior
    Joined: Feb '06
    Posts: 64

    Please post it on the wiki :)

    Posted 6 years ago #
  5. sleman

    Apprentice
    Joined: Apr '07
    Posts: 3

    Theme submitted to the wiki, thanks for your interest.

    Posted 6 years ago #
  6. AmbitiousLemon

    Member
    Joined: Jun '07
    Posts: 22

    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?

    Posted 6 years ago #
  7. Skwid

    Senior
    Joined: Feb '06
    Posts: 64

    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.

    Posted 6 years ago #
  8. Skwid

    Senior
    Joined: Feb '06
    Posts: 64

    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 !

    Posted 6 years ago #
  9. AmbitiousLemon

    Member
    Joined: Jun '07
    Posts: 22

    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.

    Posted 6 years ago #
  10. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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"?

    Don't forget to read the Forum rules and usage resources
    Posted 6 years ago #
  11. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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?

    Don't forget to read the Forum rules and usage resources
    Posted 6 years ago #
  12. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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?

    Don't forget to read the Forum rules and usage resources
    Posted 6 years ago #
  13. Skwid

    Senior
    Joined: Feb '06
    Posts: 64

    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.

    Posted 6 years ago #
  14. dodo

    Apprentice
    Joined: Jun '07
    Posts: 1

    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 :)

    Posted 6 years ago #
  15. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    Thanks, that did the trick.

    Don't forget to read the Forum rules and usage resources
    Posted 6 years ago #
  16. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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.

    Don't forget to read the Forum rules and usage resources
    Posted 6 years ago #
  17. Skwid

    Senior
    Joined: Feb '06
    Posts: 64

    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.

    Posted 6 years ago #
  18. Skwid

    Senior
    Joined: Feb '06
    Posts: 64

    sbillard: for the image description you might need to add a CDATA field in the xml generation, with both the title and the description.

    Posted 6 years ago #
  19. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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.

    Don't forget to read the Forum rules and usage resources
    Posted 6 years ago #
  20. sleman

    Apprentice
    Joined: Apr '07
    Posts: 3

    Skwid, feel free to submit your modified template replacing mine. Great work.

    Posted 6 years ago #
  21. Skwid

    Senior
    Joined: Feb '06
    Posts: 64

    Great. Thanks !

    Posted 6 years ago #
  22. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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.

    Don't forget to read the Forum rules and usage resources
    Posted 6 years ago #
  23. Skwid

    Senior
    Joined: Feb '06
    Posts: 64

    Hum,

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

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

    Tell me if this works for you.

    Posted 6 years ago #
  24. C0nfusi0N

    Member
    Joined: Sep '06
    Posts: 16

    nice gallery ^^
    :)

    Posted 5 years ago #
  25. marmot

    Apprentice
    Joined: Jun '07
    Posts: 2

    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.

    Posted 5 years ago #
  26. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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.

    Don't forget to read the Forum rules and usage resources
    Posted 5 years ago #
  27. aschiess

    Apprentice
    Joined: Jun '07
    Posts: 2

    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

    Posted 5 years ago #
  28. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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?

    Don't forget to read the Forum rules and usage resources
    Posted 5 years ago #
  29. aschiess

    Apprentice
    Joined: Jun '07
    Posts: 2

    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 ?

    Posted 5 years ago #
  30. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,818

    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%20Album/ and click on page 3. This works. visit http://www.albums.sbillard.org/Test%20Album/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.)

    Don't forget to read the Forum rules and usage resources
    Posted 5 years ago #

RSS feed for this topic

Reply »

You must log in to post.