Jump to content

RSS help


KevinM1

Recommended Posts

I have a script that creates an RSS feed for one of the sites I have.  It was working fine, but now it's parsing the info wrong and I'm not sure why.  All it's supposed to do is return a message board post.  Below is the code that creates the link:

[code]
<?php //just to turn on the pretty colors

<link>".$base."forum/viewthread.php?".$rstart."forum_id=".$row['forum_id']."&amp;thread_id=".$row['thread_id']."#post_".$row['post_id']."</link>\n

?>
[/code]

The problem lies at the forum_id - &amp; segment of the code.  Instead of returning something like:
website.com/forum/viewthread.php?rowstart=20[b]forum_id[/b]=4[b]&[/b]thread_id=25#post_66

I get:
website.com/forum/viewthread.php?rowstart=20=4thread_id=25#post_66

Any ideas on why this is screwing up?  And I haven't changed the code in months, so it's not as though I screwed it up by tweaking it myself.
Link to comment
Share on other sites

The $rstart variable is fine...all it does is specify which table row to start on for pagination.

I put an ampersand before the forum_id, but I'm not sure if it worked yet.  I use Google for reading my feeds, and sometimes it takes a while for any changes to become apparent.
Link to comment
Share on other sites

I fixed it.  My problem wasn't with creating the feed.  The feed came as part of PHP-Fusion.  The problem came from the pre-existing code using & instead of its HTML entity equivalent whenever the post appeared on any page but the first.  My original tweak (swapping & for its entity), months ago, worked on posts that were on the first page so I thought it would work for all posts, and I didn't notice that $rstart would contain the &.  Oops. :blush:
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.