Mas*Mind
03-15-2001, 08:08 PM
This adds a new bbcode option to include flash-files in posts
syntax:
http://domein.com/path/to/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)
For some strange reason \\5 gets replaced with \\1, so \\1 should be: \\5
syntax:
http://domein.com/path/to/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)
For some strange reason \\5 gets replaced with \\1, so \\1 should be: \\5