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*/
/*===================*/
$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] . "\"> ]]>