Topic: BBcode in RSS feeds

Hey I was just wondering; is there anyway to translate the BBcode used in posts to html for the RSS feeds? It's the only issue I have with using the RSS. You could easily import forum posts to blogs etc if the BBcode didn't get put directly in the feeds.

Any ideas or thoughts? Thanks!

Re: BBcode in RSS feeds

Try:add this after 330 line of extern.php:

include FORUM_ROOT.'include/parser.php';

Than add this code after 335 line of extern.php:

if ($forum_config['o_smilies'] == '1')
    $cur_post['message'] = do_smilies($cur_post['message']);
if ($forum_config['p_message_bbcode'] == '1')
    $cur_post['message'] = do_bbcode($cur_post['message']);

Is there is what you want? Maybe it will be needed to add link to css-file to function "output_rss"

Re: BBcode in RSS feeds

Ive done just as you said, Now i got this

Parse error: syntax error, unexpected T_IF, expecting ')' in /home/jyholic/public_html/forum/extern.php on line 336

Re: BBcode in RSS feeds

Try copy/paste again, it's work fine for me

Re: BBcode in RSS feeds

Thanks, but no luck. Still the same the rss feed

http://i39.tinypic.com/2jerces.jpg

Re: BBcode in RSS feeds

Oops forgot about my own post over the holidays.
I'll give this a try and report back. Thanks for the tip.

Re: BBcode in RSS feeds

I tried the above hack and it didn't work. It just broke my RSS feed and gave me an error; the browser didn't even want to read it. Could you give us your extern.php file? Perhaps we did something wrong?

Re: BBcode in RSS feeds

I think you should get rid of the BBCode instead. Having HTML inside the RSS is not a good idea.

My regex skills are not very good, but you could try something like:

$cur_post['message'] = preg_replace("/\[([a-z0-9*]+)([^\[]+?)?\]([^\[]+?)\[(\/[a-z0-9*]+)\]/i", '$3', $cur_post['message']);

On line 335.

9

Re: BBcode in RSS feeds

Garciat wrote:

Having HTML inside the RSS is not a good idea.

It shouldn't cause any problems as such. The content is contained within CDATA tags. smile

Re: BBcode in RSS feeds

HTML in a feed can be very valuable IMO, you can easily export to a blog for example. Could this sort of thing be done with an extension? (I'm not aware of the limitations of the extensions API)

Re: BBcode in RSS feeds

No more suggestions?

12 (edited by ploufplouf 2009-06-13 17:30)

Re: BBcode in RSS feeds

No new idea? The content of the RSS feed is crappy with bbcode :'(
That could be cool to remove bbcode in RSS but how :'(

Example in this feed : http://www.actubourse.fr/forum/feed-rss.xml

The result is crappy with google reader :
http://www.google.fr/reader/view/feed/h … ed-rss.xml

Re: BBcode in RSS feeds

ploufplouf wrote:

No new idea? The content of the RSS feed is crappy with bbcode :'(
That could be cool to remove bbcode in RSS but how :'(

Example in this feed : http://www.actubourse.fr/forum/feed-rss.xml

The result is crappy with google reader :
http://www.google.fr/reader/view/feed/h … ed-rss.xml


I have done some modifications in the extern.php, I use do_bbcode_rss() from goundoulf on http://www.punbb.fr/forums/viewtopic.php?id=6174

It works 'better' with google reader.

Cool wink