News: Welcome to the TinyPortal Support site.

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

December 10, 2019, 04:16:33 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189279
  • Total Topics: 20775
  • Online Today: 111
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 55
Total: 55

Author Topic: RSS feeds for TP articles?  (Read 6060 times)

0 Members and 1 Guest are viewing this topic.

axlarry

  • Guest
RSS feeds for TP articles?
« on: May 25, 2009, 07:25:56 AM »
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.

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: RSS feeds for TP articles?
« Reply #1 on: May 26, 2009, 01:14:20 PM »
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.

Offline Ianedres

  • Friends
  • *
  • Posts: 684
  • $foo['ianedres'] < $foo['ichbin']
    • Clickity click dot dot dot com thingy
Re: RSS feeds for TP articles?
« Reply #2 on: May 26, 2009, 04:19:33 PM »
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

  • Guest
Re: RSS feeds for TP articles?
« Reply #3 on: June 01, 2009, 10:40:15 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):

Code: [Select]
<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:
Code: [Select]
<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.)

Offline SN

  • Full Member
  • ***
  • Posts: 137
    • SpursNetwork - Tottenham Hotspur Fansite
Re: RSS feeds for TP articles?
« Reply #4 on: September 29, 2009, 09:56:03 AM »
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

  • Guest
Re: RSS feeds for TP articles?
« Reply #5 on: October 22, 2009, 06:37:08 AM »
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

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: RSS feeds for TP articles?
« Reply #6 on: October 22, 2009, 07:41:24 AM »
That looks good to me. Feel free to post it if you'd like.

Offline ZarPrime

  • Friends
  • *
  • Posts: 4653
Re: RSS feeds for TP articles?
« Reply #7 on: October 22, 2009, 08:03:23 AM »
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

  • Guest
Re: RSS feeds for TP articles?
« Reply #8 on: October 22, 2009, 09:43:56 AM »
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/
« Last Edit: October 22, 2009, 10:20:53 AM by gouri »