Advertisement:

Author Topic: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds  (Read 717014 times)

Offline tsmalmbe

  • Jr. Member
  • **
  • Posts: 188
  • Gender: Male
    • Kontrollrummet
Re: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds
« Reply #200 on: March 27, 2007, 03:31:00 PM »
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?

Offline hypnoticstate

  • Semi-Newbie
  • *
  • Posts: 17
Re: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds
« Reply #201 on: March 27, 2007, 11:19:37 PM »
Is it possible to pull forum statistics in a rss feed ? I searched the site but come up with nothing
[nofollow]

[nofollow]

Offline Philip dT

  • Semi-Newbie
  • *
  • Posts: 41
Re: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds
« Reply #202 on: March 28, 2007, 04:53:40 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

Offline tsmalmbe

  • Jr. Member
  • **
  • Posts: 188
  • Gender: Male
    • Kontrollrummet
Re: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds
« Reply #203 on: April 02, 2007, 01:31:13 AM »
Can I exclude certain boards?  
..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,893
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds
« Reply #204 on: April 16, 2007, 11:09:47 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.

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
Cincy Space - now open!

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,893
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds
« Reply #205 on: April 17, 2007, 02:06:25 PM »
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
Cincy Space - now open!

Offline goodsamaritan55

  • Semi-Newbie
  • *
  • Posts: 19
Re: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds
« Reply #206 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!

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,893
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Getting the Most Out of SMF - XML, RSS and RSS2 (and Atom and RDF) feeds
« Reply #207 on: April 25, 2007, 02:05:36 PM »
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
Code: [Select]
'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
Cincy Space - now open!

Offline ShuriLeopard

  • Newbie
  • *
  • Posts: 2
  • Gender: Male
    • Warrior Pages
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 hxxp:www.warriorpages.com [nonactive].  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]

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,893
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Michael Eshom
Cincy Space - now open!

Offline ShuriLeopard

  • Newbie
  • *
  • Posts: 2
  • Gender: Male
    • Warrior Pages
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]

Offline milord

  • Newbie
  • *
  • Posts: 5
Try hxxp:www.rss2javascript.com [nonactive]
Thanks for the tip!
Youre awesome!

Offline kriskd

  • Jr. Member
  • **
  • Posts: 261
  • Gender: Female
    • @kriskd on Twitter
    • Kitty-Cam
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

Offline KGIII

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,293
  • Gender: Male
  • If you can build it, I can wreck it.
    • Web Hosting
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?

Offline kriskd

  • Jr. Member
  • **
  • Posts: 261
  • Gender: Female
    • @kriskd on Twitter
    • Kitty-Cam
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

Offline KGIII

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,293
  • Gender: Male
  • If you can build it, I can wreck it.
    • Web Hosting
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?

Offline Broot

  • Newbie
  • *
  • Posts: 1

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.

Offline phexchanger

  • Semi-Newbie
  • *
  • Posts: 35
    • Scripts and Designs
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 :)

Offline Andre N

  • Jr. Member
  • **
  • Posts: 362
  • Gender: Male
  • My facebook friend tally has recently skyrocketed
    • R2bconcepts
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

Code: [Select]
ORDER BY t.ID_FIRST_MSG DESC
to
Code: [Select]
ORDER BY RAND
and

Code: [Select]
ORDER BY m.ID_MSG DESCto
Code: [Select]
ORDER BY RAND
and

Code: [Select]
ORDER BY m.ID_MSG DESCto
Code: [Select]
ORDER BY RAND
and it works like I wanted. The database does the randomization
« Last Edit: July 14, 2007, 10:55:28 PM by ike turner »
"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?"

Offline lexhair

  • Semi-Newbie
  • *
  • Posts: 58
I find my RSS2 feed defaults to an excerpt rather than full text. Is that consistent with everyone else? Version 1.1.1.