boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"News" syndication

 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
blog17



Joined: 28 Jan 2003
Posts: 144
Location: London, UK

PostPosted: Sat Mar 15, 2003 5:26 pm    Post subject: "News" syndication Reply with quote

Hi;

How can I make it so that other websites can display my headlines on their pages so that it links back to mine?

Im assuming it has something to do with b2rss(2) and b2rdf. However, I get these errors when accessing those page:

b2rss.php
Quote:
A semi colon character was expected. Error processing resource 'http://www.mjnewsonline.com/b2rss.php'. Line 16, Position 56


<link>http://www.mjnewsonline.com/index.php?p=151&c=1</link>
-------------------------------------------------------^


b2rss2.php
Quote:
A semi colon character was expected. Error processing resource 'http://www.mjnewsonline.com/b2rss2.php'. Line 24, Position 65


<item rdf:about="http://www.mjnewsonline.com/index.php?p=151&c=1">
----------------------------------------------------------------^


b2rdf.php
Quote:
A semi colon character was expected. Error processing resource 'http://www.mjnewsonline.com/b2rdf.php'. Line 28, Position 73


<rdf:li rdf:resource="http://www.mjnewsonline.com/index.php?p=151&c=1"/>
------------------------------------------------------------------------^

_________________
Check this out! The ULTIMATE site!
Back to top
View user's profile Send private message Visit poster's website
cjc



Joined: 24 Dec 2002
Posts: 146
Location: New York

PostPosted: Sun Mar 16, 2003 6:04 am    Post subject: Reply with quote

I'm not sure what's going on with you, but it works fine for me.
Back to top
View user's profile Send private message Visit poster's website
blog17



Joined: 28 Jan 2003
Posts: 144
Location: London, UK

PostPosted: Tue Mar 18, 2003 5:45 pm    Post subject: Reply with quote

No way, I have used 5 different computers now and they are all giving me the same error.

What exactly works fine for you?
_________________
Check this out! The ULTIMATE site!
Back to top
View user's profile Send private message Visit poster's website
cjc



Joined: 24 Dec 2002
Posts: 146
Location: New York

PostPosted: Tue Mar 18, 2003 8:58 pm    Post subject: Reply with quote

blog17 wrote:
No way, I have used 5 different computers now and they are all giving me the same error.

What exactly works fine for you?


I'm going to http://www.cjc.org/blog/b2rss.php and it's not barfing. Similarly for b2rss2.php and b2rdf.php.

Your site is down right now, so I can't see what's going on.
Back to top
View user's profile Send private message Visit poster's website
kichu



Joined: 23 Feb 2002
Posts: 53
Location: Chennai,India

PostPosted: Wed Mar 19, 2003 8:08 am    Post subject: Reply with quote

I want to put up a request to my viewers to include a particular snippet of code in their site so that they get the headlines of my blogs on their site(s) with a link to the respective blogs.
What shall I put in the proposed code - could you please help me!
Thanks
Regards
S.K
_________________
Cause something to change, you are not here for ever!
Back to top
View user's profile Send private message Visit poster's website
blog17



Joined: 28 Jan 2003
Posts: 144
Location: London, UK

PostPosted: Wed Mar 19, 2003 2:16 pm    Post subject: Reply with quote

OK, site is back up now, can anyone help?
_________________
Check this out! The ULTIMATE site!
Back to top
View user's profile Send private message Visit poster's website
cjc



Joined: 24 Dec 2002
Posts: 146
Location: New York

PostPosted: Wed Mar 19, 2003 4:05 pm    Post subject: Reply with quote

Hmm. Have you set up some formatting on your posts?

I've pulled out the XML using wget on a linux box. The problem seems to be that Windows Explorer (I haven't tried Netscape) doesn't want to render the XML output. This may be an IE problem, and your news syndication will work fine, but I can't tell, since I don't have an RSS thing setup.

Anyway, here's an <item> from my site:
Code:

                <item>
                                <title>Slate on Bush's Inept Diplomacy</title>                          <description>Slate has an article today about how inept the Bush Administration's diplomacy has been.

Basically, even though history does not repeat itself in perfect experimental cases, we can note that Clinton was able to get Greek support for his Kosovo intervention, despite popular Greek sentiment against it.  In fact, getting ...</description>
                                <link>http://www.cjc.org/blog/index.php?p=147&c=1</link>
                </item>


Here's an <item> from your site:

Code:

                <item>
                                <title>Michael Lavishes Liz Taylor For Her 71st Birthday </title>                               <description>Despite rumors of a rift when Michael Jackson didn't show up for Elizabeth Taylor's 71st birthday, the Chicago Sun-Times gives a different story. They reported that when she turned 71 recently; Jackson sent her more than 1,000 sterling silver roses, along with a diamond bracelet. He even included pictures of himself and his kids. <br />
</description>
                                <link>http://www.mjnewsonline.com/index.php?p=157&c=1</link>
                </item>


Note that at the end of the <description> tags, my XML has a "...", which indicates that there's more content. At the end of your <description>, there's this:
Code:
<br />

It might be what's throwing IE off.

Again, the XML might be valid, and it's just IE's problem. I can't tell.

I believe the "<br />" are just "<br />" tags that might be stuck at the end of postings by b2 in general. You might want to try stripping these out in your RSS output.

With that theory, you might want to look at the command that renders the <description> tags, which is bloginfo_rss() in b2-include/b2template.functions.php. It doesn't do much except call strip_tags() and convert_chars(). Possibly, you can write an alternate version of these functions that will strip off trailing <br />, though strip_tags() should do that according to the docs.
Back to top
View user's profile Send private message Visit poster's website
blog17



Joined: 28 Jan 2003
Posts: 144
Location: London, UK

PostPosted: Wed Mar 19, 2003 4:28 pm    Post subject: Reply with quote

OK, so how would one be able to display my "headlines" on their website? It is something that I want to offer other webmasters of websites which are similar to mine, they would be able to display the latest headlines.
_________________
Check this out! The ULTIMATE site!
Back to top
View user's profile Send private message Visit poster's website
cjc



Joined: 24 Dec 2002
Posts: 146
Location: New York

PostPosted: Wed Mar 19, 2003 4:36 pm    Post subject: Reply with quote

blog17 wrote:
OK, so how would one be able to display my "headlines" on their website? It is something that I want to offer other webmasters of websites which are similar to mine, they would be able to display the latest headlines.


They need something to parse the XML output as an RSS/RDF newsfeed. Their website management software might have something already built in (e.g., PHPWebLog, and I believe slash), or they can put a module in themselves. I believe Michel, the author of b2, has written a such a thing that can be integrated into b2, but I can't find it in my 30 second of searching. Michel's piece, IIRC, is a general purpose PHP piece, and will work with other software, not just b2.

Possibly, I'll set this up for myself over the weekend if I have time, mainly to get a slashdot newsfeed, so I don't have to go over there as frequently. If I do this, I'll point the thing at your website to see if the XML gets parsed correctly.

Actually, to ask the obvious question, have they tried to read your XML as an RSS feed using the right software (i.e., not IE)?
Back to top
View user's profile Send private message Visit poster's website
arkine



Joined: 26 Feb 2003
Posts: 2

PostPosted: Sun Apr 27, 2003 4:03 am    Post subject: RSS Reply with quote

I use a program called "Fase4" to add feeds on my site.
(http://www.fase4.com/rdf/)

It's really nice and even will cache files at set intervals. It's really easy to add into your B2 templete also.

If your too lazy to figure out Fase4 take a look at RSS-Xpress Lite (http://rssxpress.ukoln.ac.uk/lite/) it's a free service that "allows you to add RSS channels to your Web sites in a very simple way [javascript]".
Back to top
View user's profile Send private message
hugo



Joined: 28 Nov 2002
Posts: 15

PostPosted: Sun Apr 27, 2003 8:05 am    Post subject: Reply with quote

in flash also:

http://www.erational.org/software/rssViewer/info.html
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
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 2 © 2001, 2002 phpBB Group