From 8dcf68c56b3fde07756cb21c920dedf48b9a6dfb Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 27 Jan 2025 06:52:03 -0500 Subject: New upstream version 4.14.0. --- index.php | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 78ec739..7397bfc 100644 --- a/index.php +++ b/index.php @@ -2,12 +2,12 @@ /* - Single File PHP Gallery 4.12.0 (SFPG) + Single File PHP Gallery 4.14.0 (SFPG) See EULA in readme.txt for commercial use See readme.txt for configuration - Released: 2024-Sep-07 + Released: 2024-Dec-17 https://sye.dk/sfpg/ by Kenny Svalgaard @@ -28,6 +28,7 @@ option('DIR_DESC_FILE', '_desc.txt'); option('DIR_BANNER_FILE', '_banner.txt'); option('DIR_ROOT_BANNER_IN_SUBDIRS', TRUE); + option('DIR_NAME_AS_BANNER', FALSE); option('DIR_DESC_IN_GALLERY', TRUE); option('DIR_DESC_IN_INFO', TRUE); option('DIR_SORT_REVERSE', FALSE); @@ -133,6 +134,8 @@ option('SHOW_IMAGE_DAYS', FALSE); option('DELETE_IMAGE_DAYS', FALSE); option('DELETE_EMPTY_DIRS', FALSE); + option('RELOAD_IMAGE_MIN', 5000); + option('RELOAD_IMAGE_MAX', 10000); option('PAYPAL_ENABLED', FALSE); option('PAYPAL_ACCOUNT', ''); @@ -1591,6 +1594,12 @@ } + function reloadImage(imageID) + { + setTimeout(function(t) {t.src = t.src;}, Math.floor(Math.random() * (".(RELOAD_IMAGE_MAX - RELOAD_IMAGE_MIN + 1).") + ".RELOAD_IMAGE_MIN."), imageID); + }; + + function updateSize() { if (index) @@ -1813,7 +1822,7 @@ { if (isDef(dirInfo[id]['dirThumb'])) { - info += '\"\"'; + info += '\"\"'; } else { @@ -1857,7 +1866,7 @@ } else if (type == 'img') { - info += '\"\"'; + info += '\"\"'; info += ''; info += '".sts(TEXT_IMAGE_NAME)."
'+imgInfo[id]['imageName'] + '

'; "; @@ -2010,7 +2019,7 @@ { if (isDef(fileInfo[id]['fileThumb'])) { - info += '\"\"'; + info += '\"\"'; } else { @@ -2049,6 +2058,7 @@ } else { + fillInfo('dir', 0); gebi('box_info').style.visibility='visible'; gebi('box_image').style.left='".INFO_BOX_WIDTH."px'; gebi('box_gallery').style.left='".INFO_BOX_WIDTH."px'; @@ -2663,7 +2673,10 @@ function mouseOver(that, type, nr) { - fillInfo(type, nr); + if (showInfo) + { + fillInfo(type, nr); + } if (isSelected(type, nr)) { that.className='innerbox_marked'; @@ -2685,7 +2698,10 @@ function mouseOut(that, type, nr) { - fillInfo('dir', 0); + if (showInfo) + { + fillInfo('dir', 0); + } if (isSelected(type, nr)) { that.className='innerbox_marked'; @@ -2758,7 +2774,7 @@ content += '
'; if (isDef(dirInfo[elementNumber]['dirThumb'])) { - content += '\"\"'; + content += '\"\"'; } else { @@ -2776,7 +2792,7 @@ content += ' onmouseover=\"mouseOver(this, \'img\', '+elementNumber+')\" onmouseout=\"mouseOut(this, \'img\', '+elementNumber+')\"'; } content += ' class=\"innerboximg\">'; - content += '
\"\"
'; + content += '
\"\"
'; ". (THUMB_CHARS_MAX ? "content += thumbDisplayName(imgInfo[elementNumber]['imageName']);" : "")." content += '
'; } @@ -2791,7 +2807,7 @@ content += '
'; if (isDef(fileInfo[elementNumber]['fileThumb'])) { - content += '\"\"'; + content += '\"\"'; } else { @@ -2852,6 +2868,10 @@ } } gebi('navi').innerHTML = navLinks; + if (gebi('banner')) + { + gebi('banner').innerHTML = dirInfo[0]['dirName']; + } addElement(0, 'desc'); for (i = 1; i < dirInfo.length; i++) { @@ -4133,7 +4153,7 @@ ''. '
'. '
'. - ''; + ''; if(SHOW_IMAGE_NAME_BELOW_FULL) { echo '
'; @@ -4164,6 +4184,10 @@ { echo ''; } + elseif (DIR_NAME_AS_BANNER) + { + echo ''; + } echo '
'; if (ADMIN===TRUE) { -- cgit v1.2.3