remove [youtube] tags in posts
#1
recently converted a forum from phpbb that used the [youtube][/youtube] tags to display youtube videos. now that I'm on mybb and use the auto media plugin, I only need to post a direct link to the video and it'll auto embed.

is there any mycode that'll strip the [youtube][/youtube] tags and keep the URL intact?
Reply
#2
Expression: \[youtube\](.*?)\[/youtube\]

Replacement: $1

That should work.
No longer involved in the MyBB project.
Reply
#3
(2011-07-25, 08:42 PM)Malcolm. Wrote: Expression: \[youtube\](.*?)\[/youtube\]

Replacement: $1

That should work.

that does strip the youtube tags, but it doesn't make the link clickable.
Reply
#4
I thought it would automatically.

Replacement: <a href="$1" target="_blank">$1</a>






No longer involved in the MyBB project.
Reply
#5
(2011-07-25, 08:53 PM)Malcolm. Wrote: I thought it would automatically.

Replacement: <a href="$1" target="_blank">$1</a>

perfect man, thanks!
Reply
#6
Thanks, helped me too!
Reply
#7
Also..... if you want to make the replacement text:
Expression: \[youtube=(.*?)\](.*?)\[/youtube\]
Replacement: <a href="$2">$1</a>

[youtube=Text for link]Link Location[/youtube]
http://community.mybb.com/thread-99571-p...#pid726699
I wanna a response to that thread... any help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)