View Issue Details

IDProjectCategoryView StatusLast Update
0000838mantisbtbugtrackerpublic2003-12-13 04:45
ReporterrepAssigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Versionnone 
Summary0000838: Show attached images as images instead of links.
Description

I set up our system to show images as as the image instead of the link. We use this because we screen capture UI bugs and error message boxes and include them with the message. I added this code (hack) to prototype it:

ext$ = strtoupper (substr($v2_filename, -3, 3));
if(substr($ext, -3, 3) == "BMP" || substr($ext, -3, 3) == "JPG" || substr($ext, -3, 3) == "JPG"){
PRINT "<img src="$v2_diskfile"> $v2_filename";
}else{
PRINT "<a href="$v2_diskfile">$v2_filename</a> ($v2_filesize KB)";
}

I added this to files view_bug_advanced_page and view_bug_page.

Additional Information

My solution was a quick hack. It would be better if the extensions were configurable in the config file and if images above a certain size were still given as links (for people with slow connections.

TagsNo tags attached.
Attached Files
test.bmp (Attachment missing)

Activities

rep

rep

2001-08-23 13:43

reporter   ~0001208

Cut and paste problem! How about this line:

if($ext == "BMP" || $ext == "JPG" || $ext == "GIF"){

rep

rep

2002-12-10 17:08

reporter   ~0003554

This would be useful. I just noticed that Fogbugz does this:

<a href="http://www.fogcreek.com/FogBUGZ/NewIn30.html">http://www.fogcreek.com/FogBUGZ/NewIn30.html</a>

Under windows it is so easy to do the alt-print-screen to capture an error message box.

vboctor

vboctor

2003-02-25 15:43

manager   ~0003818

Fixed in CVS. Will be available in 0.18.0a3.

  • New config option (preview_attachments_inline_max_size): Configure the maximum size for an attachment to be viewed inline. This feature can be disabled by setting this value to 0. Default is 0.

Related Changesets

MantisBT: master d38f5c41

2003-02-25 09:42

vboctor


Details Diff
Fix 0000838: Show attached images as images instead of links.

M config_defaults_inc.php
- New config option (preview_attachments_inline_max_size): Configure the maximum size for an attachment to be
viewed inline. This feature can be disabled by setting this value to 0. Default is 0.

M core/file_api.php
- (file_list_attachments): Added support for attachment previewing.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2023 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0000838
mod - core/file_api.php Diff File
mod - config_defaults_inc.php Diff File
mod - doc/ChangeLog Diff File