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 = "./"; $gallery_link = "./";
$description = "MiniGal Nano"; $description = "MiniGal Nano";
$nb_items_rss = 25; $nb_items_rss = 25;
$SkipExts = array('html', 'txt', 'php'); //Files with one of this extension 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 $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

View file

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