Home | Description | Usage | Design | FAQ | Demo


Why does Slooze not automatically create thumbnails?

Now it does! You need to have PHP configured with a recent version of the GD library that supports JPEG images. See the Automatic Thumbnail Creation section of the Usage document for details.

For another way to create thumbnails, you may want to see an example script that generates resized images on-the-fly.

How can I easily create thumbnails offline?

The de facto standard toolset for batch manipulation of images, including resizing and sharpening needed for making thumbnails, is ImageMagick

If you have the ImageMagick tools installed then the following scripts can be used to create consistently-sized pictures and thumbnails from all the files in a directory. Change the sizes, borders, etc., to suit your needs.

Windows example using convert:

mkdir resized
for %%I in (*.jpg) do convert.exe -geometry 480 -border 1 %%I resized\%%~nI.jpg
for %%I in (*.jpg) do convert.exe -geometry 192 -border 1 %%I resized\%%~nI-t.jpg
This will work with any source image format that ImageMagick supports; change *.jpg to *.tif or whatever is appropriate. You will also need to change convert.exe to "c:\Program Files\ImageMagick\convert.exe" (or similar, including the quotes) if the ImageMagick tools are not on your path.

Linux (bash shell) example using mogrify, contributed by Joop Verdoorn:

#! /bin/bash
mkdir resized
cp *.jpg ./resized/
cd resized
# Resize photos
mogrify -resize 30% *.jpg
# Create thumbnail files
for i in *.jpg; do cp "$i" "${i/.jpg}"-t.jpg; done
# Resize thumbmails
mogrify -resize 14% *-t.jpg
Again, the ImageMagick tools need to be on your path, or you need to specify the path to them explicitly.

What if my web server does not support .php extensions, but requires PHP files to be named .php3 or similar?

Change the names of the photos.php and admin.php files in the example (or the names of whatever pages you choose to create). All the other Slooze files are included via require statements. Files included like this can have any name. There is no need to change them.

How can I allow HTML in comments?

HTML tags (and lots of other things) are deliberately stripped from all submitted variables. Getting rid of HTML is primarily to avoid user comments being spammed by people who would embed tags to make their comment 72 point bold flashing red, or worse, embed <img> tags for banners etc.

If you want to allow all HTML you can just comment out the line that says $var = strip_tags($var) in the function validateInput() in slooze.php. If you just want to allow some HTML tags but not others (e.g. allow simple formatting but not images) you could add the second optional parameter to strip_tags(), like: $var = strip_tags($var, "<b>,<i>,<a>"). You need PHP version 3.0.13 or later for the strip_tags() function to allow the optional second parameter.

Do roll names and picture filenames have to be lowercase?

No. They used to in 0.2.1 and prior. In 0.2.2 this restriction was removed. Mixed case roll names (directories) and picture filenames are now allowed. If you want to re-enable the automatic casting of all filenames to lowercase you can set allPathsLower to TRUE in slooze_local.php.

I created a topic with TopicID "My cat's vacation" and now I am having problems

Don't do that. The TopicID is a short, unique identifier for the topic. It is used internally to identify the topic. It is never shown to ordinary users so there is no need for it to be long or pretty. It forms part of the URL when you view a topic, so if you choose a long TopicID you will have long, ugly URLs, like photos.php?TopicID=My%20cat%27s%20vacation.

Choose a short TopicID like "CatVacn".

During testing I created then deleted some Topics / Rolls / Pictures / Comments. It was working fine but now I am getting errors. I am using CSV (text file) data storage.

In 0.2.2 and prior, if you delete all the data of any particular type the text file ends up empty; even the field names are gone. To recover from this problem re-upload the blank text files that come with the Slooze distribution. These contain no data but do contain the field names.

Why Slooze?

I needed a meaningless but catchy name. I wanted to avoid the phpFoo cliché. And I happened to own the domain which was not being used for anything in particular.

Powered by PHP Powered by PHPLib Licensed under the GNU GPL SourceForge Logo