b2evolution das object- und embed tag schmackhaft machen

Unter b2evolution gibt es beim Versuch Flashvideos z.b. von youtube.com oder video.google.com einzubetten einen Stolperstein: b2evo akzeptiert das erforderliche Object-Tag sowie die benötigten Attribute nicht. Einen Ansatz zur Lösung dazu habe ich im Support-Forum gefunden und etwas erweitert, damit der erforderliche HTML-Code von youtube.com und video.google.com von b2evolution geschluckt wird.

In der _formatting.php habe ich folgende Änderungen durchgeführt:
[PHP]
// Array showing what tags are allowed and what their allowed subtags are.
$allowed_tags = array
(
‘body’ => E_Flow, // Remember this is not a true body, just a post body
// Change one line and add three tags:
// ‘div’ => E_Flow,
‘div’ => E_Flow.’ object ‘,
‘object’ => E_Iinline.’ param embed’,
‘param’ => E_Iinline,
’embed’ => E_Iinline,
// end changed code
[/PHP]

und später im Quellcode dann die Attribute für die neuen Tags definieren:

[PHP]
// Array showing allowed attributes for tags
$allowed_attribues = array
(
// die folgenden drei Zeilen definieren die gueltigen attribute
‘object’ => A_attrs.’ ‘.A_TextAlign.’ width height’,
‘param’ => A_attrs.’ ‘.A_TextAlign.’ name value’,
’embed’ => A_attrs.’ ‘.A_TextAlign.’ src type width height style id allowscriptaccess allowScriptAccess quality bgcolor scale salign FlashVars flashvars’,
// end added code
[/PHP]

Damit wird dann der folgende HTML-Code für youtube.com von b2evolution auch nicht mehr angemeckert:

[HTML]
< div>< object width="425" height="350">< param name="movie" value="http://www.youtube.com/v/l2IkbwVZiEQ">< /param>< embed src="http://www.youtube.com/v/l2IkbwVZiEQ" type="application/x-shockwave-flash" width="425" height="350">< /embed>< /object>< /div>
[/HTML]

Und auch der HTML-Code für video.google.com sollte keine Hürde mehr darstellen:

[HTML]
< div>< embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf ?docId=5040995942068122100&hl=de"> < /embed>< /div>
[/HTML]