<%-- 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.venice.core.*" %> <%@ page import = "com.silverwrist.venice.ui.conf.CurrentConference" %> <%@ page import = "com.silverwrist.venice.ui.conf.view.PostsView" %> <%@ page import = "com.silverwrist.venice.ui.view.JSPView" %> <%@ taglib uri="/tlds/util" prefix="util" %> <%@ taglib uri="/tlds/post" prefix="post" %> <% PostsView view = PostsView.get(request); final CommunityContext my_comm = view.getCommunity(); final ConferenceContext my_conf = view.getConference(); final TopicContext my_topic = view.getTopic(); final short my_topicnum = my_topic.getTopicNumber(); final short my_next = view.getNextTopic(); final int my_total_msg = my_topic.getTotalMessages(); final int my_unread = view.getUnread(); final int my_first = view.getFirst(); final int my_last = view.getLast(); final int my_pagesize = view.getPageSize(); final String base_locator = "cc=" + my_comm.getCommunityID() + "&conf=" + my_conf.getConfID(); final String topic_locator = base_locator + "&top=" + my_topicnum; final String next_locator = base_locator + "&top=" + my_next; final String restorer = "rtop=" + my_topicnum + "&rct=" + my_unread; %> Posts <%= my_first %> through <%= my_last %> in topic #<%= my_topic.getTopicID() %> <%= view.getTitle() %> <% if (my_topic.isArchived()) { %> (Archived) <% } else if (my_topic.isFrozen()) { %> (Frozen) <% } // end if %> <%= view.getSubtitle() %> <%= view.getTopCustom() %> <% out.flush(); response.flushBuffer(); %> <% out.flush(); response.flushBuffer(); %>
Topic user controls section conf/topics.js.vs?<%= base_locator %>   <% if (my_topic.isHidden()) { %> conf/hide_topic.js.vs?<%= topic_locator %>&flag=0 <% } else { %> conf/hide_topic.js.vs?<%= topic_locator %>&flag=1 <% } // end if %>   <% if (view.canDoNextTopic()) { %> conf/posts.js.vs?<%= next_locator %>&rnm=1   <% if (my_unread>0) { %> conf/posts.js.vs?<%= next_locator %>&rnm=1&<%= restorer %>   <% } // end if } // end if %> conf/find.js.vs?<%= topic_locator %>   conf/manage_topic.js.vs?<%= topic_locator %>
  Topic admin controls section <% if (my_topic.canFreeze()) { %>   <% if (my_topic.isFrozen()) { %> conf/freeze_topic.js.vs?<%= topic_locator %>&flag=0 <% } else { %> conf/freeze_topic.js.vs?<%= topic_locator %>&flag=1 <% } // end if } // end if if (my_topic.canArchive()) { %>   <% if (my_topic.isArchived()) { %> conf/archive_topic.js.vs?<%= topic_locator %>&flag=0 <% } else { %> conf/archive_topic.js.vs?<%= topic_locator %>&flag=1 <% } // end if } // end if if (my_topic.canDelete()) { %>   conf/delete_topic.js.vs?<%= topic_locator %> <% } // end if %>
Go box
 
Upper navigation linkset [  conf/posts.js.vs?<%= topic_locator %>&p1=0&p2=-1 View All <% if (my_first>0) { %>  |  conf/posts.js.vs?<%= topic_locator %>&p1=<%= Math.max(my_first - my_pagesize,0) %>&p2=<%= my_first - 1 - Math.min(my_first - my_pagesize,0) %> Scroll Up <%= my_pagesize %> <% } // end if if ((my_total_msg - (my_last + 1))>0) { %>  |  conf/posts.js.vs?<%= topic_locator %>&p1=<%= my_last + 1 %>&p2=<%= Math.min(my_last + my_pagesize,my_total_msg - 1) %> Scroll Down <%= my_pagesize %>  |  conf/posts.js.vs?<%= topic_locator %>&p1=<%= my_total_msg - my_pagesize %>&p2=<%= my_total_msg - 1 %> Scroll To End <% } // end if %>  |  Bottom  ]
<% out.flush(); response.flushBuffer(); %> Begin Actual Messages <% Iterator it = view.getMessages().iterator(); String last_post = "shac=1&p1=" + String.valueOf(my_total_msg - 1); boolean can_line = false; while (it.hasNext()) { TopicMessageContext msg = (TopicMessageContext)(it.next()); String poster = view.getPosterName(msg); if (can_line && (msg.getPostNumber()==(my_total_msg-my_unread))) { out.write("
\n"); } // end if if (view.getShowAdvanced() && (view.getMessages().size()==1)) { %>
<% } // end if %> <% if (!(view.bozoFilterUser(msg.getCreatorUID()))) { out.write(view.getUserPhotoTag(JSPView.getRequestOutput(request),msg.getCreatorUID())); } // end if %> conf/posts.js.vs?<%= topic_locator %>&shac=1&p1=<%= msg.getPostNumber() %> <%= msg.getPostNumber() %> of conf/posts.js.vs?<%= topic_locator %>&<%= last_post %> <%= my_total_msg - 1 %> <<%= view.getTopicStem() %><%= msg.getPostNumber() %>> <% if (view.getShowAdvanced() && (view.getMessages().size()==1)) { if (msg.isHidden()) { out.write("(Hidden)\n"); } // end if if (view.showBozoFilteredIndicator(msg.getCreatorUID())) { %> (User filtered; conf/message_bozo.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %>&flag=0 remove filter ) <% } // end if } // end if if (!(view.bozoFilterUser(msg.getCreatorUID()))) { %>
<%= msg.getPseud() %> ( user/<%= poster %> <%= poster %> , <%= view.formatDate(msg.getPostDate()) %> ) <% if (msg.hasAttachment()) { if (view.displayAttachmentInNewWindow(msg)) { %> conf/view_attachment.js.vs?<%= base_locator %>&msg=<%= msg.getPostID() %> (Attachment <%= msg.getAttachmentFilename() %> - <%= msg.getAttachmentLength() %> bytes) (Attachment <%= msg.getAttachmentFilename() %> - <%= msg.getAttachmentLength() %> bytes) <% } else { %> conf/view_attachment.js.vs?<%= base_locator %>&msg=<%= msg.getPostID() %> (Attachment <%= msg.getAttachmentFilename() %> - <%= msg.getAttachmentLength() %> bytes) (Attachment <%= msg.getAttachmentFilename() %> - <%= msg.getAttachmentLength() %> bytes) <% } // end if } // end if } // end if %>

<% if (msg.isScribbled()) { %> (Scribbled by <%= view.getMessageBodyText(msg) %> on <%= view.formatDate(msg.getScribbleDate()) %>) <% if (view.getPhotoDims()!=null) { %>
<% } %>

<% } else if (view.bozoFilterUser(msg.getCreatorUID())) { %> conf/posts.js.vs?<%= topic_locator %>&shac=1&nbz=1&p1=<%= msg.getPostNumber() %> (Message from Filtered User: <%= msg.getNumLines() %> <% if (msg.getNumLines()==1) { %>Line<% } else { %>Lines<% } %>)

<% } else if (msg.isHidden() && (!(view.getShowAdvanced()) || (view.getMessages().size()!=1))) { %> conf/posts.js.vs?<%= topic_locator %>&shac=1&p1=<%= msg.getPostNumber() %> (Hidden Message: <%= msg.getNumLines() %> <% if (msg.getNumLines()==1) { %>Line<% } else { %>Lines<% } %>) <% if (view.getPhotoDims()!=null) { %>
<% } %>

<% } else { %>

<%= view.getMessageBodyText(msg) %>
<% if (view.getPhotoDims()!=null) { %>
<% } %>

<% } // end if if (view.getShowAdvanced() && (view.getMessages().size()==1)) { %>

<% if (!(msg.isScribbled())) { if (msg.canHide()) { if (msg.isHidden()) { %> conf/hide_message.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %>&flag=0

<% } else { %> conf/hide_message.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %>&flag=1

<% } // end if } // end if (can hide) if (msg.canScribble()) { %> conf/scribble_message.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %>

<% } // end if (can scribble) } // end if (not already scribbled) if (view.showFilterButton(msg.getCreatorUID())) { %> conf/message_bozo.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %>&flag=1

<% } // end if (can bozo filter) if (msg.canNuke()) { %> conf/nuke_message.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %>

<% } // end if (can nuke) if (msg.canPublish()) { %> conf/publish_message.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %>

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


<% } // end if (showing advanced controls) can_line = true; out.flush(); response.flushBuffer(); } // end while %> End Actual Messages <% out.flush(); response.flushBuffer(); %>
  Lower navigation linkset [  conf/posts.js.vs?<%= topic_locator %>&p1=0&p2=-1 View All <% if (my_first>0) { %>  |  conf/posts.js.vs?<%= topic_locator %>&p1=<%= Math.max(my_first - my_pagesize,0) %>&p2=<%= my_first - 1 - Math.min(my_first - my_pagesize,0) %> Scroll Up <%= my_pagesize %> <% } // end if %> <% if ((my_total_msg - (my_last + 1))>0) { %>  |  conf/posts.js.vs?<%= topic_locator %>&p1=<%= my_last + 1 %>&p2=<%= Math.min(my_last + my_pagesize,my_total_msg - 1) %> Scroll Down <%= my_pagesize %>  |  conf/posts.js.vs?<%= topic_locator %>&p1=<%= my_total_msg - my_pagesize %>&p2=<%= my_total_msg - 1 %> Scroll To End <% } // end if %>  |  Top  ]
Topic user controls section conf/topics.js.vs?<%= base_locator %>   <% if (my_topic.isHidden()) { %> conf/hide_topic.js.vs?<%= topic_locator %>&flag=0 <% } else { %> conf/hide_topic.js.vs?<%= topic_locator %>&flag=1 <% } // end if %>   <% if (view.canDoNextTopic()) { %> conf/posts.js.vs?<%= next_locator %>&rnm=1   <% if (my_unread>0) { %> conf/posts.js.vs?<%= next_locator %>&rnm=1&<%= restorer %>   <% } // end if } // end if %> conf/find.js.vs?<%= topic_locator %>   conf/manage_topic.js.vs?<%= topic_locator %>
<% out.flush(); response.flushBuffer(); %> <% final boolean flag1 = my_conf.canPostToConference(); final boolean flag2 = (my_topic.isFrozen() ? my_topic.canFreeze() : true); final boolean flag3 = (my_topic.isArchived() ? my_topic.canArchive() : true); if (flag1 && flag2 && flag3) { %>
Post Message in "<%= my_topic.getName() %>":
<%= my_comm.getCommunityID() %> <%= my_conf.getConfID() %> <%= my_topicnum %> <% if (view.canDoNextTopic()) { %> <%= my_next %> <% } // end if %> <%= my_total_msg %> <%= my_conf.getDefaultPseud() %> <% if (view.canDoNextTopic()) { %> <% } // end if %> <% } else if (my_conf.canPostToConference()) { if (my_topic.isArchived()) { %>
This is an Archived Topic
<% } else if (my_topic.isFrozen()) { %>
This is a Frozen Topic
<% } // end if } // end if %> <%= view.getBottomCustom() %> <% out.flush(); response.flushBuffer(); %>