This page was automatically created from images organised into folders to indicate which category they belong in.
You have a lot of control over the look and feel, in fact virtually anything can be changed (most changes are very easy). This page has the thumbnails "packed", a list is another major alternative. If a list were used the thumbnails tooltip information would probably be better in a second table column. Of course the PPWIZARD information below would not appear on any pages you create, it is simply part of the demonstation/sample code.
The thumbnails are "real" (small images in size and number of bytes) and not simply downsized images. The thumbnail image files were automatically generated.
The images appear in a html page specifically generated for them, this can look like anything you wish.
You can create directory descriptions as well as tooltips for directories (categories) as demonstrated for the two secondary directories (html pages).
Pictures of Breanna 1 | 2 photos | |
Pictures of Breanna 2 | 2 photos |
;---------------------------------------------------------------------------- ;--------------------------------[ PHOTOS.IT ]----------------------------- ;---------------------------------------------------------------------------- ; ; $Author: USER "Dennis" $ ; $Revision: 1.4 $ ; $Date: 13 Apr 2003 15:28:54 $ ; $Logfile: C:/DBAREIS/Projects.PVCS/PpwAddOn/Photos/photos.it.pvcs $ ; ; ; This file is an example of how you can use the "PHOTOS.IH" file. ; ; It will display the pages source if you have the "HTMLPRE" add-on and ; if Image Magick is available will use real thumnail images it creates ; otherwise it will fake thumnails (not good - but easy to get started). ;---------------------------------------------------------------------------- ;--- Is this being built on MY PC at home? ---------------------------------- #if FindFile("ppwaddon.ih") <> '' ;--- YES ------------------------------------------------------------- #define ON_MY_PC ;;Can test for this #define PPWADDON_PAGE PHOTOS.IH ;;Name of this header #endif ;--- Need to generate some HTML ------------------------------------------ #define FTPLIKE_HEADER \ <HTML> -\ <HEAD> -\ <TITLE>{$Title}</TITLE> -\ </HEAD> -\ <BODY BACKGROUND="ftp_wood.jpg" BGCOLOR="white" LINK="#3333FF" VLINK="green" LEFTMARGIN=5 TOPMARGIN=5 MARGINWIDTH=5 MARGINHEIGHT=5> -\ <CENTER><H1>{$Title}</H1></CENTER> ;--- Generate header for THIS page --------------------------------------- #define ROOT_TITLE A Sample Collection of Images <$FTPLIKE_HEADER TITLE="<$ROOT_TITLE>"> ;--- Explain a few things.... ----------------------------------------------- <P> This page was automatically created from images organised into folders to indicate which category they belong in. <P> You have a lot of control over the look and feel, in fact virtually anything can be changed (most changes are very easy). This page has the thumbnails "packed", a list is another major alternative. If a list were used the thumbnails tooltip information would probably be better in a second table column. #ifdef ON_MY_PC Of course the PPWIZARD information below would not appear on any pages you create, it is simply part of the demonstation/sample code. #endif <P> The thumbnails are "real" (small images in size and number of bytes) and not simply downsized images. The thumbnail image files were automatically generated. <P> The images appear in a html page specifically generated for them, this can look like anything you wish. <P> You can create directory descriptions as well as tooltips for directories (categories) as demonstrated for the two secondary directories (html pages). <HR COLOR="RED" size="1"> ;--- Where are the photo (images and dirs) ---------------------------------- #define PHOTOS_DIRECTORY .\sample.img ;;Relative to current dir #define FTPLIKE_DIRECTORY_WEB ../../sample.img ;;Relative to generated HTML page (since it displays the image) ;#define FTPLIKE_DIRECTORY_WEB file:///C|/DBAREIS/PROJECTS/PpwAddOn/Photos/SAMPLE.IMG ;;Absolute only good for local browsing ;--- Where are thumbnails/html pages for images generated ------------------- #define PHOTO_GENERATED_DIR out\gen\ #define PHOTO_GENERATED_WEBDIR gen/ ;--- Just arrange with "best fit" ------------------------------------------- #define PHOTOS_NO_TABLE #define PHOTOS_THUMBNAIL_IMG_ATTR <?Space>BORDER="0" HSPACE="5" VSPACE="5" ;--- If on MY PC then modify footer on image html pages we create ----------- #ifdef ON_MY_PC ;--- Put info on any image html we create ---------------------------- #define FTPLIKE_FOOTER \ #include "ppwaddon.ih" #endif ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ;%%% YOU MAY NEED TO MODIFY THIS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #if FindFile("C:\ImageMagick\convert.exe") = '' ;--- NO IMAGE MAGICK, use "poor mans" thumbnail -------------------------- #define PHOTO_THUMBNAIL_IMG \ ;--- Create the thumbnail --- -\ #evaluate '' ^<$GetDodgyThumbailSize>^ -\ -\ ;--- Generate POOR mans thumbnail (for demo only --------- -\ <IMG \ SRC="<$PHOTO_GENERATED_WEBDIR><??eURL>" \ WIDTH="<??iWidth>" \ HEIGHT="<??iHeight>" \ ALT="[Not real thumbnail - no image Magick] \ <$PHOTOS_TOOLTIP_CRLF> -\ <??FtpShortD> \ <??FtpSize> bytes long \ (<??iWidth> x <??iHeight>).<$PHOTOS_TOOLTIP_CRLF> -\ Photo dated \ <$FTPLIKE_SHOW_FILE_TIME> -\ #if [FtpComment <> ''] -\ <$PHOTOS_TOOLTIP_CRLF> -\ <$PHOTOS_TOOLTIP_CRLF> -\ <??FtpComment> -\ #endif -\ " -\ <$PHOTOS_THUMBNAIL_IMG_ATTR> -\ > ;--- Work out "thumbnail" size ------------------------------------------- #DefineRexx 'GetDodgyThumbailSize' nopack ;--- Get real size of image ------------------------------------------ parse value GetImageHeightWidth(FtpFile,,,"W,H") with iWidth ',' iHeight ;--- Don't try too hard - I'm not demo'ing this! --------------------- #define MAX_LNG 100 if iWidth > <$MAX_LNG> | iHeight > <$MAX_LNG> then do ;--- Scale down a bit -------------------------------------------- ScaleBy = iWidth / <$MAX_LNG>; iWidth = (iWidth % ScaleBy) + 1 - 1; ;;Not sure why I need to fudge.. iHeight = (iHeight % ScaleBy) + 1 - 1; end; #DefineRexx #endif ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ;%%%[ Process the Image TREE ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #include "photos.ih" ;---------------------------------------------------------------------------- ;--- If you have example support then show one! ----------------------------- ;---------------------------------------------------------------------------- #if FindFile("htmlpre.ih") <> '' ;--- Want to use HTMLPRE --------------------------------------------- #include "htmlpre.ih" ;--- Heading --------------------------------------------------------- <p><hr size="1" color="red"> <CENTER><H1>Full Source For This Page</H1></CENTER> ;--- Show this pages SOURCE ------------------------------------------ <$ExampleFile FILE="photos.it"> #endif ;--- Add page footer -------------------------------------------------------- #ifdef ON_MY_PC ;--- This file won't be around on YOUR machine! ---------------------- #include "ppwaddon.ih" #elseif <$FTPLIKE_FOOTER> #endif
In case you got here via a search engine or a link from another site you can download the header file used in this sample page ("PHOTOS.IH") and ppwizard itself (my free html preprocessor) from the ppwizard download page at:
PPWIZARD can be thought of as a "Super SSI", it can include external files and do most of the things that server side includes can (and heaps more) but do them in a simpler manner and have no impact or requirements on the server.
PPWIZARD is the most powerful mechanism available for code reuse and automation of common tasks. See the PPWIZARD pages for more details.