[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thread list indentation



hi

i want messages indented by thread ...but not getting with this code
check out my code in resource file for thread index...

<!--=== Thread Index Page Customizations
==================================-->
<TIdxPgBegin>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";>
<html>
<%
 response.setHeader("cache-control","no-cache");
 response.setHeader("Pragma","no-cache");
 response.setDateHeader("Expires",0);
%>
<%!
int incCount(int incCount){

 incCount++;
 return incCount;
}

int decCount(int incCount){

 incCount--;
 return incCount;
}

String getPadding(int incCount){
 String padString= "";
 int i=0;
 for(i = 0; i < incCount; i++){
  padString= "&nbsp;&nbsp;&nbsp;=>";
 }
 return padString;
}
%>
<%!
String  changecolor (String trcolor,int trcount)
{
 if (trcolor.equals("#f18fb"))
 {
  trcolor="#DBEAF5";
 }
 else if (trcolor.equals("#BEAF5"))
 {
  trcolor="#f1f8fb";
 }
 return trcolor;

}
String showNewMessage(String msgDate)
{
 java.util.Date msgdate=new java.util.Date (msgDate);
 java.util.Calendar Calender = java.util.Calendar.getInstance ();
 java.util.Date todayDate=new java.util.Date (Calender.get(Calender.YEAR) -
1900,Calender.get(Calender.MONTH),Calender.get(Calender.DAY_OF_MONTH));
 if (!todayDate.after (msgdate))
 {
  return "<img src='/kb/images/newest.gif' border=0>";
 }else
 {
  return "";
 }

}
%>
<%
String sListName="$LISTNAME$";
int incCount=0;
String padString="";
int i=0;
String trcolor="";
int trcount=0;
String spaces="";
int j=0;

%>

<head>
 <title>$LISTNAME$ - Mailing List Archive by Thread</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <link rel="stylesheet" href="/kb/css/mailinglist.css">
</head>
<body bgcolor="#FFFFFF">
<form name="frmMain">
<input name="LISTNAME" type="hidden" value="<%=sListName%>" >
</form >

<table width="100%" border=0 align="center" cellspacing=0 cellpadding=0>
    <tr>
      <td><b>Messages by Thread</b></td>
      <td>&nbsp;</td>
 </tr>
    <tr>
     <td ><b>List Name: <%=sListName%> </b></td>
     <td>&nbsp;</td>
 </tr>
 <tr>
  <td align="left"><b>Messages: $NUMOFMSG$ </b></td>
  <td  align="right"><b>Last updated: $LOCALDATE$</b></td>
    </tr>
    <tr><td colspan=2 heignt="3">&nbsp;</td></tr>
</table>
<table width="100%" border=0 align="center" cellspacing=0 cellpadding=0>

</TIdxPgBegin>

<THead>

</THead>


<TTopBegin>
<% trcolor=changecolor (trcolor,trcount);%>

<tr bgcolor="<%=trcolor%>"> <% trcount ++;%>

     <td width="65%" height="20">&nbsp;<a $A_ATTR$>$SUBJECT$</</a></td>
     <td width="300" height="20">$MSGGMTDATE(CUR;%a %d %b, %H:%M)$ by
$FROMNAME$<%=showNewMessage ("$MSGGMTDATE$")%></td>
    </tr>
</TTopBegin>

<TSubListBeg>
<%

incCount = incCount(incCount); %>
</TSubListBeg>


<TLiTxt>
<% trcolor=changecolor (trcolor,trcount);%>
<tr bgcolor="<%=trcolor%>" valign="center">

     <td width="65%" height="20" valign="center">&nbsp;<%
padString=getPadding (incCount); out.print (padString);%><a
$A_ATTR$>$SUBJECT$</a></td>
     <td width="300" height="20" valign="center">$MSGGMTDATE(CUR;%a %d %b,
%H:%M)$ by $FROMNAME$<%=showNewMessage ("$MSGGMTDATE$")%></td>
</tr>

</TLiTxt>

<TLiEnd>

</TLiEnd>

<TLiNone>

</TLiNone>

<TLiNoneEnd>

</TLiNoneEnd>


<TSubListEnd>
<% incCount = decCount(incCount); %>
</TSubListEnd>

<TSubjectBeg>

</TSubjectBeg>

<TTopEnd>

</TTopEnd>

<TSingleTxt>
<% trcolor=changecolor (trcolor,trcount);%>
<tr bgcolor="<%=trcolor%>"><% trcount++; %>

     <td width="*" height="20">&nbsp;<a $A_ATTR$>$SUBJECT$</</a></td>
     <td width="300" height="20">$MSGGMTDATE(CUR;%a %d %b, %H:%M)$ by
$FROMNAME$<%=showNewMessage ("$MSGGMTDATE$")%></td>
</tr>

</TSingleTxt>

<TFoot>
</table>
</TFoot>

<TIdxPgEnd>
  <table width="100%" border=0 align="center" cellspacing=0 cellpadding=0>
    <tr>
     <td colspan=3 height="25">
  [<a href="maillist.jsp">View By Date</a>]
  [<a href="#"
onClick="javascript:window.open('/kb/common/subscribe.jsp?list=<%=sListName%
>','Subscribe','toolbar=no,menubar=no,resizable=no,location=no,scrollbars=no
,top=140,left=250,width=300,height=300'); return false; ">Subscribe</a>]
  [<a href="#"
onClick="javascript:window.open('/kb/common/unsubscribe.jsp?list=<%=sListNam
e%>','UnSubscribe','toolbar=no,menubar=no,resizable=no,location=no,scrollbar
s=no,top=140,left=250,width=300,height=300'); return false;
">Un-Subscribe</a>]
  </td>
    </tr>
  </table>
</td></tr></table>
</body>
</html>
</TIdxPgEnd>

regards,

niraj

----- Original Message -----
From: "Earl Hood" <ehood@hydra.acs.uci.edu>
To: <mhonarc@ncsa.uiuc.edu>
Sent: Thursday, December 06, 2001 11:24 PM
Subject: Re: thread list indentation


> On December 5, 2001 at 13:27, "niraj" wrote:
>
> > 1.  what tags are used to indent messages if they belong to the same
> >  thread and maintain the level of threads by using resource file. I want
> >  to format the messages for showing messages within same thread ..I get
> >  the indentation of threads when i am not using rcfile but it losts
after
> >  using resource file...
>
> The Page Layout section of the documentation provides a summary of the
> resources that affect the layout of the thread index pages.  Since you
> have stated that when you specify a resource file the layout is not
> what you want, then apparently there are settings in the resource
> file that change the value of the resources that affect thread index
> page layout.  You will need to correct these settings to get the
> desired layout.
>
> If you are having trouble debugging your resource file, we may be able to
> help if you provide a pointer to your resource file for us to look
> at.
>
> --ewh


[Index of Archives]     [Bugtraq]     [Yosemite News]     [Mhonarc Home]