This adds a new bbcode option to include flash-files in posts
syntax:
[swf height="x" width="x"]http://domein.com/path/to/swf.swf[/swf]
Instructions (
Note: The instructions in the attachment on the next post are more accurate since there seems to be a bug with \\; \\5 gets replaced by\\1)
- Backup admin/functions.php
- Open admin/functions.php
- after: "/(\[)(php)(])(\r\n)*(.*)(\[\/php\])/siU",
add:
"/(\[)(swf)( +height=)(['\"]?)([^\"']*)(\\4)( +width=)(['\"]?)([^\"']*)(\\8)(])(.*)(\[\/swf\])/siU",
- after: "[ code ]\\5[ /code ]",
NB! Note the spaces between [ code ] and [ /code ] -> They need to be removed!
add:
"<embed src=\"\\12\" quality=\"high\" width=\"\\9\" height=\"\\5\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>",
- after: "/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/esiU",
add:
"/(\[)(swf)( +height=)(['\"]?)([^\"']*)(\\4)( +width=)(['\"]?)([^\"']*)(\\8)(])(.*)(\[\/swf\])/siU",
- after: "stripbrsfromcode('\\5')",
add:
"<embed src=\"\\12\" quality=\"high\" width=\"\\9\" height=\"\\5\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed>",
That's it! Let me know if it works (didn't used it at my server)
[edit]For some strange reason \\5 gets replaced with \\1, so \\1 should be: \\5[/edit]