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:
- A Webserver supporting PHP4 (or higher)
- 1.5MB of free space on your webhosting account
-
- The ability to open remote connections using PHP (normally not much of a problem, maybe on free hosts)
- The ability to set write permissions on one directory (see below)
- Note: SPGallery uses sessions to cache the data from ShutterPoint. This is a standard feature of PHP.
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
- As simple as placing a HTML element.
Con's
- Fixed size, they will not autoresize based on content.
- Might nto be visible in all browsers
- Less practical to integrate in your site (styling needs to be done in the external requested page)
PHP
Pro's
- Photos really become a part of your site
- Therefore, much better to style
- Preferable method
Con's
- Small bit of programming required
Using SPGallery
Using SPGallery is fairly easy:
- First upload the "gallery" directory to your webspace, preferably by using a FTP program (like Filezilla, which is free).
- After uploading the files you will have to give write permissions to the 'templates_c' directory. If your website host is running a Windows webserver, you might not need to do this. If you do get an error, the only method is (by experience) to mail your provider and ask them if they want to be so kind to give write permissions.
When your site runs on a Linux server (more likely with PHP), you can use the option "chmod" in your favorite FTP program. Probably you can do this by right clicking on the remote folder. Or if you have access to a shell (telnet, ssh) you can do it from the commandline using "chmod 777 templates_c" when you are in the gallery directory, of course.
- The above was the difficult part. Open up 'gallery.config.php' in your favorite text editor (notepad will do). This file can be found in the gallery/inc directory. If your editor supports online editting you could also edit this file directly online. The most important variable to change is: $shutterpoint_account. you will have to change this to your own account name, otherwise it will show my photos :-). Keep the name between the '' though!
- If you open one of the examples, you should see a working example showing your own photos.
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!
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:
- Reselling it again, be fair.
- Removing the (in the website invisible) copyright line put in the HTML source
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.