1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 00:27:45 +02:00

new module creation

This commit is contained in:
mcfly
2006-12-02 04:36:16 +00:00
commit e149b35fcc
2196 changed files with 182987 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
// USAGE: [flash=width,height]http://www.example.com/file.swf[/flash]
$movie_path = "http://".eregi_replace("http://", "",$code_text);
$movie_path = $tp -> toAttribute($movie_path);
$parm_array = explode(",",$parm);
$width_type = strpos($parm_array[0], "%") !== FALSE ? "%" : "";
$height_type = strpos($parm_array[1], "%") !== FALSE ? "%" : "";
$width_value = ereg_replace("[^0-9]","",$parm_array[0]);
$height_value = ereg_replace("[^0-9]","",$parm_array[1]);
$width_value = $width_value ? $width_value.$width_type : "50";
$height_value = $height_value ? $height_value.$height_type : "50";
return "<object type='application/x-shockwave-flash' data='$movie_path' width='$width_value' height='$height_value'>
<param name='movie' value='$movie_path' />
<param name='quality' value='high' />
<param name='allowscriptaccess' value='samedomain' />
</object>";