Support Forum

Slight tweak to sf-bbtohtml.php

AG Alex Greenland
Alex Greenland
Member

Whilst working on the importer I found a small issue with the bbcode to html parser

It seems that a lot of other forums allow the bbcode url to look like

 [url]www.example.com[/url]

Which the parser will not convert

 

Suggested change

 

Add

'/[url](.*?)[/url]/is',

 

to $in and

 

'<a href=”1″>1</a>',

 

to $out

 

Alex

4 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Happy to consider making the change and thanks.

I guess you do realise that when it comes to storing bbCode generated posts then they are converted to html prior to gong into the database. yes – I suppose you do which is why you want the parser to work for you!

If all goes to plan we may well be adopting better html/bbcode editing options in V5 but i will see if i can get this into the v4.3.4 update.

AG Alex Greenland
Alex Greenland
Member

I was testing signature imports which where I spotted the issue, I assumed it would be the same for posts.

where possible I am using as many spf function as possible and it seemed sensible to use the bbtohtml parser. For now I have ripped the code and put it into the importer so I can modify the regex as I find any anomalies so from my point of view there is no rush for the change

Regards

Alex

YS Yellow Swordfish
Yellow Swordfish
Member

please do let me know if you find any others…

AG Alex Greenland
Alex Greenland
Member

So far the only other one I have found is [flash].

 

Alex