SMF Development > Fixed or Bogus Bugs
[4874] Author field does not comply to RSS standards [SMF 1.1 - Maybe SMF 2]
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:
--- Code: ---'author' => (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) || (!empty($row['hideEmail']) && !empty($modSettings['allow_hideEmail']) && !allowedTo('moderate_forum')) ? null : $row['posterEmail'],
--- End code ---
with
--- Code: ---'author' => (!empty($modSettings['guest_hideContacts']) && $user_info['is_guest']) || (!empty($row['hideEmail']) && !empty($modSettings['allow_hideEmail']) && !allowedTo('moderate_forum')) ? null : $row['posterEmail'] . ' ('.$row['posterName'].')',
--- End code ---
Thankyou.
Arantor:
Where is that in the RSS 0.9 standard?
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.
Navigation
[0] Message Index
[#] Next page
Go to full version