I have developed a new theme that wraps simpleviewer (flash photo viewer) quite nicely. Take a look at:
http://michaelsleman.com/zenphotoI'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
Comments
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.
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 !
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.
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?
-------
<?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?
Or maybe is it an issue with my hoster (mod_rewrite is disabled here).
Your demo gallery looks great anyway
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.
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: I have not figured out how to make CDATA work. Everything I have tried breaks the viewer.
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.
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.
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.
<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.
- 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
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?
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.)