* landed support for reading topics and posting followup messages to a topic -

the basis of the conferencing engine is now firmly in place
* tweaks to the HTML Checker to make it better at breaking lines without
  leaving stranded punctuation at the beginning or end of a line
* also modified dictionary to better handle possessives and hyphenates
* as always, miscellaneous tweaks and bugfizes as I spot them
This commit is contained in:
Eric J. Bowersox
2001-02-07 21:12:38 +00:00
parent 8bcc80ddd7
commit 66b7fea53b
50 changed files with 3304 additions and 75 deletions

327
web/format/posts.jsp Normal file
View File

@@ -0,0 +1,327 @@
<%--
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 <http://www.mozilla.org/MPL/>.
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 <erbo@silcom.com>,
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()) { %><!-- <%= data.getIdentifyingData() %> --><% } %>
<%
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()));
%>
<TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=0>
<TR VALIGN=BOTTOM>
<TD NOWRAP ALIGN=LEFT>
<% if (rdat.useHTMLComments()) { %><!-- Topic user controls section --><% } %>
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getConfLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_topic_list.gif") %>" ALT="Topic List" WIDTH=80 HEIGHT=24
BORDER=0></A>
&nbsp;&nbsp;
<% if (data.isTopicHidden()) { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_show_topic.gif") %>" ALT="Show Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
<% } else { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_hide_topic.gif") %>" ALT="Hide Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
<% } // end if %>
&nbsp;&nbsp;
<% if (data.canDoNextTopic()) { %>
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getNextLocator() + "&rnm=1") %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_next_topic.gif") %>" ALT="Next Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
&nbsp;&nbsp;
<% if (data.getNewMessages()>0) { %>
<%-- TODO: this doesn't do Keep New yet --%>
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getNextLocator() + "&rnm=1") %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_next_keep_new.gif") %>" ALT="Next & Keep New" WIDTH=80 HEIGHT=24
BORDER=0></A>
&nbsp;&nbsp;
<% } // end if %>
<% } // end if %>
</TD>
<TD NOWRAP ALIGN=RIGHT>
<% if (rdat.useHTMLComments()) { %><!-- Topic admin controls section --><% } %>
<% if (data.canFreezeTopic()) { %>
&nbsp;&nbsp;
<% if (data.isTopicFrozen()) { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_unfreeze_topic.gif") %>" ALT="Unfreeze Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
<% } else { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_freeze_topic.gif") %>" ALT="Freeze Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
<% } // end if %>
<% } // end if %>
<% if (data.canArchiveTopic()) { %>
&nbsp;&nbsp;
<% if (data.isTopicArchived()) { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_unarchive_topic.gif") %>" ALT="Unarchive Topic" WIDTH=80
HEIGHT=24 BORDER=0></A>
<% } else { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_archive_topic.gif") %>" ALT="Archive Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
<% } // end if %>
<% } // end if %>
<% if (data.canDeleteTopic()) { %>
&nbsp;&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_delete_topic.gif") %>" ALT="Delete Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
<% } // end if %>
</TD>
</TR>
<TR><TD COLSPAN=2>&nbsp;</TD></TR>
<TR VALIGN=BOTTOM>
<TD NOWRAP ALIGN=LEFT>
<% if (rdat.useHTMLComments()) { %><!-- Go box --><% } %>
<FORM METHOD="GET" ACTION="<%= rdat.getEncodedServletPath("confdisp") %>">
<INPUT TYPE="HIDDEN" NAME="sig" VALUE="<%= data.getSIGID() %>">
<INPUT TYPE="HIDDEN" NAME="conf" VALUE="<%= data.getConfID() %>">
<INPUT TYPE="HIDDEN" NAME="top" VALUE="<%= data.getTopicNumber() %>">
<INPUT TYPE="TEXT" NAME="pxg" VALUE="" SIZE=6 MAXLENGTH=13>&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_go.gif") %>" NAME="Go" ALT="Go"
ALIGN=BOTTOM WIDTH=80 HEIGHT=24 BORDER=0>
</FORM>
</TD>
<TD NOWRAP ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<% if (rdat.useHTMLComments()) { %><!-- Upper navigation linkset --><% } %>
<%-- TODO: the number "20" should be configurable --%>
<A NAME="top">[</A>&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&p1=0&p2=-1") %>">View All</A>
<% if (data.canScrollUp()) { %>
&nbsp;|&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&"
+ data.getScrollUpLocator()) %>">Scroll Up 20</A>
<% } // end if %>
<% if (data.canScrollDown()) { %>
&nbsp;|&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&"
+ data.getScrollDownLocator()) %>">Scroll Down 20</A>
<% } // end if %>
<% if (data.canScrollDown()) { %>
&nbsp;|&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&"
+ data.getScrollToEndLocator()) %>">Scroll To End</A>
<% } // end if %>
&nbsp;|&nbsp;
<A HREF="#bottom">Bottom</A>
&nbsp;]
</FONT></TD>
</TR>
</TABLE>
<% if (rdat.useHTMLComments()) { %><!-- Begin Actual Messages --><% } %>
<%
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())) { %><HR WIDTH="70%"><% } %>
<% if (data.showAdvanced()) { %>
<BR>
<TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0><TR VALIGN=TOP><TD NOWRAP ALIGN=LEFT>
<% } // end if %>
<%= rdat.getStdFontTag(null,2) %>
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&shac=1&p1="
+ String.valueOf(msg.getPostNumber())) %>"><%= msg.getPostNumber() %></A> of
<A HREF="<%= last_post %>"><%= data.getTotalMessages() - 1 %></A>
<%= rdat.getStdFontTag(null,1) %>&lt;<%= "TODO" %>&gt;</FONT><BR>
<B><%= msg.getPseud() %></B>
(<EM>
<A HREF="<%= rdat.getEncodedServletPath("user/" + poster) %>" TARGET="_blank"><%= poster %></A>,
<%= rdat.formatDateForDisplay(msg.getPostDate()) %>
</EM>)
<%-- TODO: paperclip goes here if we have an attachment --%>
</FONT><P>
<% if (msg.isScribbled()) { %>
<TT><EM><B>
(Scribbled by <%= data.getMessageBodyText(msg) %> on
<%= rdat.formatDateForDisplay(msg.getScribbleDate()) %>)
</B></EM></TT>
<% } else if (msg.isHidden() && !(data.showAdvanced())) { %>
<TT><EM><B>
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&shac=1&p1="
+ String.valueOf(msg.getPostNumber())) %>">(Hidden
Message: <%= msg.getNumLines() %> <% if (msg.getNumLines()==1) { %>Line<% } else { %>Lines<% } %></A>
</B></EM></TT>
<% } else { %>
<PRE><%= data.getMessageBodyText(msg) %></PRE>
<% } // end if %>
<% if (data.showAdvanced()) { %>
</TD><TD NOWRAP ALIGN=RIGHT>
<% if (!(msg.isScribbled())) { %>
<% if (msg.canHide()) { %>
<% if (msg.isHidden()) { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_show.gif") %>" ALT="Show" WIDTH=80 HEIGHT=24 BORDER=0></A><P>
<% } else { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_hide.gif") %>" ALT="Hide" WIDTH=80 HEIGHT=24 BORDER=0></A><P>
<% } // end if %>
<% } // end if (can hide) %>
<% if (msg.canScribble()) { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_scribble.gif") %>" ALT="Scribble" WIDTH=80 HEIGHT=24
BORDER=0></A><P>
<% } // end if (can scribble) %>
<% } // end if (not already scribbled) %>
<% if (msg.canNuke()) { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_nuke.gif") %>" ALT="Nuke" WIDTH=80 HEIGHT=24
BORDER=0></A><P>
<% } // end if (can nuke) %>
</TD></TR></TABLE><BR>
<% } // end if (showing advanced controls) %>
<% can_line = true; %>
<% } // end while %>
<% if (rdat.useHTMLComments()) { %><!-- End Actual Messages --><% } %>
<TABLE BORDER=0 WIDTH="100%" CELLPADDING=0 CELLSPACING=0>
<TR VALIGN=BOTTOM>
<TD NOWRAP ALIGN=LEFT>&nbsp;</TD>
<TD NOWRAP ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<% if (rdat.useHTMLComments()) { %><!-- Upper navigation linkset --><% } %>
<%-- TODO: the number "20" should be configurable --%>
<A NAME="bottom">[</A>&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&p1=0&p2=-1") %>">View All</A>
<% if (data.canScrollUp()) { %>
&nbsp;|&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&"
+ data.getScrollUpLocator()) %>">Scroll Up 20</A>
<% } // end if %>
<% if (data.canScrollDown()) { %>
&nbsp;|&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&"
+ data.getScrollDownLocator()) %>">Scroll Down 20</A>
<% } // end if %>
<% if (data.canScrollDown()) { %>
&nbsp;|&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getLocator() + "&"
+ data.getScrollToEndLocator()) %>">Scroll To End</A>
<% } // end if %>
&nbsp;|&nbsp;
<A HREF="#top">Top</A>
&nbsp;]
</FONT></TD>
</TR>
<TR VALIGN=BOTTOM>
<TD NOWRAP ALIGN=LEFT>
<% if (rdat.useHTMLComments()) { %><!-- Topic user controls section --><% } %>
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getConfLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_topic_list.gif") %>" ALT="Topic List" WIDTH=80 HEIGHT=24
BORDER=0></A>
&nbsp;&nbsp;
<% if (data.isTopicHidden()) { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_show_topic.gif") %>" ALT="Show Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
<% } else { %>
<A HREF="<%= rdat.getEncodedServletPath("TODO?" + data.getLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_hide_topic.gif") %>" ALT="Hide Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
<% } // end if %>
&nbsp;&nbsp;
<% if (data.canDoNextTopic()) { %>
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getNextLocator() + "&rnm=1") %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_next_topic.gif") %>" ALT="Next Topic" WIDTH=80 HEIGHT=24
BORDER=0></A>
&nbsp;&nbsp;
<% if (data.getNewMessages()>0) { %>
<%-- TODO: this doesn't do Keep New yet --%>
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getNextLocator() + "&rnm=1") %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_next_keep_new.gif") %>" ALT="Next & Keep New" WIDTH=80 HEIGHT=24
BORDER=0></A>
&nbsp;&nbsp;
<% } // end if %>
<% } // end if %>
</TD>
<TD NOWRAP ALIGN=RIGHT>&nbsp;</TD>
</TR>
</TABLE>
<% if (data.displayPostBox()) { %>
<HR><%= rdat.getStdFontTag(null,3) %><B>Post Message in &quot;<%= data.getTopicName() %>&quot;:</B></FONT>
<BR>
<FORM METHOD="POST" ACTION="<%= rdat.getEncodedServletPath("post") %>">
<INPUT TYPE="HIDDEN" NAME="sig" VALUE="<%= data.getSIGID() %>">
<INPUT TYPE="HIDDEN" NAME="conf" VALUE="<%= data.getConfID() %>">
<INPUT TYPE="HIDDEN" NAME="top" VALUE="<%= data.getTopicNumber() %>">
<% if (data.canDoNextTopic()) { %>
<INPUT TYPE="HIDDEN" NAME="next" VALUE="<%= data.getNextTopicNumber() %>">
<% } // end if %>
<INPUT TYPE="HIDDEN" NAME="sd" VALUE="<%= data.getTotalMessages() %>">
<TABLE BORDER=0 CELLPADDING=0>
<TR><TD ALIGN=LEFT COLSPAN=2>
<%= rdat.getStdFontTag(null,2) %>Your name/header:</FONT><BR>
<INPUT TYPE="TEXT" NAME="pseud" SIZE=37 MAXLENGTH=255 VALUE="<%= data.getDefaultPseud() %>">
<%= rdat.getStdFontTag(null,2) %><INPUT TYPE="CHECKBOX" NAME="attach" VALUE="Y"> Attach a file</FONT>
</TD></TR>
<TR>
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>Message:</FONT></TD>
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<A HREF="TODO" TARGET="_blank">HTML Guide</A>
</FONT></TD>
</TR>
<TR><TD ALIGN=LEFT COLSPAN=2>
<TEXTAREA NAME="pb" WRAP=SOFT ROWS=7 COLS=51></TEXTAREA>
</TD></TR>
<TR><TD ALIGN=CENTER COLSPAN=2>
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_preview.gif") %>" ALT="Preview" NAME="preview"
WIDTH=80 HEIGHT=24 BORDER=0>
&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_post_reload.gif") %>" ALT="Post & Reload"
NAME="post" WIDTH=80 HEIGHT=24 BORDER=0>
<% if (data.canDoNextTopic()) { %>
&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_post_go_next.gif") %>" ALT="Post & Go Next"
NAME="postnext" WIDTH=80 HEIGHT=24 BORDER=0>
<% } // end if %>
</TD></TR>
</TABLE>
</FORM>
<% } else if (data.isTopicArchived()) { %>
<DIV ALIGN=CENTER><%= rdat.getStdFontTag(null,2) %><B>This is an <EM>Archived</EM> Topic</B></DIV>
<% } else if (data.isTopicFrozen()) { %>
<DIV ALIGN=CENTER><%= rdat.getStdFontTag(null,2) %><B>This is a <EM>Frozen</EM> Topic</B></DIV>
<% } // end if %>
<% rdat.writeFooter(out); %>

81
web/format/preview.jsp Normal file
View File

@@ -0,0 +1,81 @@
<%--
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 <http://www.mozilla.org/MPL/>.
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 <erbo@silcom.com>,
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.*" %>
<%
PostPreview data = PostPreview.retrieve(request);
Variables.failIfNull(data);
RenderData rdat = RenderConfig.createRenderData(application,request,response);
%>
<% rdat.writeContentHeader(out,"Previewing Post",null); %>
<%= rdat.getStdFontTag(null,3) %><B>
<% if (data.getNumSpellingErrors()==0) { %>
Your post did not contain any spelling errors.
<% } else if (data.getNumSpellingErrors()==1) { %>
There was 1 spelling error in your post.
<% } else { %>
There were <%= data.getNumSpellingErrors() %> spelling errors in your post.
<% } // end if %>
</B></FONT>
<P><PRE><%= data.getPreviewData() %></PRE><HR>
<FORM METHOD="POST" ACTION="<%= rdat.getEncodedServletPath("post") %>">
<INPUT TYPE="HIDDEN" NAME="sig" VALUE="<%= data.getSIGID() %>">
<INPUT TYPE="HIDDEN" NAME="conf" VALUE="<%= data.getConfID() %>">
<INPUT TYPE="HIDDEN" NAME="top" VALUE="<%= data.getTopicNumber() %>">
<% if (!(StringUtil.isStringEmpty(data.getNextVal()))) { %>
<INPUT TYPE="HIDDEN" NAME="next" VALUE="<%= data.getNextVal() %>">
<% } // end if %>
<INPUT TYPE="HIDDEN" NAME="sd" VALUE="<%= data.getTotalMessages() %>">
<TABLE BORDER=0 CELLPADDING=0>
<TR><TD ALIGN=LEFT COLSPAN=2>
<%= rdat.getStdFontTag(null,2) %>Your name/header:</FONT><BR>
<INPUT TYPE="TEXT" NAME="pseud" SIZE=37 MAXLENGTH=255 VALUE="<%= data.getPseud() %>">
<%= rdat.getStdFontTag(null,2) %><INPUT TYPE="CHECKBOX" NAME="attach"
VALUE="Y" <% if (data.attachChecked()) { %>CHECKED<% } %> > Attach a file</FONT>
</TD></TR>
<TR>
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>Message:</FONT></TD>
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<A HREF="TODO" TARGET="_blank">HTML Guide</A>
</FONT></TD>
</TR>
<TR><TD ALIGN=LEFT COLSPAN=2>
<TEXTAREA NAME="pb" WRAP=SOFT ROWS=7 COLS=51><%= data.getBodyText() %></TEXTAREA>
</TD></TR>
<TR><TD ALIGN=CENTER COLSPAN=2>
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_preview.gif") %>" ALT="Preview" NAME="preview"
WIDTH=80 HEIGHT=24 BORDER=0>
&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_post_reload.gif") %>" ALT="Post & Reload"
NAME="post" WIDTH=80 HEIGHT=24 BORDER=0>
<% if (!(StringUtil.isStringEmpty(data.getNextVal()))) { %>
&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_post_go_next.gif") %>" ALT="Post & Go Next"
NAME="postnext" WIDTH=80 HEIGHT=24 BORDER=0>
<% } // end if %>
&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_cancel.gif") %>" ALT="Cancel"
NAME="cancel" WIDTH=80 HEIGHT=24 BORDER=0>
</TD></TR>
</TABLE>
</FORM>
<% rdat.writeFooter(out); %>

107
web/format/slippage.jsp Normal file
View File

@@ -0,0 +1,107 @@
<%--
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 <http://www.mozilla.org/MPL/>.
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 <erbo@silcom.com>,
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.*" %>
<%
PostSlippage data = PostSlippage.retrieve(request);
Variables.failIfNull(data);
RenderData rdat = RenderConfig.createRenderData(application,request,response);
%>
<% if (rdat.useHTMLComments()) { %><!-- <%= data.getIdentifyingData() %> --><% } %>
<% rdat.writeContentHeader(out,"Slippage or Double-Click Detected",null); %>
<%= rdat.getStdFontTag(null,2) %>
The following posts slipped in while you were typing. You may choose to edit your message and
re-post, just post it as is, or cancel your posting altogether.
</FONT>
<% if (rdat.useHTMLComments()) { %><!-- Begin Slipped Messages --><% } %>
<% Iterator it = data.getMessageIterator(); %>
<% while (it.hasNext()) { %>
<%
TopicMessageContext msg = (TopicMessageContext)(it.next());
String poster = data.getPosterName(msg);
%>
<%= rdat.getStdFontTag(null,2) %>
<B><%= msg.getPostNumber() %></B> of <B><%= data.getTotalMessages() - 1 %></B>
<%= rdat.getStdFontTag(null,1) %>&lt;<%= "TODO" %>&gt;</FONT><BR>
<B><%= msg.getPseud() %></B>
(<EM>
<A HREF="<%= rdat.getEncodedServletPath("user/" + poster) %>" TARGET="_blank"><%= poster %></A>,
<%= rdat.formatDateForDisplay(msg.getPostDate()) %>
</EM>)
</FONT><P>
<% if (msg.isScribbled()) { %>
<TT><EM><B>
(Scribbled by <%= data.getMessageBodyText(msg) %> on
<%= rdat.formatDateForDisplay(msg.getScribbleDate()) %>)
</B></EM></TT>
<% } else { %>
<PRE><%= data.getMessageBodyText(msg) %></PRE>
<% } // end if %>
<% } // end while %>
<% if (rdat.useHTMLComments()) { %><!-- End Slipped Messages --><% } %>
<HR><%= rdat.getStdFontTag(null,3) %><B>Post Message in &quot;<%= data.getTopicName() %>&quot;:</B></FONT>
<BR>
<FORM METHOD="POST" ACTION="<%= rdat.getEncodedServletPath("post") %>">
<INPUT TYPE="HIDDEN" NAME="sig" VALUE="<%= data.getSIGID() %>">
<INPUT TYPE="HIDDEN" NAME="conf" VALUE="<%= data.getConfID() %>">
<INPUT TYPE="HIDDEN" NAME="top" VALUE="<%= data.getTopicNumber() %>">
<% if (!(StringUtil.isStringEmpty(data.getNextVal()))) { %>
<INPUT TYPE="HIDDEN" NAME="next" VALUE="<%= data.getNextVal() %>">
<% } // end if %>
<INPUT TYPE="HIDDEN" NAME="sd" VALUE="<%= data.getTotalMessages() %>">
<TABLE BORDER=0 CELLPADDING=0>
<TR><TD ALIGN=LEFT COLSPAN=2>
<%= rdat.getStdFontTag(null,2) %>Your name/header:</FONT><BR>
<INPUT TYPE="TEXT" NAME="pseud" SIZE=37 MAXLENGTH=255 VALUE="<%= data.getPseud() %>">
<%= rdat.getStdFontTag(null,2) %><INPUT TYPE="CHECKBOX" NAME="attach"
VALUE="Y" <% if (data.attachChecked()) { %>CHECKED<% } %> > Attach a file</FONT>
</TD></TR>
<TR>
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>Message:</FONT></TD>
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<A HREF="TODO" TARGET="_blank">HTML Guide</A>
</FONT></TD>
</TR>
<TR><TD ALIGN=LEFT COLSPAN=2>
<TEXTAREA NAME="pb" WRAP=SOFT ROWS=7 COLS=51><%= data.getBodyText() %></TEXTAREA>
</TD></TR>
<TR><TD ALIGN=CENTER COLSPAN=2>
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_preview.gif") %>" ALT="Preview" NAME="preview"
WIDTH=80 HEIGHT=24 BORDER=0>
&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_post_reload.gif") %>" ALT="Post & Reload"
NAME="post" WIDTH=80 HEIGHT=24 BORDER=0>
<% if (!(StringUtil.isStringEmpty(data.getNextVal()))) { %>
&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_post_go_next.gif") %>" ALT="Post & Go Next"
NAME="postnext" WIDTH=80 HEIGHT=24 BORDER=0>
<% } // end if %>
&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_cancel.gif") %>" ALT="Cancel"
NAME="cancel" WIDTH=80 HEIGHT=24 BORDER=0>
</TD></TR>
</TABLE>
</FORM>
<% rdat.writeFooter(out); %>

View File

@@ -24,8 +24,7 @@
TopicListing data = TopicListing.retrieve(request);
Variables.failIfNull(data);
RenderData rdat = RenderConfig.createRenderData(application,request,response);
String self = "confdisp?sig=" + String.valueOf(data.getSIGID()) + "&conf="
+ String.valueOf(data.getConfID());
String self = "confdisp?" + data.getLocator();
String tmp;
%>
<% if (rdat.useHTMLComments()) { %><!-- Topic list for conf #<%= data.getConfID() %> --><% } %>
@@ -36,14 +35,14 @@
SRC="<%= rdat.getFullImagePath("bn_conference_list.gif") %>" ALT="Conference List" WIDTH=80 HEIGHT=24
BORDER=0></A>&nbsp;&nbsp;
<% if (data.canCreateTopic()) { %>
<% tmp = "confops?sig=" + String.valueOf(data.getSIGID()) + "&conf="
+ String.valueOf(data.getConfID()) + "&cmd=T"; %>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>"><IMG SRC="<%= rdat.getFullImagePath("bn_add_topic.gif") %>"
ALT="Add Topic" WIDTH=80 HEIGHT=24 BORDER=0></A>&nbsp;&nbsp;
<% tmp = rdat.getEncodedServletPath("confops?" + data.getLocator() + "&cmd=T"); %>
<A HREF="<%= tmp %>"><IMG SRC="<%= rdat.getFullImagePath("bn_add_topic.gif") %>" ALT="Add Topic"
WIDTH=80 HEIGHT=24 BORDER=0></A>&nbsp;&nbsp;
<% } // end if %>
<% if (data.canDoReadNew()) { %>
<A HREF="TODO"><IMG SRC="<%= rdat.getFullImagePath("bn_read_new.gif") %>"
ALT="Read New" WIDTH=80 HEIGHT=24 BORDER=0></A>&nbsp;&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("confdisp?" + data.getNextLocator()) %>"><IMG
SRC="<%= rdat.getFullImagePath("bn_read_new.gif") %>" ALT="Read New" WIDTH=80 HEIGHT=24
BORDER=0></A>&nbsp;&nbsp;
<% } // end if %>
<A HREF="TODO"><IMG SRC="<%= rdat.getFullImagePath("bn_manage.gif") %>"
ALT="Manage" WIDTH=80 HEIGHT=24 BORDER=0></A>&nbsp;&nbsp;
@@ -59,52 +58,61 @@
<% tmp = self + "&sort="
+ String.valueOf(data.isSort(ConferenceContext.SORT_NUMBER) ? -ConferenceContext.SORT_NUMBER
: ConferenceContext.SORT_NUMBER); %>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>">#</A>
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">#</A></B>
</FONT></TD>
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>
<% tmp = self + "&sort="
+ String.valueOf(data.isSort(ConferenceContext.SORT_NAME) ? -ConferenceContext.SORT_NAME
: ConferenceContext.SORT_NAME); %>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Topic Name</A>
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Topic Name</A></B>
</FONT></TD>
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<% tmp = self + "&sort="
+ String.valueOf(data.isSort(ConferenceContext.SORT_UNREAD) ? -ConferenceContext.SORT_UNREAD
: ConferenceContext.SORT_UNREAD); %>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>">New</A>
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">New</A></B>
</FONT></TD>
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<% tmp = self + "&sort="
+ String.valueOf(data.isSort(ConferenceContext.SORT_TOTAL) ? -ConferenceContext.SORT_TOTAL
: ConferenceContext.SORT_TOTAL); %>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Total</A>
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Total</A></B>
</FONT></TD>
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>
<% tmp = self + "&sort="
+ String.valueOf(data.isSort(ConferenceContext.SORT_DATE) ? -ConferenceContext.SORT_DATE
: ConferenceContext.SORT_DATE); %>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Last Response</A>
<B><A HREF="<%= rdat.getEncodedServletPath(tmp) %>">Last Response</A></B>
</FONT></TD>
</TR>
<TR VALIGN=TOP><TD ALIGN=LEFT COLSPAN=5><%= rdat.getStdFontTag(null,2) %>&nbsp;</FONT></TD></TR>
<% Iterator it = data.getTopicIterator(); %>
<% while (it.hasNext()) { %>
<% TopicContext topic = (TopicContext)(it.next()); %>
<%
TopicContext topic = (TopicContext)(it.next());
tmp = self + "&top=" + String.valueOf(topic.getTopicNumber()) + "&rnm=1";
%>
<TR VALIGN=TOP>
<TD ALIGN=LEFT WIDTH="1%"><%= rdat.getStdFontTag(null,2) %>
<A HREF="TODO"><%= topic.getTopicNumber() %></A>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>"><%= topic.getTopicNumber() %></A>&nbsp;&nbsp;
</FONT></TD>
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>
<A HREF="TODO"><%= topic.getName() %></A>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>"><%= topic.getName() %></A>
<% if (topic.isArchived() && !(data.isView(ConferenceContext.DISPLAY_ARCHIVED))) { %>
<EM>(archived)</EM>
<% } else if (topic.isFrozen()) { %>
<EM>(frozen)</EM>
<% } // end if %>
</FONT></TD>
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<A HREF="TODO"><%= topic.getUnreadMessages() %></A>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>"><%= topic.getUnreadMessages() %></A>
</FONT></TD>
<TD ALIGN=RIGHT><%= rdat.getStdFontTag(null,2) %>
<A HREF="TODO"><%= topic.getTotalMessages() %></A>
<A HREF="<%= rdat.getEncodedServletPath(self + "&top=" + String.valueOf(topic.getTopicNumber())
+ "&p1=0&p2=-1") %>"><%= topic.getTotalMessages() %></A>
</FONT></TD>
<TD ALIGN=LEFT><%= rdat.getStdFontTag(null,2) %>
<A HREF="TODO"><%= rdat.formatDateForDisplay(topic.getLastUpdateDate()) %></A>
<A HREF="<%= rdat.getEncodedServletPath(tmp) %>"><%= rdat.formatDateForDisplay(topic.getLastUpdateDate()) %></A>
</FONT></TD>
</TR>
<% } // end while (more topics in enumeration) %>

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
web/images/bn_go.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

BIN
web/images/bn_hide.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

BIN
web/images/bn_nuke.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
web/images/bn_scribble.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

BIN
web/images/bn_show.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B