Current time: 08-01-2014, 03:44 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(Tutorial) Mycode Youtube 720p [HD on] by default]
05-16-2009, 09:06 PM (This post was last modified: 05-17-2009 05:10 PM by aglioeolio.)
Post: #1
Lightbulb (Tutorial) Mycode Youtube 720p [HD on] by default]
Go to your ACP in:
http://www.yoursite.com/admin/index.php?...fig/mycode

Follow these steps in creating a new mycode

Title: Youtube HD

Short Description: YoutubeHD

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

Replacement:
Code:
<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



Result:
   

[]s, Claudio

Tutorial: Jquery (by google API) with mybb (Prototype)
Distinction between Paid/Free Plugins Threads
Visit this user's website Find all posts by this user
Quote this message in a reply
05-17-2009, 03:10 AM
Post: #2
RE: (Tutorial) Mycode Youtube 720p [HD on] by default]
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?
Find all posts by this user
Quote this message in a reply
05-17-2009, 01:57 PM (This post was last modified: 05-17-2009 05:14 PM by aglioeolio.)
Post: #3
RE: (Tutorial) Mycode Youtube 720p [HD on] by default]
nope... bbcode for this will be

Code:
[video=hd]video-ID[/video]

(05-12-2009 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).

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

Hope that helps.

Updated...

[]s, Claudio

Tutorial: Jquery (by google API) with mybb (Prototype)
Distinction between Paid/Free Plugins Threads
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication