Allowed URL protocols

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Profo
Registered User
Posts: 34
Joined: Wed May 13, 2009 1:51 pm

Allowed URL protocols

Post by Profo »

I'm having trouble trying to add any custom BBcode which includes non-standard protocols (ssh, svn+ssh, svn...). I am using {URL} token.

An example to clarify follows.

BBCode usage:

Code: Select all

[protocol={URL}]{SIMPLETEXT}[/protocol]
HTML replacement:

Code: Select all

<a href="{URL}">{SIMPLETEXT}</a>
The above does not work. Any custom combination I try fails, it just renders as plain text. The same happens if you paste the url directly (no BBCode) inside any post, so I guess any protocols different from HTTP or HTTPS are being filtered.

Is there a configuration parameter/file I can change to allow specific protocols in URLs and make them clickable inside posts?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22834
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: Allowed URL protocols

Post by Mick »

What are you trying to achieve exactly, what is the purpose of the BBCode?
"The more connected we get the more alone we become" - Kyle Broflovski©
Profo
Registered User
Posts: 34
Joined: Wed May 13, 2009 1:51 pm

Re: Allowed URL protocols

Post by Profo »

I'm trying to make any non-http URLs (skype, git, irc, udp, ssh, svn ...) clickable, either using BBCode or not.

In version 3.1, it works fine. e.g. ssh://path/to/files is clickable in 3.1 posts, but not in 3.2.
User avatar
JoshyPHP
Code Contributor
Posts: 1164
Joined: Mon Jul 11, 2011 12:28 am

Re: Allowed URL protocols

Post by JoshyPHP »

Profo wrote:Is there a configuration parameter/file I can change to allow specific protocols in URLs and make them clickable inside posts?
There's a config setting but I don't think there's a way to change it from the admin panel. You can change it in CLI or I guess you can modify your config table by hand too. You'll have to purge the cache in the admin panel for the changes to take effect.

Code: Select all

./phpBB/bin/phpbbcli.php config:set allowed_schemes_links http,https,ftp,ftps,svn+ssh
I wrote the thing that does BBCodes in 3.2+.
Profo
Registered User
Posts: 34
Joined: Wed May 13, 2009 1:51 pm

Re: Allowed URL protocols

Post by Profo »

That's exactly what I was looking for. Thanks JoshyPHP!
Post Reply

Return to “[3.2.x] Support Forum”