onecut wrote:Ok thx for help no64, for exemple just right now i want to add a "vimeo" embed video.
There's the embed code:
<object type="application/x-shockwave-flash" width="400" height="302" data="http://www.vimeo.com/moogaloop.swf?clip_id=739858&server=www.vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color="> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=739858&server=www.vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color=" /></object><br /><a href="http://www.vimeo.com/739858/l:embed_739858">Wii Loop Machine 2.0 : two hands!</a> from <a href="http://www.vimeo.com/user157218/l:embed_739858">The Amazing Rolo</a> on <a href="http://vimeo.com/l:embed_739858">Vimeo</a>.
(think is more clear with the italic style than the "code" one)
<object type="application/x-shockwave-flash" width="400" height="302" data="http://www.vimeo.com/moogaloop.swf?clip_id=739858&server=www.vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color="> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=739858&server=www.vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color=" /></object><br /><a href="http://www.vimeo.com/739858/l:embed_739858">Wii Loop Machine 2.0 : two hands!</a> from <a href="http://www.vimeo.com/user157218/l:embed_739858">The Amazing Rolo</a> on <a href="http://vimeo.com/l:embed_739858">Vimeo</a>.
ok,... here you go
first create in parser.php another BBCode in the $pattern = array
I placed it right after "brightcove"
'#\[vimeo\](.*?)\[/vimeo\]#s',
Then in the $replace = array
also right after "brightcove"
//****** embed Vimeo Video ****************************************************
'<div class="bbvideo"><object width="400" height="302" align="top" data="http://www.vimeo.com/moogaloop.swf?clip_id=$1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=$1" /><param name="allowScriptAccess" value="sameDomain" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="&server=www.vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=1&color=999900" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=$1" flashvars="&server=www.vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=1&color=999900" width="400" height="302" wmode="transparent" quality="best" align="top" allowScriptAccess="sameDomain" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed></object></div>',
//****** end Vimeo Video ******************************************************
Thats it, now you can use:
to insert your vimeo video.
"739858" is of course the video ID , which is included in the embed code:
<object type="application/x-shockwave-flash" width="400" height="302" data="http://www.vimeo.com/moogaloop.swf?clip_id=739858&server=www......
As you can see, I use the "object" tag and the "embed" tag, some people say you only need the "object" tag, but somehow it seems Safari on Mac grabs the "embed" tag.
However, take a look at both, you will find something like this:
flashvars="&server=www.vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color=999900"
there you have "fullscreen", "show_title", "show_byline" , "show_portrait" and the "color"
Here you can set your custom appearance of the player - either "1" for true or "0" for false
Here is a test where you can see the "plain" one - everything set to "0" and with a blue color
and the other all parameters set to "1" and with a green color.
http://www.monsterhall.de/viewtopic.php?pid=86#p86
Make a test and tell me if it works - I can only test this on a Mac at the moment.
*Edit: changed a bit on the code.... fullscreen works now too