From 10cb4eb47e79f0f170e2f2e59cf86577d422dc8f Mon Sep 17 00:00:00 2001 From: Tom Canac Date: Wed, 30 Apr 2014 19:01:11 +0200 Subject: [PATCH] rss titles are now just file names and not complete files urls --- config.php | 4 ++-- rss.php | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/config.php b/config.php index 4e1dc11..2d0a51c 100755 --- a/config.php +++ b/config.php @@ -41,8 +41,8 @@ $label_loading = "Loading..."; //Thumbnail loading text $gallery_link = "./"; $description = "MiniGal Nano"; $nb_items_rss = 25; -$SkipExts = array('html', 'txt', 'php'); //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 +$SkipExts = array('html', 'txt', 'php'); //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 $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 diff --git a/rss.php b/rss.php index 0cfbaee..6690fa5 100644 --- a/rss.php +++ b/rss.php @@ -106,7 +106,8 @@ /*XML Gen*/ /*===================*/ $temp = explode("\n", $temp); - + $pieceOfTitle; + $titleLenght; echo " @@ -115,9 +116,11 @@ ".$description." "; for ($i=0; $i <= $nb_items_rss; $i++) { + $pieceOfTitle = strrchr ($temp[$i] , "/"); + $titleLenght = strlen($pieceOfTitle) - strlen(strrchr($pieceOfTitle, ".")); echo " - " . $temp[$i] . " + " . substr($pieceOfTitle, 1, $titleLenght-1) . " ". $temp[$i] . " ]]>