Updated PlusGallery.js to accommodate other sources
Specifically, plusgallery may now accommodated data from a local database or other sources through the use of two additional attributes.
To utilize this new feature, add the following html5 data attributes:
data-type="local"
data-image-data="json-formatted-string"
NB. json-formatted-string is a json object in the following format
{
albums: [ //array of albums
{ //album object
title:"Album Title",
images:[ //array of images in gallery
{ //image object
src:"", //URL of large image
th:"", // URL of image thumbnail
caption:"" // caption of images
}
]
}
]
}
Quick Tip
To obtain json-formatted-string from JSON object, you may write in javascript
JSON.stringify(obj)
Issues
When inserting characters such as the apostrophe (") or single quotation mark ('), please ensure to use html encoded values or alternatives as these may break your html page and will result in the gallery not showing (although no errors will be shown in your console).
Additional Changes
Removed wait for all images to load before being able to see album
images. This was quite a bit slow and was already accommodated by a
loading image over image tiles.
Updated PlusGallery.js to accommodate other sources
Specifically, plusgallery may now accommodated data from a local database or other sources through the use of two additional attributes.
To utilize this new feature, add the following html5 data attributes:
NB. json-formatted-string is a json object in the following format
Quick Tip
To obtain json-formatted-string from JSON object, you may write in javascript
Issues
When inserting characters such as the apostrophe (") or single quotation mark ('), please ensure to use html encoded values or alternatives as these may break your html page and will result in the gallery not showing (although no errors will be shown in your console).
Additional Changes