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=http://www.metztli-it.com/blog/index.php/2008/10/14/from-mainframes-to-distributed-computing?blog=4]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=http://www.beatease.com/web-design.php/b2evolution-plugins/embed-flash-2]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="http://services.brightcove.com/services/viewer/federated_f8/980795693" bgcolor="#FFFFFF" flashVars="videoId=1761978933&playerId=980795693&viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&servicesURL=http://services.brightcove.com/services&cdnURL=http://admin.brightcove.com&domain=embed&autoStart=false&" base="http://admin.brightcove.com" name="flashObj" width="486" height="412" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></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=https://console.brightcove.com/services/amfgateway&servicesURL=http://services.brightcove.com/services&cdnURL=http://admin.brightcove.com&domain=embed&autoStart=false&" base="http://admin.brightcove.com" name="flashObj" width="\\2" height="\\3" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></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="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ver
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=https://console.brightcove.com/services/amfgat
eway&servicesURL=http://services.brightcove.com/services&cdnURL=http://admin.brightcove.com&domain=embed&autoStart=false&" base="http://admin.brightcove.com" name="flashObj" width="\\2" height="\\3" seamlesstabbing="false" type="application/x-shockwave-flash"
swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></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:

http://services.brightcove.com/services/viewer/federated_f8/980795693


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...