diff --git a/.htaccess b/.htaccess
index 7d9c8eb..f62c3ae 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1 +1,9 @@
-Options -Indexes
\ No newline at end of file
+Options -Indexes
+AddType video/ogg .ogv
+AddType video/ogg .ogg
+AddType video/mp4 .mp4
+AddType video/webm .webm
+
+
+ ForceType video/mp4
+
\ No newline at end of file
diff --git a/index.php b/index.php
index 83bfde4..a4284fa 100755
--- a/index.php
+++ b/index.php
@@ -1,5 +1,4 @@
', $name, '';
+ echo '
";
$breadcrumb_navigation .= "
" . $label_home . " $breadcrumb_separator ";
$navitems = explode("/", htmlspecialchars($_REQUEST['dir']));
- for ($i = 0; $i < sizeof($navitems); $i++) {
- if ($i == sizeof($navitems) - 1) {
+ for ($i = 0; $i < count($navitems); $i++) {
+ if ($i == count($navitems) - 1) {
$breadcrumb_navigation .= $navitems[$i];
} else {
$breadcrumb_navigation .= "
" . $navitems[$i] . " $breadcrumb_separator ";
}
@@ -473,14 +523,14 @@ if ($requestedDir != "" && $requestedDir != "photos") {
}
//Include hidden links for all images BEFORE current page so lightbox is able to browse images on different pages
-for ($y = 0; $y < $offset_start - sizeof($dirs); $y++) {
+for ($y = 0; $y < $offset_start - $nbDir; $y++) {
$breadcrumb_navigation .= "
";
}
//-----------------------
// DISPLAY FOLDERS
//-----------------------
-if (count($dirs) + count($files) == 0) {
+if ($nbDir + $nbFile == 0) {
$thumbnails .= "
$label_noimages
$label_noimages_advice
"; //Display 'no images' text
if ($current_dir == "photos") {
$messages =
@@ -490,7 +540,7 @@ if (count($dirs) + count($files) == 0) {
}
}
$offset_current = $offset_start;
-for ($x = $offset_start; $x < sizeof($dirs) && $x < $offset_end; $x++) {
+for ($x = $offset_start; $x < $nbDir && $x < $offset_end; $x++) {
$offset_current++;
$thumbnails .= $dirs[$x]["html"];
}
@@ -498,7 +548,7 @@ for ($x = $offset_start; $x < sizeof($dirs) && $x < $offset_end; $x++) {
//-----------------------
// DISPLAY FILES
//-----------------------
-for ($i = $offset_start - sizeof($dirs); $i < $offset_end && $offset_current < $offset_end; $i++) {
+for ($i = $offset_start - $nbDir; $i < $offset_end && $offset_current < $offset_end; $i++) {
if ($i >= 0) {
$offset_current++;
$thumbnails .= $files[$i]["html"];
@@ -510,7 +560,7 @@ if ($i < 0) {
$i = 1;
}
-for ($y = $i; $y < sizeof($files); $y++) {
+for ($y = $i; $y < $nbFile; $y++) {
$page_navigation .= "
";
}
diff --git a/user_config.php b/user_config.php
new file mode 100644
index 0000000..c7115a8
--- /dev/null
+++ b/user_config.php
@@ -0,0 +1,46 @@
+"; // Breadcrumb parts separator
+
+//RSS SETTINGS
+$description = "MiniGal Nano";
+$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 = 320; // Time, in seconds, between two RSS refresh. for example, 3600 = 1update max per hour, 86400 = 1/day.
+$keep_extensions = array('jpg', 'jpeg', 'png', 'gif'); //Files with one of this extension will not be displayed on the RSS feed
+
+//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!
+$label_max_length = 40; // Maximum chars of a folder name that will be displayed on the folder thumbnail
+$display_exif = 0; // Take care, even if not diplayed EXIF are still readable for visitors. May be a good idea to erase EXIF data...
+$display_filename = 1; // Show file names below the pictures
+?>