Admin login:

KSSWF | gallery


Gallery(string folder, string title (optional), string order (optional), bool cache_all (optional), string OR int release_frequency (optional), string release_folder (optional), int release_amount (optional));

function gallery gets all files in folder and makes a gallery of them for you. Also returns a number to tell you how many items it found (this does not need to be used) -- only works (since update v0.4.00a) when the cache_all is not used, or false.

string folder is the key parameter. It references to "./img/"+folder and the function shows its contents as an image gallery.

string title (optional) is the title of your gallery.

string order (optional) expects "abc", "cba", or "random". Anything else will be considered "abc", as default.

bool cache_all (optional) is a boolean value, default: false; If you don't need to count your items, I suggest you to turn it on (true) since it should make your page load faster.

string OR int release_time (optional) expects "hour", "day", "week", "month", "year", OR ANY time in minutes as a number. This is optional for releasing new images to the gallery every *release_time* from the first load-up.

string release_folder (optional) expects a path to an existing directory. This is the folder from which it will take new images to put in gallery.

int release_amount (optional) expects number of how many images you wanna release per interval.

Since the v0.4.00a update: string title was made optional, otherwise blank; string order (optional) has been added to maintain the order of pictures; bool cache_all (optional) has been added;
These changes are compatible with old versions, which means that update won't change your galleries, or throw exceptions for the amount of parameters to the function.

Since the v0.4.71a update: Gallery can now be automatically filled up from another folder.

This function uses (2x optional) caching! Every change needs the cache to be cleared.

Usage example

		//$num = gallery("gallery", "title"); //("" - empty parameter leads to "./img/", in this case "./img/gallery/")
		//echo $num;
		//update v0.4.00a usage:
		gallery("gallery", "", "cba", true);