Create custom replacement of [url] BBCode

Get help developing custom BBCodes or request one.
Post Reply
EA117
Registered User
Posts: 20
Joined: Wed Aug 15, 2018 3:23 am

Create custom replacement of [url] BBCode

Post by EA117 » Tue Aug 21, 2018 11:04 pm

Where could I find how the [url] BBCode is "defined", meaning the actual specific replacement text and tokens that are used for the built-in version of this BBCode?

After upgrading from 3.0.14 to 3.2.2, I find that "[url=ts3server://dns:port]TeamSpeak 3 Server[/url]" no longer works, and instead displays literally "[url=ts3server://dns:port]TeamSpeak 3 Server[/url]" without any replacement.

I presume it's because 3.2.2 or some earlier version is more strict on what a "valid" protocol prefix is, and only allows "http://", "ftp://", etc. "ts3server://" is a valid handler when you have the TeamSpeak client application installed, but we can agree that it's "a non-standard prefix."

Is defining my own BBCode to use instead of [url] for these cases the right approach? Or was there a way for me to specify the acceptable protocol prefixes for the existing BBCode?

The question of "how is the current [url] BBCode defined" is being asked just so I can be sure to mirror/mimic any smart choices that were made in defining the built-in [url] code. As opposed to the otherwise obtuse and simple HTML replacement text I might otherwise think to create on my own.

Surprised that a search for "ts3server" here in on phpbb.com didn't already show someone tripping over this, which made me concerned it might be something more unique that I'm failing to recognize.

Thanks. -Trench

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51317
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Create custom replacement of [url] BBCode

Post by Brf » Wed Aug 22, 2018 12:43 am

There is a row in the config table for allowed_schemas. Try adding yours to that.

User avatar
3Di
Registered User
Posts: 12896
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Create custom replacement of [url] BBCode

Post by 3Di » Wed Aug 22, 2018 12:54 am

Allowed schemas can be added in ACP/posting TAB somewhere, AFAIR.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

EA117
Registered User
Posts: 20
Joined: Wed Aug 15, 2018 3:23 am

Re: Create custom replacement of [url] BBCode

Post by EA117 » Wed Aug 22, 2018 1:03 am

Sounds logical, and looks like that did it.

I updated the "allowed_schemes_links" value from "http,https,ftp" to "http,https,ftp,ts3server", and then cleared my cache, and then edited and re-saved the forum description the "[url=ts3server://dns:port]TeamSpeak 3 Server[/url]" link existed it (rather than jumping through more complex hoops to trigger BBCode reparsing of that forum description), and now it's back to being rendered as an HTML <a> tag again.

Thanks for pointing me to where that needle was in the haystack. And now there is something for future searchers of "ts3server" to find. :)

-Trench

EA117
Registered User
Posts: 20
Joined: Wed Aug 15, 2018 3:23 am

Re: Create custom replacement of [url] BBCode

Post by EA117 » Wed Aug 22, 2018 1:05 am

3Di wrote:
Wed Aug 22, 2018 12:54 am
Allowed schemas can be added in ACP/posting TAB somewhere, AFAIR.
Hey, there it is. ACP -> Posting -> Messages -> Post Settings, "Allowed schemes in links". Thanks.

-Trench

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 4 guests