Guide to SPGM If you are satisfied with SPGM and want to make a little contribution as an encouragement, you can
|
Simple Picture Gallery ManagerGuide to SPGM
A website that is able to run PHP scripts (PHP >= 4)... and a few pictures !
That is a pretty easy step. Just uncompress the SPGM distribution you have
just downloaded and upload the spgm directory to your website, using
your favorite FTP client.
SPGM can be run as a standalone webpage (as it is out of the box)
or as part of a template (CGI wrappers, CMS like PHPNuke...).
If displaying your pictures is just what you're looking for, don't change
anything, you've got the URL. You can edit the index.html file though, to change
your gallery title, update the HTML headers and so on... Important:
Galleries are merely directories which contain pictures and/or sub-galleries (sub-directories). They are to be put in the gal directory and may be captioned by inserting among their content a gal-desc.txt text file containing whatever you want (even PHP code). They can also be previewed using icons, pre-defined thumbnails, or even random thumbnails. Refer to the "Gallery icon type" section in spgm.conf (gal/ directory) to see how to proceed.
Pictures are .jpg / .png / .gif files which must be
associated to a thumbnail (use your favorite tool for thumbnail edition), and
possibly to a caption. _thb_Tux.jpg | This is a caption for Tux's thumbnail. Tux.jpg | This is a caption for Tux's picture.<br /> >Still descripting Tux.jpg, and now : >here is <a href="http://spgm.sourceforge.net">a link</a>. ... To hide a gallery and therefore make it available through direct URLs only, simply put an empty gal-hide.txt file in it.
Moreover, pictures and galleries can be sorted using several options (creation
date, filenames, explicit sort using simple text files)... Important:
Tips:
If you want to integrate SPGM into you website, follow these instructions. Let's say your want to call spgm from your main page, index.php and that SPGM is installed in a directory named spgm-xxx (those two reside at the same level). Considering that index.php handles the general layout of your website and puts many categories' content within it, as the following scheme: URL param | param value | pointed page -------------------------------------- id | about | information about the site id | bio | your biography id | gallery | your picture gallery ...then your URL looks like: http://yourname.free.fr/index.php?id=about To make SPGM work from within your website, you'll have to edit spgm.php with a text editor and update the following constants (located at the beginning of the file):
Now, just require("spgm-xxx/spgm.php") wherever you want in your code.
Each gallery can be applied a specific layout configuration
which is defined in a spgm.conf file. Here is the default configuration file which contains an exhaustive list of the properties you can set (check out the file itself for each property's role): <?php $spgm_cfg['conf']['newStatusDuration'] = 40; $spgm_cfg['conf']['thumbnailsPerPage'] = 10; $spgm_cfg['conf']['thumbnailsPerRow'] = 5; $spgm_cfg['conf']['galleryListingCols'] = 1; $spgm_cfg['conf']['galleryCaptionPos'] = BOTTOM; $spgm_cfg['conf']['subGalleryLevel'] = 0; $spgm_cfg['conf']['galleryOrientation'] = ORIENTATION_LEFTRIGHT; $spgm_cfg['conf']['gallerySortType'] = SORTTYPE_CREATION_DATE; $spgm_cfg['conf']['gallerySortOptions'] = SORT_DESCENDING; $spgm_cfg['conf']['pictureSortType'] = SORTTYPE_CREATION_DATE; $spgm_cfg['conf']['pictureSortOptions'] = SORT_DESCENDING; $spgm_cfg['conf']['pictureInfoedThumbnails'] = true; $spgm_cfg['conf']['captionedThumbnails'] = true; $spgm_cfg['conf']['pictureCaptionedThumbnails'] = true; $spgm_cfg['conf']['filenameWithThumbnails'] = true; $spgm_cfg['conf']['filenameWithPictures'] = true; $spgm_cfg['conf']['enableSlideshow'] = true; $spgm_cfg['conf']['popupPictures'] = true; $spgm_cfg['conf']['popupWidth'] = 800; $spgm_cfg['conf']['popupHeight'] = 600; $spgm_cfg['conf']['popupFitPicture'] = true; $spgm_cfg['conf']['filters'] = 't'; $spgm_cfg['conf']['zoomFactors'] = array(50, 100, 150); $spgm_cfg['conf']['galleryIconType'] = GALICON_RANDOM; $spgm_cfg['conf']['galleryIconHeight'] = 40; $spgm_cfg['conf']['galleryIconWidth'] = ORIGINAL_SIZE; $spgm_cfg['conf']['stickySpgm'] = true; $spgm_cfg['conf']['language'] = 'fr'; $spgm_cfg['conf']['theme'] = 'bvk'; ?>
SPGM does also make the use of flavors (a.k.a. themes) to make it match your
whises. It comes with a flavor which is set by default. To change it, just go
to the flavor page (http://spgm.sourceforge.net/?lg=us&id=themes) and download
the one you're interested in. Unzip the package and put the resulting directory
in the SPGM flavor directory (i.e. spgm-xxx/flavors).
Important:
How can I make my own flavor ?
The SPGM distribution includes a flavors directory where you can put your
flavors in.
<?php $spgm_cfg['theme']['gallerySmallIcon'] = 'folder.jpg'; $spgm_cfg['theme']['galleryBigIcon'] = 'folder.jpg'; $spgm_cfg['theme']['newItemIcon'] = 'new.jpg'; $spgm_cfg['theme']['previousPictureIcon'] = 'page_previous.jpg'; $spgm_cfg['theme']['nextPictureIcon'] = 'page_next.jpg'; $spgm_cfg['theme']['previousPageIcon'] = 'page_previous.jpg'; $spgm_cfg['theme']['previousPageIconNot'] = 'page_previous_not.jpg'; $spgm_cfg['theme']['nextPageIcon'] = 'page_next.jpg'; $spgm_cfg['theme']['nextPageIconNot'] = 'page_next_not.jpg'; $spgm_cfg['theme']['firstPageIcon'] = 'page_first.jpg'; $spgm_cfg['theme']['firstPageIconNot'] = 'page_first_not.jpg'; $spgm_cfg['theme']['lastPageIcon'] = 'page_last.jpg'; $spgm_cfg['theme']['lastPageIconNot'] = 'page_last_not.jpg'; ?> Above is an exhaustive list of the variables you can set. Note that you are not required to set all of these. Omitting variables identifying icons will only result in a textual representation of what they are supposed to display, whereas omitting the stylesheet only makes your gallery graphically deprived. Important:
|
|||
* SPGM is maintained by Sylvain Pajot * www.pajot.org Current page last modified on Wed, 26 Jan 2022 5:01:32 pm +0000 |