<%-- 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()) { %><% } %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_HEADER,5) %> <%= data.getTopicName() %>    <%= rdat.getStdFontTag(ColorSelectors.CONTENT_HEADER,3) %> <% if (data.isTopicArchived()) { %>(Archived)<% } else if (data.isTopicFrozen()) { %>(Frozen)<% } %> <%= data.getTotalMessages() %> Total; <%= 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 %> ">" ALT="Manage" WIDTH=80 HEIGHT=24 BORDER=0> 
  <% 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(ColorSelectors.CONTENT_FOREGROUND,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 (showing advanced controls) %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> <% if (!(data.bozoFilterUser(msg.getCreatorUID()))) { %> <%= data.getUserPhotoTag(msg.getCreatorUID(),rdat) %> <% } // end if %> "><%= msg.getPostNumber() %> of <%= data.getTotalMessages() - 1 %> <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,1) %><<%= data.getMessageReference(msg) %>> <% if (data.showAdvanced() && msg.isHidden()) { %> (Hidden) <% } // end if %> <% if (data.showAdvanced() && data.showBozoFilteredIndicator(msg.getCreatorUID())) { %> (User filtered; ">remove filter) <% } // end if %> <% if (!(data.bozoFilterUser(msg.getCreatorUID()))) { %>
<%= msg.getPseud() %> ( " TARGET="_blank"><%= poster %>, <%= rdat.formatDateForDisplay(msg.getPostDate()) %> ) <% if (msg.hasAttachment()) { %> TARGET="_blank"<% } %> >" ALT="(Attachment <%= msg.getAttachmentFilename() %> - <%= msg.getAttachmentLength() %> bytes)" WIDTH=16 HEIGHT=16 BORDER=0> <% } // end if %> <% } // end if (message not bozo-filtered) %>

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

<% } else if (data.bozoFilterUser(msg.getCreatorUID())) { %> ">(Message from Filtered User: <%= msg.getNumLines() %> <% if (msg.getNumLines()==1) { %>Line<% } else { %>Lines<% } %>)

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

<% } else { %>

<%= rdat.rewritePostData(data.getMessageBodyText(msg)) %>
<% if (data.displayPostPictures()) { %>
<% } %> <% } // end if %>
<% if (data.showAdvanced()) { %> <% String po_loc = data.getLocator() + "&msg=" + 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 (data.showFilterButton(msg.getCreatorUID())) { %> ">" ALT="Filter User" WIDTH=80 HEIGHT=24 BORDER=0>

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

<% } // end if (can nuke) %> <% if (msg.canPublish()) { %> ">" ALT="Publish" WIDTH=80 HEIGHT=24 BORDER=0>

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


<% } // end if (showing advanced controls) %> <% can_line = true; %> <% } // end while %> <% if (rdat.useHTMLComments()) { %><% } %>
  <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,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 %> ">" ALT="Manage" WIDTH=80 HEIGHT=24 BORDER=0>   
<% if (data.displayPostBox()) { %>
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,3) %> Post Message in "<%= data.getTopicName() %>":
">
<% if (data.canDoNextTopic()) { %> <% } // end if %>
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>Your name/header:
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %> Attach a file
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>Message: <%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,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 %>   " ALT="Post & Go Topics" NAME="posttopics" WIDTH=80 HEIGHT=24 BORDER=0>
<% } else if (data.isTopicArchived()) { %>
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>This is an Archived Topic
<% } else if (data.isTopicFrozen()) { %>
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>This is a Frozen Topic
<% } // end if %>