2009-06-04, 07:59 PM
'Basics' of auto-embed credits to SAFAD
threads: http://community.mybboard.net/thread-49050.html http://community.mybboard.net/thread-48781.html
1st: Number of chars in Video-ID
Pick a video url and see its relation with embed code... there must be an "ID Code" between both that will be the mycode key value (video-ID). You will need the number of chars from that code.
* example:
Dailymotion:
video URL:
video Embed:
Key value (Video-ID): x9h0nm - 6 chars
2nd: Build the "Regular Expression" mycode with video url
Just paste video url in mycode replacement following SAFAD replacements
(example from auto-youtube)
(\[youtube\]|(<a href=\")?(http://)?(www.)?youtube.com/watch\?v=)(.{11}?)((.*?)\" target=\"_blank\">)?((.*?)\[/youtube\]|(.*?)</a>)
* Still studying dailymotion example:
http://www.dailymotion.com/relevance/search/pes+2010+e3/video/x9h0nm_pes-2010-e3-2k9_videogames
Regular Expression:
(\[dailymotion\]|(<a href=\")?(http://)?(www.)?dailymotion.com/(.*?)/vi....{6}?)((.*?)\" target=\"_blank\">)?((.*?)\[/dailymotion\]|(.*?)</a>)
{6} = number os characters from Video-ID
3rd: Build the "Replacement" mycode with Embed code
Just copy & paste EMBED Code from video and replace Video-ID with ${5} tag:
from:
Video example:
Replacement:
it´s done...pretty simple
"MyCode preview" won´t work, test directly in post preview pasting some Video urls - surelly will work
threads: http://community.mybboard.net/thread-49050.html http://community.mybboard.net/thread-48781.html
1st: Number of chars in Video-ID
Pick a video url and see its relation with embed code... there must be an "ID Code" between both that will be the mycode key value (video-ID). You will need the number of chars from that code.
* example:
Dailymotion:
video URL:
http://www.dailymotion.com/relevance/search/pes+2010+e3/video/x9h0nm_pes-2010-e3-2k9_videogames
video Embed:
<div><object width="480" height="291"><param name="movie" value="http://www.dailymotion.com/swf/x9h0nm_pes-2010-e3-2k9_videogames&related=0"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/x9h0nm_pes-2010-e3-2k9_videogames&related=0" type="application/x-shockwave-flash" width="480" height="291" allowFullScreen="true" allowScriptAccess="always"></embed></object><br /><b><a href="http://www.dailymotion.com/video/x9h0nm_pes-2010-e3-2k9_videogames">PES 2010 E3 2K9</a></b><br /><i>Enviado por <a href="http://www.dailymotion.com/CSL_Console">CSL_Console</a>. - <a href="http://www.dailymotion.com/br/channel/videogames">Veja reviews de games, trailers e seus melhores momentos jogando</a></i></div>
Key value (Video-ID): x9h0nm - 6 chars
2nd: Build the "Regular Expression" mycode with video url
Just paste video url in mycode replacement following SAFAD replacements
(example from auto-youtube)
(\[youtube\]|(<a href=\")?(http://)?(www.)?youtube.com/watch\?v=)(.{11}?)((.*?)\" target=\"_blank\">)?((.*?)\[/youtube\]|(.*?)</a>)
- Red = Basic site URL
- Green = Number os chars from youtube´s video ID > Example: http://www.youtube.com/watch?v=W4K_k_7Eroo
* Still studying dailymotion example:
http://www.dailymotion.com/relevance/search/pes+2010+e3/video/x9h0nm_pes-2010-e3-2k9_videogames
- Green = basic video URL
Regular Expression:
(\[dailymotion\]|(<a href=\")?(http://)?(www.)?dailymotion.com/(.*?)/vi....{6}?)((.*?)\" target=\"_blank\">)?((.*?)\[/dailymotion\]|(.*?)</a>)
{6} = number os characters from Video-ID
3rd: Build the "Replacement" mycode with Embed code
Just copy & paste EMBED Code from video and replace Video-ID with ${5} tag:
from:
Video example:
Quote:<div><object width="480" height="291"><param name="movie" value="http://www.dailymotion.com/swf/x9h0nm_pes-2010-e3-2k9_videogames&related=0"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/x9h0nm_pes-2010-e3-2k9_videogames&related=0" type="application/x-shockwave-flash" width="480" height="291" allowFullScreen="true" allowScriptAccess="always"></embed></object><br /><b><a href="http://www.dailymotion.com/video/x9h0nm_pes-2010-e3-2k9_videogames">PES 2010 E3 2K9</a></b><br /><i>Enviado por <a href="http://www.dailymotion.com/CSL_Console">CSL_Console</a>. - <a href="http://www.dailymotion.com/br/channel/videogames">Ver mais videos de jogos</a></i></div>
- Red = useless code
- Blue = Video-ID
Replacement:
<object width="480" height="291"><param name="movie" value="http://www.dailymotion.com/swf/${6}&related=0"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/${6}&related=0" type="application/x-shockwave-flash" width="480" height="291" allowFullScreen="true" allowScriptAccess="always"></embed></object>
it´s done...pretty simple
"MyCode preview" won´t work, test directly in post preview pasting some Video urls - surelly will work