Topic: extern.php with rss 2.0

actually my extern.php give me rss 0.91 feed.
but i need rss 2.0 feed.

i have tested the différents rss.php scripts available on this forum (or on punres), but the probleme is that they give me the latest or active messages, or i just need the latest or active topic ...

so i need a script who as exactly the same fucntions than extern.php bu wih give me rss 2.0 feed.

can anyone help me ,

thanks

2

Re: extern.php with rss 2.0

If there isn't one knocking about, I'll try and backport the one I use for you. It has latest message/topic selectable display.

Re: extern.php with rss 2.0

thanks smile

4 (edited by MattF 2007-12-27 14:47)

Re: extern.php with rss 2.0

Have posted both the Atom and RSS generators up, so you have the choice of either/both:

http://forums.bauchan.org/unix/viewdownloads.php?dcid=1

There is a langfile to go in lang/English/, a feed_functions.php file to go in include/user/, and then the two atom.xml and rss.xml files to go in the root forum dir. The scripts are call via one of four parameters:

[path/to/forum/]atom.xml?cid=[category id]
[path/to/forum/]atom.xml?fid=[forum id]
[path/to/forum/]atom.xml?tid=[topic id]

The fourth one is for if you are running the sub-forum mod. It will generate a feed for all of the child forums of a parent forum:

[path/to/forum/]atom.xml?pfid=[parent forum id]


These are feeds on the test forum:

http://forums.bauchan.org/punbb/atom.xml?fid=1
http://forums.bauchan.org/punbb/rss.xml?fid=1


Edit: Obviously, change atom.xml to rss.xml above if you're using the RSS feeds. big_smile

5 (edited by hurry 2008-01-01 12:14)

Re: extern.php with rss 2.0

echo '<?xml-stylesheet type="text/css" href="'.$forumuri.'style/feeds/rss.css"?>'."\n";

XML Parsing Error: not well-formed
Line Number 139, Column 8:

I don't have a feeds directory in my style folder or a rss.css file. sad

6

Re: extern.php with rss 2.0

I have uploaded all the files. It still gives the error for each of that code in echo.

   

echo '<?xml version="1.0" encoding="'.$lang_common['lang_encoding'].'"?>'."\n";
    echo '<?xml-stylesheet type="text/css" href="'.$forumuri.'style/feeds/rss.css"?>'."\n";
    echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">'."\n\n";
    echo '<channel>'."\n";
    echo '<title>'.pun_htmlspecialchars($pun_config['o_board_title']).'</title>'."\n";
    echo '<link>'.$forumuri.'</link>'."\n";
    echo '<description>'.pun_htmlspecialchars($pun_config['o_board_title']).'</description>'."\n";
    echo '<language>'.$language.'</language>'."\n";
    echo '<docs>http://backend.userland.com/rss</docs>'."\n";
    echo '<atom:link href="'.$atomdir.basename($_SERVER['PHP_SELF']).$add.'" rel="self" type="application/rss+xml"/>'."\n";
    echo '<ttl>60</ttl>'."\n\n";

7 (edited by MattF 2008-01-01 15:43)

Re: extern.php with rss 2.0

hurry wrote:
echo '<?xml-stylesheet type="text/css" href="'.$forumuri.'style/feeds/rss.css"?>'."\n";

XML Parsing Error: not well-formed
Line Number 139, Column 8:

I don't have a feeds directory in my style folder or a rss.css file. sad

Just remove that line. I thought I had already done so. smile It's not required.

Edit: You may also need to change the file extension back to .php, rather than .xml. The server may try to serve it up as is rather than running it.

8

Re: extern.php with rss 2.0

I've uploaded a newer version of those scripts now, btw. The main alterations are use of the Etag header for modified/not modified status codes to the browser, and some general code trimming/optimising. One thing to note. I've set these scripts up for mysql seeing as that seems to be the general db type in use, so any pgsql users will need to alter these two lines:

//pg_result_seek($result, 0);
mysql_data_seek($result, 0);

by commenting out the mysql line and removing the comments from the pgsql line. smile

The download is still at the same location:

http://forums.bauchan.org/unix/viewdownloads.php?dcid=1

9

Re: extern.php with rss 2.0

hurry wrote:

I have uploaded all the files. It still gives the error for each of that code in echo.

I've uploaded a new version now, (with the files now having a .php extension instead of .xml), so your server won't try serving the files directly instead of actually executing them. smile