fix #53
This commit is contained in:
parent
9d31ffd7c8
commit
17322c981c
2 changed files with 39 additions and 51 deletions
|
@ -27,7 +27,8 @@ $sorting_folders = "name"; // Sort folders by: [name][date]
|
||||||
$sorting_files = "name"; // Sort files by: [name][date][size]
|
$sorting_files = "name"; // Sort files by: [name][date][size]
|
||||||
$sortdir_folders = "ASC"; // Sort direction of folders: [ASC][DESC]
|
$sortdir_folders = "ASC"; // Sort direction of folders: [ASC][DESC]
|
||||||
$sortdir_files = "ASC"; // Sort direction of files: [ASC][DESC]
|
$sortdir_files = "ASC"; // Sort direction of files: [ASC][DESC]
|
||||||
$lazyload = 1; // 0 = pagination, 1 = display all pictures on one page
|
$lazyload = 1; // 0 is pagination, 1 is display all pictures on one page
|
||||||
|
$SkipObjects = array('aFolder', 'IMG_1612.JPG'); //Those files and folders will not be displayed (affects the page and the RSS feed)
|
||||||
|
|
||||||
//LANGUAGE STRINGS
|
//LANGUAGE STRINGS
|
||||||
$label_home = "Home"; // Name of home link in breadcrumb navigation
|
$label_home = "Home"; // Name of home link in breadcrumb navigation
|
||||||
|
@ -39,10 +40,10 @@ $label_loading = "Loading..."; //Thumbnail loading text
|
||||||
|
|
||||||
//RSS SETTINGS
|
//RSS SETTINGS
|
||||||
$description = "MiniGal Nano";
|
$description = "MiniGal Nano";
|
||||||
$nb_items_rss = 25; //number ef elements to display in the feed. If you add a lot of pictures at the time, consider increasing this number
|
$nb_items_rss = 25; // Number of elements to display in the feed. If you add a lot of pictures at the time, consider increasing this number
|
||||||
$rss_refresh_interval = 60;//time, in seconds, between two RSS refresh. for example, 3600 = 1update max per hour, 86400 = 1/day.
|
$rss_refresh_interval = 60;// Time, in seconds, between two RSS refresh. for example, 3600 = 1update max per hour, 86400 = 1/day.
|
||||||
$SkipExts = array('html', 'txt', 'php', "gitignore"); //Files with one of this extension will not be displayed on the RSS feed
|
$SkipExts = array('html', 'txt', 'php', "gitignore"); //Files with one of this extension will not be displayed on the RSS feed
|
||||||
$SkipObjects = array('UnDossier', 'UnFichier'); //Those files and folders will not be displayed on the RSS feed
|
|
||||||
//ADVANCED SETTINGS
|
//ADVANCED SETTINGS
|
||||||
$thumb_size = 320; //Thumbnail height/width (square thumbs). Changing this will most likely require manual altering of the template file to make it look properly!
|
$thumb_size = 320; //Thumbnail height/width (square thumbs). Changing this will most likely require manual altering of the template file to make it look properly!
|
||||||
$label_max_length = 40; //Maximum chars of a folder name that will be displayed on the folder thumbnail
|
$label_max_length = 40; //Maximum chars of a folder name that will be displayed on the folder thumbnail
|
||||||
|
|
21
index.php
21
index.php
|
@ -132,21 +132,6 @@ function checkpermissions($file) {
|
||||||
if (substr(decoct(fileperms($file)), -1, strlen(fileperms($file))) < 4 OR substr(decoct(fileperms($file)), -3,1) < 4) $messages = "At least one file or folder has wrong permissions. Learn how to <a href='http://minigal.dk/faq-reader/items/how-do-i-change-file-permissions-chmod.html' target='_blank'>set file permissions</a>";
|
if (substr(decoct(fileperms($file)), -1, strlen(fileperms($file))) < 4 OR substr(decoct(fileperms($file)), -3,1) < 4) $messages = "At least one file or folder has wrong permissions. Learn how to <a href='http://minigal.dk/faq-reader/items/how-do-i-change-file-permissions-chmod.html' target='_blank'>set file permissions</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------
|
|
||||||
// CHECK FOR NEW VERSION
|
|
||||||
//-----------------------
|
|
||||||
// New version check disabled because original author does not update it software anymore.
|
|
||||||
/*
|
|
||||||
if (ini_get('allow_url_fopen') == "1") {
|
|
||||||
$file = @fopen ("http://www.minigal.dk/minigalnano_version.php", "r");
|
|
||||||
$server_version = fgets ($file, 1024);
|
|
||||||
if (strlen($server_version) == 5 ) { //If string retrieved is exactly 5 chars then continue
|
|
||||||
if (version_compare($server_version, $version, '>')) $messages = "MiniGal Nano $server_version is available! <a href='http://www.minigal.dk/minigal-nano.html' target='_blank'>Get it now</a>";
|
|
||||||
}
|
|
||||||
fclose($file);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!defined("GALLERY_ROOT")) define("GALLERY_ROOT", "");
|
if (!defined("GALLERY_ROOT")) define("GALLERY_ROOT", "");
|
||||||
$requestedDir = '';
|
$requestedDir = '';
|
||||||
if (!empty($_GET['dir'])) $requestedDir = $_GET['dir'];
|
if (!empty($_GET['dir'])) $requestedDir = $_GET['dir'];
|
||||||
|
@ -167,7 +152,7 @@ $files = array();
|
||||||
$dirs = array();
|
$dirs = array();
|
||||||
if (is_directory($currentdir) && $handle = opendir($currentdir))
|
if (is_directory($currentdir) && $handle = opendir($currentdir))
|
||||||
{
|
{
|
||||||
while (false !== ($file = readdir($handle)))
|
while (false !== ($file = readdir($handle)) && !in_array($file, $SkipObjects))
|
||||||
{
|
{
|
||||||
// 1. LOAD FOLDERS
|
// 1. LOAD FOLDERS
|
||||||
if (is_directory($currentdir . "/" . $file))
|
if (is_directory($currentdir . "/" . $file))
|
||||||
|
@ -301,7 +286,9 @@ if (file_exists($currentdir ."/captions.txt"))
|
||||||
// If file is not provided, image filename will be used instead.
|
// If file is not provided, image filename will be used instead.
|
||||||
checkpermissions($currentdir . "/" . $file);
|
checkpermissions($currentdir . "/" . $file);
|
||||||
|
|
||||||
if (is_file($currentdir.'/'.$file.'.html')) { $img_captions[$file] = $file.'::'.htmlspecialchars(file_get_contents($currentdir.'/'.$file.'.html'),ENT_QUOTES); }
|
if (is_file($currentdir.'/'.$file.'.html')) {
|
||||||
|
$img_captions[$file] = $file.'::'.htmlspecialchars(file_get_contents($currentdir.'/'.$file.'.html'),ENT_QUOTES);
|
||||||
|
}
|
||||||
if ($lazyload) {
|
if ($lazyload) {
|
||||||
$linkUrl = urlencode("$currentdir/$file");
|
$linkUrl = urlencode("$currentdir/$file");
|
||||||
$imgParams = http_build_query(
|
$imgParams = http_build_query(
|
||||||
|
|
Loading…
Reference in a new issue