MyBB Community Forums

Full Version: Changing the flash size
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use the Flash tag plugin to show the flash file into the forum by using [flash]...[/flash]. When I use it, the flash file is too small. Could I change it to the custom size.

Here is my flash_tag.php:
<?php

/*

Plugin Flash Tag

(c) 2005 by MyBBoard.de

Website: http://www.mybboard.de

*/



$plugins->add_hook("parse_message", "flash_tag");



function flash_tag_info()

{

	return array(

		"name"			=> "Flash Tag",

		"description"	=> "Chèn flash thông quan thẻ ([flash][/flash]) đến hệ thống board của người dùng.",

		"website"		=> "http://www.mybboard.de",

		"author"		=> "MyBBoard.de",

		"authorsite"	=> "http://www.mybboard.de",

		"version"		=> "1.0",

	);

}



function flash_tag_activate()

{

}



function flash_tag_deactivate()

{

}



function flash_tag($message)

{

	// [flash]Datei[/flash] umwandeln

	$message = preg_replace("#\[flash\]([a-z]+?://){1}(.+?)\[/flash\]#i", "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\">

  <param name=\"movie\" value=\"$1$2\" />

  <param name=\"quality\" value=\"high\" />

  <embed src=\"$1$2\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed>

</object>", $message);

	

	// [flash="width"x"height"]Datei[/flash] umwandeln

    $message = preg_replace("#\[flash=([0-9]{1,3})x([0-9]{1,3})\]([a-z]+?://){1}(.+?)\[/flash\]#i", "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"$1\" height=\"$2\">

  <param name=\"movie\" value=\"$3$4\" />

  <param name=\"quality\" value=\"high\" />

  <embed src=\"$3$4\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"$1\" height=\"$2\"></embed>

</object>", $message);

    // $message ausgeben

	return $message;

}

?>

Any help will be very appreciated!!
[flash="width"x"height"]

instead of [flash][/flash]

i believe [flash="width"x"height"][/flash] will work
you could also

    $message = preg_replace("#\[flash=([0-9]{1,3})x([0-9]{1,3})\]([a-z]+?://){1}(.+?)\[/flash\]#i", "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"$1\" height=\"$2\">
change the
width=\"$1\" height=\"$2\">
to
width=WIDTH HERE height=HEIGHT HERE>
then use [flash] [/flash]

find this useful? +rep Big Grin
Thanks so much. I have changed the code below:

width=\"$1\" height=\"$2\">
to
width=300px height=400px>
then use [flash] [/flash]

But nothing change. Please help me!

try clearing your cache
what is your site url can i check?
not sure if needed but have u deactivated and reactivated the plugin
$message = preg_replace("#\[flash=([0-9]{1,3})x([0-9]{1,3})\]([a-z]+?://){1}(.+?)\[/flash\]#i",

you may also need to replace the above with

$message = preg_replace("#\[flash\]([a-z]+?://){1}(.+?)\[/flash\]#i",
I have done all but nothing change. Here is my link site: http://diendana.quanlycongnghieping.net/...php?tid=42
your site wont load for me
ok it loaded
i am not sure how to help sorry
You're welcome. Thanks so much
sorry me being thick

change all back and then change
  <embed src=\"$3$4\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"$1\" height=\"$2\"></embed>
to
<embed src=\"$3$4\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=WIDTH HERE height=HEIGHT HERE></embed>

cant believe i didnt see that before Big Grin
you will need to repost the flash file aswell as it wont update once already posted