Paypal donation

Simple File Gallery - Documentation

A webserver with PHP 5.2+ support.
Any web hosting server support Simple File Gallery.
PHP 5.2+ is the only requirement.
Notice that MySQL, or any other DB is not required.
SSL is reccomended but it is also optional.

Installation :
Just Unzip the file and using any FTP client (like FileZilla) upload all the files at your server.
Configuration :
Simple File Gallery is pretty easy to configure. Just open the "Settings.php" file located at the root of the zip file with any text editor.

$pass set your admin password. The default password is admin
$hideFileskey set your random alphanumeric string that makes your files private.
Ex : $hideFileskey = "kwxLLR7KkSQLVjUd";
PUBLIC: filename.jpg -> HIDDEN: filenamekwxLLR7KkSQLVjUd.jpg

$Languages = array(array("EN","en_US"), array("IT","it_IT"), array("GR", "el_GR"));
This sets the array of your translations.
The strong part of the array("EN","en_US") is the shown name on the Languages menu.
The other part is the locale part.
In order to find a new locale language code just go to :
For example French language has the locale code "fr_FR".
Set $Languages = array(array("EN","en_US"), array("IT","it_IT"), array("GR", "el_GR"), array("FR","fr_FR"));
In order to translate in French Simple-File-Gallery just copy the
folder and rename the cloned folder as:
Using poedit or any other gettext application open the
Do the translation and hit the save button in order to generate the
_libs\multilanguage\locale\fr_FR\LC_MESSAGES\ file

$DefaultLanguage = "en_US"; Sets the default language to English
$ShowLanguagesMenu = true; Show the Language-Change menu.

$TitlePrefix = __("Simple File Gallery"); Notice the __("") allows you to translate the double quoted string.
$Description = __("Simple File Gallery made By TrustFm");
$Keywords = __("file, gallery, image, video, audio, files");
$TitleGalleryPrefix = __("File Gallery");

$GridColumns = 4; Set the grid columns of your gallery. 3 or 4 is the best option.
$GridMaxWidth = "1800px"; Set the max grid width. Examples : 1000px or 90%
$GridMinWidth = "600px"; If lower than this value -> display cells in single column (responsiveness option)

$ThumbsCrop = false; Crop the thumbnails. Default value: false
$ThumbsMaxWidth = 400; Maximum width of the thumbnails in px
$ThumbsMaxHeight = 300; Maximum height of the thumbnails in px

$VideoMaxWidth = 400; Maximum video thumbnail width
$VideoMaxHeight = 225; Maximum video thumbnail height. Recommendation : $VideoMaxWidth*(16/9).
$VideoPreload = "none";
Possible values:
auto : browser loads the entire video when the page loads
metadata : browser should load only metadata when the page loads
none : browser should NOT load the video when the page loads [recommended option]
$VideoTimeSnapshot = 10;Take a snapshot at 10sec from the beginning. If the video is shorter takes a snapshot at 0sec.

$AllowedAudioExtensions = array("3gpp", "mp3", "oga", "ogg", "wav"); HTML5 embeded audio formats
$AllowedFileExtensions = array("7z", "avi", "mkv", "pdf", "txt", "zip");
$AllowedImageExtensions = array("gif", "jpeg", "jpg", "png");
$AllowedVideoExtensions = array("mov", "mp4", "ogv", "webm"); HTML5 embeded video formats
From the Allowed files it is recommended to leave them as is except the $AllowedFileExtensions.
In this category the files are treated as simple download links (no embeded HTML5 option).
If you want to support rar files for example do like this :
$AllowedFileExtensions = array("7z", "avi", "mkv", "pdf", "rar", "txt", "zip");
If you want to add a rar icon, you have to add "rar.png" image at "_libs\images\"

$EnableGroupBy = true; if false -> simple file alphabetic order, if true GroupBy from Groups array below :
$Groups = array("Video", "Image", "Audio", "File"); Possible values "Video", "Image", "Audio", "File".
Notice that this array is ordered, so by changing the order you change the view order of the groups.
Usage :
The admin can:
  • Create a new Gallery
  • Upload files
  • Hide a Gallery (Private Gallery)
  • Show a Gallery (Public gallery)
  • Generate thumbnails from selected videos
  • Rename Gallery
  • Delete files
  • Delete Gallery

The users can:
  • Navigate at public Galleries
  • See public files
  • Share public files
  • Download public files


Simple-File-Gallery - Italian demo

Copyright © 1998-2018 - Made by TrustFm - All Rights Reserved Worldwide