SPGallery Documentation

Thank you for using SPGallery. SPGallery provides you the ability to add your own ShutterPoint photos easily on your own personal website. By adding SPGallery to your site, your photos will likely be ranked higher on search machines. Example: SPGallery automatically puts the keywords you assigned to the photos (on ShutterPoint) as so called "alternative text" for your photos. Another nice example is that ShutterPoint automatically adds your affiliate ID to all the URLs... so if someone signs up using your link, you might get some extra revenue!

SPGallery is based on the tutorial found here: How to make your own personal ShutterPoint gallery. But instead of some loose snippets, SPGallery provides a framework for displaying images. SPGallery uses a PHP templating system called 'SMARTY'. This allows you to easily change the output, without much programming effort.

Although this documentation should help you quite, and questions aren't much of a problem, I have to warn you that there is some self learning involved with SPGallery. If you aren't into Stylesheets(css)/HTML/PHP/FTP for a single bit, SPGallery might not be suitable for you. A small bit of web experience is required!

Requirements

Before getting started, SPGallery has the following minimum requirements:

IFRAME vs PHP

SPGallery offers you two methods for displaying photos on your site. Using so called "IFRAMES" (which are HTML elements containing a whole different page/url) and the "PHP" method. The PHP method simply "includes" the output of SPGallery in the content of your site. It all happens on the server.

IFRAME:

Pro's Con's

PHP

Pro's Con's

Using SPGallery

Using SPGallery is fairly easy:

Configuration

Nearly all configuration of SPGallery is done in the "gallery.config.php" file. Since this file is heavily commented, I will not explain much of it. Please open the file to read about it!

It is possible to override some of the configuration properties directly in the request of the photogallery. For example:

gallery/index.php?template=moviestrip&photosperrow=4
- Would override the default template and the number of photos per row.

gallery/index.php?price=0&rating=0
- Would use the default template, but hide the price and rating values.


List of overridable parameters, not all parameters are used by all templates.

Name Value Description
rating 0 or 1 Displays rating when enabled
price 0 or 1 Displays price when enabled
size 0 or 1 Displays size when enabled
views 0 or 1 Displays number of views when enabled
buttonnext 0 or 1 Displays 'next' button when enabled
buttonprevious 0 or 1 Displays 'previous' button when enabled
sorting custom - Custom (sorting can be defined here: http://www.shutterpoint.com/Account-PhotoSort.cfm)
popularity - Popularity (views)
rating - Rating
newtoold - Submitted: New to old
oldtonew - Submitted: Old to new
Controls sorting order. Default is 'newtoold'
photosperpage A number. Controls the number of photos per page
photosperrow A number. Controls the number of photos per row
template Valid template file Controls which template is displayed. Should be a valid path!

Examples

SPGallery comes with quite some examples. These files can be found in the root directory of the package.
Note that most of these files cannot be opened directly (as a file in your browser) but have to go through a webserver.
I suggest you edit the account name in the config file, and simply upload everything to your webhosting account.

Tip: Click on the links below, it will take you to an online preview!

Filename Description
example - gallery (iframe).htm Shows a complete gallery using the iframe method.
example - moviestrip (iframe).htm Shows a 'moviestrip' of a number of photos
example - random photo (iframe).htm Shows a single random photo for on your site.
index.php?template=albumpulldowniframe Uses the ShutterPoint IFRAME, but allows you to choose which album is displayed by a pulldown.
index.php?template=showalbumlist Displays a styled list of albums, and takes you to the ShutterPoint site, with the correct album opened. Just a simple demo.
index.php?template=randombigimage Shows you a random image - this time the large version instead of the thumbnail.
example - simple php example.php This example just ouputs the raw data from ShutterPoint, as an array. Ready for your own PHP adventure!

SMARTY / Templates are me too much...

If you do not want to use a templating system like SMARTY (Although I do not see why... it's just as good as chocolate cake!),
You can easily strip SPGallery down. Basically you only need: All the files in the inc directory, and the index.php. Theoretically, removing the SMARTY include at the top of the PHP file, and the SMARTY assign functions should be enough to run standalone.

License

You could simply do whatever you want with SPGallery, except for: If you make modifications, or new templates... please be kind enough to share them. I'm sure SPGallery an be extended quite a lot!

It would be really nice if you gave me a small donation by PayPal (paypal@persistentrealities.com), or simply bought a photo from my ShutterPoint account :-).

Or as an alternative, you could extend my ShutterPoint account, or get me some more space :). It would be highly appreciated!

Disclaimer

Although theoretically (and even practically) nothing wrong could happen, you are using SPGallery on your own risk(!).

Contact

You can contact the author, Almar at:

E-mail: spgallery@persistentrealities.com
Website: www.persistentrealities.com

Take a look at my ShutterPoint profile as well.