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

@ -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] . "\"> ]]>