/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ * singapore - Copyright 2003 Tamlyn Rhodes <tam@zenology.org> * * * * singapore is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published * * by the Free Software Foundation; either version 2 of the License, * * or (at your option) any later version. * * * * singapore 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 General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this; if not, write to the Free Software Foundation, * * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
You are kindly requested to display a link such as the following on all pages generated by singapore:
Powered by singapore v0.9.8
Few extra features in this release: URLs are automatically made clickable in 'description' field; galleries starting with dot (.) are hidden from listing view but can still be accessed if given the exact URL; enabled the navigation buttons in Mozilla/Opera/etc. A few bug fixes including PHP 5 compliance. Updated documentation.
test.php to see if your server is capable of running
singapore.data/ and all subdirectories and filesgalleries/ and all subdirectories and filessetup.php to create the necessary directories.setup.php to prevent any unauthorised users from
uninstalling singapore.admin and the default password is password.galleries/ directory
More info.Optional but recommended:
singapore.ini and look at the
available options. Each option has comments explaining its function. For most
purposes the default values will be fine but you may be able to tweak them
to your benefit. See also overriding default
settings.thumbnail_software
option in singapore.ini.templates/default/images/header.gif)
with the name of your site.templates/default/main.css)
to integrate it with your site.Always back-up first!
Upgrading is usually just a matter of unzipping the new version over the old. Your galleries, images, metadata, logs and cache will not be affected but the admin password will be reset and the root ini file (singapore.ini) will be overwritten. Unless otherwise stated you can keep your old adminusers.csv file. When new configuration options are added you will need to either add these to your old singapore.ini or re-edit the new singapore.ini in order to keep your personal settings. You may want to use WinMerge to merge the differences.
The default templates will also be overwritten in an upgrade. For this reason it is advisable to start a new template (in a separate directory) when making customisations.
Server generated content will be owned by the web server and it may therefore not be possible to delete these files via ftp. You can use the setdown function provided to remove the cache and logs. Use the admin interface to remove server generated galleries and images. Please run this script before removing any other files.
If using the info in file name system then all management can be done
directly on the files using, for example, an ftp client. To create new galleries
simply create a new subdirectory of galleries/. To add, move or delete
images in a gallery simply add, move or delete the image files in the
appropriate directory.
If you use the admin mode to edit your galleries or images it will automatically create the relevant metadata files. If these files are deleted singapore will revert to using info in file name.
Galleries may contain either images or further subgalleries. This means that if you create one or more subgalleries in a gallery that already contains images, these images will be 'hidden'. Removing these subgalleries will make the images visible again.
There is currently no support for bulk image upload via the admin interface. You are recommended to use FTP to upload your images and then use the admin mode to add image information and for occasional additions and deletions.
If singapore doesn't find a metadata file in a gallery it will try to extract some sensible information from the image file and directory names as follows:
Underscores (_) are converted to spaces and the file extension is discarded
by removing all characters after the last . (dot) in the filename. If a filename or
directory name contains the sequence '_-_' (underscore hyphen underscore)
or ' - ' (space hyphen space) then the name will be split on this
separator. The first half will be interpreted as the artist name and the second
half will be interpreted as the gallery or image name depending on context. If
a separator is not found then the file or directory name is interpreted as the
image or gallery name, respectively.
For example Holiday_Snaps/Bob_Fenderson_-_Pretty_picture_of_Sunset.jpg
will be translated into an image called "Pretty picture of Sunset" by "Bob
Fenderson" in a gallery called "Holiday Snaps".
How to make a file writable is dependent on your operating system and web server setup and can seem quite daunting for a beginner. One option that will work on nearly all Unix/Linux servers is to chmod the relevant files/directories to 777 (consult your FTP software documentation for help on using the chmod command). However this option is not considered very secure as anyone who has write access the web server (such as the owners of other web sites hosted on the same computer) can potentially write to or delete these directories. There may be a better way to make your files writable by your server but this is something you must take up with your server administrator.
One thing you can do to moderately increase security is: once you have changed your singapore admin password, chmod the adminusers.csv file back to 755.
All configuration options may be overridden on a per-gallery and/or per-template basis. This means that a particular gallery may use, for example, a different template or language to the rest of the site. Also, templates may introduce their own configuration settings if they so wish.
Gallery config options are stored in files named gallery.ini in
the chosen gallery directory. Settings are not inherited by subgalleries; they
affect only the current gallery and its images.
Template config options are stored in files named template.ini
in the chosen template directory. Some of these settings are not present in the
default config file; they are only found in the template config file.
Settings are loaded in this order: default settings (singapore.ini)
> gallery settings (gallery.ini) > template settings
(template.ini). This may be changed in the future to allow gallery
settings to override template settings.
Note that there is no restriction on which options may be overridden.
Overriding some settings may lead to unpredictable operation (e.g. changing
pathto_galleries in gallery.ini).
Any gallery (except the root gallery) may be hidden from the listing view
by prefixing the directory name with a dot (.). However it is still
accessible by using its exact URL. For example consider the following directory
structure:
galleries/ |- my_pretty_pictures/ | |- trees/ | `- flowers/ |- .a_hidden_gallery/ | |- some_embarrassing_pictures/ | `- .this_is_also_hidden/ `- some_other_things/
A user browsing the root gallery (e.g. www.some-site.com/?gallery=.)
will see my_pretty_pictures and some_other_things;
.a_hidden_gallery and all its contents will be hidden from view. If,
however, the user is supplied with the exact URL (e.g. www.some-site.com/?gallery=./.a_hidden_gallery)
they will be able to see the contents as usual (in this case only
some_embarrassing_pictures because .this_is_also_hidden
is hidden as above).
Since a user could guess the exact URL or discover it by some other means, this feature is not to be used for concealing sensitive information.
Key to symbols:
+ added
- removed
* fixed
o changed
+ automatic recognition of most URLs in 'description' field
+ do not process directories starting with dot (.)
+ enabled navigation bar in supporting browsers (e.g. mozilla, opera)
o made 'artist - name' iifn parsing optional
* fixed bizarre sort order in admin mode
* use htmlspecialchars instead of htmlentities
* fixed using special chars in filenames when magic_quotes_gpc is on (again)
* fixed code that produced 'Notice' level errors with PHP 5
+ added forced image resizing to fixed size
+ added rudimentary image and gallery sort ordering
* fixed multi-page galleries listings
* fixed zero-width thumbnails for failed uploads
+ added a few functions useful for templates
+ added .jpe extension
o changed details array format
+ added basePath parameter to allow removed instantiation of singapore class
o fixed some untranslated strings in admin mode
* maybe fixed using special chars in filenames when magic_quotes_gpc is on
+ added back-reference check to prevent file-system walking
o merged __g functionality into _g and _ng
o code entirely reorganised and largely re-written into classes
+ multilanguage (i18n) support
o interface is template driven
+ per-gallery and per-template configuration files
+ nested gallery support (unlimited depth)
+ crumb line for easier navigation
* all image and gallery names are now urlencoded
+ many new config options
* fixed GD2 support in thumb.php (0.9.4a always used GD1)
- removed secret string option
+ added config options for admin session name (allows multiple installs on same server),
path to convert (ImageMagick), remove jpeg profile (ImageMagick),
character encoding & site name (page title)
o execution_timer off by default and default galleries per page set to 10
+ thumb.php always uses fopen on remote files (now works on windows)
+ more checks in test.php including ImageMagick support and bugfix #743954 (upload_tmp_dir)
+ added PNG and GIF support under GD (GIF only with compatible versions of GD)
+ added PNG, GIF, TIFF, BMP, and support from pretty much every
other file type under ImageMagick
+ more checks in test.php
* fixed image counting in iifn mode
* fixed show_image_name_in_thumbnail_view
+ images link back to correct page of gallery (second link)
o changed config to ini file + global config object
o changed directory structure (moved documentation into docs/, moved writable files into data/)
+ gallery (thumbnail) view shows more information
+ gallery (thumbnail) view can show image name under thumbnail (off by default)
+ gallery (list) view shows number of images in gallery
+ implemented random thumbnail image in gallery (list) view
+ added test.php and setup.php (not very useful yet)
* fixed handling of gallery_thumb_number config option
* password change bug
* remote file thumbnail generation with ImageMagick
+ web admin can add and delete images and galleries
+ added GD 2 and ImageMagic thumbnail generation support
* does not generate any E_NOTICE errors anymore
+ added config option for generated thumbnail JPEG quality
* handles extended characters in gallery and image names (Piotr)
* fixed 'images link back to correct page of gallery'
+ added directory_mode and file_mode options
* track_views and show_views now work independently
o admin bar now visible everywhere when logged in
* fixed non-expiration of admin sessions in some cases
+ added purge cached thumbnails option
+ new 'XP' theme
* fixed hit logging functions
+ added image hit log viewing in admin mode
+ images link back to correct page of gallery
o optimised config.php
* fixed some css issues
o changed database format
+ added visible database fields for artist email, darkroom manipulation and
digital manipulation
+ added invisible (control) database fields for thumbnail, owner, groups and categories
o put header and footer code into separate files
+ implemented limited themeing support
+ added config options for custom paths to cache, galleries, logs, themes,
header, footer and custom css
o improved navigation in admin mode
+ added optional script execution timer
* fixed proliferation of newlines in 'desc' field
* fixed wrongly escaped characters when saving info
+ added much better documentation
+ admin section (allows editing image and gallery info)
+ nicer gallery list layout
+ filename parser for if no metadata file found
o split into separate include files for io operations, ui generation etc
* fixed some css issues
+ lots of other little things
o first release under GPL
+ everything
$Date: 2004/01/06 23:01:48 $