RSS Comments and Images

Hi, as you see in my website http://ed2k.paradise.free.fr when you click on rss of comments ou wallpapers it gives you a error message on the both files http://ed2k.paradise.free.fr/rss.php and http://ed2k.paradise.free.fr/rss-comments.php . So what's the problem please help me quickely. Thanks.

Comments

  • acrylian Administrator, Developer
    Which error please? The normal rss.php seems to work fine for me. The comments feed seems simply empty.
  • enams Member
    No go to my website http://ed2k.paradise.free.fr
    Make Comments RSS you will find it near random images, and clicke on the rss bouton you will get to a page where i find an error and no comment. I have 4 comments posted an no one is visible.
  • acrylian Administrator, Developer
    Both feeds work in my feed reader (NetNewsWire on Mac OS X), I see 3 comments and 10 images in the normal feed. But indeed they don't in Firefox 3 . I ran the validator check on them and they both got hte same error that is related to unescaped characters of your gallery title:
    XML parsing error: <unknown>:3:48: not well-formed (invalid token)
    XML parsing error: <unknown>:4:48: not well-formed (invalid token)

    This is indeed something we did correct in the nightly (we didn't notice actually). You can alter the rss feeds yourself to solve that by putton `htmspecialchars()` around the gallery title in both feeds (within <title></title>. Or you could use the nightly.
  • enams Member
    I did'nt Understand how to do this
  • acrylian Administrator, Developer
    Search on rss.php for `<?php echo getOption('gallery_title'); ?><?php echo $albumname; ?>`
    and change it to
    `<?php echo htmlspecialchars(getOption('gallery_title')); ?><?php echo htmlspecialchars($albumname); ?>`
  • enams Member
    it works for the rss file but the rss comment file i do it and i change what have to be changed but nothing appears.

    <title><?php echo htmlspecialchars(getOption('gallery_title'))." - Derniers Commentaires"; ?></title>

    <description><?php echo htmlspecialchars(getOption('gallery_title')); ?></description>

    I changed the line of description and the one of title and I have done them like that. Can you help me? Here is the link for the comments rss feed http://ed2k.paradise.free.fr/rss-comments.php
  • acrylian Administrator, Developer
    Ok, the easiest is you try tonight's nightly build. The feed is working for me, but there are some validation errors, that have been corrected in the nightly.

    What do you use to read the feed?
  • enams Member
    What's the nightly??
  • The nightly is a development build that contains all the current changes to zenphoto. You can download it from http://www.zenphoto.org/files/nightly/. Usually the nightly builds are stable, but they have not had the testing that goes into a release so sometimes there are problems.
  • enams Member
    It doesn't work, can you just tell me how to modify the rss-comments.php file
  • Are you sure you loaded the current nightly build? Your release level is 1550 which is the 1.1.6 base release. The nightly builds are in the 1700's for a release level. I have tried your site and indeed the RSS comments does not work. I then tried the current build stopdesign theme RSS comments feed and it did work.
  • The differences between the current rss-comment.php and the one from 1.1.6 are:
    `--- O:ZenPhotozenphoto v1.1.6rss-comments.php 2008-03-29 14:19:00.000000000 -0700

    +++ O:testalbumzenphotohtdocsrss-comments.php 2008-06-18 15:41:34.000000000 -0700



    <?php<br />
    if (!defined('ZENFOLDER')) { define('ZENFOLDER', 'zp-core'); }

    +define('OFFSET_PATH', 0);

    header('Content-Type: application/xml');

    require_once(ZENFOLDER . "/template-functions.php");

    $themepath = 'themes';

    $host = htmlentities($_SERVER["HTTP_HOST"], ENT_QUOTES, 'UTF-8');



    if($comment['type'] === "images") {

    $imagetag = $imagepath.$comment['filename'].$modrewritesuffix;

    } else {

    $imagetag = "";

    }

    $date = $comment['date'];

    - $albumtitle = $comment['albumtitle'];

    + $albumtitle = htmlspecialchars($comment['albumtitle']);

    if ($comment['title'] == "") $title = $image; else $title = $comment['title'];

    $website = $comment['website'];

    $shortcomment = truncate_string($comment['comment'], 123);

    if(!empty($title)) {

    $title = ": ".$title;

    }

    $count++;

    ?>



    -<?php echo $albumtitle.$title." by ".$author; ?>

    +<?php echo htmlspecialchars($albumtitle.$title." by ".$author, ENT_QUOTES); ?>

    <?php echo '<![CDATA[http://'.$host.WEBPATH.$albumpath.$album.$imagetag.']]>';?&gt;

    -<?php echo $author; ?>

    -<?php echo $shortcomment; ?>

    -<?php echo $albumtitle; ?>

    +<?php echo htmlspecialchars($shortcomment, ENT_QUOTES); ?>

    +<?php echo htmlspecialchars($albumtitle, ENT_QUOTES); ?>

    <?php echo '<![CDATA[http://'.$host.WEBPATH.$albumpath.$album.$imagetag.']]>';?&gt;

    <?php echo fixRSSDate($date); ?>



    <?php } ?>



    `

  • enams Member
    Thanks It Works
Sign In or Register to comment.