Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Slight tweak to sf-bbtohtml.php
Avatar
Alex Greenland
Cambridgeshire (ish)
Member
Free Members
sp_UserOfflineSmall Offline
Aug 30, 2010 - 4:07 pm

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 31, 2010 - 4:12 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alex Greenland
Cambridgeshire (ish)
Member
Free Members
sp_UserOfflineSmall Offline
Aug 31, 2010 - 7:09 am

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 31, 2010 - 11:37 am

please do let me know if you find any others...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alex Greenland
Cambridgeshire (ish)
Member
Free Members
sp_UserOfflineSmall Offline
Aug 31, 2010 - 12:32 pm

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

 

Alex

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625