Usage
You can use this script with images from a directory or with images from a MySQL database. Just insert the
IMG-tags with thumbsup.php and the required arguments where you want your thumbnails to appear (see
examples below).
Images from a directory
Required arguments: image = path to image
Optional arguments: width = max. thumbnail width, height = max. thumbnail height, cache_dir = path to cache
Examples:
<img src="thumbsup.php?image=images/example.jpg&width=200&height=250">
<img src="thumbsup.php?image=images/example.jpg&width=200&height=250&cache_dir=images/cache">
Images from a MySQL database
Required arguments: database = database name, table = table name, field = field name,
key = key name, id = record ID
Optional arguments: width = max. thumbnail width, height = max. thumbnail height, cache_dir = path to cache
Examples:
<img src="thumbsup.php?database=mydb&table=mytable&field=image&key=ID&id=123&width=200&height=250">
<img src="thumbsup.php?table=mydb.mytable&field=image&key=ID&id=123&width=200&height=250">
Please note: cache_dir must be readable + writable by PHP!
Comments
|