selectbutton
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile / Ignoring   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help me fix our RSS feed

 
Post new topic   Reply to topic    selectbutton Forum Index -> GBF 120%
View previous topic :: View next topic  
Author Message
Toups
tyranically banal


Joined: 03 Dec 2006
Location: Ebon Keep

PostPosted: Tue May 29, 2007 6:21 am    Post subject: help me fix our RSS feed    Reply with quote

so for some reason the subject line doesn't show up on RSS readers for the SB feed.

this is the code of the xml file:
Code:
<php>
<rss>
   <channel>
      <title>Select Button</title>
      <link>http://selectbutton.net/</link>
      <description></description>
      <language>en</language>
<?php
   foreach($posts as $post){
      $url = "http://forums.selectbutton.net/viewtopic.php?t=".$post['id'];
      $bare = trim(strip_tags($post['body']));
      echo <<<XML
      <item>
         <title>{$post['title']}</title>
         <link>$url</link>
         <comments>$url</comments>
         <pubDate>{$post['time']}</pubDate>
         <dc>{$post['poster']['username']}</dc>
         <guid>
            $url
         </guid>
         <description>
            $bare
         </description>
         <content><CDATA></content>
      </item>
XML;
   }
?>   
   </channel>
</rss>


how do I change it so that you can see the subject line?
_________________
Filter / Back to top 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
falsedan



Joined: 13 Dec 2006
Location: San Francisco

PostPosted: Tue May 29, 2007 7:15 am        Reply with quote

without seeing the entire RSS PHP file, I'm going to make a total guess and say:
change
Code:
<title>{$post['title']}</title>

to
Code:
<title>{$post['subject']}</title>

_________________
Filter / Back to top 
View user's profile Send private message Send e-mail
Toups
tyranically banal


Joined: 03 Dec 2006
Location: Ebon Keep

PostPosted: Tue May 29, 2007 7:18 am        Reply with quote

oops, that IS the php file, not xml.

let me try that though.
_________________
Filter / Back to top 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Toups
tyranically banal


Joined: 03 Dec 2006
Location: Ebon Keep

PostPosted: Tue May 29, 2007 7:24 am        Reply with quote

hey it seems to have worked!
_________________
Filter / Back to top 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
falsedan



Joined: 13 Dec 2006
Location: San Francisco

PostPosted: Tue May 29, 2007 7:30 am        Reply with quote

WOO!

I have been hacking half-documented PHP for the last 4 months, so I am getting pretty good at guessing!
_________________
Filter / Back to top 
View user's profile Send private message Send e-mail
Toups
tyranically banal


Joined: 03 Dec 2006
Location: Ebon Keep

PostPosted: Tue May 29, 2007 7:34 am        Reply with quote

falsedan you are a true man.

I also owe thanks to a mysterious lurker who IMed me giving me pretty much the same advice.

Your help is appreciated, mysterious stranger!
_________________
Filter / Back to top 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Quick Reply
 Attach signature
 Notify on replies

Display posts from previous:   
Post new topic   Reply to topic    selectbutton Forum Index -> GBF 120% All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group