Simple gallery script provides single-file web gallery.
More...
|
| | $version = '1.7.0' |
| |
| | $dir = 'pictures' |
| |
| | $cache = 'cache' |
| |
| | $defaultIcon = '?static=defico.png' |
| |
| | $defaultDirIcon = '?static=defdirico.svg' |
| |
| | $icotitlefname = '000.nfo' |
| |
| | $lockfname = '000.lock' |
| |
| | $thumb_x = 320 |
| |
| | $thumb_y = 240 |
| |
| | $middle_x = 800 |
| |
| | $imgTitleLen = 24 |
| |
| | $date_format = 'Y-m-d' |
| |
| | $galTitle = 'SiGal gallery' |
| |
| | $legal_notice = 'No photos can be distributted without written permission of their author.' |
| |
| | $enable_mass_download = true |
| |
| | $show_exif_tab = true |
| |
| | $show_gps_tab = true |
| |
| | $cache_image_quality = 80 |
| |
| | $exts = array('jpg','jpeg','png','gif','bmp','tif','tiff','svg','swf','flv','mp4', 'mp3','mts','mov') |
| |
| | $extsIcon = array('jpg','jpeg','png', 'gif', 'bmp') |
| |
| | $extsExif = array('jpg','jpeg','tif','tiff') |
| |
| | $extsVideo = array('swf','flv','mp4','mts','mov') |
| |
| | $extsAudio = array('mp3') |
| |
| | $defaultMime = 'text/plain' |
| |
| | $avMime |
| |
| | $func_sortimages = NULL |
| |
| | $func_sortalbums = NULL |
| |
| | $func_scandir = NULL |
| |
| | $func_albumname = NULL |
| |
| | $func_groupname = NULL |
| |
| | $func_sortgroups = NULL |
| |
| | $langs |
| |
| | $LANG = 'en' |
| |
| | $html_head |
| |
| | $html_tail = '' |
| |
Simple gallery script provides single-file web gallery.
◆ __construct()
Actually only redefines $this->html_head and $this->html_tail.
- Returns
- An instance of SiGal class.
◆ cookie()
| Sigal::cookie |
( |
|
$name, |
|
|
|
$value, |
|
|
|
$lifetime = 2592000 |
|
) |
| |
Set cookie valid on current path
- Parameters
-
| string | $name | |
| string | $value | |
| int | $lifetime | number of seconds, 0 for session cookie |
- Returns
- bool
◆ detect_lang()
- Returns
- string 2 chars of language ID (eg.: en | cs | ...)
◆ downloadZippedImages()
| Sigal::downloadZippedImages |
( |
| ) |
|
- Returns
- zipped binary data
◆ format_number()
| Sigal::format_number |
( |
|
$val | ) |
|
Format decimal number
- Parameters
-
- Returns
- string
◆ getAlbums()
| Sigal::getAlbums |
( |
|
$top = NULL | ) |
|
Get sorted (by name reversed eg. 9->0, Z->A) array of all albums.
- Returns
- An array of all albums in defined dir ($this->dir).
◆ getAlbumTitleFile()
| Sigal::getAlbumTitleFile |
( |
|
$album | ) |
|
Gets path to title image of given album. If there are no iconificable image, the $this->defaultIcon is used.
- Parameters
-
| string | $album | Path to album directory |
- Returns
- URL of title image.
◆ getImages()
Returns all images from given directory sorted by name and read possible locks of album.
- Parameters
-
| string | $dir | Source directory for scan. |
- Returns
- An array of all images.
◆ lang()
| Sigal::lang |
( |
|
$idf, |
|
|
|
$number = null |
|
) |
| |
Translate string
- Parameters
-
- Returns
- string
◆ makeMiddleImage()
| Sigal::makeMiddleImage |
( |
|
$file | ) |
|
Creates middle size image of given original image.
- Parameters
-
| string | $file | The original filename. |
◆ makeThumbImage()
| Sigal::makeThumbImage |
( |
|
$file | ) |
|
Creates thumbnail of given image.
- Parameters
-
| string | $file | The original filename. |
◆ remove_from_uri()
| Sigal::remove_from_uri |
( |
|
$param = "" | ) |
|
Remove parameter from query string
- Parameters
-
- Returns
- string
◆ resizeImage()
| Sigal::resizeImage |
( |
|
$path, |
|
|
|
$max_x |
|
) |
| |
Resizes given image (JPG, PNG, GIF, BMP) with respect to aspect ratio. Saves final image to cache.
- Parameters
-
| string | $path | The original image.. |
| double | $max_x | Final width. |
- Returns
- string Full path of resized image in cache.
◆ showAlbum()
Shows given album.
- Parameters
-
| string | $alb | Full path to album directory. |
◆ showImage()
Shows detail of given photo.
- Parameters
-
| string | $f | Path to original image. |
◆ showVideo()
◆ switch_lang()
Prints the form for language switching.
◆ $avMime
Initial value:= array(
'mp3' => 'audio/mpeg',
'mp4' => 'video/mp4',
'mts' => 'video/mts',
'mov' => 'video/quicktime',
'swf' => 'application/x-shockwave-flash',
'flv' => 'video/x-flv'
)
Mime types for files. The key represents extension, value is mime type.
◆ $cache
Directory for caching thumbnails (must be writeable!).
◆ $cache_image_quality
| Sigal::$cache_image_quality = 80 |
Quality of output cached jpeg images.
◆ $date_format
| Sigal::$date_format = 'Y-m-d' |
Date format for image/thumbnail display.
◆ $defaultDirIcon
| Sigal::$defaultDirIcon = '?static=defdirico.svg' |
URL to default album. May be absolute or relative.
◆ $defaultIcon
| Sigal::$defaultIcon = '?static=defico.png' |
URL to default picture icon. May be absolute or relative.
◆ $defaultMime
| Sigal::$defaultMime = 'text/plain' |
Default mime type. It is used when automated recognition fails.
◆ $dir
◆ $enable_mass_download
| Sigal::$enable_mass_download = true |
Flag to enable function of mass download.
◆ $exts
| Sigal::$exts = array('jpg','jpeg','png','gif','bmp','tif','tiff','svg','swf','flv','mp4', 'mp3','mts','mov') |
Array of file extensions for scanning in directiories.
◆ $extsAudio
| Sigal::$extsAudio = array('mp3') |
Array of file extensions for audio files.
◆ $extsExif
| Sigal::$extsExif = array('jpg','jpeg','tif','tiff') |
Array of file extensions with EXIF informations.
◆ $extsIcon
| Sigal::$extsIcon = array('jpg','jpeg','png', 'gif', 'bmp') |
Array of file extensions for which we are able to generate thumbnail.
◆ $extsVideo
| Sigal::$extsVideo = array('swf','flv','mp4','mts','mov') |
Array of file extensions for videofiles.
◆ $func_albumname
| Sigal::$func_albumname = NULL |
Callback function for mapping directory name to album name.
◆ $func_groupname
| Sigal::$func_groupname = NULL |
Callback function for getting album/directory group name
◆ $func_scandir
| Sigal::$func_scandir = NULL |
Callback function for scanning directory for images. You can implement own filters tanks to this function.
◆ $func_sortalbums
| Sigal::$func_sortalbums = NULL |
Callback function for sorting albums in gallery.
◆ $func_sortgroups
| Sigal::$func_sortgroups = NULL |
Callback function for sorting group names.
◆ $func_sortimages
| Sigal::$func_sortimages = NULL |
Callback function for sorting images in some album.
◆ $galTitle
| Sigal::$galTitle = 'SiGal gallery' |
◆ $html_head
HTML head of each page of gallery. You can use string "{title}" which will be replaced by title of gallery defined above.
◆ $html_tail
HTML tail of each page of galllery.
◆ $icotitlefname
| Sigal::$icotitlefname = '000.nfo' |
Name of file with definition of title image.
◆ $imgTitleLen
Number of characters of shortened image title.
◆ $LANG
◆ $langs
Initial value:= array(
'en' => 'English',
'cs' => 'Čeština',
)
Available languages
◆ $legal_notice
| Sigal::$legal_notice = 'No photos can be distributted without written permission of their author.' |
String shown in bottom of each page. Designed to some words about legal use of photos.
◆ $lockfname
| Sigal::$lockfname = '000.lock' |
Name of file with defined usernames/passwords for locked/private albums.
◆ $middle_x
Width of middle size picture - the view size.
◆ $show_exif_tab
| Sigal::$show_exif_tab = true |
Flag to show EXIF info in image details.
◆ $show_gps_tab
| Sigal::$show_gps_tab = true |
Flag to show GPS info in image details.
◆ $thumb_x
Width of thumbnail. Minimal 120px.
◆ $thumb_y
Height of thumbnail. Minimal 120px.
◆ $version
| Sigal::$version = '1.7.0' |
The documentation for this class was generated from the following file: