coding...and other random stuff.

The home of Bingo Caller and other quality low cost/free software!

Home
Bingo Caller
AnteUp!
Screen Shots
PHP Scripts
Support
Forum
Links
 
Donate
 
Mailing List
 

Support

If you're having problems with my programs, please post a message on the Support Forums. Otherwise, please feel free to email me:
codesupport@1-fix.com

Installation and use of phpSimpleGallery

To install, unzip the downloaded zip file and copy the files gallery.php and gallery.tpt to your webserver, in a directory that can run PHP scripts.

Edit gallery.php in a text editor and change the information to suit your configuration:

$config['template']

- Set this to the name/path to your template file (default: gallery.tpt)

$config['templateImage']

- Set this to the name/path to your Image Display template file, if using internalDisplay. (default: galleryImage.tpt)

$config['size']

- This figure chooses the size you want your thumbnails to be, in pixels (default: 150)

$config['universal']

- This option chooses whether to make universal sized thumbnails (150x150, etc) or if set to false will set the width or height (depending on which is larger) to be the size specified in $config['size']. Options - true or false (default: true)

$config['borderR']

- The Red colour of the image border used when making universal thumbnails. Values: 0 - 255 (default: 255)

$config['borderG']

- The Green colour of the image border used when making universal thumbnails. Values: 0 - 255 (default: 255)

$config['borderB']

- The Blue colour of the image border used when making universal thumbnails. Values: 0 - 255 (default: 255)

$config['columnsize']

- The width you want the columns of images to be, in pixels. Default: the same as $config['size']

$config['albums']

- Currently unused

$config['imagequality']

- The level of quality/compression used in the JPG algorithm for making the thumbnails. Values: 1 - 100 (Default: 70)

$config['rows']

- The number of image rows to show per page (Default: 3)

$config['cols']

- The number of image columns to show per page (Default: 3)

$config['maxShow']

- The number maximum number of page numbers to display. For instance if you have 100 pages of images, you can set this to only show the page numbers of the 10 pages close to where you currently are. (Default: 10)

$config['fileName']

- Display the name of the file under the thumbnail? (True/False - default: false)

$config['internalDisplay']

- If true then display the selected image 'inline' within the program (and use template), otherwise make it pop up in a new window. (default: true)

$config['sortOrder']

- Default sort order for the images. (Options: 'nameASC','nameDESC','oldFIRST','newFIRST'. Default: newFirst)

$config['fulls']

- The path to the directory that contains your images, including trailing slash (Default: Images/)

$config['thumbs']

- The name of the subfolder under $config['fulls'] where the thumbnails will be created. This should be writable by the web server. (Default: $config['fulls']."Thumbs")

$config['deleteThumbs']

- Automatically clear down orphaned thumbnails? (Thumbnails without a master image). Options: 0,1,2 (0 - Never, 1 - Yes, on the 1st day of the month, 2 - Yes, every time the page is loaded.) (Default: 2 - performance concious users may wish to use 1 here.)

$config['imagemethod']

- Whether to use GD2 or ImageMagick to create the thumbails. Options: gd2, imagemagick (Default: gd2)

$config['convert']

- Path to ImageMagick Convert program (Default: /usr/bin/convert)

$config['identify']

- Path to ImageMagick Identify program . (Default: /usr/bin/identify)

Templates in phpSimpleGallery

The template system is a series of html comment tags that are replaced by the phpSimpleGallery script at run-time.
These tags can be inserted as many times as you like to enable multiple forward/previous buttons, or image tables, etc.
Note: They do not have to be used at all - if you don't want a list of pages, just don't add the tag.

The tags for gallery.tpt are:

<!--Columns//-->

- This is the number of columns that are being used in the image table. It is used for the 'colspan' values of table columns in the default template.

<!--Position//-->

- This is the current position that we are at in the images - i.e: 1 - 10, or 15 - 18.

<!--Max//-->

- This is the total number of images in the gallery.

<!--ImageTable//-->

- This is the main table of images that is generated by the script. To change the look/feel of this, edit gallery.php.

<!--AlbumList//-->

- This is the list of sub albums you have in your gallery - including the html links to them.

<!--TotalPages//-->

- This is the number of pages of images in the gallery.

<!--LinkPrev//-->

- This is the link to the previous page of images in the gallery.

<!--FirstDivide//-->

- This is a divider that appears between the previous page link and the list of pages. Used in the default template.

<!--Pages//-->

- This is a list of pages, with links, up to the maximum number specified in the gallery.php config.

<!--LastDivide//-->

- This is a divider that appears between the list of pages and the next page link. Used in the default template.

<!--LinkNext//-->

- This is the link to the next page of images in the gallery.

<!--ImgPerPage//-->

- This is the dropdown selection box for the number of images you want per page.

<!--SortOrder//-->

- This is the dropdown selection box for the sort order of the images.

<!--VersionFooter//-->

- This displays the script name/version and a link back to this site. I'd appreciate you adding this tag to your templates.


The tags for galleryImage.tpt are:

<!--Filename//-->

- This is the name of the file - i.e: image01.jpg.

<!--Image//-->

- This is the image itself, including the IMG SRC tag. Add this where you want the image to appear.

<!--Description//-->

- This is the description, if available, of the image.

<!--Modified//-->

- This is the date the image was last updated.

<!--LinkBack//-->

- This is the a link back to the image gallery. Includes the A HREF tag.

<!--VersionFooter//-->

- This displays the script name/version and a link back to this site. I'd appreciate you adding this tag to your templates.

© Craig Atkins - 2004