MyBB Community Forums

Full Version: Mycode auto url
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
is it possible to make mycode for this? it will be really helpful if someone can guide me.

input:
[link]https://domain/file/demo.zip[/link]



output:
<span class="link"><a href="https://domain/file/demo.zip">demo.zip</a></link>
Can you please explain again what you really want? The function of including a URL already exists, what is special about your request?

[url=https://community.mybb.com/]das ist ein Link[/url]

In addition, MyBB makes urls automatically clickable,

https://community.mybb.com
[ur= bbcodes work, but you have to extra work. add URL and file title.

anyways I figure it out. here is the mycode

regular expression
\[link](https?://[^\]]+/([^/]+?))\[/link]

replace with
<a href="$1">$2</a>