[4874] Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2]

Started by darrenbeige, January 16, 2010, 02:14:01 PM

Previous topic - Next topic

darrenbeige

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.


Arantor


darrenbeige

In the official spec, the example 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?

Arantor

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.

darrenbeige

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.

Arantor

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.

darrenbeige

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...

Arantor

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.

darrenbeige

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?

Joshua Dickerson

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.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

emanuele

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


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: