• User

    Problema Cutenews e feed RSS

    Ho un problema con cutenews e la configurazione del file rss.php!
    In poche parole,lo script sopra citato permette tramite lo stesso di configurare gli RSS ma dopo fatta tutta la procedura il se vado nella paggina dove dovrebbe apparire quindi:

    "http://www.miosito.com/rss.php"

    mi dice:
    The RSS is not configured.
    Please do this from: **CuteNews > Options > Implementation Wizards > RSS

    Come posso fare ho provato anche ad inpostare il file in questione con un programma adatto e ad impostarlo manualmente,ma niente!
    Allego script:

    <?PHP
    include('./data/rss_config.php');

    if(!isset($rss_news_include_url) or !$rss_news_include_url or $rss_news_include_url == ''){

    die("The RSS is not configured.<br>Please do this from: <strong>CuteNews > Options > Implementation Wizards > RSS</strong>");
    

    }

    header("Content-type: text/xml");

    echo"<?xml version="1.0" encoding="$rss_encoding" ?>
    <?xml-stylesheet type="text/css" href="skins/rss_style.css" ?>
    <rss version="2.0" >
    <channel>
    <title>$rss_title</title>
    <link>$rss_news_include_url</link>
    <language>$rss_language</language>
    <description></description>
    <!-- <docs>This is an RSS 2.0 file intended to be viewed in a newsreader or syndicated to another site. For more information on RSS check : http://www.feedburner.com/fb/a/aboutrss</docs> -->
    <generator>CuteNews</generator>
    ";

    if(!$_GET[number] or $_GET[number] == ''){ $number = 10;}else{ $number = $_GET[number];}
    if(!$_GET[only_active] or $_GET[only_active] == ''){ $only_active = TRUE;}else{ $only_active = $_GET[only_active];}

    $template="rss";
    include("show_news.php");

    echo"</channel></rss>";
    ?>

    Come posso fare,help me?????
    Grazie in anticipo.
    **


  • Super User

    posta il contenuto del file ./data/rss_config.php


  • User

    <?PHP

    //RSS Configurations (Auto Generated file)

    $rss_news_include_url = "http://www.miosito.com/index.php";

    $rss_title = "Bevilo.com La guida ai locali di Roma costruita da te ";

    $rss_encoding = "UTF-8";

    $rss_language = "en-it";

    ?>

    Adesso in parte il problema lo risolto....Nel senso che con Mozilla me lo visualizza in modo perfetto invece con I.E. nn mi visualizza le img. ,nn mi impagina le notizie,il titolo/link me lo visualizza come indirizzo web nn clikkabile e nn capisco per quale motivo.Da cosa può dipendere?
    Grazie ancora.


  • User

    Help me.........
    Nn riesco a capire xchè sto c....o de I.E. nn me visualizza la paggina de feed RSS!!!


  • Super User

    @Monny77 said:

    Help me.........
    Nn riesco a capire xchè sto c....o de I.E. nn me visualizza la paggina de feed RSS!!!

    Secondo me la pagina non include correttamente il file ./data/rss_config.php

    Anziche: include('./data/rss_config.php');
    prova ad usare un persorso relativo, per esempio include('.../data/rss_config.php'); oppure include('data/rss_config.php'); in base a dove si trova la cartella "data".


  • User

    Grazie per la risposta ma...:x
    Ho provato con entrambe i percorsi ma con I.E non cambia assolutamente nulla,x Mozzilla il primo percorso nn funge invece con il secondo va alla perfezione;quindi deduco che " include('data/rss_config.php'); " sia esatto!
    Praticamente explorer mi visualizza la paggina con i comandi HTML in bella visione.Di seguito ti mostro un esempio:

    ]]> 1186594067 Wed, 08 Aug 2007 19:27:47 +0200 http://www.bevilo.com/index.php?subaction=showfull&id=1186428707

    Invece di mostrare il titolo del Post e cioè:

    Faber beach (clikkabile)

    Perchè Bill ce deve complicà la vita...😢
    Grazie in anticipo per la risposta


  • Super User

    @Monny77 said:

    Grazie per la risposta ma...:x
    Ho provato con entrambe i percorsi ma con I.E non cambia assolutamente nulla,x Mozzilla il primo percorso nn funge invece con il secondo va alla perfezione;quindi deduco che " include('data/rss_config.php'); " sia esatto!
    Praticamente explorer mi visualizza la paggina con i comandi HTML in bella visione.Di seguito ti mostro un esempio:

    ]]> 1186594067 Wed, 08 Aug 2007 19:27:47 +0200 http://www.bevilo.com/index.php?subaction=showfull&id=1186428707

    Invece di mostrare il titolo del Post e cioè:

    Faber beach (clikkabile)

    Perchè Bill ce deve complicà la vita...😢
    Grazie in anticipo per la risposta

    Quello che hai postato suppongo sia l'output di include("show_news.php");
    Posta il suo codice.

    P.S.: quando poni un quesito su un problema cerca di essere il più esaustivo possibili. In questo modo avrei evitato di scriverti più volte "posta questo" e" posta quello". Questo poichè se avessi avuto fretta o stanchezza magari non ti rispondevo. Credo questo valga anche per molti. Prendilo come un consiglio. A volte se non si risponde ad una discussione non è perchè nessuna sa la risposta, ma può dipendere da una domanda esposta male o incompleta.


  • User

    Questo è il contenuto del file "show_news.php":

    <?PHP

    error_reporting (E_ALL ^ E_NOTICE);

    $cutepath = FILE;
    $cutepath = preg_replace( "'\\show_news.php'", "", $cutepath);
    $cutepath = preg_replace( "'/show_news.php'", "", $cutepath);

    require_once("$cutepath/inc/functions.inc.php");
    require_once("$cutepath/data/config.php");

    // If we are showing RSS, include some need variables.
    if($template == 'rss'){
    include("$cutepath/data/rss_config.php");
    }

    //----------------------------------
    // Check if we are included by PATH
    //----------------------------------
    if($HTTP_SERVER_VARS["HTTP_ACCEPT"] or $HTTP_SERVER_VARS["HTTP_ACCEPT_CHARSET"] or $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"] or $HTTP_SERVER_VARS["HTTP_CONNECTION"]){ /* do nothing */ }
    elseif(eregi("show_news.php", $PHP_SELF)){
    die("<h4>CuteNews has detected that you are including show_news.php using the URL to this file.<br>
    This is incorrect and you must include it using the PATH to show_news.php</h4><br>Example:<br>
    this is <font color=red>WRONG</font> :   <?PHP include("http://yoursite.com/cutenews/show_news.php"); ?><br>
    this is <font color=green>CORRECT</font>:   <?PHP include("cutenews/show_news.php"); ?><br>
    <br><BR>// <font size=2>if you think this message shouldn't be shown, open show_news.php and delete it from there</font>");
    }
    //----------------------------------
    // End of the check
    //----------------------------------

    if(!isset($subaction) or $subaction == ""){ $subaction = $POST["subaction"]; }

    if(!isset($template) or $template == "" or strtolower($template) == "default"){ require_once("$cutepath/data/Default.tpl"); }
    else{
    if(file_exists("$cutepath/data/${template}.tpl")){ require("$cutepath/data/${template}.tpl"); }
    else{ die("Error!<br>the template <b>".htmlspecialchars($template)."</b> does not exists, note that templates are case sensetive and you must write the name exactly as it is"); }
    }

    // Prepare requested categories
    if(eregi("[a-z]", $category)){
    die("<b>Error</b>!<br>CuteNews has detected that you use $category = "".htmlspecialchars($category).""; but you can call the categories only with their <b>ID</b> numbers and not with names<br>
    example:<br><blockquote><?PHP<br>$category = "1";<br>include("path/to/show_news.php");<br>?></blockquote>");
    }
    $category = preg_replace("/ /", "", $category);
    $tmp_cats_arr = explode(",", $category);
    foreach($tmp_cats_arr as $key=>$value){
    if($value != ""){ $requested_cats[$value] = TRUE; }
    }

    if($archive == ""){
    $news_file = "$cutepath/data/news.txt";
    $comm_file = "$cutepath/data/comments.txt";
    }else{
    $news_file = "$cutepath/data/archives/$archive.news.arch";
    $comm_file = "$cutepath/data/archives/$archive.comments.arch";
    }

    $allow_add_comment = FALSE;
    $allow_full_story = FALSE;
    $allow_active_news = FALSE;
    $allow_comments = FALSE;

    //<<<------------ Detarime what user want to do
    if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "") or ($requested_cats[$ucat] == TRUE ) ) ){
    if($subaction == "addcomment"){ $allow_add_comment = TRUE; $allow_comments = TRUE; }
    if($subaction == "showcomments"){ $allow_comments = TRUE; }
    if(($subaction == "showcomments" or $allow_comments == TRUE) and $config_show_full_with_comments == "yes"){$allow_full_story = TRUE; }
    if($subaction == "showfull") $allow_full_story = TRUE;
    if($subaction == "showfull" and $config_show_comments_with_full == "yes") $allow_comments = TRUE;

    }
    else{
    if($config_reverse_active == "yes"){ $reverse = TRUE; }
    $allow_active_news = TRUE;
    }
    //----------->>> Detarime what user want to do

    require("$cutepath/inc/shows.inc.php");
    if($_GET['archive'] and $_GET['archive'] != ''){ $archive = $_GET['archive']; } // stupid fix ?
    unset($static, $template, $requested_cats, $category, $catid, $cat,$reverse, $in_use, $archives_arr, $number, $no_prev, $no_next, $i, $showed, $prev, $used_archives);

    ?>

    E questo è il risultato finale di "rss.php":http://www.bevilo.com/index.php?subaction=showfull&id=1186428707 <p align="justify"><span style="color: rgb(255, 255, 255);"><img style="width: 297px; height: 222px;" alt="" src="http://www.bevilo.com/data/upimages/Faber_beach.jpg" align="none" border="0"><br><span style="color: rgb(0, 0, 0);"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Locale ad Ostia (Roma) aperto solamente in estate, ma in quei quattro mesi è uno dei più frequentati.<br></font></span></span><span style="color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0);"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><br></font><span style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(153, 0, 0);"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><strong>Faber beach</strong> <br></font><span style="background-color: rgb(255, 255, 255);"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">LungoMare Paolo Toscanelli 199<br>00121 Ostia (Roma)<br></font></span></span><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tel: 06/5613849<br></font></span></span></span><a href="http://www.faberbeach.com/" target="_blank"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sito ufficiale</font></a><br></p>

    In pratica nn mi visualizza solo la notizia postata ma tutto l'html come si pùo vedere sopra.
    Comunque ho provato ad aprire gli RSS di altri siti ed il risultato è lo stesso,probabilmente è propio i.explorer che a difficolta a leggere lo script!?!?
    Grazie in anticipo per la risposta e spero di essermi espresso meglio,purtroppo l'inesperienza porta anche ad essere inprecisi.
    Grazie ancora