kence.org/projects/pictures

 

Picture Album

After becoming annoyed with not having an easy way to create an online picture album-ish thing I decided just to create my own. Several other people on the kence.org system expressed interest in using it as well and I fudged it into a general-case script. At least one other person has borrowed the script and customized it for his system.

This page discusses how to use the pictures script after it has been configured for your account on the kence.org system.

Uploading & Organizing Pictures

The kence.org system only supports secured file transfer. Because of this you'll need to use an SSH/SCP/SFTP program to upload files. For Windows users I recommend WinSCP, for Mac users I'm told that Fugu is a good tool to use although I've never used it myself.

When using an SSH/SCP/SFTP program, use the following connection options:

  • Server: www.kence.org
  • Protocol: SSH 2
  • Username: kence.org username
  • Password: kence.org password

After connecting to the system, browse to the directory where the pictures script is installed (typically there will be a pictures directory under your home directory). This is the base of your picture alubm. From here you can create subdirectories and upload pictures at any level. When creating subdirectories you must change the group owner of the directory as well as the directory permissions. When you create a directory with the tool, it will be created for your default group (usually your group is the same as your username). The pictures script needs permission to create files under this directory. To do this, change the group owner to www and change the group permission bits to group write. Without this step the script will be unable to create thumbnail or preview images.

Descriptions & Names

You can also add names and descriptions to your pictures as well. To add descriptions, create a file called descriptions in the directory that contains the pictures. In this file, add a line for each picture that looks like the following:
IMAGE_FILE_NAME.JPG=This is the description of the IMAGE_FILE_NAME picture.
Note that the filename is case-sensitive and must match then name of your image exactly.

A sample description file might look like this:

MyHouse.jpg=A picture of my house.
YourHouse.jpg=A picture of your house...
WhiteHouse.jpg=and we can't forget the Whitehouse!

Adding names works very similar to the descriptions. Create a file called names in the directory that contains the pictures. The format of the names file is exactly the same as the descriptinos file.

Customizing Look and Feel

The picture script uses Cascading Style Sheets (CSS) to control how things are displayed. You can customize the CSS file to match the existing layout of your site. A sample CSS should have been included with your starter picture album (usually called pictures.css). If not, here is a sample CSS to get you going.

p.location         { font-weight: bold }
p.description      { font-style: italic }
p.directoryheading { font-weight: bold; font-size: 1.5em }
p.directories      { margin-left: 2em }
p.imageerror       { color: red }
table.thumbnails   { }
td.thumbnail       { text-align: center; background: #CCC; padding: 1em }
td.title           { text-align: center; font-weight: bold }
img.preview        { }
img.thumbnail      { border: 0 }