Mycode auto url
#1
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>
Reply
#2
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
 
Reply
#3
[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>
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)