Page Index Toggle Pages: [1] 2  ReplyAdd Poll Send Topic
Hot Topic (More than 10 Replies) RSS Feed display error (Read 7114 times)
 
Paste Member Name in Quick Reply Box ThM
New Member
*
Offline



Posts: 10
Location: Deutschland
Joined: Jul 24th, 2014
Gender: Male
Zodiac sign: Scorpio
RSS Feed display error
Apr 28th, 2015 at 5:48am
Mark & QuoteQuote  
Hi,
don't know it's an error but on my small website with a yabb board rss feed the source code range inside a post doesn't display right.

If you want see an example here. The source code is masked with the html tag.

http://www.zp-widgets.de/forum-rss-feed.php
  
Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: RSS Feed display error
Reply #1 - Apr 28th, 2015 at 2:04pm
Mark & QuoteQuote  
RSS uses XML and we haven't gotten around to figuring out how to get the code box (and certain other formatting) to look right in the feed. (The css class gets stripped out during the conversion to XML.)

Going on next week's todo list.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: RSS Feed display error
Reply #2 - May 6th, 2015 at 11:51pm
Mark & QuoteQuote  
Okay, finally had a few minutes to look at what's happening.
In the process of converting a message to XML all the class and style info gets stripped out. The standard tags (like <b> and <i>) render but 'class="codebox"' gets removed.

I suspect the only way around this is to actually remove the codebox from the RSS feed and replace it with something that says something like 'Code Box' with a link back to the message.

So, this isn't a bug, just an annoyance.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: RSS Feed display error
Reply #3 - Jun 1st, 2015 at 5:33pm
Mark & QuoteQuote  
For "codebox" and other CSS formatting to work in RSS feeds, the feed actually needs to have own CSS file attached. This CSS file should have only the minimum required styling.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: RSS Feed display error
Reply #4 - Jun 1st, 2015 at 11:24pm
Mark & QuoteQuote  
But the actual text 'class="codebox"' is removed, so there's nothing for the css to format because the tag is gone.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: RSS Feed display error
Reply #5 - Jun 2nd, 2015 at 1:25pm
Mark & QuoteQuote  
Dandello wrote on Jun 1st, 2015 at 11:24pm:
But the actual text 'class="codebox"' is removed, so there's nothing for the css to format because the tag is gone.

When the RSS feed has own CSS that actually works and looks perfect, it makes sense to not remove the class attribute any more...

The thing with XML and CSS together is that even though both standards are decades old, none of the current browsers fully support the official standards, but instead the pre-standard version. This isn't so much an issue with YaBB as all browsers fail in common compatible way.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: RSS Feed display error
Reply #6 - Jun 2nd, 2015 at 2:47pm
Mark & QuoteQuote  
So, can we add the style sheet additions in the head like we can with (x)html? Or does it need to be separate file?
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: RSS Feed display error
Reply #7 - Jun 3rd, 2015 at 11:47am
Mark & QuoteQuote  
Dandello wrote on Jun 2nd, 2015 at 2:47pm:
So, can we add the style sheet additions in the head like we can with (x)html? Or does it need to be separate file?

The standard says "href" attribute is required, so we can imply from that it has to be an external file.

http://www.w3.org/TR/xml-stylesheet/#the-xml-stylesheet-processing-instruction
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: RSS Feed display error
Reply #8 - Jun 3rd, 2015 at 1:29pm
Mark & QuoteQuote  
Okay - further research done. Although the specification says you can add a stylesheet  to an XML document (in theory you can even use a css one), in practice, RSS readers may not load it and people pulling the RSS into their site may not want YaBB's css.

So the solution is going to have to be to remove the entire code block from the RSS display and replace it with a link to the item or a note telling people to go to the original message for the code.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: RSS Feed display error
Reply #9 - Jun 3rd, 2015 at 3:21pm
Mark & QuoteQuote  
A Fix:
In Sources/RSS.pm (in 2 places) find
Code (Perl)
Select All
             if ($enable_ubbc) { 



and add above it
Code (Perl)
Select All
            $message =~ s/\[code\s*(.*?)\]\n*(.+?)\n*\[\/code\]/$maintxt{'rsscode'}/eisgm; 



in Languages/English/Main.lng, find the '1;' and add before it:
Code
Select All
$maintxt{'rsscode'} = 'Go to Post to see Code'; 

(Or whatever you want it to say.)

Do the same for any other Language packs you have.



  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: RSS Feed display error
Reply #10 - Jun 4th, 2015 at 1:19pm
Mark & QuoteQuote  
Dandello wrote on Jun 3rd, 2015 at 1:29pm:
Okay - further research done. Although the specification says you can add a stylesheet  to an XML document (in theory you can even use a css one), in practice, RSS readers may not load it and people pulling the RSS into their site may not want YaBB's css.


The reason people might not want full YaBB's CSS is pretty much the reason I said it has to be minimal. The part where RSS reader doesn't support CSS styling, the bare code needs to be compatible with the RSS reader in a way that RSS readers that do support CSS can override the style. Just replacing the code block with a forwarding message is not long-term solution, because the post it points to might not exist any more but the RSS feed entry still stays in the reader.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: RSS Feed display error
Reply #11 - Jun 4th, 2015 at 1:44pm
Mark & QuoteQuote  
If you want to tackle this - please go ahead.
Monni wrote on Jun 4th, 2015 at 1:19pm:
because the post it points to might not exist any more but the RSS feed entry still stays in the reader.
                     
- the same argument goes for all posts. The post may be cached in the RSS reader, but the actual (post|image|link) is gone.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: RSS Feed display error
Reply #12 - Jun 7th, 2015 at 12:24am
Mark & QuoteQuote  
Dandello wrote on Jun 4th, 2015 at 1:44pm:
- the same argument goes for all posts. The post may be cached in the RSS reader, but the actual (post|image|link) is gone.

The point being the RSS feed entry should be as self-contained as possible.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: RSS Feed display error
Reply #13 - Jun 7th, 2015 at 3:37am
Mark & QuoteQuote  
One can take the stance that the RSS should reflect the most current info from the source.

In any case, I have been unsuccessful in getting the RSS feed to render anything styled via class to render the proper style. So if someone can get it to work, that would be great.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: RSS Feed display error
Reply #14 - Jun 15th, 2015 at 7:33am
Mark & QuoteQuote  
Dandello wrote on Jun 7th, 2015 at 3:37am:
One can take the stance that the RSS should reflect the most current info from the source.

In any case, I have been unsuccessful in getting the RSS feed to render anything styled via class to render the proper style. So if someone can get it to work, that would be great. 


If someone kind e-mails me a xml dump of a RSS feed, I could try locally to get the styles working... It takes too long to test it on a remote server. I have had so many projects going on lately that I haven't really had much time to play with YaBB.
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
RSS Feed display error

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry