Foros del Web » Programando para Internet » PHP »

Poner un feed en mi web con CMS propio

Estas en el tema de Poner un feed en mi web con CMS propio en el foro de PHP en Foros del Web. Hola a todos, he creado una web con CMS propio ( http://mememes.com.ar ), y lo he querido validar en feedburner y me sale esto: Cita: ...
  #1 (permalink)  
Antiguo 07/03/2012, 10:13
 
Fecha de Ingreso: marzo-2012
Ubicación: España
Mensajes: 32
Antigüedad: 12 años
Puntos: 2
Poner un feed en mi web con CMS propio

Hola a todos, he creado una web con CMS propio ( http://mememes.com.ar ), y lo he querido validar en feedburner y me sale esto:

Cita:
The URL does not appear to reference a valid XML file. We encountered the following problem: Error on line 24: The element type "br" must be terminated by the matching end-tag "</br>".
Entonces le doy a Confirm its validity now. y me sale esto en el mensaje:

It looks like this is a web page, not a feed. I looked for a feed associated with this page, but couldn't find one. Please enter the address of your feed to validate.

(( Pagina: http://feedvalidator.org/check.cgi?url=http%3a%2f%2fmememes.com.ar ))

Bueno, os agradeceria un montón que me ayudaseis, he abierto la web hoy, es una pagina del tipo CuantoCabrón pero para mis amigos y eso, espero respuestas!!

Un saludo!!
  #2 (permalink)  
Antiguo 07/03/2012, 10:19
Avatar de Eleazan  
Fecha de Ingreso: abril-2008
Ubicación: Ibiza
Mensajes: 1.879
Antigüedad: 15 años, 11 meses
Puntos: 326
Respuesta: Poner un feed en mi web con CMS propio

Feed != pagina web


Quizás esto te ayude: http://www.comolohago.cl/2010/01/06/...ss-desde-cero/

;)
__________________
>> Eleazan's Source
>> @Eleazan
  #3 (permalink)  
Antiguo 07/03/2012, 10:37
 
Fecha de Ingreso: marzo-2012
Ubicación: España
Mensajes: 32
Antigüedad: 12 años
Puntos: 2
Respuesta: Poner un feed en mi web con CMS propio

Eleazan, ya lo he mirado, pero cuando pongo eso en mi index.php:

[spoiler]
Cita:
<?php
header("Content-Type: application/rss+xml; charset=utf-8");
?>

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>¡MeMeMes! ¡Hechate unas risas!</title>
<link>http://www.mememes.com.ar</link>
<description>Tu p&aacute;gina de vi&ntilde;etas</description>

<?php
include ('conexiones/conexion.php');
//hacemos las consultas
$result = mysql_query('SELECT * FROM noticias ORDER BY id_noticia DESC', $connect);
$totalregistros=mysql_num_rows($result);
if ($totalregistros == 0){
echo "No hay ningún registro. Puede haber sido un error. Lo solucionaremos en cuanto podamos. Gracias.";
exit;
}
$registros=1;
$pagina=$_GET['pag'];
if (!$pagina) {
$inicio = 0;
$pagina = 1;
}
else {
$inicio = ($pagina - 1) * $registros;
}
$totalregistros = mysql_num_rows($result);
$result = mysql_query("SELECT * FROM noticias ORDER BY fecha DESC LIMIT $inicio, $registros");
$total_paginas = ceil($totalregistros / $registros);

// Calculamos $fin y luego $enlace_fin para despues saber el tamaño de enlaces a mostrar
$j=10;
for ($fin=1; $fin<$j ;$fin+=1){
for ($j=10; $j<$pagina; $j+=10)
{}}
$enlace_fin = $fin - $pagina;

// Calculamos el boton para avanzar a la pagina siguiente
$j=10;
for ($sigpag=1; $sigpag<$j ;$sigpag+=10){
for ($j=10; $j<$pagina; $j+=10)
{}}

// Calculamos el boton para retroceder a la pagina anterior
$j=21;
for ($antpag=0; $antpag<=$j-20;$antpag+=1){
for ($j=10; $j<$pagina; $j+=10)
{}}

// Calculamos el numero en el cual nos paramos para empezar a paginar
$j=11;
for ($ini=0; $ini<=$j-10;$ini+=1){
for ($j=10; $j<$pagina; $j+=10)
{}}

$result2=mysql_query("SELECT * FROM comentarios WHERE id='$id'",$connect);
$totalcomentarios=mysql_num_rows($result2);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>¡MeMeMes! ¡Hechate unas risas!</title>
<link rel="stylesheet" type="text/css" href="estilos/style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="../estilos/formularios.css" media="screen" />
</head>
<body>
<div id="wrap">
<div id="header">
<h1><a href="http://mememes.com.ar">MeMeMes</a></h1>
<h2>¡Hechate unas risas!</h2>
</div>

<div id="menu">
<a href="index.php">&Uacute;ltimos </a>|
<a href="aleatorios.php">Aletorios </a>|
<a href="memes.php">MeMes </a>
</div>

<div id="contenedor" class="left">

<?php
//Recogemos las consultas en un array y las mostramos
while($row=mysql_fetch_array($result))
{
$result2=mysql_query("SELECT * FROM comentarios where id='".$row[id_noticia]."'",$connect);
$totalcomentarios=mysql_num_rows($result2);
echo '<h2><a href="ver.php?id_noticia='.$row[id_noticia].'">'.$row[titulo].'</a></h2>';
echo '<span>Autor:&nbsp;'.$row[autor].'&nbsp; '.$row[fecha].'</span><br><br><br>';
echo '<a href="ver.php?id_noticia='.$row[id_noticia].'"><img src="comics/'.$row[foto].'" /></a><br><br><br><br>';
}
mysql_free_result($result)

?>
</div>
<div id="menuright">
<?php include('menu.php');?><br />
</div>

<div style="clear: both;"> </div>

<div style="clear: both;" >
<?php
if($pagina>1) {
echo "<a href='index.php?pag=".($pagina-1)."'>« Anterior</a> ";
}
if($pagina>10) {
echo " <a href='index.php?pag=".($antpag)."'>«</a>";?> <?
}


for ($i=$ini; $i<=$enlace_fin+$pagina and $i<=$total_paginas; $i++){
if ($i == $pagina){?>
<? echo "<b>".$i."</b> ";}
else {
echo "<a href='index.php?pag=$i'>$i</a> "; }
}
if($pagina < $total_paginas) {
echo " <a href='index.php?pag=".($pagina+1)."'>Siguiente</a>";
}
if($ini <= $total_paginas) {
echo " <a href='index.php?pag=".($sigpag)."'> »»</a>";
}
?>
</div>

<div id="footer"><a href="http://mememes.com.ar"> MeMeMes &copy;</a> || Dise&ntilde;ado por Alex Alarcón</div>
</div>
</body>
</html>

</channel>
</rss>
[/spoiler]

Me sale un error en esta linea:

<?xml version="1.0" encoding="utf-8"?>

Como lo soluciono??
  #4 (permalink)  
Antiguo 07/03/2012, 10:40
Avatar de Eleazan  
Fecha de Ingreso: abril-2008
Ubicación: Ibiza
Mensajes: 1.879
Antigüedad: 15 años, 11 meses
Puntos: 326
Respuesta: Poner un feed en mi web con CMS propio

El espacio / intro q hay antes, creo :)
__________________
>> Eleazan's Source
>> @Eleazan
  #5 (permalink)  
Antiguo 07/03/2012, 10:46
 
Fecha de Ingreso: marzo-2012
Ubicación: España
Mensajes: 32
Antigüedad: 12 años
Puntos: 2
Respuesta: Poner un feed en mi web con CMS propio

Sigue igual
  #6 (permalink)  
Antiguo 09/03/2012, 13:19
 
Fecha de Ingreso: marzo-2012
Ubicación: España
Mensajes: 32
Antigüedad: 12 años
Puntos: 2
Respuesta: Poner un feed en mi web con CMS propio

Hola, ya mas o menos lo he conseguido, me salta un solo error, validen http://www.mememes.com.ar/feed/rss.php y veran el error

Un saludo!!

Etiquetas: cms, feed, propio
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:51.