rss titles are now just file names and not complete files urls

This commit is contained in:
Tom Canac 2014-04-30 19:01:11 +02:00
parent 29c1e2cfcb
commit 10cb4eb47e
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -106,7 +106,8 @@
/*XML Gen*/
/*===================*/
$temp = explode("\n", $temp);
$pieceOfTitle;
$titleLenght;
echo "
<rss version=\"2.0\">
<channel>
@ -115,9 +116,11 @@
<description>".$description."</description>
";
for ($i=0; $i <= $nb_items_rss; $i++) {
$pieceOfTitle = strrchr ($temp[$i] , "/");
$titleLenght = strlen($pieceOfTitle) - strlen(strrchr($pieceOfTitle, "."));
echo
"<item>
<title>" . $temp[$i] . "</title>
<title>" . substr($pieceOfTitle, 1, $titleLenght-1) . "</title>
<link>". $temp[$i] . "</link>
<description>
<![CDATA[ <img src=\"" . $temp[$i] . "\"> ]]>