MyBB Community Forums

Full Version: change flash window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i use flash_tag contribution plugin,just want to know where do i edit to change the width and height of default flash window in this file
thanks
<?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"	=> "Adds the flash tag ([flash][/flash]) to your board to indert flash files into posts.",
		"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;
}
?>
$1,2 in width and height?
// [flash="width"x"height"]Datei[/flash] umwandeln

Use [flash=100x100]link[/flash] ; should work ... change 100 into your own widths and heights.
so how about use [flash]link[/flash].it has width and height default,how to change it?
It uses the width&height of the .swf-file ... You would need to change the .fla file if you want to use [flash]link[/flash] with no extra attributes and the right w&h. And why making it so difficult when you have a mycode with the w&h-attributes =z
yes thanks for answering
This Code work for MyBB 1.2 ?