ZENpressed is a ZENphoto-integration-plugin for WordPress based on ZenShow by Rui Cruz and my old ZENphoto-insert-plugin. I also got inspired by the simple mp3 player plugin on how to do the Quicktag.
If you have any comments or suggestions just leave a message here.
Just copy zenpressed.php to your plugin directory, activate it and visit the options dialog (options→zenpressed) and save your options at least once (also after upgrade). If you also wanna use the ZENpressed widget copy zenpressedwidget.php to your plugin directory, activate it and add the widget to your sidebar (presentation→sidebar widgets).
Every of ZENpressed functions takes as last parameter an associative array in which you may override as many default parameters as u like. You may also use any of this as attributes of the zen-tag in your posts to override parameters.
All these functions are great for your sidebar.
show a whole album with its description
zenpressed_photos( "albumname", array( "count" => "all", "showalbumdescription" => "on" ) );
show the whole gallery
zenpressed_photos( null, array( "count" => "all" ) );
show multiple albums
zenpressed_photos( array( "albumname1", "albumname2" ), array( "count" => "all" ) );
show latest photos from all albums
zenpressed_latestphotos( );
show latest photos from album
zenpressed_latestphotos( "albumname" );
show the 8 most recent photos in album with size 320
zenpressed_latestphotos( "albumname", array( "count" => "8", "size" => "320" ) );
show 10 most recent photos from multiple albums
zenpressed_latestphotos( array( "albumname1", "albumname2" ), array( "count" => "10" ) );
show random photos from all albums
zenpressed_randomphotos( );
show random photos from album
zenpressed_randomphotos( "albumname" );
show 16 random photos from all albums without title
zenpressed_randomphotos( null, array( "count" => "16", "showtitle" => "off" ) );
show 4 random photos from multiple albums
zenpressed_randomphotos( array( "albumname1", "albumname2" ), array( "count" => "4" ) );
show photo
zenpressed_photo( "jada.jpg", "albumname" );
if the imagename is unique you even can forget about the album
zenpressed_photo( "jada666.jpg" );
show photo by id
zenpressed_photobyid( 11 )
to insert a image into a post with class “photo” (→ zp_image.photo)
<zen image="jada.jpg" album="albumname" class="photo" />
like with the functions you can override any default parameter with the appropriate attribute.
<zen image="jada666.jpg" size="512" showdescription="on" />
you also can just copy the album/image part of the zenphoto url you wanna show
<zen url="albumname/jada333.jpg" />
insert a whole album into a post
<zen album="albumname" count="all" size="thumb" />
insert 8 random photos from an album and show the albums title and description
<zen album="albumname" count="8" select="random" showalbumtitle="on" showalbumdescription="on" />
insert the 3 most recent (by id) photos from the whole gallery with title
<zen count="3" select="latest" showtitle="on" />
the HTML output for every image looks like this:
<div class="zp_photo"> <a href="url" title="title" class="zp_link"> <img src="source" alt="title" class="zp_image classname" /> <div class="zp_title">title</div> </a> <div class="zp_description">description</div> </div>
if there is more than one photo to show all photo blocks (see above) are wrapped with this:
<div class="zp_photos"> <div class="zp_albumtitle">albumtitle</div> <div class="zp_albumdescription">albumdescription</div> {zp_photo} </div>