(Tutorial) Mycode Youtube 720p [HD on] by default]
Go to your ACP in:

Follow these steps in creating a new mycode

Title: Youtube HD

Short Description: YoutubeHD

Regular Expression:
\[video=hd\]([0-9a-zA-Z\-_ ]+)\[/video\]

<object width="854" height="450"><param name="movie" value="http://www.youtube.com/v/$1&hl=pt-br&fs=1&hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/$1&hl=pt-br&fs=1&hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="854" height="450"></embed></object>

PS: Replace pt-br with with your language code

will this make it though for people who have a youtube video url can just copy it to the site and post reply and voila there is the youtube video and then you start to watch it?
nope... bbcode for this will be


(2009-05-12, 11:23 AM)Yumi Wrote: I've seen a number of MyCodes where "(.*?)" expression is used. I thought it'd be about time that I suggest trying to avoid that expression where possible, as this may allow users to perform some minor HTML injection (HTML tags are automatically converted to their entities and Javascript is automatically stripped out, so luckily this isn't that big an issue).

Number fields, use "([0-9]+)"
General CSS fields (may not apply to everything), use "([0-9a-zA-Z\-_ ]+)"

Hope that helps.


Forum Jump:

Users browsing this thread: 1 Guest(s)