Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: darrenbeige on January 16, 2010, 02:14:01 PM

Title: [4874] Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2]
Post by: darrenbeige on January 16, 2010, 02:14:01 PM
This is a very minor issue, and causes no errors at all to the majority of feed readers. However, it is very easy to fix, so I'm reporting it in anyway.

Basically, in SMF RSS feeds, the 'author' node is generated and populated with an email address. This is incorrect; the format should be <author>[email address] ([name])</author>.

To fix this (minor) semantic error, replace all instances of:


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


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


Thankyou.

Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: Arantor on January 16, 2010, 02:20:50 PM
Where is that in the RSS 0.9 standard?
Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: darrenbeige on January 16, 2010, 04:01:23 PM
In the official spec, the example (http://www.rssboard.org/rss-specification#ltauthorgtSubelementOfLtitemgt) is referenced with that syntax, and whilst it is not vital to complying with the specification, the w3 validator does advise putting the <author> field with that syntax. The notice appears in both RSS 0.9 and RSS 2.0 mode.

It can't hurt adding it, for complete compatibility?
Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: Arantor on January 16, 2010, 04:06:56 PM
I seriously can't see it being added to 1.1 to be honest, though for 2.0 perhaps.

Thing is, it's not a bug because it's not actually against the standard. It simply is an advisory as far as I can see.
Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: darrenbeige on January 16, 2010, 08:03:43 PM
Yeah, I was expecting ANY change would be to 2.0 (doesn't matter to me - I've already done it for 1.1).

However, I don't think it should be disregarded just because it's advice (and not strictly standardized) shouldn't mean it is disregarded. HTML still evaluates 'strict' with or without labels on form elements, but SMF adheres to that advice from w3.
Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: Arantor on January 16, 2010, 08:04:53 PM
Oh, that's entirely true. I just know the devs are rather concentrating on actual bugs rather than things that are technically (from their perspective) enhancements. I believe it should too - just trying to cover off why it may not happen.
Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: darrenbeige on January 17, 2010, 05:08:25 AM
It certainly isn't high priority, and I can see the focus would be on actual bugs, but it's such a small issue that can be fixed so easily I really don't see the problem including it in the next version etc...
Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: Arantor on January 17, 2010, 07:12:12 AM
Because it's something else that would have to be tested, and the devs have said they are keen to not change functionality other than bugfixes, but as ever it's their call.
Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: darrenbeige on January 17, 2010, 07:25:05 AM
Tested? It's obvious what it does? The value is already called from the database already? It's just echoing it?

But yeah, it's their decision (whoever "they" are).

Perhaps it's better then to move the topic to Tips/Tricks for future reference if users want to add the functionality themselves?
Title: Re: Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2 aswell]
Post by: Joshua Dickerson on November 13, 2011, 11:24:09 AM
From what I have read, it isn't against the spec, but placing the name in there does help with readability. So, I will track it. Bear in mind, it isn't a bug as much as it is a (minor) feature request.
Title: Re: [4874] Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2]
Post by: emanuele on June 01, 2012, 09:34:57 AM
commit 2f5f01d9150c23a1694c2131bc56eed9b8fba480
Author: emanuele
Date: Fri Jun 1 2012

    rss author tag now shows also the name [Bug 4874]
    Fixed (I hope) the atom feeds
    Changed from rss to rss2 (2 because...don't know, it's new maybe :P) the default feed and added atoms too