I got RSS feeds working by doing the following:
Step 1: I made a displaysection.rss and put it in my templates =20
directory (where my other main displaysection.html and =20
displaystory.html files are).
Step 2: I modified the modules/globaltags/tags/storylist.php, by adding:
the following after line #37
%U - HTML URL of story
and the following after line #154
$storystring =3D str_replace("%U", genurl(array("module" =3D> =20
"displaystory", "story_id" =3D> $srow["story_id"], "format" =3D> =
"html")), =20
$storystring);
__________________________________________
Here is the content of my displaysection.rss:
<?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
"http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version=3D"0.91">
<channel>
<title>{publication_name}</title>
<link>http://newbie.herald-mail.com</link>
<description></description>
<language>en-us</language>
{storylist section=3D"local" order=3D"weight desc" =20
format=3D"<item><title>%Z - =20
%h</title><description>%a</description><link>%U</link></item>"}
{storylist section=3D"tristate" order=3D"weight desc" =20
format=3D"<item><title>%Z - =20
%h</title><description>%a</description><link>%U</link></item>"}
{storylist section=3D"sports,localsports,localbasketball" order=3D"weight =
=20
desc" format=3D"<item><title>%Z - =20
%h</title><description>%a</description><link>%U</link></item>"}
</channel>
</rss>
I also put a similar file in each of the appropriate directories (for =20=
this example - local, tristate and sports directories). This =20
difference here is that I only have the corresponding section in each =20=
of those files (only local is shown):
<?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
"http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version=3D"0.91">
<channel>
<title>{publication_name}</title>
<link>http://newbie.herald-mail.com</link>
<description></description>
<language>en-us</language>
{storylist section=3D"local" order=3D"weight desc" =20
format=3D"<item><title>%Z - =20
%h</title><description>%a</description><link>%U</link></item>"}
</channel>
</rss>
_________________________________
If you do not put the displaysection.rss files in each of the =20
directories, it returns all stories for that publication. So by =20
putting a displaysection.rss that calls for stories by section name in =20=
each corresponding directory, you can presort the categories/sections.
Here are links to see how they turned out:
ALL THREE SECTIONS - =20
http://newbie.herald-mail.com/?module=3Ddisplaysection&format=3Drss
LOCAL SECTION - =20
http://newbie.herald-mail.com/=20
?module=3Ddisplaysection§ion_id=3D51&format=3Drss
TRISTATE SECTION - =20
http://newbie.herald-mail.com/=20
?module=3Ddisplaysection§ion_id=3D50&format=3Drss
SPORTS SECTION - =20
http://newbie.herald-mail.com/=20
?module=3Ddisplaysection§ion_id=3D49&format=3Drss
I also put up a parser so I could see the output of these .rss files, =20=
if anyone wants to know how I did this, let me know.
Here are links to the parsed results:
ALL: http://newbie.herald-mail.com/rss/all.php
LOCAL: http://newbie.herald-mail.com/rss/local.php
TRISTATE: http://newbie.herald-mail.com/rss/tristate.php
LOCAL SPORTS: http://newbie.herald-mail.com/rss/sports.php
Hope this is helpful!
Patti Rowe
Webmaster
Herald-Mail Online
http://www.herald-mail.com
On Wednesday, March 3, 2004, at 12:11 AM, Derrick Miller wrote:
> I don't know whether this is of any help to you, but a patch was =20
> submitted a
> while ago to add RSS support:
>
> http://sourceforge.net/tracker/=20
> index.php?func=3Ddetail&aid=3D864262&group_id=3D29581&atid=3D396658
>
> I haven't tried it, so I have no idea whether it works.
>
>
> ----- Original Message -----
> From: <topekadiy@...>
> To: "Geert Eltink" <geerteltink@...>; "props-general"
> <props-general@...>
> Sent: Monday, March 01, 2004 6:12 AM
> Subject: Re: Re: [Props-general] RSS feeds for Props
>
>
>> Thanks for your reply, BUT it does not work.
>>
>> What did I do wrong?
>> I cut and pasted the file you included, and uploaded it and named it
>> displaysection.rss,
>> I used the url you suggested and got a page not found error, and I =20=
>> tried a
>> direct URL to the file and still got nothing.
>>
>> I dont get it? What is wrong?
>> Cheers,
>> bob c
>>
>>> I've been looking into this. Since props 6.x the template
>> displaysection.rss is missing. So create a file displaysection.rss in =
=20
>> the
>> templates dir and put the following code into the file:
>>>
>>> <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?>
>>> <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
>>> "http://my.netscape.com/publish/formats/rss-0.91.dtd">
>>>
>>> <rss version=3D"0.91">
>>>
>>> <channel>
>>> <title>{publication_name}</title>
>>> <link>{home_url}</link>
>>> <description></description>
>>> <language>en-us</language>
>>>
>>> {storylist order=3D"weight desc"
>> format=3D"<item><title>%h</title><link>%u</link></item>"}
>>>
>>> </channel>
>>>
>>> </rss>
>>>
>>>
>>>
>>> Now you can use a URL like
>>
> http://s90601500.onlinehome.us/=20
> ?module=3Ddisplaysection§ion_id=3D49&format=3Drss
>> to get the newsfeed.
>>>
>>> Cheers, Geert.
>>>
>>> ----- Original Message -----
>>> From: topekadiy [mailto:topekadiy@...]
>>> Sent: 2004-02-20 05:07:35
>>> To: Geert Eltink; props-general
>>> Cc:
>>> Subject: Re: [Props-general] RSS feeds for Props
>>>
>>> I get:
>>> The XML page cannot be displayed
>>> Cannot view XML input using XSL style sheet. Please correct the =
error
> and
>>> then click the Refresh button, or try again later.
>>>
>>> Only one top level element is allowed in an XML document. Error
> processing
>>> resource
>>>
>>
> 'http://s90601500.onlinehome.us/=20
> ?module=3Ddisplaysection=C2=A7ion_id=3D49&format=3Dxml'
>>> Line 72, Position 2
>>>
>>> <br />
>>> -^
>>>
>>> OR: Cannot locate template displaysection.rss
>>>
>>> It all makes no sense to me. Surely there is a much better way to
> provide
>>> rss feeds FROM
>>> a Props site? Wasnt that one of the main goals of PROPS in the first
>> place?
>>> To provide two-way RSS capabilities? When I read that in some of the
> docs
>>> from the sourceforge site, it really made me think that this was
> something
>>> that would be a much more integral part of the PROPS software. Has
> anyone
>>> else successfully gotten an RSS feed running from their props site? =20=
>>> And
> if
>>> so, how did you do it?
>>>
>>> Cheers!
>>> BC
>>>
>>>
>>>
>>>> Have you tried to change the link to:
>>>>
>>>
>>
> http://s90601500.onlinehome.us/=20
> ?module=3Ddisplaysection§ion_id=3D49&format=3Drss
>>>>
>>>> Or change the displaysection.rss to displaysection.xml.
>>>>
>>>> Cheers, Geert.
>>>>
>>>>
>>>> ----- Original Message -----
>>>> From: topekadiy [mailto:topekadiy@...]
>>>> Sent: 2004-02-10 10:58:21
>>>> To: props-general@...
>>>> Cc:
>>>> Subject: [Props-general] RSS feeds for Props
>>>>
>>>> Hello, Ive been dickering around with this:
>>>>
>>>>
>>>
>>
> http://sourceforge.net/tracker/=20
> index.php?func=3Ddetail&aid=3D864262&group_id=3D29581&atid=3D396658
>>>>
>>>> But I am not able to get it to work right!
>>>> I can get an RSS feed to show up on whatever page on my site I put =20=
>>>> it
>> on,
>>>> but if I try to load the link directly into my browser:
>>>>
>>>
>>
> http://s90601500.onlinehome.us/=20
> ?module=3Ddisplaysection§ion_id=3D49&format=3Dxml
>>>>
>>>> I get these error message, plus several xml-validators tell me that =
=20
>>>> it
>> is
>>> not
>>>> a valid xml/rss feed.
>>>>
>>>> Im a bit of a dummy, but Ive tried everything I can think of!
>>>> I need to be able to offer and RSS-feed directly off of my site, =
and
>>> without a
>>>> valid rss feed, no one wants to put it on their site.
>>>>
>>>> Any help or adive? Or any other hacks or patches that will put an =20=
>>>> RSS
>>>> feed out from my site?
>>>>
>>>> Cheers!
>>>>
>>>>
>>>
>>>
>>>
>>> HS^=C2=B6+,=C5=93?=C3=AC=C2=A2=C2=B7=CB=87o$=C2=A9y=C3=A7R=C2=B5=C2=AA=
=C3=ADb<=C2=AB.)=C3=AE=C3=84
>>> =
i=C2=B0=C3=9A0=06=C3=A8=C2=A5u=C2=A9=E2=80=A0u=C3=AAe=C2=A3&=C2=A9=C5=93=C3=
=85zn=C3=87=C2=AB=E2=89=A4'=1E=C2=B1=C3=BA+.)=C3=AE=C3=87=08=E2=80=93.=C2=A7=
=C3=ABy=C3=A0=C3=95=0E=C3=8A=1F=C2=B7=06=C2=ABzH=E2=80=93~=C2=BA&
>>
> =
=13=02-'$6O!=C2=B6=C3=9A=7F=E2=80=A1=C2=A7l=C2=A2=C3=87gr?=C2=BFi=C3=98=CB=
=87=03]=C3=B9=C3=A9=C2=A9e=C2=A1=C3=88=CB=87=03~7=C3=B2SrX=E2=88=86=C3=BA=C5=
=93=C3=88=CB=87=C3=AA-f-)-+>=C2=BA=E2=80=9D=07z=C2=B6-=20
> +=E2=80=9D=C3=8A=E2=80=93=C3=87=C2=A2=C2=B8=CB=87=C3=AB=C2=B6=C3=9A=C3=BF=
=C3=B9=E2=80=9D=E2=82=AC=C2=A2=C3=AAy
>> =C3=BA=E2=84=A2=C3=A9=C2=B7=C3=B9=E2=80=9D=E2=82=AC-+Sw=EF=AC=82s=C5=93=
=C3=88=CB=87=C3=AA
>>
>>
>>
>>
>> -------------------------------------------------------
>> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
>> Build and deploy apps & Web services for Linux with
>> a free DVD software kit from IBM. Click Now!
>> http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick
>> _______________________________________________
>> Props-general mailing list
>> Props-general@...
>> https://lists.sourceforge.net/lists/listinfo/props-general
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dclick
> _______________________________________________
> Props-general mailing list
> Props-general@...
> https://lists.sourceforge.net/lists/listinfo/props-general
>
|