<%-- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is the Venice Web Communities System. The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> <%@ page import = "java.util.*" %> <%@ page import = "com.silverwrist.util.StringUtil" %> <%@ page import = "com.silverwrist.venice.core.*" %> <%@ page import = "com.silverwrist.venice.servlets.Variables" %> <%@ page import = "com.silverwrist.venice.servlets.format.*" %> <% TopicPosts data = TopicPosts.retrieve(request); Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); %> <% if (rdat.useHTMLComments()) { %><% } %> <% String tmp; if (data.isTopicArchived()) tmp = "(Archived) "; else if (data.isTopicFrozen()) tmp = "(Frozen) "; else tmp = ""; rdat.writeContentHeader(out,data.getTopicName(),tmp + String.valueOf(data.getTotalMessages()) + " Total; " + String.valueOf(data.getNewMessages()) + " New; Last: " + rdat.formatDateForDisplay(data.getLastUpdate())); %>
<% if (rdat.useHTMLComments()) { %><% } %> ">" ALT="Topic List" WIDTH=80 HEIGHT=24 BORDER=0>    <% if (data.isTopicHidden()) { %> ">" ALT="Show Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } else { %> ">" ALT="Hide Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %>    <% if (data.canDoNextTopic()) { %> ">" ALT="Next Topic" WIDTH=80 HEIGHT=24 BORDER=0>    <% if (data.getNewMessages()>0) { %> ">" ALT="Next & Keep New" WIDTH=80 HEIGHT=24 BORDER=0>    <% } // end if %> <% } // end if %> <% if (rdat.useHTMLComments()) { %><% } %> <% if (data.canFreezeTopic()) { %>    <% if (data.isTopicFrozen()) { %> ">" ALT="Unfreeze Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } else { %> ">" ALT="Freeze Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %> <% } // end if %> <% if (data.canArchiveTopic()) { %>    <% if (data.isTopicArchived()) { %> ">" ALT="Unarchive Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } else { %> ">" ALT="Archive Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %> <% } // end if %> <% if (data.canDeleteTopic()) { %>    ">" ALT="Delete Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %>
 
<% if (rdat.useHTMLComments()) { %><% } %>
">    " NAME="Go" ALT="Go" ALIGN=BOTTOM WIDTH=80 HEIGHT=24 BORDER=0>
<%= rdat.getStdFontTag(null,2) %> <% if (rdat.useHTMLComments()) { %><% } %> [  ">View All <% if (data.canScrollUp()) { %>  |  ">Scroll Up <%= data.getNumPostsPerPage() %> <% } // end if %> <% if (data.canScrollDown()) { %>  |  ">Scroll Down <%= data.getNumPostsPerPage() %> <% } // end if %> <% if (data.canScrollDown()) { %>  |  ">Scroll To End <% } // end if %>  |  Bottom  ]
<% if (rdat.useHTMLComments()) { %><% } %> <% Iterator it = data.getMessageIterator(); String last_post = rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&shac=1&p1=" + String.valueOf(data.getTotalMessages() - 1)); boolean can_line = false; %> <% while (it.hasNext()) { %> <% TopicMessageContext msg = (TopicMessageContext)(it.next()); String poster = data.getPosterName(msg); %> <% if (can_line && data.emitBreakLinePoint(msg.getPostNumber())) { %>
<% } %> <% if (data.showAdvanced()) { %>
<% } // end if %> <%= rdat.getStdFontTag(null,2) %> "><%= msg.getPostNumber() %> of <%= data.getTotalMessages() - 1 %> <%= rdat.getStdFontTag(null,1) %><<%= data.getMessageReference(msg) %>> <% if (data.showAdvanced() && msg.isHidden()) { %> (Hidden) <% } // end if %>
<%= msg.getPseud() %> ( " TARGET="_blank"><%= poster %>, <%= rdat.formatDateForDisplay(msg.getPostDate()) %> ) <% if (msg.hasAttachment()) { %> " ALT="(Attachment <%= msg.getAttachmentFilename() %> - <%= msg.getAttachmentLength() %> bytes)" WIDTH=16 HEIGHT=16 BORDER=0> <% } // end if %>

<% if (msg.isScribbled()) { %> (Scribbled by <%= data.getMessageBodyText(msg) %> on <%= rdat.formatDateForDisplay(msg.getScribbleDate()) %>)

<% } else if (msg.isHidden() && !(data.showAdvanced())) { %> ">(Hidden Message: <%= msg.getNumLines() %> <% if (msg.getNumLines()==1) { %>Line<% } else { %>Lines<% } %>)

<% } else { %>

<%= rdat.rewritePostData(data.getMessageBodyText(msg)) %>
<% } // end if %> <% if (data.showAdvanced()) { %> <% String po_loc = data.getLocator() + "&msg=" + String.valueOf(msg.getPostNumber()); %>
<% if (!(msg.isScribbled())) { %> <% if (msg.canHide()) { %> <% if (msg.isHidden()) { %> ">" ALT="Show" WIDTH=80 HEIGHT=24 BORDER=0>

<% } else { %> ">" ALT="Hide" WIDTH=80 HEIGHT=24 BORDER=0>

<% } // end if %> <% } // end if (can hide) %> <% if (msg.canScribble()) { %> ">" ALT="Scribble" WIDTH=80 HEIGHT=24 BORDER=0>

<% } // end if (can scribble) %> <% } // end if (not already scribbled) %> <% if (msg.canNuke()) { %> ">" ALT="Nuke" WIDTH=80 HEIGHT=24 BORDER=0>

<% } // end if (can nuke) %>


<% } // end if (showing advanced controls) %> <% can_line = true; %> <% } // end while %> <% if (rdat.useHTMLComments()) { %><% } %>
  <%= rdat.getStdFontTag(null,2) %> <% if (rdat.useHTMLComments()) { %><% } %> [  ">View All <% if (data.canScrollUp()) { %>  |  ">Scroll Up <%= data.getNumPostsPerPage() %> <% } // end if %> <% if (data.canScrollDown()) { %>  |  ">Scroll Down <%= data.getNumPostsPerPage() %> <% } // end if %> <% if (data.canScrollDown()) { %>  |  ">Scroll To End <% } // end if %>  |  Top  ]
<% if (rdat.useHTMLComments()) { %><% } %> ">" ALT="Topic List" WIDTH=80 HEIGHT=24 BORDER=0>    <% if (data.isTopicHidden()) { %> ">" ALT="Show Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } else { %> ">" ALT="Hide Topic" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %>    <% if (data.canDoNextTopic()) { %> ">" ALT="Next Topic" WIDTH=80 HEIGHT=24 BORDER=0>    <% if (data.getNewMessages()>0) { %> ">" ALT="Next & Keep New" WIDTH=80 HEIGHT=24 BORDER=0>    <% } // end if %> <% } // end if %>  
<% if (data.displayPostBox()) { %>
<%= rdat.getStdFontTag(null,3) %>Post Message in "<%= data.getTopicName() %>":
"> <% if (data.canDoNextTopic()) { %> <% } // end if %>
<%= rdat.getStdFontTag(null,2) %>Your name/header:
<%= rdat.getStdFontTag(null,2) %> Attach a file
<%= rdat.getStdFontTag(null,2) %>Message: <%= rdat.getStdFontTag(null,2) %> " TARGET="_blank">HTML Guide
" ALT="Preview" NAME="preview" WIDTH=80 HEIGHT=24 BORDER=0>    " ALT="Post & Reload" NAME="post" WIDTH=80 HEIGHT=24 BORDER=0> <% if (data.canDoNextTopic()) { %>    " ALT="Post & Go Next" NAME="postnext" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %>
<% } else if (data.isTopicArchived()) { %>
<%= rdat.getStdFontTag(null,2) %>This is an Archived Topic
<% } else if (data.isTopicFrozen()) { %>
<%= rdat.getStdFontTag(null,2) %>This is a Frozen Topic
<% } // end if %> <% rdat.writeFooter(out); %>