News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds

Started by Oldiesmann, January 20, 2005, 12:55:32 PM

Previous topic - Next topic

Matthew Schenker

QuoteHmm... I will look to see if there are other places that need changing as well but that SHOULD have worked? I will poke around and make sure that that is the one being called. It may take a while though.

Thank you for looking into this.  I keep thinking it has to be possible to increase the number of feeds.  After all, isn't the limit of 5 something that it set in the code?  So if we find where that is set, can't we change it?  I'm not a programmer, so maybe I'm simplifying this too much!

Thanks again for your help.

I do hope you find the answer!!

Vandaahl

I already tried that change before you mentioned it, and it does indeed NOT work, unfortunately.

devx

Quote from: Oldiesmann on August 03, 2006, 11:53:19 AM
Quote from: iago23 on June 01, 2006, 11:59:30 AM
Quote from: Oldiesmann on December 04, 2005, 07:57:16 PM
Not unless your RSS reader supports cookies, and you're logged in to that particular board.
Wow.  Huh.  Okay, I'm crushed.  I'd hoped SMF was more up to the task than I thought it was, but clearly it's not.  Cookies should never be necessary for this sort of thing; requiring them just seems silly.

SMF doesn't support remote logins (ie passing the username and password through the URL instead of through a form) because it's extremely insecure. What other option do we have? We can't just ignore board access simply because it's a news feed.

Quote
I'm also disappointed that there's no built-in "make me a feed of this particular member's recent posts"; instead, it's solely board-centric.

Actually that wouldn't be hard to implement (see below).

Quote
As implemented, the RSS feature's not going to fit my board's needs at all.

Anyone have any hints as far as how to hack in the ability to a) accept on-the-URL credentials, and b) allow the most-recent-posts-from-user page to render just like any board feed would?

I'm sorry you feel that way, but unfortunately until someone finds a secure way to pass a username and password via the URL, SMF will not support remote logins.

As you (and several others) have requested, here's how to add user-specific "latest posts" functionality to SMF's news feeds...


Oldiesmann, i'm wondering how feasible it is to create a hash of the username and password and use that as the url based identifying credential just to access feeds. Some suggestions posted here about username=blah&password=blah are quite horrendous in terms of security....but I totally understand what they are getting at...
I too am looking for some sort of URL based access of feeds on my fully protected board. I use a feedreader called RSS Popper which is an addon for Microsoft Outlook (it basically drops new feeds into a designated folder in Outlook). Its very primitive and has no support for cookies or form based authentication feeds.

Suggestion: md5 or SHA1($username.$password) is stored in DB...possibly new field.
So resulting auth url will be: site/smf install/protectedfeeds.php?(accepts all vars as current feed generator)&auth=hash
protectedfeed.php basically matches hash and requesting ip to user db's username,password and last logged in ip(effectively preventing the auth url from being passed around or stolen). The unique auth url should be visible to each member in their profiles or something.

Sure it would mean that the individual needs to login once so that their last logged in ip is recorded. This might be problematic for those on frequently changing ips(or a group of ppl behind a shared connection).

emomoney

I read all of the posts here and I don't think I saw the question asked that I am looking for, and if I did, I apologize.  Is there a way to exclude some boards from the RSS feeds.  I plugged the action=.xml;type=rss;limit=10 to the end of my URL and it works, but it is also displaying the recent messages from my private forums.  Obviously I do not want to people to see my private forums.

Matthew Schenker

QuoteI plugged the action=.xml;type=rss;limit=10 to the end of my URL and it works

I tried this in my forum and it still reports 5 messages to the news feeder!

OK, someone has got to tell me how to change this.  The setting of 5 has to be plugged into some line or lines of code somewhere, right?  Well, where in the world is it?

emomoney

Quote from: MatthewSchenker on March 01, 2007, 07:55:40 PM
QuoteI plugged the action=.xml;type=rss;limit=10 to the end of my URL and it works

I tried this in my forum and it still reports 5 messages to the news feeder!

OK, someone has got to tell me how to change this.  The setting of 5 has to be plugged into some line or lines of code somewhere, right?  Well, where in the world is it?
Just make sure you don't have a typo.  The first time I did it, I added limit10 instead of limit=10 and and it only produced the default 5 results.  As soon as I added the = it worked.

As far as my original question, I was able to figure it out.  The problem was I was testing the feed from News Fox while I logged into the forum, which is why it showed me the post in the private forum.  When i logged out of the forum, it did not display the private forum message.

Matthew Schenker

QuoteJust make sure you don't have a typo.  The first time I did it, I added limit10 instead of limit=10 and and it only produced the default 5 results.  As soon as I added the = it worked.

So, the URL should look like this:
http://www.genericforum.com/index.php/action=.xml;type=rss;limit=10

Do members have to manually add that extra data to the URL every time they sign in?  Or am I supposed to make that the new official home page of my forum?

goodsamaritan55

Please Help!

How to display in type=rss and type=rss2 the AUTHOR NAME of the post!

If you omit type=rss on the rss url, the AUTHOR NAME is displayed!

I think it is a bug in the RSS coding, can you fix?
How do I fix it?
Is there a plugin?

For example in this forum:

Unformatted XML will SHOW the AUTHOR / POSTER
http://www.simplemachines.org/community/index.php?action=.xml;sa=recent

Formatted RSS output will NOT SHOW the author / poster!!!
http://www.simplemachines.org/community/index.php?action=.xml;sa=recent;type=rss2
or
http://www.simplemachines.org/community/index.php?action=.xml;sa=recent;type=rss


John Dias

I use the hxxp:www.google.com/reader/ [nonactive] to monitor the RSS feed of a forum based on SimpleMachines software.  When I receive the feed items, it looks like this:

Re: [Thread title]
from [Thread source, i.e. the name of the Web site]
[Body of the comment or post, with no indication of who wrote it]

The trouble with this is that I have no way of telling who wrote the post.  Even if it was known who the author is for the initial post for a thread, all of the commenters' usernames never show up.  It makes it a lot more interesting to see if a particular commenter has posted a particular comment.  But the username for each commenter is never included in the RSS feed, at least on my reader (hxxp:www.google.com/reader/ [nonactive]).  What can I do to modify the output of the feed, so that the username of each commenter shows up?

tsmalmbe

..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

tsmalmbe

A question: is the rss-client visible on the recently logged in users list as a guest? Would it be possible to have the rss-clients as a dedicated group, instead of guests? It could be based on the URL perhaps?
..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

KGIII

Alright. I just checked and it works on a new installation. What I would do is go ahead and make the changes and then clear your history, cache, etc... You might even want to check with a different browser to.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

riffster

Good job KG III, that was the ticket. Simple clearing of the cookies, temps, after the change to the index.template.php fixed 'er right up.

KGIII


My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

goodsamaritan55

Quote from: KGIII on March 10, 2007, 01:52:14 AM
Alright. I just checked and it works on a new installation. What I would do is go ahead and make the changes and then clear your history, cache, etc... You might even want to check with a different browser to.

Are you referring to RSS displaying the AUTHOR NAME?

Philip dT

KGIII, You say:
QuoteAlright. I just checked and it works on a new installation. What I would do is go ahead and make the changes and then clear your history, cache, etc... You might even want to check with a different browser to.

Hallo.  I'm not exactly an expert, but I just want to make sure.  Do you mean that you altered the code of SMF in order for the author name to display too?  In other words that ???/index.php?action=.xml;sa=recent;type=rss will display the author too?

If so, how do one update your SMF-code in order for this to work?

Thanks...


KGIII

My response was geared towards getting more than the default 5 topics to display, I am not sure what you are asking.  

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

Philip dT

If I understand it right, "/index.php?action=.xml;sa=recent;type=rss" should display the author too.  Or is it not yet supported by SMF that the author is also displayed together with the post?

pax

Quote from: Matthew Schenker on March 01, 2007, 07:55:40 PM
QuoteI plugged the action=.xml;type=rss;limit=10 to the end of my URL and it works

I tried this in my forum and it still reports 5 messages to the news feeder!

OK, someone has got to tell me how to change this.  The setting of 5 has to be plugged into some line or lines of code somewhere, right?  Well, where in the world is it?

The easiest way is to change the limit 5 in News.php in the Sources directory to the number you want.  The line you want to change is inside the function ShowXmlFeed().

Change

// Default to latest 5.  No more than 255, please.
$_GET['limit'] = empty($_GET['limit']) || (int) $_GET['limit'] < 1 ? 5 : min((int) $_GET['limit'], 255);


to


// Default to latest 10.  No more than 255, please.
$_GET['limit'] = empty($_GET['limit']) || (int) $_GET['limit'] < 1 ? 10 : min((int) $_GET['limit'], 255);


, for example.


KGIII

pax: I like that. Prior to this I had had people change it in the template itself. Does this work and does it work 'better' than the other solution? I obviously haven't tested it but, well, if it does I will add that to my clipboard manager because this is actually a fairly oft asked question.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

Advertisement: