News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

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

tsmalmbe

Could someone confirm the following: when fetching the rss-urls, it is not counted as a "guest"-user, and thus not visible in the amount of guests?

Is this a design decision, and if, why? I would rather see a mod like googlebot&spider to include the top-10 rss-readers and have them added.

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

hypnoticstate

Is it possible to pull forum statistics in a rss feed ? I searched the site but come up with nothing
[nofollow]

[nofollow]

Philip dT

Quote from: goodsamaritan55 on March 02, 2007, 09:52:41 AM
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



Sorry for asking this again...
Is there no way one can display the author of the post?  (I use Joomla.)  I just want to make sure.

Thanks

tsmalmbe

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

Oldiesmann

Quote from: Philip dT on March 28, 2007, 04:53:40 AM
Quote from: goodsamaritan55 on March 02, 2007, 09:52:41 AM
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



Sorry for asking this again...
Is there no way one can display the author of the post?  (I use Joomla.)  I just want to make sure.

Thanks


That will require some minor modifications. I'm at school right now, so I can't look at it at the moment, but I will look at it when I get home.

Quote from: tsmalmbe on April 02, 2007, 01:31:13 AM
Can I exclude certain boards? 

Yes. Just append "boards=" to the query string followed by a comma-separated list of all the boards you want to include (.../index.php?action=.xml;type=rss;boards=1,2,3 would display a feed of the appropriate content from boards 1, 2 and 3).
Michael Eshom
Christian Metal Fans

Oldiesmann

Ok. Did some more checking on the RSS/RSS2 author issue.

The poster's name is not shown because there is no RSS tag to support this. Instead, SMF sends the poster's email address in the <author> tag (used to specify the email address of the author - see http://www.w3schools.com/rss/rss_tag_author.asp), assuming you can see the email address.

Firefox doesn't show the author details when you're previewing the feed, but if you do a "view source", you should see it in there.
Michael Eshom
Christian Metal Fans

goodsamaritan55

Is there a work around possible for this RSS/RSS2 shortcoming?

How about SMF reposting the author name on the body of the post?
How about posting the author name in place of the email address in the <author> tag?

Lots of people enjoy reading new posts on RSS on say google reader but it comes up short because they don't know who the author is until they click the link to the actual post!

Oldiesmann

Quote from: goodsamaritan55 on April 25, 2007, 11:24:25 AM
Is there a work around possible for this RSS/RSS2 shortcoming?

How about SMF reposting the author name on the body of the post?
How about posting the author name in place of the email address in the <author> tag?

Lots of people enjoy reading new posts on RSS on say google reader but it comes up short because they don't know who the author is until they click the link to the actual post!

I did some more research on this issue... The example given in the official RSS specification (http://www.rssboard.org/rss-specification) shows the author's name in parentheses following the email address. Since they do it, there's absolutely no reason why we can't do the same :)

Sources/News.php

Find
Code (Lines 548 and 654) Select
'author' => (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) || (!empty($row['hideEmail']) && !empty($modSettings['allow_hideEmail']) && !allowedTo('moderate_forum')) ? null : $row['posterEmail'],

Replace
'author' => (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) || (!empty($row['hideEmail']) && !empty($modSettings['allow_hideEmail']) && !allowedTo('moderate_forum')) ? null : $row['posterEmail'] . ' (' . $row['posterName'] . ')',

I'll mention it to the developers as well so we can get it done for 2.0 as well (I doubt they'll have a problem with it since it's such a minor change).
Michael Eshom
Christian Metal Fans

ShuriLeopard

Another newbie with a silly question.

I've had no problem getting the feeds thanks to the instructions on this board.  I couldn't get the feed to display the way I wanted using Expressions Web, so I used Feedroll.  It displays great, but it doesn't update.  If you click on the feed icon, you get an updated feed.  It just doesn't update on my site.  The webpage where it's displaying is www.warriorpages.com.  The feed is: hxxp:www.warriorpages.com/forum/index.php?action=.xml;sa=recent;board=22.00;type=rss [nonactive].  Any help would be great.  Thanks.
"If it was easy, everybody would do it"
hxxp:www.warriorpages.com [nonactive]

Oldiesmann

Michael Eshom
Christian Metal Fans

ShuriLeopard

Thanks!   :D  I guess feedroll was the problem.  This interaction between the forum and the main site is great.  I'm very excited about the possibilities.
"If it was easy, everybody would do it"
hxxp:www.warriorpages.com [nonactive]

milord


kriskd

My forum is closed to guests.  I read back and it appears that an RSS feed won't work for forums such as mine that are closed to guests.  Is that correct?
SMF 2.0.2

KGIII

They will only be able to access RSS feeds when/if they are logged in. RSS only gives the information available for the user level of the person pulling those feeds.

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?

kriskd

Quote from: KGIII on May 29, 2007, 09:06:48 PM
They will only be able to access RSS feeds when/if they are logged in. RSS only gives the information available for the user level of the person pulling those feeds.

Would it be possible that version 1.1 RC2 would still display the feed even though it's closed to guests versus version 1.1.2?  I ask because my forums that are closed to guests behave as you say, but I know of an SMF forum running 1.1 RC2 which is also closed to guests where you can still get access to the feed as a guest.
SMF 2.0.2

KGIII

I don't think that is possible UNLESS the caching for authentication is there. In other words - they should HAVE to be enabled the appropriate permissions to access any feeds that they do access.

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?

Broot

Quote from: devx on March 01, 2007, 03:41:49 PM
Quote from: Oldiesmann on August 03, 2006, 11:53:19 AM

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.
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).
+1

I would really like to be able to read all the new posts through rss with an authentification. So putting the md5 of the password in the URL seems to be a fine solution for me. And I don't worry to have to build a page to let all users compute the md5 of their password.

Couldn't it be simply implemented ? I'm already using this on another website and it's working fine, most users understanding quite easily the concept of computing the md5 of their password and using it in the URL (in fact, we automatically generate the URL they have to use, to be sure they won't get confused in any way).

And wether it is or not a security leak to transmit the md5 in plain text just for rss feed (which are really very limited in the number of article it is possible to see) should be (from my point a view) a decision of the administrator of the board.

phexchanger

Since I do not know where to find what RSS feed my SMF forum is using, I tried using Google Reader and it fetched the URL for me showing this form

http://forum.domainname.com/index.php?type=rss;action=.xml

I first tried entering the versions posted on the first post of this thread
a) http://forum.domainname.com/index.php?type=rss2;action=.xml
&nbsp; &nbsp;http://forum.domainname.com/index.php?type=rss;action=.xml

When I entered said URL on my browser, I saw my email address.
1. Is there a way that, instead of the email address, it will dispaly the username of the poster?
2. What file should I alter and what code to place?

The atom version is working fine for it displays the username

b) http://forum.domainname.com/index.php?type=atom;action=.xml

3. How will I alter the code such that readers such as Google Reader will read/fetch b) as the default feed instead of a)


If items 1 and 2 is solved then item 3 is not a problem anymore. Thanks :)

Andre N

My mission is to get a feed with 5 random posts from board x. Not the last 5 in a random order, but any 5. I don't see a way to do this by modifying the feed url, so what do I need to change in news.php?

Thanks!

Edit:

Nevermind, got it! In /Sources/news.php I changed

ORDER BY t.ID_FIRST_MSG DESC
to
ORDER BY RAND

and

ORDER BY m.ID_MSG DESC
to
ORDER BY RAND

and

ORDER BY m.ID_MSG DESC
to
ORDER BY RAND

and it works like I wanted. The database does the randomization
"Every generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?"

lexhair

I find my RSS2 feed defaults to an excerpt rather than full text. Is that consistent with everyone else? Version 1.1.1.

Advertisement: