TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 07:11:55 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 125
  • Total: 125

RSS feeds for TP articles?

Started by axlarry, May 25, 2009, 02:25:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

axlarry

Hello,

I've been thinking about this for quite some time now. How can I make rss feeds for TP articles? I'm not trying to import feeds into articles, I want to make feeds for my articles.

Has anyone tried this and willing to share with me? Or perhaps you can point me on how to do it. Thanks in advance.

IchBin

All you need to do is query the articles table and create an XML output from the tables. Sounds easy right? :P

I would like to see something like this too. Unfortunately, I don't have the time to look into it at the moment.

Ianedres

Grabbing the article's fields would be somewhat simple I would think to output into a XML format; just would need the guidelines for some established RSS formats...

Maybe when I get back home next week...

supportingactors

Quote from: axlarry on May 25, 2009, 02:25:56 PM
How can I make rss feeds for TP articles? I'm not trying to import feeds into articles, I want to make feeds for my articles.

Has anyone tried this and willing to share with me? Or perhaps you can point me on how to do it. Thanks in advance.
It's something I wanted for a long time, too-- was hoping that it would make an appearance in the TP code, as it seemed a natural outcome of the articles.

However, as a temporary but workable kludge, I used the free service Feed43.com, which uses a robot that will generate RSS feeds based on the content of your page-- which you can customize.

The critical part is defining the Advanced "extraction rules" that specify what needs to be part of the feed. After playing around, here is the repeating pattern that worked for me (based on my HTML, so YMMV):

<div style="padding: 3px 6px 3px 6px;" class="titlebg"> <a href="{%}">{*}<b>{%}</b>{*}<span class="smalltext"><em>{%}</em></span>{*}<span class="smalltext"><em> {%}</em></span>{*}</a><div>{%}</div>

This extract five fields -- as specified by the {%} which can then be placed in this order:

Item Title: "{%2}"
Item Link: "{%1}"
Item Content: "{%3}, {%4}< br / >{%5}"

When you're done, you get a link to an XML document, which you can put into a script block, ala:
<a href="http://feed43.com/myfeed.xml">
<img src="/tp-images/Image/rss.png" border=0 align=middle> Subscribe to RSS feed</a>


(I uploaded an RSS icon to make it stand out.)

SN

I do this Manually. My site is featured on NewsNow.com so i basically get the link to the articles and add it as a <item> to the xml myself annoying to do it for every article yes, but thats life :p

gouri

Hey i have got some code from some site (I don't remember exact link) and modified it to make rss feed for articles.

Tell Me whether it is ok or not. The RSS Icon on right side panel is linked to it.  8)

If this ok, then i will give you the code. It has some problems too, Has to be rectified.  ???


If it is not as good as you think then leave it. I am happy with it. :)

Site : http://gouri.in

Direct RSS link:  http://gouri.in/rss.php

IchBin

That looks good to me. Feel free to post it if you'd like.

ZarPrime

Well, it certainly seems to work on your site though a few of the articles seem to not be in order.

How are you sorting the feed, by date posted or what?  Is this a static thing or does it refresh when new content comes on line?  It would be nice if you could have the feed create thumbs of the pictures instead of feeding the full size pics.  I'm interested in hearing more about this and Bloc may be interested in this as well as we've been talking about article feeds on the Team Board.

I would also be interested in testing this as a viable option for a future version of TinyPortal.

ZarPrime

gouri

#8
It is done by querying database and getting the topics from the articles table. It is automatic. I will upload the code asap.

I told you all that some modifications are required. It has to be refined to display properly. :)

Update: Added the rss.zip

Update: I Found the original link where i got the code : http://www.webreference.com/authoring/languages/xml/rss/custom_feeds/