Please check the new version: nanoPhotosProvider2
Publish your self-hosted photos simply and automatically to nanoGALLERY.
Content is provided on demand when browsing the albums of the gallery.
Generates thumbnails automatically.
To be used as an add-on for nanoGALLERY (http://nanogallery.brisbois.fr).
On your webserver:
- create a folder named
nanoPhotosProvider
where you want to store your photos - in this folder:
- copy the files:
nanoPhotosProvider.php
,nanoPhotosProvider.class.php
,nanoPhotosProvider.cfg
andnanoPhotosProvider.Encoding.php
- create a folder named
nanoPhotosContent
- copy your photos here
- you can organize your photos in folders (= albums)
- in the filenames, you can separate title and description with
$$
- add leading
@@@@@
to the filename of the images to be used as album covers
- edit the
nanoPhotosProvider.cfg
file for custom settings
- copy the files:
- The page can be located anywhere on your webserver.
- Install nanoGALLERY for jQuery (see http://nanogallery.brisbois.fr)
- Configure the call to the plugin:
- Use the specific parameters:
kind
andjsonProvider
kind
: set value to'json'
jsonProvider
: URL to thenanoPhotosProvider.php
file installed in step 1
- Use the specific parameters:
Example:
jQuery(document).ready(function () {
jQuery("#nanoGallery1").nanoGallery({
thumbnailWidth: 150,
thumbnailHeight: 150,
kind: 'json',
jsonProvider: 'http://mywebsever.com/mypath/nanoPhotosProvider/nanoPhotosProvider.php',
locationHash: false
});
});
Add files and folders, or renaname them.
Please note that the generated thumbnails are never purged, so you may delete the _thumbnails
folders to force a new generation.
Custom settings are defined in nanoPhotosProvider.cfg
Section | Option | default value | Description |
---|---|---|---|
config | fileExtensions | "jpg|jpeg|png|gif" | Supported file extensions |
contentFolder | "/nanoPhotosContent" | Folder where albums and images are stored | |
sortOrder | "asc" | Filename sort ordr | |
titleDescSeparator | "$$" | Separator between title and description in the name of the file | |
albumBlackListDetector | "!!!!!" | Ignore albums (folders) containing this sequence in their name | |
imageBlackListDetector | "_hidden" | Ignore images containing this sequence in their name | |
albumCoverDetector | "@@@@@" | Leading sequence in the filename of the image to be used as an album cover | |
thumbnailSizes | _thumbnails folders |
||
width | 150 | Thumbnail width in pixels (note: the value must match the value of thumbnailWidth in your nanoGALLERY) |
|
height | 150 | Thumbnail height in pixels (note: the value must match the value of thumbnailHeight in your nanoGALLERY) |
|
crop | false | Crop images to avoid black borders |
### ⚪ Supported image formats JPEG, GIF and PNG.
- The nanoGALLERY option
locationHash
should not be enabled if albums have more than 2 levels. - multiple thumbnail resolutions are not supported.
http://nanophotosprovider.herokuapp.com/demonstration/heroku.html
nanoPhotosProvider is licensed under CC BY-NC 3.0.
Only for personal, non-profit organizations, or open source projects (without any kind of fee), you may use nanoPhotosProvider for free.
- nanoGALLERY (http://nanogallery.brisbois.fr)
- Webserver
- PHP >= v5.2 with GD-Library