![]() | Welcome to Islandnet.com Locally owned and operated since 1993 |
| Create an Account • Pricing & Features • Domain Registration • Customer Sites • Help & Info | |
Sunday February 12 2012 | |
Web Gadget: inThumbinThumb is a gadget that displays a small "thumbnail" version of an image. It automatically resizes the image to the size you request, and optionally applies a border, outline, underlays, and overlays.
Current Version2012-01-20 16:38:56 NEWNote that you can check the version of a web gadget by loading it directly in your browser with the "version" keyword. For example, loading "inthumb.php?version" will display the current version and tell you if there is a newer version available.
InstallationTo install this web gadget, place a copy of inthumb.php in your web space. You can change the name to anything you'd like, as long as it ends with ".php". Note that this is an encoded and encrypted PHP file. It will look like gibberish to you, but the web server will know what to do with it. If you make any changes to this file it will cease to function, so be careful to upload it to your site in BINARY mode.
ConfigurationWhen this web gadget runs it will expect to find a configuration file to load settings from. The filename depends on the name that you gave to the web gadget itself. If you named it "inthumb.php" then the configuration file must be named "inthumb_config.php" (that's an underscore in the middle). If you named it "tn.php" then the configuration file must be named "tn_config.php", and so on.The configuration file is a PHP script that contains a list of values in the "CONFIG" array. It will look something like this (but normally with many more settings):
Configuration Settings
Usage:For the following examples, we'll use "beach.jpg" as our image:
If we wanted to display a thumbnail version of this image that is no bigger than 100 pixels in width or height, we would invoke the thumbnail gadget like this:
<img src="inthumb.php?image=beach.jpg&size=100"> We could add a thin black line around it like this:
<img src="inthumb.php?image=beach.jpg&size=100&border=1"> Or a slightly thicker line in red:
<img src="inthumb.php?image=beach.jpg&size=100&border=4&bordercolor=FF0000">
Example:To view the configuration file used in this example, click here.
|