← Desenvolvimento

Ajuda com feed!

Lida 2724 vezes

Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

http://feedvalidator.org/check.cgi?url=http%3a%2f%2fwww.webtuga.com%2fbackend.php

Bem, a feed do webtuga dá-me erros por todo lado, será que alguem sabe o que se passa?
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Passa a feed para pt-pt, se possivel para iso-8859-1. O problema aparenta ser nos acentos. Depois diz se funcionou ;)

Cumps 8)
Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

Verifica: http://feedvalidator.org/check.cgi?url=http%3a%2f%2fwww.webtuga.com%2fbackend.php

Dá erros!

Código: [Seleccione]
<?php

/************************************************************************/
/* PHP-NUKE&#58; Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright &#40;c&#41; 2005 by Francisco Burzi                                */
/* http&#58;//phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

include&#40;"mainfile.php"&#41;;
include&#40;"includes/ipban.php"&#41;;
global $prefix$db$nukeurl;
header&#40;"Content-Type&#58; text/xml"&#41;;
$cat intval&#40;$cat&#41;;
if &#40;$cat != ""&#41; &#123;
$catid $db->sql_fetchrow&#40;$db->sql_query&#40;"SELECT catid FROM ".$prefix."_stories_cat WHERE title LIKE '%$cat%' LIMIT 1"&#41;&#41;;
if &#40;$catid == ""&#41; &#123;
$result $db->sql_query&#40;"SELECT sid, title, hometext FROM ".$prefix."_stories ORDER BY sid DESC LIMIT 10"&#41;;
&#125; else &#123;
$catid intval&#40;$catid&#41;;
$result $db->sql_query&#40;"SELECT sid, title, hometext FROM ".$prefix."_stories WHERE catid='$catid' ORDER BY sid DESC LIMIT 10"&#41;;
&#125;
&#125; else &#123;
$result $db->sql_query&#40;"SELECT sid, title, hometext FROM ".$prefix."_stories ORDER BY sid DESC LIMIT 10"&#41;;
&#125;

echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
\n\n";
echo "<rss version=\"0.91\">\n\n";
echo "<channel>\n";
echo "<title>".htmlspecialchars($sitename)."</title>\n";
echo "<link>$nukeurl</link>\n";
echo "<description>".htmlspecialchars($backend_title)."</description>\n";
echo "<language>pt-pt</language>\n\n";

while ($row = $db->sql_fetchrow($result)) {
$rsid = intval($row['sid']);
$rtitle = $row['title'];
$rtext = $row['hometext'];
echo "<item>\n";
echo "<title>".htmlspecialchars($rtitle)."</title>\n";
echo "<link>$nukeurl/modules.php?name=News&amp;file=article&amp;sid=$rsid</link>\n";
echo "<description>".htmlspecialchars($rtext)."</description>\n";
echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>";

?>
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Falta-te um espaço nesta linha <?xml version="1.0" encoding="iso-8859-1" ?> Tenta denovo lol

Cumps 8)
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Pões a versão em 0.92.

Cumps 8)
Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

Em <?xml version="1.0" encoding="iso-8859-1" ?> ou em <rss version=\"0.91\"> ???
Offline

Spread 
Membro
Mensagens 1433 Gostos 2
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

rss version

Cumps 8)