Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

set background color for deffer line mail message

Quote Reply
set background color for deffer line mail message
Dear All ,
I need to set background color for differ line
mail message (Subject,Sender,Date,Status,Size) etc,
color 1 for mail message 1,
color 2 for mail message 2,
color 1 for mail message 3,
color 2 for mail message 4,......

i know the file for modify file is msg-row.htm ,
but i don't how to change it !

Thanks You.



Quote Reply
Re: set background color for deffer line mail message In reply to
I try to add bellow text at msg-row.htm , but can't show bgcolor.

if($bcolor=ffffff) {
$bcolor=ffcccc; }
else {
$bcolor=ffffff; }


<tr bgcolor=$bcolor id="<%msgs_mid%>a" onclick="top.HighLightMsg('<%msgs_mid%>'); top.main.window.location='webmail.cgi?sid=<%sid%>&t=<%template%>&sb=<%sb%>&so=<%so%>&nh=<%nh%>&tb=<%tb%>&mh=1&folders_fid=<%msgs_fid%>';">

<td width="224" bgcolor="#FFFFFF"><font face="Tahoma, Arial, Helvetica" size="2"><INPUT TYPE=HIDDEN NAME="Next" VALUE="webmail.cgi?sid=<%sid%>&t=<%template%>&sb=<%sb%>&so=<%so%>&nh=<%nh%>&tb=<%tb%>&mh=1&folders_fid=<%msgs_fid%>"><INPUT TYPE="CHECKBOX" NAME="<%msgs_mid%>" VALUE="checked"><A onclick="top.HighLightMsg('<%msgs_mid%>');" ID="<%msgs_mid%>b" style="text-decoration:none" HREF="webmail.cgi?sid=<%sid%>&t=<%template%>&sb=<%sb%>&so=<%so%>&nh=<%nh%>&tb=<%tb%>&mh=1&folders_fid=<%msgs_fid%>" target=main><%msgs_subject%><%ifnot msgs_subject%>No Subject<%endif%></a></font></td>

<td width="250" bgcolor="#FFFFFF"><font face="Tahoma, Arial, Helvetica" size="2"><%msgs_sent_from%></font></td>

<td width="145" bgcolor="#FFFFFF"><font face="Tahoma, Arial, Helvetica" size="2"><%msgs_sent%> </font></td>

<td width="68" bgcolor="#FFFFFF"><font face="Tahoma, Arial, Helvetica" size="2"><%msgs_status%></font></td>

<td width="37" bgcolor="#FFFFFF"><font face="Tahoma, Arial, Helvetica" size="2"><%msg_size%></font></td>
</tr>

<SCRIPT language=JavaScript>top.CheckSelected('<%msgs_mid%>');</SCRIPT>


Quote Reply
Re: set background color for deffer line mail message In reply to
Alext help ME!!!!

Quote Reply
Re: set background color for deffer line mail message In reply to
This needs to be done in the code unfortunately. Edit Webmail.pm around line 512:

$out .= &Webmail::page('msg-row.htm', $IN, $USER, { template => $USER->{'template'}, msg_size => $size, sb => $in->{sb}, so => $in->{so}, nh => $tr, p => $in->{nh}, tb => $in->{tb} }, $msg_r );

and add into that list:

, bgcolor => $bgcolor

and just before that do:

$bgcolor = ($bgcolor eq '#FFFFFF') ? '#000000' : '#FFFFFF';

using whatever two colors you want. Then you can use <%bgcolor%> in your msg-row template.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: set background color for deffer line mail message In reply to
i put below code but get 500 error: --

$bgcolor = ($bgcolor eq '#FFFFFF') ? '#000000' : '#FFFFFF';

$out .= &Webmail::page('msg-row.htm', $IN, $USER, { template => $USER->{'template'}, msg_size => $size, sb => $in->{sb}, so => $in->{so}, nh => $tr, p => $in->{nh}, tb => $in->{tb}}, $msg_r, bgcolor => $bgcolor );


----help , thanks


Quote Reply
Re: set background color for deffer line mail message In reply to
Oops, that should be:

$out .= &Webmail::page('msg-row.htm', $IN, $USER, { template => $USER->{'template'}, msg_size => $size, sb => $in->{sb}, so => $in->{so}, nh => $tr, p => $in->{nh}, tb => $in->{tb}, bgcolor => $bgcolor
}, $msg_r );

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: set background color for deffer line mail message In reply to
Hi alex
i add
$out .= &Webmail::page('msg-row.htm', $IN, $USER, { template => $USER->{'template'}, msg_size => $size, sb => $in->{sb}, so => $in->{so}, nh => $tr, p => $in->{nh}, tb => $in->{tb}, bgcolor => $bgcolor
}, $msg_r );
still same , get 500 error,

also if i just add below link, also have get 500 error,
$bgcolor = ($bgcolor eq '#FFFFFF') ? '#000000' : '#FFFFFF';

help me please , thanks.