This is phoghorn.egg.info, produced by makeinfo version 4.7 from
eggdoc-output.texi.

INFO-DIR-SECTION The Algorithmic Language Scheme
START-INFO-DIR-ENTRY
* phoghorn.egg: (phoghorn.egg).		A thumbnail gallery library for spiffy
END-INFO-DIR-ENTRY


File: phoghorn.egg.info,  Node: Top,  Next: About this egg,  Up: (dir)

phoghorn egg
************

A thumbnail gallery library for spiffy
(http://www.call-with-current-continuation.org)

Written by Peter Bex (mailto:peter.bex@xs4all.nl)

   This manual corresponds to version 1.2 of the phoghorn extension
library for Chicken Scheme.

* Menu:

* About this egg::
* Documentation::
* Examples::
* License::
* Index::


File: phoghorn.egg.info,  Node: About this egg,  Next: Documentation,  Prev: Top,  Up: Top

1 About this egg
****************

* Menu:

* Version history::
* Requirements::


File: phoghorn.egg.info,  Node: Version history,  Next: Requirements,  Up: About this egg

1.1 Version history
===================

`1.2'
     Update to latest versions of epeg and imlib2.

`1.1.1'
     Changed .setup script to reflect new distribution of syntax-case.

`1.1'
     Fix small bug (a let statement was closed a little too early.

`1.0'
     initial release.


File: phoghorn.egg.info,  Node: Requirements,  Prev: Version history,  Up: About this egg

1.2 Requirements
================

This egg requires the following extensions:

   `spiffy', `spiffy-utils', `syntax-case', `imlib2', `epeg',
`generalised-case'


File: phoghorn.egg.info,  Node: Documentation,  Next: Examples,  Prev: About this egg,  Up: Top

2 Documentation
***************

Phoghorn is a web-based image gallery with built-in automatic thumbnail
generator for spiffy the webserver.

   Its features are:

   * Easy to use (just drop a bunch of files in a directory underneath
     the designated photos dir)

   * Configurable

   * Does not require a database

   * Uses CSS for markup, so its look is easily changed

   * Leverages imlib2 for maximum image file type support and epeg for
     extra-speedy JPEG handling.


* Menu:

* Use::
* Configuration::
* Output document structure::


File: phoghorn.egg.info,  Node: Use,  Next: Configuration,  Up: Documentation

2.1 Use
=======

By default, phoghorn assumes there is a directory called `galleries' in
the directory from which you call its functions (ie, the same directory
in which you placed `index.ssp'). It will create thumbnails on-the-fly
when there aren't any yet, and only for those pictures on the page that
is currently being viewed.  By default, these will be placed in the
`thumbs' directory under the gallery's directory.

   In the main page (save this as `index.ssp'):


<?scheme (use phoghorn) ?>
<html>
<head>
<title>Phoghorn example</title>
</head>
<body>
<?scheme
(parameterize ((ph:movie-image "/pics/movie.jpg")) ; Default is #f
  (ph:show-gallery))
?>
</body>
</html>

   In the zoomed-in page (save this as `zoomed.ssp'):


<?scheme (use phoghorn) ?>
<html>
<head>
<!-- The current photo's filename is the title -->
<title><? (ph:get-entry) ?></title>
</head>
<body>
<?scheme
(parameterize ((ph:movie-image "/pics/movie.jpg")) ; Default is #f
  (ph:show-zoomed-entry))
?>
</body>
</html>

   Note that currently there's no support for calling phoghorn from
SXML pages.  This is an important shortcoming and the intention is to
rewrite the output functions to SXML for the next release.


File: phoghorn.egg.info,  Node: Configuration,  Next: Output document structure,  Prev: Use,  Up: Documentation

2.2 Configuration
=================

Phoghorn can be customised to the max.  The following SRFI
(http://srfi.schemers.org/srfi-39/) parameters are supported:

* Menu:

* Directory and file settings::
* Thumbnail generation::
* Presentational options::


File: phoghorn.egg.info,  Node: Directory and file settings,  Next: Thumbnail generation,  Up: Configuration

2.2.1 Directory and file settings
---------------------------------

 -- parameter: ph:gallery-dir
          (ph:gallery-dir) [default: "galleries"]

     The directory under which the galleries can be found, relative to
     the index page.

 -- parameter: ph:index-page
          (ph:index-page) [default: "index.ssp"]

     The main webpage serving the Phoghorn script.  This shows the
     image thumbnails.

 -- parameter: ph:zoomed-page
          (ph:zoomed-page) [default: "zoomed.ssp"]

     The webpage that serves the zoomed-in views on images.

 -- parameter: ph:thumb-dir
          (ph:thumb-dir) [default: "thumbs"]

     The name of the directory under which thumnail versions of the
     images in the parent directory are stored.


File: phoghorn.egg.info,  Node: Thumbnail generation,  Next: Presentational options,  Prev: Directory and file settings,  Up: Configuration

2.2.2 Thumbnail generation
--------------------------

 -- parameter: ph:thumb-max-width/height
          (ph:thumb-max-width/height) [default: 100]

     Maximum width _or_ height of a thumbnail.The smaller of the two
     will get scaled by the same factor as the larger, which will be
     shrunk into this size. In other words, it maintains the aspect
     ratio of the original picture in the thumb.


File: phoghorn.egg.info,  Node: Presentational options,  Prev: Thumbnail generation,  Up: Configuration

2.2.3 Presentational options
----------------------------

 -- parameter: ph:entries/page
          (ph:entries/page) [default: 25]

     The number of pictures to display on one page.

 -- parameter: ph:table-width
          (ph:table-width) [default: 5]

     The number of images horizontally (to be deprecated).

 -- parameter: ph:prev-page-text
          (ph:prev-page-text) [default: "prev"]

     The text on the link to the previous page.

 -- parameter: ph:next-page-text
          (ph:next-page-text) [default: "next"]

     The text on the link to the next page.

 -- parameter: ph:up-link-text
          (ph:up-link-text) [default: "up"]

     The text on the link to a higher directory.

 -- parameter: ph:prev-entry-text
          (ph:prev-entry-text) [default: "prev"]

     The text on the link to the previous image in zoomed view.

 -- parameter: ph:next-entry-text
          (ph:next-entry-text) [default: "next"]

     The text on the link to the next image in zoomed view.

 -- parameter: ph:unzoom-link-text
          (ph:unzoom-link-text) [default: "back"]

     The text on the link to the gallery view (displayed inzoomed view).

 -- parameter: ph:movie-image
          (ph:movie-image) [default: #f]

     The image file to display when a movie is in the gallery.  This
     image will also be displayed in the zoomed view, as a link to the
     actual video clip.

 -- parameter: ph:root-gallery-name
          (ph:root-gallery-name) [default: "Gallery list"]

     The title of the topmost gallery.  All subgalleries have a title
     that is equal to the directory name.


File: phoghorn.egg.info,  Node: Output document structure,  Prev: Configuration,  Up: Documentation

2.3 Output document structure
=============================

The output can most easily be looked at in the source view of your
favorite browser, but to style it with CSS it is handy to have a
reference.  There is an example CSS file in the _examples_ section.

* Menu:

* Global::
* The zoomed view::
* The gallery/thumbnail view::


File: phoghorn.egg.info,  Node: Global,  Next: The zoomed view,  Up: Output document structure

2.3.1 Global
------------

All phoghorn output is wrapped in a `div' element of class `phoghorn'.
It also has class `gallery' when in thumbnail view, and class `zoomed'
in zoomed view.


File: phoghorn.egg.info,  Node: The zoomed view,  Next: The gallery/thumbnail view,  Prev: Global,  Up: Output document structure

2.3.2 The zoomed view
---------------------

Links above and below the image are inside a `div' of class
`navigation'. The image itself is inside a `div' of class `entry'.


File: phoghorn.egg.info,  Node: The gallery/thumbnail view,  Prev: The zoomed view,  Up: Output document structure

2.3.3 The gallery/thumbnail view
--------------------------------

The list of subgalleries, if present, is inside a `div' of class
`gallerytree'. The list itself is an `ul'.  The list item of the link
to the parent gallery, if present, has class `uplink'.

   Below the subgalleries list (and repeated again below the gallery)
is a `div' of class navigation. This navigation has the links to the
other pages.  The current page number is not a link, but a `span' of
class `curpage'.

   The gallery itself is inside a `table', containing the thumbnails.


File: phoghorn.egg.info,  Node: Examples,  Next: License,  Prev: Documentation,  Up: Top

3 Examples
**********


/*
 * All stuff Phoghorn outputs is centered, and in a sans-serif font of a
 *  decent size.  Any stuff above or below the Phoghorn output is separately
 *  on a new line.
 */
div.phoghorn {
	text-align: center;
	font-family: arial, tahoma, verdana, helvetica;
	font-size: 12px;
	clear: both;
}

/* A blue background for the thumbnails */
div.phoghorn table {
	background-color: #6688bb;
}

/* Current page in thumbnail view shown in red */
div.phoghorn .curpage {
	color: red;
}

/* We show the gallery tree in a table-like fashion */
div.phoghorn .gallerytree {
	display: block;
	text-align: center;
	width: 100%;
}

div.phoghorn .gallerytree li {
	/* background-color: #cc0000; */
	display: block;			/* Remove leading list-bullets */
	width: 200px;			/* Link text is left-aligned inside */
	text-align: left;		/*   the 200 pixels-wide `li' element */
	float: left;			/* Don't make them start a new line */
	padding-bottom: 10px;		/* Leave room between them vertically */
}

div.phoghorn .gallerytree li.uplink {
	width: 100%;			/* The uplink is on its own line */
	text-align: center;		/* Centered */
}

/* Start the table on its own line, not to the right of the navigation */
div.phoghorn table {
	clear: left;
}


File: phoghorn.egg.info,  Node: License,  Next: Index,  Prev: Examples,  Up: Top

4 License
*********


Copyright (c) 2005 - 2006, Peter Bex (peter.bex@xs4all.nl)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. Neither the name of author nor the names of any contributors may
   be used to endorse or promote products derived from this software
   without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


File: phoghorn.egg.info,  Node: Index,  Prev: License,  Up: Top

Index
*****

 [index ]
* Menu:

* ph:entries/page:                       Presentational options.
                                                               (line  7)
* ph:gallery-dir:                        Directory and file settings.
                                                               (line  7)
* ph:index-page:                         Directory and file settings.
                                                               (line 13)
* ph:movie-image:                        Presentational options.
                                                               (line 47)
* ph:next-entry-text:                    Presentational options.
                                                               (line 37)
* ph:next-page-text:                     Presentational options.
                                                               (line 22)
* ph:prev-entry-text:                    Presentational options.
                                                               (line 32)
* ph:prev-page-text:                     Presentational options.
                                                               (line 17)
* ph:root-gallery-name:                  Presentational options.
                                                               (line 54)
* ph:table-width:                        Presentational options.
                                                               (line 12)
* ph:thumb-dir:                          Directory and file settings.
                                                               (line 24)
* ph:thumb-max-width/height:             Thumbnail generation. (line  7)
* ph:unzoom-link-text:                   Presentational options.
                                                               (line 42)
* ph:up-link-text:                       Presentational options.
                                                               (line 27)
* ph:zoomed-page:                        Directory and file settings.
                                                               (line 19)



Tag Table:
Node: Top248
Node: About this egg667
Node: Version history843
Node: Requirements1218
Node: Documentation1473
Node: Use2122
Node: Configuration3400
Node: Directory and file settings3768
Node: Thumbnail generation4627
Node: Presentational options5176
Node: Output document structure6884
Node: Global7321
Node: The zoomed view7605
Node: The gallery/thumbnail view7911
Node: Examples8584
Node: License9919
Node: Index11536

End Tag Table
