remove [youtube] tags in posts - 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: remove [youtube] tags in posts (/thread-99817.html) |
remove [youtube] tags in posts - andrewjs18 - 2011-07-25 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? RE: remove [youtube] tags in posts - Nathan Malcolm - 2011-07-25 Expression: \[youtube\](.*?)\[/youtube\] Replacement: $1 That should work. RE: remove [youtube] tags in posts - andrewjs18 - 2011-07-25 (2011-07-25, 08:42 PM)Malcolm. Wrote: Expression: \[youtube\](.*?)\[/youtube\] that does strip the youtube tags, but it doesn't make the link clickable. RE: remove [youtube] tags in posts - Nathan Malcolm - 2011-07-25 I thought it would automatically. Replacement: <a href="$1" target="_blank">$1</a> RE: remove [youtube] tags in posts - andrewjs18 - 2011-07-25 (2011-07-25, 08:53 PM)Malcolm. Wrote: I thought it would automatically. perfect man, thanks! RE: remove [youtube] tags in posts - xhosmafia - 2011-07-26 Thanks, helped me too! RE: remove [youtube] tags in posts - Wes the Bes - 2011-07-26 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] |