[rt-users] ImageAutoResize in RT 3.6.3

Justin Hayes justin.hayes at orbisuk.com
Thu Jun 14 12:36:47 EDT 2007


This is what I did on 3.6.3:

copy share/html/Ticket/Elements/ShowTransactionAttachments to local/ 
html/Ticket/Elements/

then at around link 156 there is the code that display an image:

     # if it's an image, show it as an image
     elsif ( $RT::ShowTransactionImages and  $message->ContentType  
=~ /^image\//i ) {
         $m->out('<img src="'
               . $AttachPath . '/'
               . $Transaction->Id . '/'
               . $message->Id
               . '/" />' );
     }

well I just added a 'width=90%' declaration and it seems to work fine  
for me

     # if it's an image, show it as an image
     elsif ( $RT::ShowTransactionImages and  $message->ContentType  
=~ /^image\//i ) {
         $m->out('<img width=90% src="'
               . $AttachPath . '/'
               . $Transaction->Id . '/'
               . $message->Id
               . '/" />' );
     }

HTH

Justin

------------------------------------------------------
Justin Hayes
Support Manager
justin.hayes at orbisuk.com



On 7 May 2007, at 08:34, Baytalskiy, Sal wrote:

> Hello!
>
> I found an article on automatic image resizing for RT 3.2 on the Wiki.
>
> However it talks about some files that seem to be very different in  
> RT 3.6.3 that i'm running.
>
> Is there a way to automatically scale attached images to the  
> ticket's display width?
>
> Thanks !
>
> Sal Baytalskiy
>
> *** NDS UK IT scanned this email for malicious content ***
> *** IMPORTANT: Do not open attachments from unrecognized senders  ***
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070614/de10adfa/attachment.htm>


More information about the rt-users mailing list