Displaying Flash ( swf files) on bug display page
Moderators: Developer, Contributor
Displaying Flash ( swf files) on bug display page
I have been using Mantis for my project for a while now.
Recently I discovered a great free product called Wink that enables interaction driven tutorials to be recorded and exported as flash files.
All my users are now required to save flash files before submitting a bug vs. printscreens as they used too.
I know vboctor was working on integrating cropper to save screen snapshots and display tham in mantis ( well Mantis supports displaying images in the first place)
Flash also could be embedded and displayed straight on the big report page for the hands on view.
It should not be very difficult ?
Regards,
Kuba
Recently I discovered a great free product called Wink that enables interaction driven tutorials to be recorded and exported as flash files.
All my users are now required to save flash files before submitting a bug vs. printscreens as they used too.
I know vboctor was working on integrating cropper to save screen snapshots and display tham in mantis ( well Mantis supports displaying images in the first place)
Flash also could be embedded and displayed straight on the big report page for the hands on view.
It should not be very difficult ?
Regards,
Kuba
Last edited by qbaas on 25 Oct 2006, 13:48, edited 1 time in total.
Already did it.
I edited the file core/file_api.php
and after:
if ( $t_can_download &&
( $v_filesize <= config_get( 'preview_attachments_inline_max_size' ) ) &&
( $v_filesize != 0 ) &&
( in_array( strtolower( file_get_extension( $t_file_display_name ) ), array( 'png', 'jpg', 'jpeg', 'gif', 'bmp' ), true ) ) ) {
PRINT "<br /><img src=\"file_download.php?file_id=$v_id&type=bug\" />";
$image_previewed = true;
}
I have added :
// added by JK to enable displaying of SWF files
if ( $t_can_download &&
( $v_filesize <= config_get( 'preview_attachments_inline_max_size' ) ) &&
( $v_filesize != 0 ) &&
( in_array( strtolower( file_get_extension( $t_file_display_name ) ), array( 'swf' ), true ) ) ) {
PRINT "<center>";
PRINT "<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" WIDTH=\"800\" HEIGHT=\"600\"CODEBASE=\"http://active.macromedia.com/flash5/cab ... on=5,0,0,0\">";
PRINT "<PARAM NAME=movie VALUE=\"file_download.php?file_id=$v_id&type=bug\">";
PRINT "<PARAM NAME=play VALUE=true>";
PRINT "<PARAM NAME=loop VALUE=false>";
PRINT "<PARAM NAME=quality VALUE=low>";
PRINT "<EMBED SRC=\"file_download.php?file_id=$v_id&type=bug\" WIDTH=\"100%\" HEIGHT=\"100%\" quality=low loop=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/dow ... kwaveFlash\">";
PRINT "</EMBED>";
PRINT "</OBJECT>";
PRINT "</center>";
PRINT "<br />";
$image_previewed = true;
}
The only problem is the size of the flash files.
I don't know how to do it dynamically so for now I set it to be 800x600 and than use 100% as parameters for HTML output.
It is not a beauty but it does the trick.
Hopefully somebody willfind it usefull.
Regards,
Kuba
and after:
if ( $t_can_download &&
( $v_filesize <= config_get( 'preview_attachments_inline_max_size' ) ) &&
( $v_filesize != 0 ) &&
( in_array( strtolower( file_get_extension( $t_file_display_name ) ), array( 'png', 'jpg', 'jpeg', 'gif', 'bmp' ), true ) ) ) {
PRINT "<br /><img src=\"file_download.php?file_id=$v_id&type=bug\" />";
$image_previewed = true;
}
I have added :
// added by JK to enable displaying of SWF files
if ( $t_can_download &&
( $v_filesize <= config_get( 'preview_attachments_inline_max_size' ) ) &&
( $v_filesize != 0 ) &&
( in_array( strtolower( file_get_extension( $t_file_display_name ) ), array( 'swf' ), true ) ) ) {
PRINT "<center>";
PRINT "<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" WIDTH=\"800\" HEIGHT=\"600\"CODEBASE=\"http://active.macromedia.com/flash5/cab ... on=5,0,0,0\">";
PRINT "<PARAM NAME=movie VALUE=\"file_download.php?file_id=$v_id&type=bug\">";
PRINT "<PARAM NAME=play VALUE=true>";
PRINT "<PARAM NAME=loop VALUE=false>";
PRINT "<PARAM NAME=quality VALUE=low>";
PRINT "<EMBED SRC=\"file_download.php?file_id=$v_id&type=bug\" WIDTH=\"100%\" HEIGHT=\"100%\" quality=low loop=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/dow ... kwaveFlash\">";
PRINT "</EMBED>";
PRINT "</OBJECT>";
PRINT "</center>";
PRINT "<br />";
$image_previewed = true;
}
The only problem is the size of the flash files.
I don't know how to do it dynamically so for now I set it to be 800x600 and than use 100% as parameters for HTML output.
It is not a beauty but it does the trick.
Hopefully somebody willfind it usefull.
Regards,
Kuba
Thanks qbass, this looks nice. I would suggest reporting an issue in the bugtracker and attaching the patch to it.
I've installed Wink on XP and it kept crashing whenever the rendering option was triggered. Hence, I wasn't able to use the tool.
I wonder if other people had the same problem.
Regards,
Victor.
I've installed Wink on XP and it kept crashing whenever the rendering option was triggered. Hence, I wasn't able to use the tool.
I wonder if other people had the same problem.
Regards,
Victor.
Thanks , Victor
I will post the patch as you suggested.
As for Wink, play around with the Render options. Fo rme it works like a miracle if i use the Uncompressed flash file setting. Others cause problems ( I also use it on a XP).
The thing is that the tool is just super easy and does the best job explaining the issue keeping the size much lower than avi files ( not to mention interaction)
Here is how it looks like:
Cheers,
Kuba
As for Wink, play around with the Render options. Fo rme it works like a miracle if i use the Uncompressed flash file setting. Others cause problems ( I also use it on a XP).
The thing is that the tool is just super easy and does the best job explaining the issue keeping the size much lower than avi files ( not to mention interaction)
Here is how it looks like:
Cheers,
Kuba
-
- Posts: 40
- Joined: 07 Jun 2006, 16:33
That 100% setting didn't work well for me, but with a pixel based setting it's now perfectly fine. Thanks for the patch and the Wink tip!PRINT "<EMBED SRC=\"file_download.php?file_id=$v_id&type=bug\" WIDTH=\"100%\" HEIGHT=\"100%\" quality=low loop=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/dow ... kwaveFlash\">";
-
- Posts: 33
- Joined: 22 Jul 2005, 14:19
Re: Thanks , Victor
I need the Patch too, can u send it to me f.rentmeister@ascaron.comqbaas wrote:I will post the patch as you suggested.
As for Wink, play around with the Render options. Fo rme it works like a miracle if i use the Uncompressed flash file setting. Others cause problems ( I also use it on a XP).
The thing is that the tool is just super easy and does the best job explaining the issue keeping the size much lower than avi files ( not to mention interaction)
Here is how it looks like:
Cheers,
Kuba
!!!THANKS!!!
-
- Posts: 40
- Joined: 07 Jun 2006, 16:33
-
- Posts: 33
- Joined: 22 Jul 2005, 14:19
-
- Posts: 40
- Joined: 07 Jun 2006, 16:33
-
- Posts: 33
- Joined: 22 Jul 2005, 14:19
It seems there are browser-specific issues here.
I would expect the swf file to display at the original captured size in the Mantis page, howver no case does it do this, its either smaller or bigger. I tried using pixel sizes as noted in a post above to try force it to specific sizes as well as leaving the sizing info blank inhopes it would use some internal default, but it seems to make no difference either way.
Im using the Wink2.0 output from XP using defaults, maybe there are sometweaks i can make there, as it embeds some odd controll that Quicktime player seems to choke on.
Tried it in Win/Mac : Firefox/iExplorer/Safari
Anyway, did i forget to mention? this is great! Thanks.
I would expect the swf file to display at the original captured size in the Mantis page, howver no case does it do this, its either smaller or bigger. I tried using pixel sizes as noted in a post above to try force it to specific sizes as well as leaving the sizing info blank inhopes it would use some internal default, but it seems to make no difference either way.
Im using the Wink2.0 output from XP using defaults, maybe there are sometweaks i can make there, as it embeds some odd controll that Quicktime player seems to choke on.
Tried it in Win/Mac : Firefox/iExplorer/Safari
Anyway, did i forget to mention? this is great! Thanks.
-
- Posts: 40
- Joined: 07 Jun 2006, 16:33
well i just upgraded from 1.0.3 to 1.0.6. now this awesome feature isn't working. anybody else run into this? oh, i copied the old "file_api.php" to the new instance. am i forgetting anything?
EDIT:
I found out my problem. I had forgotten by default that the $g_preview_attachments_inline_max_size = 0; means no attachments viewed inline, so i set it to 100000 and now everything works. hopefully this will be a reminder for those that upgrade
EDIT:
I found out my problem. I had forgotten by default that the $g_preview_attachments_inline_max_size = 0; means no attachments viewed inline, so i set it to 100000 and now everything works. hopefully this will be a reminder for those that upgrade