MyBB Community Forums

Full Version: mycode help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello, i want to make a code for example like

[video]http://community.mybboard.net/thread-37140.html[/video]

i want it so that it will support any url link. and that when you use the code [video] a button will appear in the thread. so when u use [video][/video] code. it will get a default image that i set. and use the url . so when u click the button it will automatically re-direct you to a site.


[Image: 80v7iq1.png]


i want it like the example above. but it takes too much code for the button above.
Code:
[url=http://community.mybboard.net/thread-37140.html]
[img]http://i5.tinypic.com/80v7iq1.png[/img][/url]

where i would just like it as
Code:
[video]http://community.mybboard.net/thread-37140.html[/video]
Try this

Regular Expression:
Code:
\[video\](https?\://[^["<>]+?)\[/video\]
Replacement:
Code:
<a href="$1"><img src="myimage.jpg" alt="" /></a>
Reference URL's