View Full Version : Problemas con mi RSS
Tengo problemas con mi RSS, y no se solucionarlo alguien me puede ayudar?
http://www.feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.busca2.info%2Ffotob log%2F%2Findex.php%3Fx%3Drss
Mi Fotoblog es www.busca2.info/fotoblog/
Dkozikowski
02-21-2007, 06:14 AM
For whatever reason, you have 4 blank lines before <?xml version="1.0" encoding="UTF-8"?>
You must not have any blank lines before this bit of code!
Have you made any changes to your RSS output inside index.php?
No he hecho ningún cambio en index.php, ¿es este el problema que tengo?
Perdona por mi inglés, pero uso el traductor de google
No, I made no change in index.php, is that the problem that I have?
It pardons by my English use translation of google.
No he hecho ningún cambio en index.php, ¿es este el problema que tengo?
Perdona por mi inglés, pero uso el traductor de google
No, I made no change in index.php, is that the problem that I have?
Excuse me for my English use translation of google.
Dkozikowski
02-21-2007, 07:17 AM
I removed the spanish translation, it was horrible! I hope you have better luck translating the following to spanish!
Open index.php and search for
if(isset($_GET['x'])&&$_GET['x'] == "rss")
Copy and pase the next 10 lines of code here so I can have a look.
I removed the spanish translation, it was horrible! I hope you have better luck translating the following to spanish!
Open index.php and search for
if(isset($_GET['x'])&&$_GET['x'] == "rss")
Copy and pase the next 10 lines of code here so I can have a look.
// ################################################## ########################################//
// RSS 2.0 FEED
// ################################################## ########################################//
if(isset($_GET['x'])&&$_GET['x'] == "rss")
{
$output = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<rss version=\"2.0\">
<channel>
<title>".$pixelpost_site_title."</title>
<link>".$cfgrow['siteurl']."</link>
<description>$pixelpost_site_title photoblog</description>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>pixelpost</generator>
";
$tzoner = $cfgrow['timezone'];
$tprefix = '+';
$tzoner = sprintf ("%01.2f", $tzoner);
if (substr($tzoner,0,1)=='-')
{
$tzoner = (substr($tzoner,1));
$tprefix = '-';
}
if ($tzoner < 10) $tzoner = "0".$tzoner;
$hh = substr($tzoner,0,2);
$mm = substr($tzoner,-2);
$tzoner = $tprefix.$hh.$mm;
$query = mysql_query("SELECT id,datetime,headline,body,image FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime<='$cdate') ORDER BY datetime desc limit 10");
while(list($id,$datetime,$headline,$body,$image) = mysql_fetch_row($query))
{
$headline = pullout($headline);
$headline = htmlspecialchars($headline,ENT_QUOTES);
$image = $cfgrow['siteurl']."thumbnails/thumb_$image";
$datetime = strtotime($datetime);
$datetime =date("D, d M Y H:i",$datetime);
$datetime .= ' ' .$tzoner;
$body = pullout($body);
$body = stripslashes($body);
$body = strip_tags( $body );
$body = htmlspecialchars($body,ENT_QUOTES);
$body = ereg_replace("\n","\n<br />",$body);
$output .= "
<item>
<title>$headline</title>
<link>".$cfgrow['siteurl']."?showimage=$id</link>
<description>
<img src="$image">
<br />$body
</description>
<pubDate>$datetime</pubDate>
<guid>".$cfgrow['siteurl']."index.php?showimage=$id</guid>
</item>
";
}
$output .= "
</channel>
</rss>";
header("Content-type:application/xml");
echo $output;
exit;
}
Dennis
02-21-2007, 07:51 PM
Enviarnos por favor el archivo de index.php por correo.
Mi escritura en español no es buena
Apesadumbrado ;)
E-mail enviado a dwilkinsjr. Muchas gracias . Thanks you
Schonhose, si me dices tu e-mail por privado también te envio el index.php.
Por cierto tu español no es tan malo. Peor es mi ingles. jajajjaa
Gracias. Thanks
Dennis
02-21-2007, 08:23 PM
Ningún problema, pediré el djwilkinsjr si él no puede calcularlo hacia fuera. ;)
Dkozikowski
02-21-2007, 09:15 PM
Ok, i do not suspect your index.php causing the problem. I could be wrong but I will know for sure when I get home later and am able to get on my dev computer to compare index files. All I have to work with right now it notepad :(
So, I think this is a addon or template issue.
Have you installed any additional addons?
*Something* is adding white space to the top of your html code. This is what's causing the feed error.
List any non packaged addons and check for white spaces at the beginning and end of every template file you use.
Trauko
02-21-2007, 10:44 PM
La solución mas facil que tienes es subir nuevamente index.php e image_template.php de la plantilla simple que es lo que tienes editado.
suerte
Dkozikowski
02-22-2007, 12:06 AM
If it is not an addon, then i'm begining to wonder if somehow, these files were saved as UTF-8 with BOM. Or if the pixelpost files were uploaded as binary instead of ASCII.
Even the admin index has the mysterious space problem.
Dkozikowski
02-22-2007, 01:46 AM
Alright, finally home!
I can say for sure now that index.php is not at fault. I have compaired your index to a clean 1.5 index and they match 100%.
I did notice you have my comment stats addon installed. What version? Have you modified it? Something does not seem right if you are using v1.0. If you are using a previous version (0.5 or 0.1) please upgrade, otherwise please delete it and see if this helps.
Estos son los addons que tengo instalados:
(photostats - version 0.1)
(most_commented - version 0.2)
(admin_comment_stat - version 0.5)
(photoblink_thumbs - version 1.0)
(top_views - version 0.4)
(random_thumb - version 0.3)
(referer_spam - version 1.0)
(paged_archive - version 1.0)
(current_datetime - version 1.1)
(copy_folder - version 1.0)
(advanced_stat - version 1.0)
(admin_ping - version 1.0)
(admin_12CropImage - version 1.0)
Espero tu contestación. Gracias
Dkozikowski
02-22-2007, 07:10 AM
Estos son los addons que tengo instalados:
(most_commented - version 0.2)
(top_views - version 0.4)
Espero tu contestación. Gracias
Ok,
Top_views v0.4
There is an extra white space on line 172 right under the closing php tag ( ?> )
?>
<--- DELETE THIS SPACE!
Delete this extra space and save.
Most Commented (I could only find v1.1)
There is an extra white space on line 75 right under the closing php tag ( ?> )
?>
<--- DELETE THIS SPACE!
Delete this extra space and save
Let me know when you do this so i can check and see if the white spaces are diminishing.
Ya he solucionado el problema, y a continuación os explico donde residia dicho problema, para que si le sucede lo mismo que a mi otro usuario, lo sepa solucionar.
La pista me la dío dwilkinsjr cuando me dijo que tenia que quitar el espacio del final en 2 de los addons:
Ej: Top_views v0.4
There is an extra white space on line 172 right under the closing php tag ( ?> )
PHP Code:
?>
<--- DELETE THIS SPACE!
Delete this extra space and save.
Most Commented (I could only find v1.1)
There is an extra white space on line 75 right under the closing php tag ( ?> )
PHP Code:
?>
<--- DELETE THIS SPACE!
Delete this extra space and save
Let me know when you do this so i can check and see if the white spaces are diminishing.
Pues lo hice, pero no me soluciono nada, pero más tarde me dí cuenta que el unico archivo que he variado ha sido el pixelpost.php, cuando introduje:
$pixelpost_db_host = "***********"; // database host, often "localhost"
$pixelpost_db_user = "*********"; // database user
$pixelpost_db_pass = "*********"; // database user password
$pixelpost_db_pixelpost = "********"; // database
$pixelpost_db_prefix = "pixelpost_"; // table prefix, leave as is unless you want to install multiple blogs on the same database
// pixelpost version
$version = "********************";
?>
<---------AQUI TENÍA 5 ESPACIOS EN BLANCO, ese era mi problema.
Quiero dar las gracias a dwilkinsjr y schonhose (que no es tan malo tu español), por la ayuda que me habeis prestado.
Un saludo.
Espero que los post en español aumenten.......
THANKS YOU
Dkozikowski
02-22-2007, 06:54 PM
Ahhh, see, I knew you had some blank lines somewhere :)
Well it's good that you cleaned those two addons up and nice job locating the blank lines!
We would have checked there next ;)
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.