SlideShow
SlideShow turns your Links SQL database into a directory of
photo galleries. When images are uploaded to specific links, they will be
displayed as thumbnails to users browsing your directory, and can be cycled
through like a slideshow.
The SlideShow Plugin Menu
SlideShow, like all Links SQL plugins,
can be accessed and customized from the Plugin Manager. Clicking the "Edit" link
beside SlideShow's record in the Plugin Manager brings up a menu of options
allowing you to customize all aspects of your SlideShow plugin.

Figure 1: The SlideShow Plugin menu.
The following
options can be configured from the Plugin Details menu:
Maximum width
and height for thumbnail
This field controls the maximum width and height
(in pixels) of the thumbnails that will be generated from uploaded images.
Specify using the format widthxheight; 100x200, for example.
Maximum width
and height for medium sized image
This field controls the maximum width and height
(in pixels) of medium sized pictures that will be generated from uploaded images.
Specify using the format widthxheight; 200x400, for example. If you do not wish to display medium sized images, simply leave this field blank.
Maximum width
and height for large images
This field controls the maximum width and height
(in pixels) of large sized that will be generated from uploaded images.
Specify using the format widthxheight; 400x800, for example. If you do not wish to display large sized images, simply leave this field blank.
Maximum
width and height for largest sized images
This field controls the maximum
width and height (in pixels) of the largest images that will be generated
from uploaded images. Specify using the format widthxheight; 800x1600, for
example.
Path to watermark file
This field allows you to
configure a path to a watermark image file. If specified, this image will appear
in the upper-left corner of all medium and full-sizes images in SlideShow. The
image should be small, have a white or clear background, and be in either gif,
png or jpeg format.
Name of image columns
This field contains the
names of the columns from which SlideShow will call and display images. Column
names should be separated by commas. A sample list of column names in this field
might be: "Image_01, Image_02, Image_03, Image_04". Remember to type the names
of the columns exactly as they appear in the "Column Name"
field.
SlideShow image columns
This field contains the names of the
columns from which SlideShow will call and display images when a user is viewing
images in a sequenced slideshow. Column names should be separated by commas. A
sample list of column names in this field might be: "Image_01, Image_02,
Image_03, Image_04". Remember to type the names of the columns exactly as they
appear in the "Column Name" field.
Temporary image directory
This field contains the path to the directory where images will be
temporarily stored while being uploaded.
Image upload
path
This field contains the path to the directory where uploaded
images will be permanently stored.
Menu Options
These
checkboxes allow you to choose which of the following options will be displayed
in the "SlideShow" menu on the "Installed Plugins" sidebar: Help, Add Fields,
and Edit. Plugin hooks
The add_link and modify_link checkboxes allow
you to enable and disable the hooks to the SlideShow plugin in the add_link.html
and modify_link.html templates. If disabled, images uploaded using SlideShow
will still be saved and stored normally, but will not be visible to users
viewing the directory. These hooks are enabled by default, and it is not
recommended that you disable them unless you believe there may be a problem with
SlideShow.
SlideShow and Your Links SQL Templates
To fully integrate
SlideShow into your Links SQL database, you will have to make some changes to
your templates.
To integrate uploaded images into your site, add the
following line to your link.html, detailed.html, or pictureframe.html (click
here for details on this new template) templates, depending on which pages you
want to be able to display images on:
<%Plugins::SlideShow::generate_paths($ID)%>
To let users to be
able to upload images of their own to your database, make the following changes
in form.txt:
replace
<form method="POST" name="admin" action="add.cgi" >
with
<form method="POST" enctype="multipart/form-data" name="admin"
action="add.cgi" >
To make the file upload fields available to users,
add the following to form.txt, replacing "COLUMN_NAME" with the name of the
columns you wish to add:
<input type="file" name="COLUMN_NAME">
So, if you had a series
of columns called "Image1", "Image2", etc, you would add the following to
form.txt:
<input type="file" name="Image1">
<input type="file" name="Image2">
<input type="file" name="Image3">
<input type="file" name="Image4">
<input type="file" name="Image5">
To actually display the uploaded
images, add the following line (replacing "Image1" with the name of the desired
columns) to your link.html, detailed.html, or pictureframe.html (click here for
details on this new template) templates, depending on which pages you want to
display images on. You will have to add the line once for each column, inserting
the column name for each:
<img src="<%Image1_path%>">
To display thumbnails of the
uploaded images, add the following line (replacing "Image1" with the name of the
desired columns) to your link.html, detailed.html, or pictureframe.html (click
here for details on this new template) templates, depending on which pages you
want to display thumbnails on. You will have to add the line once for each
column, inserting the column name for each:
<img src="<%Image1_thumbnail_path%>">
You can do the same with medium, large and largest sized versions of images, simply by replacing "thumbnail" in the above tag with "medium", "large" or "largest".
To create a link to
the slideshow, allowing users to view images in their full size, enter the
following (replacing Image1" with the name of the image column you want the
slideshow to begin with):
<a href="<%db_cgi_url%>/showpicture.cgi?ID=<%ID%>&v=Image1">text of link</a>
You
may wish alter this code in case the column called in the above string does not
contain any data. The following code will create a link that will open the
slideshow, search the image columns and display the first image found.
<%if first_img_col%>
<a href="<%db_cgi_url%>/showpicture.cgi?ID=<%ID%>&v=<%first_img_col%>">text of link</a>
<%endif%>
If, for example, no file was found in the Image1 column,
but a file was contained in the Image2 column, the slideshow would automatically
display the file in the Image2 column first.
Tags can be used in your templates to display the dimensions of any size of an image. Use the following format, replacing "Image" with the desired column name:
<%Image_medium_height%>, <%Image_medium_width%>, <%Image_height%>, <%Image_width%>
You can of course call dimensions of thumbnail, large, or largest size versions by replacing "medium" with the desired size in the tags above. These tags can be useful in proving height and width information to reserve space for images when pages are displayed:
<img src="<%Image_medium_path%>" height="<%Image_medium_height%>" width="<%Image_medium_width%>">
Installing SlideShow
automatically generates a new template called slideshow.html that builds the
slideshow page in which users can browse through uploaded images. By modifying
this template, you can alter the way in which users view
images.