Recent Topics

1 Oct 15, 2008 13:32    

My b2evolution Version: 2.x

First, I did not want to deactivate the b2evolution security nor the validation rules (I was getting an illegal tag: embed warning) but wanted to embed into my [url=]b2evolution v2.4.5 blog[/url] an Brightcove video for which there is (or I could not find) an relevant plugin.

Below is what I did using an specific example with code offered by Brightcove services to embed in website or blog for the pertinent video.

Encapsulating the embedded code provided by Brightcove into the Ladyease [url=]BAE Embed Flash 2.2[/url] I avoided the error that was being displayed (illegal tag) when pasting the sample code below directly into an b2evolution version 2.4.5 post:

<embed src="" bgcolor="#FFFFFF" flashVars="videoId=1761978933&playerId=980795693&viewerSecureGatewayURL=" base="" name="flashObj" width="486" height="412" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage=""></embed>

Accordingly, modifying the above code to comply with the parameters required by the BAE Embed Flash 2.2 plugin, namely: src, width, and height, as rewritten below:

<embed src="\\1" bgcolor="#FFFFFF" flashVars="videoId=1761978933&playerId=980795693&viewerSecureGatewayURL=" base="" name="flashObj" width="\\2" height="\\3" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage=""></embed>

And subsequently replacing the above sample Brightcove video modified code into the actual BAE Embed Flash 2.2 plugin BEFORE installing it through b2evolution backend as the relevant portion of the plugin is shown below:

// flash:
                $content = preg_replace( '¤\[object:flash:(.+?) width:(.+?) height:(.+?)]¤', '<div class="videoblock"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
sion=6,0,40,0" WIDTH="\\2" HEIGHT="\\3"><PARAM NAME="movie" VALUE="\\1"><PARAM NAME="quality" VALUE="high"><embed src="\\1" bgcolor="#FFFFFF" flashVars="videoId=1761978933&playerId=980795693&viewerSecureGatewayURL=
eway&servicesURL=" base="" name="flashObj" width="\\2" height="\\3" seamlesstabbing="false" type="application/x-shockwave-flash"
swLiveConnect="true" pluginspage=""></embed><
/OBJECT></div>', $content );

In other words, we replace everything from the original BAE Embed Flash 2.2 plugin initial openning embed tag to the last embed tag with our sample BrightCove modified equivalent and save the modification to the original.

And then the single video (one-off) ready BAE Embed Flash 2.2 is ready to be installed in the B2evolution backend.

After the plugin is installed, and we are ready to embed a Brightcove video into one of our posts, we select the Embed object: Flash button. It will prompt us to enter object URL of flash. Evidently it refers to the src= parameter and we enter:

Subsequently it will prompt for the width, using px or %, of your flash: and height, using px or %, of your flash: that we provide verbatim to satisfy the BAE Embed Flash 2.2 plugin requirements in our post.

Yes, it is a one video per plugin hack (that works); but the information may be useful for someone out there (maybe Ladyease) that wants to add more general features/parameters to extend the one-off video limitation.

Form is loading...

Social CMS – This forum is powered by b2evolution CMS, a complete engine for your website.