pho

this is pho
a customizable image viewer
for php web pages.

Features:

1.) simple picture upload - just drop a folder of pictures into your /pho/ folder on your webserver (ssh/ftp, whatever.) (no annoying uploading through a klunky webpage interface),
2.) aesthetics similar to flickr and photoshop's web export plugin.
3.) image rotation is automatic based on camera EXIF data (if available) (depends on jpegtrans and jhead)
4.) image thumbnail generation is automatic (depends on ImageMagick)
5.) It's simple to setup and configure (no mysql setup, imagemagick is all you need to find)
6.) no user accounts, simply copy pho where you want it to run

an example 'index.php' file:
// include 'pho'
include( ".pho/pho.php" );

// html start...
echo "<html><head>\n";
echo "<title>pho tao gallery</title>\n";
outputLinksAndScripts();
echo "</head>\n<body>\n";
echo "<table width='800'><tr><td>";

// directory tree browser
echo "<p align='right'>";
echo "<table><tr><td class='directoryBrowser'>";
outputCurrentDir();
outputTree( filterArray( getdirs( $usedir ), array( $thumbdir, $phodir, ".svn" ) ) );
echo "<BR></td></tr></table>";

// image thumbnail strip
echo "<p align='right'>";
echo "<table><tr><td>";
//outputModeToggle();
$pics = getImagesInDir( $usedir );
outputThumbs( $pics, 30, 30, -1 );
echo "</td></tr></table>";

// current image / nextprev widget
echo "<table cellspacing='0' cellpadding='0' width='100%'>";
echo "<tr><td align='left' valign='top'>";
if ($display != "")
{
   spacer( 200, 1 );
   echo "<br><BR>";
   outputPopupLink( $display, "[ popup ]" );
   spacer( 10, 1 );
   outputFullDisplayToggle();
   spacer( 10, 1 );
   outputRemoveDisplay();
   echo "<BR>";
   outputDisplayImage();
}
echo "</td><td valign='top' align='right' width='100%'>";
outputPrevNext( $pics );
echo "</td></tr></table>";

// footer
echo "<p><HR>powered by <a href='.pho/readme.html'>pho</a><BR>";
outputThumbs( array( "$phodir/pho.jpg" ), 50, 50, -1 );
echo "<p class='statustext'>";
outputStatus();

// html end...
echo "</td></tr></table></body></html>";

future work

1.) support multiple users (or at least a single user w/ password auth)

2.) scour the code for security holes

3.) add a fancy file uploader, for uploading files through the webpage. prefer drag and drop to single-file text input forms with browse button on each. maybe someone has something slick written in flash?

DOWNLOAD

not available yet, go bug the author

license

/*
   pho - image viewer for webpages
   Copyright (c) 2007 kevin meinert all rights reserved

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
   02110-1301  USA
*/