MyBB Community Forums
Mycode auto url - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: MyCodes (https://community.mybb.com/forum-117.html)
+--- Thread: Mycode auto url (/thread-239812.html)



Mycode auto url - lkop - 2023-12-16

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>


RE: Mycode auto url - bv64 - 2023-12-16

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


RE: Mycode auto url - lkop - 2023-12-17

[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>