ImageAutoResize in RT 3.6.3

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

smime.p7s (3.65 KB)

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(‘’ );
}

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(‘’ );
}

HTH

Justin

Justin Hayes
Support Manager
justin.hayes@orbisuk.comOn 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 ***


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Thanks Justin!
Worked out great!

Sal.From: Justin Hayes [mailto:justin.hayes@orbisuk.com]
Sent: Thursday, June 14, 2007 12:37 PM
To: Baytalskiy, Sal
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] ImageAutoResize in RT 3.6.3

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(‘’ );
}

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(‘’ );
}

HTH

Justin

Justin Hayes
Support Manager
justin.hayes@orbisuk.com mailto:justin.hayes@orbisuk.com