From a404987a4288a959d2d4907866da0a0565c1e98a Mon Sep 17 00:00:00 2001 From: "Eric J. Bowersox" Date: Sat, 2 Feb 2002 07:16:28 +0000 Subject: [PATCH] implement move message between topics in a conference --- etc/ui-config.xml | 2 + scripts/conf/move_message.js | 134 +++++++++++++ setup/database.sql | 1 + .../venice/core/TopicMessageContext.java | 4 + .../impl/TopicMessageUserContextImpl.java | 188 ++++++++++++++++++ .../silverwrist/venice/security/Audit.java | 1 + .../venice/ui/jsp/FrameContentHereTag.java | 4 +- .../venice/ui/jsp/UtilCallJSPTag.java | 86 ++++++++ .../venice/ui/script/ScriptLibrary.java | 8 + .../venice/ui/view/NestedJSPView.java | 163 +++++++++++++++ tlds/utils-taglib.tld | 14 +- web/format/conf/move_message.jsp | 65 ++++++ web/format/conf/posts.jsp | 100 ++-------- web/format/conf/posts_usercontrols.jsp | 88 ++++++++ web/images/classic/.gitignore | 1 + web/images/classic/move.jpg | Bin 0 -> 2408 bytes web/images/gelcap/.gitignore | 1 + web/images/gelcap/move.jpg | Bin 0 -> 2853 bytes 18 files changed, 770 insertions(+), 90 deletions(-) create mode 100644 scripts/conf/move_message.js create mode 100644 src/com/silverwrist/venice/ui/jsp/UtilCallJSPTag.java create mode 100644 src/com/silverwrist/venice/ui/view/NestedJSPView.java create mode 100644 web/format/conf/move_message.jsp create mode 100644 web/format/conf/posts_usercontrols.jsp create mode 100644 web/images/classic/.gitignore create mode 100644 web/images/classic/move.jpg create mode 100644 web/images/gelcap/.gitignore create mode 100644 web/images/gelcap/move.jpg diff --git a/etc/ui-config.xml b/etc/ui-config.xml index 5d0d738..2bc3b22 100644 --- a/etc/ui-config.xml +++ b/etc/ui-config.xml @@ -172,6 +172,7 @@ + + diff --git a/scripts/conf/move_message.js b/scripts/conf/move_message.js new file mode 100644 index 0000000..9890663 --- /dev/null +++ b/scripts/conf/move_message.js @@ -0,0 +1,134 @@ +// 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) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. +// +// Contributor(s): + +importPackage(java.util); +importPackage(Packages.com.silverwrist.venice.core); +importPackage(Packages.com.silverwrist.venice.except); +importPackage(Packages.com.silverwrist.venice.ui); +importPackage(Packages.com.silverwrist.venice.ui.conf); +importPackage(Packages.com.silverwrist.venice.ui.helpers); + +// get the request object and the community +rinput = bsf.lookupBean("request"); +comm = rinput.getCommunity(true,"top.js.vs"); + +// get the current conference +currc = new CurrentConference(rinput); +conf = currc.getConference(true,"conf/conferences.js.vs?cc=" + comm.communityID); + +// get the current topic +topic = currc.getTopic(true,"conf/topics.js.vs?cc=" + comm.communityID + "&conf=" + conf.confID); + +// get the message under consideration +msg = currc.getTopicMessageParam("msg",true,"conf/posts.js.vs?cc=" + comm.communityID + "&conf=" + + conf.confID + "&top=" + topic.topicNumber); +on_error = "conf/posts.js.vs?cc=" + comm.communityID + "&conf=" + conf.confID + "&top=" + topic.topicNumber + + "&p1=" + msg.getPostNumber() + "&shac=1"; + +if ("GET"==rinput.verb) +{ // set up the prompt for which topic to move the post to + rinput.setRequestAttribute("message.move.message",msg); + poster = ""; + try + { // get the poster name + poster = msg.creatorName; + + } // end try + catch (foo) + { // we hit a DataException here + poster = "(unknown)"; + + } // end catch + + rinput.setRequestAttribute("message.move.postername",poster); + + rc = null; + try + { // get the list of topics in the conference + in_list = vlib.castList(conf.getTopicList(ConferenceContext.GET_ALL,ConferenceContext.SORT_NAME)); + out_list = vlib.createList(); + it = in_list.iterator(); + while (it.hasNext()) + { // add all topic names to the list EXCEPT the current one + xtopic = vlib.castTopicContext(it.next()); + if (xtopic.topicID!=topic.topicID) + out_list.add(xtopic); + + } // end while + + rinput.setRequestAttribute("message.move.topics",out_list); + + // create the actual view and output it + rc = new JSPView("Move Message","conf/move_message.jsp"); + rc.menuSelector = Content.MENU_SELECTOR_COMMUNITY; + + } // end try + catch (e) + { // handle the exception here + etype = vlib.exceptionType(e) + ""; + if (etype.match("DataException")) + rc = new ErrorBox("Database Error","Database error listing messages: " + e.message,on_error); + else if (etype.match("AccessError")) + rc = new ErrorBox("Access Error",e.message,on_error); + else + rc = e; + + } // end catch + + vlib.output(rc); + vlib.done(); + +} // end if ("GET" request) + +if (rinput.isImageButtonClicked("cancel")) +{ // Cancel button pressed - bounce back to the message + vlib.output(new Redirect(on_error,LinkTypes.SERVLET)); + vlib.done(); + +} // end if + +if (!(rinput.isImageButtonClicked("move"))) +{ // invalid command button pressed + logger.error("no known button click on POST to conf/move_message.js"); + vlib.output(new ErrorBox("Internal Error","Invalid command button pressed.",on_error)); + vlib.done(); + +} // end if + +rc = null; +try +{ // move the message! + topic_id = rinput.getParameterInt("target",-1); + msg.moveToTopic(topic_id); + + // bounce to the topic we moved from + rc = new Redirect("conf/posts.js.vs?cc=" + comm.communityID + "&conf=" + conf.confID + "&top=" + + topic.topicNumber,LinkTypes.SERVLET); + +} // end try +catch (e) +{ // handle the exception + etype = vlib.exceptionType(e) + ""; + if (etype.match("DataException")) + rc = new ErrorBox("Database Error","Database error moving message: " + e.message,on_error); + else if (etype.match("AccessError")) + rc = new ErrorBox("Access Error",e.message,on_error); + else + rc = e; + +} // end catch + +vlib.output(rc); // all done... diff --git a/setup/database.sql b/setup/database.sql index fac448f..ad97bc9 100644 --- a/setup/database.sql +++ b/setup/database.sql @@ -492,6 +492,7 @@ INSERT INTO refaudit (type, descr) VALUES (313, 'Nuke Message'), (314, 'Upload Message Attachment'), (315, 'Delete Conference'), + (316, 'Move Message'), (9999999, 'DUMMY'); # Populate the Category table. diff --git a/src/com/silverwrist/venice/core/TopicMessageContext.java b/src/com/silverwrist/venice/core/TopicMessageContext.java index faf8a16..3391d52 100644 --- a/src/com/silverwrist/venice/core/TopicMessageContext.java +++ b/src/com/silverwrist/venice/core/TopicMessageContext.java @@ -85,4 +85,8 @@ public interface TopicMessageContext public abstract String getPostLink() throws DataException; + public abstract void moveToTopic(int newtopicid) throws DataException, AccessError; + + public abstract boolean canMove(); + } // end interface TopicMessageContext diff --git a/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java b/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java index e60b647..e9802e0 100644 --- a/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java @@ -1087,6 +1087,194 @@ class TopicMessageUserContextImpl implements TopicMessageContext } // end getPostLink + public void moveToTopic(int newtopicid) throws DataException, AccessError + { + if (!(env.getConference().userCanNuke()) || !(env.getConference().userCanPost())) + { // we must have both Nuke and Post privileges in this conference to be able to move + logger.error("trying to move post w/o permission!"); + throw new AccessError("You are not permitted to move this message to another topic."); + + } // end if + + if (newtopicid==topicid) + return; // attempting to move to the same topic is a no-op + + if (nuked) + { // we can't move a nuked message! + logger.error("unable to move message because message nuked"); + throw new DataException("Cannot move a message that has been nuked."); + + } // end if + + if (scribble_date!=null) + { // we can't move a scribbled message! + logger.error("unable to move because message scribbled"); + throw new DataException("Cannot move a message that has been scribbled."); + + } // end if + + Connection conn = null; + AuditRecord ar = null; + ArrayList mailto_addrs = null; + int new_topic_num = -1; + String new_topic_name = null, my_text = null; + ResultSet rs; + StringBuffer sql = new StringBuffer(); + + try + { // get a database connection + conn = env.getConnection(); + Statement stmt = conn.createStatement(); + + // lock the tables we reference + stmt.executeUpdate("LOCK TABLES confs WRITE, topics WRITE, posts WRITE, topicsettings READ;"); + + ArrayList mailto_uids = null; + int old_topicid; + + try + { // verify that we're not trying to move post 0 when that's the only one that exists + if (num==0) + { // if we're moving post 0, check the number of posts in the topic + rs = stmt.executeQuery("SELECT top_message FROM topics WHERE topicid = " + topicid + ";"); + if (!(rs.next())) + throw new InternalStateError("unable to get current message's topic?!?!?"); + if (rs.getInt(1)==0) + throw new DataException("You cannot move the only message out of a topic."); + + } // end if + + // verify that the target topic exists + rs = stmt.executeQuery("SELECT confid, num, top_message, name FROM topics WHERE topicid = " + + newtopicid + ";"); + if (!(rs.next())) + throw new DataException("The specified topic to move the message to does not exist."); + if (env.getConfID()!=rs.getInt(1)) + throw new AccessError("The topic to move the message to must be within the same conference."); + int newconfid = rs.getInt(1); + new_topic_num = rs.getInt(2); + int new_post_num = rs.getInt(3) + 1; + new_topic_name = rs.getString(4); + + // save off the old parent, topic ID, and old post number + long old_parent = parent; + old_topicid = topicid; + int old_post_num = num; + + // adjust the post record in the database so it's part of the new topic + sql.append("UPDATE posts SET parent = 0, topicid = ").append(newtopicid).append(", num = "); + sql.append(new_post_num).append(" WHERE postid = ").append(postid).append(';'); + if (logger.isDebugEnabled()) + logger.debug("SQL: " + sql.toString()); + stmt.executeUpdate(sql.toString()); + parent = 0; + topicid = newtopicid; + num = new_post_num; + + // Touch the topic values to reflect the added post. + sql.setLength(0); + java.util.Date now = new java.util.Date(); + sql.append("UPDATE topics SET top_message = ").append(new_post_num).append(", lastupdate = '"); + sql.append(SQLUtil.encodeDate(now)).append("' WHERE topicid = ").append(newtopicid).append(';'); + if (logger.isDebugEnabled()) + logger.debug("SQL: " + sql.toString()); + stmt.executeUpdate(sql.toString()); + + // Now we have to renumber the remaining posts in the "old" topic, just as if the post had been + // nuked rather than moved. + // ----- + // Phase 1 of renumber - Renumber all posts IN THIS TOPIC that had a number higher than the one + // we just shifted over. + stmt.executeUpdate("UPDATE posts SET num = (num - 1) WHERE topicid = " + old_topicid + " AND num > " + + old_post_num + ";"); + + // Phase 2 of renumber - The topic now has one less post in it. Reflect that. + stmt.executeUpdate("UPDATE topics SET top_message = (top_message - 1) WHERE topicid = " + + old_topicid + ";"); + + // Also reparent any posts that had this one as a parent. + stmt.executeUpdate("UPDATE posts SET parent = " + old_parent + " WHERE parent = " + postid + ";"); + + // Touch the "conference updated" indicator. + env.getConference().touchUpdate(conn,now); + + // Who's subscribed to the new topic? Whoever it is, they need to get this post via E-mail. + sql.setLength(0); + sql.append("SELECT uid FROM topicsettings WHERE topicid = ").append(newtopicid); + sql.append(" AND subscribe = 1;"); + if (logger.isDebugEnabled()) + logger.debug("SQL: " + sql.toString()); + rs = stmt.executeQuery(sql.toString()); + while (rs.next()) + { // load the UIDs here + if (mailto_uids==null) + mailto_uids = new ArrayList(); + mailto_uids.add(new Integer(rs.getInt(1))); + + } // end while + + } // end try + finally + { // unlock the tables before we go + Statement ulk_stmt = conn.createStatement(); + ulk_stmt.executeUpdate("UNLOCK TABLES;"); + + } // end finally + + // record what we did in an audit record + ar = env.newAudit(AuditRecord.MOVE_MESSAGE,"conf=" + env.getConfID() + ",post=" + postid, + "fromtopic=" + old_topicid,"totopic=" + newtopicid); + + if (mailto_uids!=null) + { // We need to translate the "mailto" UIDs to E-mail addresses while we still have the database open! + mailto_addrs = new ArrayList(mailto_uids.size()); + sql.setLength(0); + sql.append("SELECT c.email FROM users u, contacts c WHERE u.contactid = c.contactid AND u.uid "); + if (mailto_uids.size()==1) + sql.append("= ").append(mailto_uids.get(0)).append(';'); + else + sql.append("IN (").append(StringUtil.join(mailto_uids,", ")).append(");"); + if (logger.isDebugEnabled()) + logger.debug("SQL: " + sql.toString()); + rs = stmt.executeQuery(sql.toString()); + while (rs.next()) + mailto_addrs.add(rs.getString(1)); + + // also load the message's text for E-mailing + my_text = this.getBodyText(); + + } // end if + + } // end try + catch (SQLException e) + { // just trap SQL exceptions and log them + logger.error("unable to move message: " + e.getMessage(),e); + throw new DataException("unable to move message: " + e.getMessage(),e); + + } // end catch + finally + { // make sure we release the connection before we go + AuditRecord.store(conn,ar); + env.releaseConnection(conn); + + } // end finally + + if (mailto_addrs!=null) + { // spin off a background thread to generate the E-mails + PostDeliveryAgent agent = new PostDeliveryAgent(env,my_text,pseud,new_topic_name,new_topic_num, + mailto_addrs); + agent.start(); + + } // end if + + } // end moveToTopic + + public boolean canMove() + { + return (env.getConference().userCanNuke() && env.getConference().userCanPost()); + + } // end canMove + /*-------------------------------------------------------------------------------- * External static operations *-------------------------------------------------------------------------------- diff --git a/src/com/silverwrist/venice/security/Audit.java b/src/com/silverwrist/venice/security/Audit.java index 5d2cce8..e476cfe 100644 --- a/src/com/silverwrist/venice/security/Audit.java +++ b/src/com/silverwrist/venice/security/Audit.java @@ -67,5 +67,6 @@ public interface Audit public static final int NUKE_MESSAGE = 313; public static final int UPLOAD_ATTACHMENT = 314; public static final int DELETE_CONF = 315; + public static final int MOVE_MESSAGE = 316; } // end interface Audit diff --git a/src/com/silverwrist/venice/ui/jsp/FrameContentHereTag.java b/src/com/silverwrist/venice/ui/jsp/FrameContentHereTag.java index 4a677e0..2fe743a 100644 --- a/src/com/silverwrist/venice/ui/jsp/FrameContentHereTag.java +++ b/src/com/silverwrist/venice/ui/jsp/FrameContentHereTag.java @@ -11,7 +11,7 @@ * * 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. + * Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. * * Contributor(s): */ @@ -27,7 +27,7 @@ import com.silverwrist.venice.ui.*; public class FrameContentHereTag extends VeniceTagSupport { /*-------------------------------------------------------------------------------- - * Overrides from class TagSupport + * Static data members *-------------------------------------------------------------------------------- */ diff --git a/src/com/silverwrist/venice/ui/jsp/UtilCallJSPTag.java b/src/com/silverwrist/venice/ui/jsp/UtilCallJSPTag.java new file mode 100644 index 0000000..a14a20f --- /dev/null +++ b/src/com/silverwrist/venice/ui/jsp/UtilCallJSPTag.java @@ -0,0 +1,86 @@ +/* + * 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) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + * + * Contributor(s): + */ +package com.silverwrist.venice.ui.jsp; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.jsp.*; +import javax.servlet.jsp.tagext.*; +import com.silverwrist.venice.ui.*; +import com.silverwrist.venice.ui.view.NestedJSPView; + +public class UtilCallJSPTag extends VeniceTagSupport +{ + /*-------------------------------------------------------------------------------- + * Attributes + *-------------------------------------------------------------------------------- + */ + + private String name = null; + + /*-------------------------------------------------------------------------------- + * Overrides from class TagSupport + *-------------------------------------------------------------------------------- + */ + + public int doStartTag() throws JspException + { + if (name==null) + throw new JspTagException(" tag specified without a JSP name"); + + try + { // do what we came here to accomplish + JspWriter out = pageContext.getOut(); + out.flush(); + getRequestOutput().output(out,new NestedJSPView(getContent(),name)); + + } // end try + catch (IOException e) + { // convert the I/O error into something the servlet engine can deal with + throw new JspTagException("error writing comment start - " + e.getMessage()); + + } // end catch + catch (ServletException se) + { // convert the servlet exception into something we can deal with, too + throw new JspTagException("Servlet error writing frame content - " + se.getMessage()); + + } // end catch + + return SKIP_BODY; + + } // end doStartTag + + public void release() + { + super.release(); + name = null; + + } // end release + + /*-------------------------------------------------------------------------------- + * Attribute set functions + *-------------------------------------------------------------------------------- + */ + + public void setName(String s) + { + name = s; + + } // end setName + +} // end class UtilCallJSPTag diff --git a/src/com/silverwrist/venice/ui/script/ScriptLibrary.java b/src/com/silverwrist/venice/ui/script/ScriptLibrary.java index 1d0f1e8..653f11d 100644 --- a/src/com/silverwrist/venice/ui/script/ScriptLibrary.java +++ b/src/com/silverwrist/venice/ui/script/ScriptLibrary.java @@ -93,6 +93,14 @@ public class ScriptLibrary } // end castSideBoxDescriptor + public final TopicContext castTopicContext(Object o) + { + if (o instanceof TopicContext) + return (TopicContext)o; + throw new ClassCastException("ScriptLibrary.castTopicContext: invalid cast"); + + } // end castTopicContext + public final TopicMessageContext castTopicMessageContext(Object o) { if (o instanceof TopicMessageContext) diff --git a/src/com/silverwrist/venice/ui/view/NestedJSPView.java b/src/com/silverwrist/venice/ui/view/NestedJSPView.java new file mode 100644 index 0000000..755c9c3 --- /dev/null +++ b/src/com/silverwrist/venice/ui/view/NestedJSPView.java @@ -0,0 +1,163 @@ +/* + * 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) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + * + * Contributor(s): + */ +package com.silverwrist.venice.ui.view; + +import java.util.Date; +import javax.servlet.*; +import com.silverwrist.venice.core.CommunityContext; +import com.silverwrist.venice.ui.*; +import com.silverwrist.venice.ui.servlet.RequestImpl; + +public class NestedJSPView implements ContentJSP +{ + /*-------------------------------------------------------------------------------- + * Attributes + *-------------------------------------------------------------------------------- + */ + + private Content outer; + private String jspname; + private RequestInput rinput = null; + + /*-------------------------------------------------------------------------------- + * Constructor + *-------------------------------------------------------------------------------- + */ + + public NestedJSPView(Content outer, String jspname) + { + this.outer = outer; + this.jspname = jspname; + + } // end constructor + + /*-------------------------------------------------------------------------------- + * Implementations from interface Content + *-------------------------------------------------------------------------------- + */ + + public boolean needFrame() + { + return outer.needFrame(); + + } // end needFrame + + public int getMenuSelector() + { + return outer.getMenuSelector(); + + } // end getMenuSelector + + public String getPageTitle(RequestOutput ro) + { + return outer.getPageTitle(ro); + + } // end getPageTitle + + public String getPageQID() + { + return outer.getPageQID(); + + } // end getPageQID + + /*-------------------------------------------------------------------------------- + * Implementations from interface ContentJSP + *-------------------------------------------------------------------------------- + */ + + public String getJSPName() + { + return jspname; + + } // end getJSPName + + public void initialize(RequestInput req) + { + rinput = req; + + } // end initialize + + public void terminate(RequestInput req) + { + rinput = null; + + } // end terminate + + /*-------------------------------------------------------------------------------- + * External operations + *-------------------------------------------------------------------------------- + */ + + public final Content getOuterView() + { + return outer; + + } // end getOuterView + + public final Object getRequestAttribute(String s) + { + return ((rinput==null) ? null : rinput.getRequestAttribute(s)); + + } // end getRequestAttribute + + public final String formatDate(Date date) + { + return ((rinput==null) ? null : rinput.formatDate(date)); + + } // end formatDate + + public final CommunityContext getCommunity() + { + return ((rinput==null) ? null : rinput.getCommunity()); + + } // end getCommunity + + public final String getActivityString(Date date) + { + return ((rinput==null) ? null : rinput.getActivityString(date)); + + } // end getActivityString + + /*-------------------------------------------------------------------------------- + * External static operations + *-------------------------------------------------------------------------------- + */ + + public static final NestedJSPView get(ServletRequest sreq) throws ServletException + { + Object obj = sreq.getAttribute(RequestImpl.REQUEST_CONTENT); + if (obj==null) + throw new ServletException("NestedJSPView.get: unable to get request content"); + if (obj instanceof NestedJSPView) + return (NestedJSPView)obj; + throw new ServletException("NestedJSPView.get: request content is not a NestedJSPView object"); + + } // end get + + public static final RequestOutput getRequestOutput(ServletRequest sreq) throws ServletException + { + Object obj = sreq.getAttribute(RequestImpl.REQUEST_OUTPUT); + if (obj==null) + throw new ServletException("NestedJSPView.getRequestOutput: unable to get request object"); + if (obj instanceof RequestOutput) + return (RequestOutput)obj; + throw new ServletException("NestedJSPView.getRequestOutput: request object is not a RequestOutput object"); + + } // end getRequestOutput + +} // end class NestedJSPView diff --git a/tlds/utils-taglib.tld b/tlds/utils-taglib.tld index 7d4a805..fa0883c 100644 --- a/tlds/utils-taglib.tld +++ b/tlds/utils-taglib.tld @@ -12,7 +12,7 @@ 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. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --> @@ -365,4 +365,16 @@ JSP + + call_jsp + com.silverwrist.venice.ui.jsp.UtilCallJSPTag + Calls another JSP page from within this one. + EMPTY + + name + true + false + + + diff --git a/web/format/conf/move_message.jsp b/web/format/conf/move_message.jsp new file mode 100644 index 0000000..0a67c22 --- /dev/null +++ b/web/format/conf/move_message.jsp @@ -0,0 +1,65 @@ +<%-- + 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) 2002 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.view.JSPView" %> +<%@ taglib uri="/tlds/util" prefix="util" %> +<%@ taglib uri="/tlds/community" prefix="comm" %> +<%@ taglib uri="/tlds/conference" prefix="conf" %> +<%@ taglib uri="/tlds/topic" prefix="topic" %> +<% + JSPView view = JSPView.get(request); + CurrentConference currc = CurrentConference.get(request); + TopicMessageContext msg = (TopicMessageContext)(view.getRequestAttribute("message.move.message")); + final String poster = view.getRequestAttribute("message.move.postername").toString(); + final List targets = (List)(view.getRequestAttribute("message.move.topics")); +%> +Moving message #<%= msg.getPostID() %> to another topic + + + Message <%= msg.getPostNumber() %> of : + <% if (msg.isHidden()) { %> + (Hidden) + <% } // end if %> +
+ <%= msg.getPseud() %> + ( + + user/<%= poster %> + <%= poster %> + , + <%= view.formatDate(msg.getPostDate()) %> + ) +

+ + + + + + Move to topic:  +

+   +

+ diff --git a/web/format/conf/posts.jsp b/web/format/conf/posts.jsp index a647b14..4625e84 100644 --- a/web/format/conf/posts.jsp +++ b/web/format/conf/posts.jsp @@ -11,7 +11,7 @@ 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. + Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): --%> @@ -58,49 +58,7 @@ <% out.flush(); response.flushBuffer(); %> @@ -388,6 +346,16 @@ conf/posts.js.vs?<%= topic_locator %>&p1=<%= my_last + 1 %>&p2=<%= Math.min(my_l

<% } // end if (can nuke) + if (msg.canMove() && (my_topic.getTotalMessages()>1)) { +%> + + + conf/move_message.js.vs?<%= topic_locator %>&msg=<%= msg.getPostNumber() %> + + +

+<% + } // end if (can move) if (msg.canPublish()) { %> @@ -451,49 +419,7 @@ conf/posts.js.vs?<%= topic_locator %>&p1=<%= my_last + 1 %>&p2=<%= Math.min(my_l

- 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 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 %> - - +
diff --git a/web/format/conf/posts_usercontrols.jsp b/web/format/conf/posts_usercontrols.jsp new file mode 100644 index 0000000..c095916 --- /dev/null +++ b/web/format/conf/posts_usercontrols.jsp @@ -0,0 +1,88 @@ +<%-- + 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) 2002 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.NestedJSPView" %> +<%@ taglib uri="/tlds/util" prefix="util" %> +<%@ taglib uri="/tlds/community" prefix="comm" %> +<%@ taglib uri="/tlds/conference" prefix="conf" %> +<%@ taglib uri="/tlds/topic" prefix="topic" %> +<% + NestedJSPView view = NestedJSPView.get(request); + PostsView outer_view = (PostsView)(view.getOuterView()); + final int my_unread = outer_view.getUnread(); + final short my_next = outer_view.getNextTopic(); + final String restorer = "rtop=" + outer_view.getTopic().getTopicNumber() + "&rct=" + my_unread; +%> +<%-- Broken out from posts.jsp, which was getting too large and complex --%> +Topic user controls section + + conf/topics.js.vs?cc=&conf= + + +  + + + + conf/hide_topic.js.vs?cc=&conf=&top=&flag=0 + + + + + + + + conf/hide_topic.js.vs?cc=&conf=&top=&flag=1 + + + + +  +<% if (outer_view.canDoNextTopic()) { %> + + + conf/posts.js.vs?cc=&conf=&top=<%= my_next %>&rnm=1 + + + +   + <% if (my_unread>0) { %> + + + conf/posts.js.vs?cc=&conf=&top=<%= my_next %>&rnm=1&<%= restorer %> + + + +   +<% + } // end if +} // end if +%> + + conf/find.js.vs?cc=&conf=&top= + + +  + + + conf/manage_topic.js.vs?cc=&conf=&top= + + + diff --git a/web/images/classic/.gitignore b/web/images/classic/.gitignore new file mode 100644 index 0000000..5c165d9 --- /dev/null +++ b/web/images/classic/.gitignore @@ -0,0 +1 @@ +.xvpics diff --git a/web/images/classic/move.jpg b/web/images/classic/move.jpg new file mode 100644 index 0000000000000000000000000000000000000000..54daf5d434662308f1c3298c2301b6e06775b361 GIT binary patch literal 2408 zcmbu%`#;l<9tZHxHf(a+T%##>jU>0+k}zTJ*K&zch^U#R=I%=_mCI}{Yb2KuTDs8) zT?}dNMbM)maAsK}q#((V%1HAh-7y&^5hQReM zoCbFCoiUmL7A{#*w^Xe7pkICgJ#%}sB_+X-KPw(3_p`06lZm|$Ao?XcF_4y4E?O0Y z4-}|<2;Qo@{jlJep878DQY37q@M~{H2;ocWi;~~dK_}ejwcJz_XY=L^G*skmo?vFn zk#d~Xj!(0;#z|IIwk%fTnh}(-o{v|#C1RR_CUCny`)o*n=NO9@y-k@ zVLqrkGiYc>E3|dWr!WM;<34aa*5N8*Rf;4GU=d^VWuU*gTW0yz0Q8U5P#qC41DmssBE`oP*TpyuhYG$~+jvonx zSJZY80`A?;c-y|fH(A|i;kmO_H6AZcB|>z)h6w7J4Q!KW1LySJRYaaZ#zp&TQ#RS~FW0iFTnWn-qT|t?8Y| z=03actI;)#gsHbWxcdnUn0@q|a8apRb)?VV0IsX4iw82*`G=_O$zm5adi8?(2s$H{ z(zJ3iCT7H(IHZ6-_^J>!MoIFcR2GuPnV;S-^s`qcomH{a8>(+2ofqdfCphycL<|oW z+)E*M+R-($4hi!d1S6_rIhz+K5OiV+y=gdb16vVRHj_B4$?!PcsJ>uvFp)zF%{`1RFnM8oWekhk>%H!uT`6s zS~RbQg&&{L>C-&!=DfMCdO-4k$H83x?A+?Y@h;c1gR?3J1oO++ko`BGO6w+6;d}3C z$;u@yzP~wjm`CoLVIhOTOHxni5M(M`%k$aJbW8PbW4;s@$en^}b>{o{7>lVUe;j04 z%8$>qqspx44QCjlXb4Q_7K-L~4oUR|bFh4}OL~O|@H6B!a609u$wEa8HT8WA7dk{W7z2 zvOIKecQNO3KTQOWW-Rere{*fPAkf-Bk|6NCEL<%Xhhi|_H-$Am#vCFr23LVeZhwsb z;2k>8gC0UD9O~7|$QjJ>`u&r{saKy%dVCSU4Rvj7im6r@WvE z^JG{j67+a>pPou#gpyP%gA}K{BX2hHE7zItgs=P_W>gnab|=VrAC*pxDmp|Pyumjg z#&(_W{7tA~w4|W2Bkt(T>W$*Z^gD#C=`KDvdBZy$RCh0*dkl8X zC^fWKg85iJvm{dFTnb-9{YrD5c~j}db`!K&^Z5WP@e{@L4pSxQXDK1<guyG9)@MO=p_-EliWpK(i*>+tAEPu45is6guRa8`YAEd;H071Qc z@AiO~Z=+kRkaNeb>;YGj2Noq8>fxq0MYDK=r&{%=-!iEYRkZI$DUs#HG(qryqvM#O zv*6-a{W*arKR2A*R-GHSd<}=bv-A4{&+j)CSzD&WK%4V3qoQ=qYBL;J zS8*6GadOpb8~LM_xycS>AMbdYZ0`uhUWy~eLf>OLiJEW^!As(U1B4eAK3xEhwaxrd bWqai@1|vT3SWwZ3<`>%o__~23dqe*M=));( literal 0 HcmV?d00001 diff --git a/web/images/gelcap/.gitignore b/web/images/gelcap/.gitignore new file mode 100644 index 0000000..5c165d9 --- /dev/null +++ b/web/images/gelcap/.gitignore @@ -0,0 +1 @@ +.xvpics diff --git a/web/images/gelcap/move.jpg b/web/images/gelcap/move.jpg new file mode 100644 index 0000000000000000000000000000000000000000..596028b839c71e7f2e415831a5311ac8c18a27b4 GIT binary patch literal 2853 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