diff --git a/TODO b/TODO index 6979e36..eb7b93b 100644 --- a/TODO +++ b/TODO @@ -29,9 +29,15 @@ Lots! - Slippage during posting is still untested. - Functions still to do on conferencing "topics" page: - Manage Conference Add Conference To Hotlist +- Functions still to do on "manage conference" page: + Manage members + Delete conference + +- We need a "manage" button at conference list level so we can use that to + manage the ordering of conferences. + - Implement conference hotlist for users. - Not everybody likes purple. Provide a way to change the default colors. diff --git a/setup/database.sql b/setup/database.sql index d83d0e2..90950af 100644 --- a/setup/database.sql +++ b/setup/database.sql @@ -9,7 +9,7 @@ # 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 Community System. +# 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 diff --git a/src/com/silverwrist/venice/core/ActiveUser.java b/src/com/silverwrist/venice/core/ActiveUser.java new file mode 100644 index 0000000..501714e --- /dev/null +++ b/src/com/silverwrist/venice/core/ActiveUser.java @@ -0,0 +1,32 @@ +/* + * 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): + */ +package com.silverwrist.venice.core; + +import java.util.Date; + +public interface ActiveUser +{ + public abstract int getUID(); + + public abstract String getName(); + + public abstract Date getLastRead(); + + public abstract Date getLastWrite(); + +} // end interface ActiveUser diff --git a/src/com/silverwrist/venice/core/ConferenceContext.java b/src/com/silverwrist/venice/core/ConferenceContext.java index fed6bda..3767c67 100644 --- a/src/com/silverwrist/venice/core/ConferenceContext.java +++ b/src/com/silverwrist/venice/core/ConferenceContext.java @@ -7,7 +7,7 @@ * 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 Community System. + * 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 @@ -119,4 +119,16 @@ public interface ConferenceContext public abstract void fixSeen() throws DataException; + public abstract List getActivePosters(int skip, int limit) throws DataException; + + public abstract List getActivePosters(int limit) throws DataException; + + public abstract List getActivePosters() throws DataException; + + public abstract List getActiveReaders(int skip, int limit) throws DataException; + + public abstract List getActiveReaders(int limit) throws DataException; + + public abstract List getActiveReaders() throws DataException; + } // end interface ConferenceContext diff --git a/src/com/silverwrist/venice/core/UserFound.java b/src/com/silverwrist/venice/core/UserFound.java index 9cfdd5e..fb8c26d 100644 --- a/src/com/silverwrist/venice/core/UserFound.java +++ b/src/com/silverwrist/venice/core/UserFound.java @@ -7,7 +7,7 @@ * 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 Community System. + * 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 diff --git a/src/com/silverwrist/venice/core/impl/ActiveUserImpl.java b/src/com/silverwrist/venice/core/impl/ActiveUserImpl.java new file mode 100644 index 0000000..25441c4 --- /dev/null +++ b/src/com/silverwrist/venice/core/impl/ActiveUserImpl.java @@ -0,0 +1,78 @@ +/* + * 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): + */ +package com.silverwrist.venice.core.impl; + +import java.util.Date; +import com.silverwrist.venice.core.ActiveUser; + +class ActiveUserImpl implements ActiveUser +{ + /*-------------------------------------------------------------------------------- + * Attributes + *-------------------------------------------------------------------------------- + */ + + private int uid; + private String name; + private Date last_read; + private Date last_write; + + /*-------------------------------------------------------------------------------- + * Constructor + *-------------------------------------------------------------------------------- + */ + + ActiveUserImpl(int uid, String name, Date last_read, Date last_write) + { + this.uid = uid; + this.name = name; + this.last_read = last_read; + this.last_write = last_write; + + } // end constructor + + /*-------------------------------------------------------------------------------- + * Implementations from interface ActiveUser + *-------------------------------------------------------------------------------- + */ + + public int getUID() + { + return uid; + + } // end getUID + + public String getName() + { + return name; + + } // end getName + + public Date getLastRead() + { + return last_read; + + } // end getLastRead + + public Date getLastWrite() + { + return last_write; + + } // end getLastWrite + +} // end class ActiveUserImpl diff --git a/src/com/silverwrist/venice/core/impl/ConferenceCoreData.java b/src/com/silverwrist/venice/core/impl/ConferenceCoreData.java index 24130ad..ac22940 100644 --- a/src/com/silverwrist/venice/core/impl/ConferenceCoreData.java +++ b/src/com/silverwrist/venice/core/impl/ConferenceCoreData.java @@ -7,7 +7,7 @@ * 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 Community System. + * 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 @@ -633,7 +633,7 @@ class ConferenceCoreData implements ConferenceData // OK, go delete the row (or not, if this alias is not in the table) sql.setLength(0); - sql.append("DELETE FROM confalias WHERE confid = ").append(confid).append("AND alias = '"); + sql.append("DELETE FROM confalias WHERE confid = ").append(confid).append(" AND alias = '"); sql.append(SQLUtil.encodeString(alias)).append("';"); did_it = (stmt.executeUpdate(sql.toString())>0); @@ -648,7 +648,7 @@ class ConferenceCoreData implements ConferenceData if (did_it) { // set the database's update date and generate a new audit record touchUpdate(conn); - if (cached_alias.equals(alias)) + if ((cached_alias!=null) && cached_alias.equals(alias)) cached_alias = null; // also release the cached alias and force a re-get ar = new AuditRecord(AuditRecord.CONF_ALIAS,sig.realUID(),sig.userRemoteAddress(),sig.realSIGID(), "conf=" + String.valueOf(confid),"remove=" + alias); diff --git a/src/com/silverwrist/venice/core/impl/ConferenceUserContextImpl.java b/src/com/silverwrist/venice/core/impl/ConferenceUserContextImpl.java index edc6ea9..3f62dd3 100644 --- a/src/com/silverwrist/venice/core/impl/ConferenceUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/ConferenceUserContextImpl.java @@ -738,6 +738,9 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void setDefaultPseud(String val) throws DataException { + if (sig.userIsAnonymous()) + return; // anonymous user can't change pseud + Connection conn = null; // pooled database connection try @@ -952,6 +955,9 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void fixSeen() throws DataException { + if (sig.userIsAnonymous()) + return; // anonymous user can't fixseen + Connection conn = null; try @@ -1012,6 +1018,126 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end fixSeen + public List getActivePosters(int skip, int limit) throws DataException + { + Connection conn = null; + Vector rc = new Vector(); + + try + { // retrieve a connection from the datapool + conn = datapool.getConnection(); + Statement stmt = conn.createStatement(); + + // create the SQL statement to retrieve all posters + StringBuffer sql = + new StringBuffer("SELECT s.uid, u.username, s.last_read, s.last_post FROM confsettings s, " + + "users u WHERE u.uid = s.uid AND s.confid = "); + sql.append(confid).append(" AND u.is_anon = 0 AND ISNULL(s.last_post) = 0 ORDER BY s.last_post DESC"); + if ((skip>=0) && (limit>0)) + sql.append(" LIMIT ").append(skip).append(", ").append(limit); + sql.append(';'); + + // execute the statement + ResultSet rs = stmt.executeQuery(sql.toString()); + + while (rs.next()) + { // return all the records as ActiveUser data elements + ActiveUser usr = new ActiveUserImpl(rs.getInt(1),rs.getString(2),SQLUtil.getFullDateTime(rs,3), + SQLUtil.getFullDateTime(rs,4)); + rc.add(usr); + + } // end while + + } // end try + catch (SQLException e) + { // this becomes a DataException + logger.error("DB error getting active poster list: " + e.getMessage(),e); + throw new DataException("unable to get active poster listing: " + e.getMessage(),e); + + } // end catch + finally + { // make sure we release the connection before we go + if (conn!=null) + datapool.releaseConnection(conn); + + } // end finally + + return new ReadOnlyVector(rc); + + } // end getActivePosters + + public List getActivePosters(int limit) throws DataException + { + return getActivePosters(0,limit); + + } // end getActivePosters + + public List getActivePosters() throws DataException + { + return getActivePosters(-1,-1); + + } // end getActivePosters + + public List getActiveReaders(int skip, int limit) throws DataException + { + Connection conn = null; + Vector rc = new Vector(); + + try + { // retrieve a connection from the datapool + conn = datapool.getConnection(); + Statement stmt = conn.createStatement(); + + // create the SQL statement to retrieve all readers + StringBuffer sql = + new StringBuffer("SELECT s.uid, u.username, s.last_read, s.last_post FROM confsettings s, " + + "users u WHERE u.uid = s.uid AND s.confid = "); + sql.append(confid).append(" AND u.is_anon = 0 AND ISNULL(s.last_read) = 0 ORDER BY s.last_read DESC"); + if ((skip>=0) && (limit>0)) + sql.append(" LIMIT ").append(skip).append(", ").append(limit); + sql.append(';'); + + // execute the statement + ResultSet rs = stmt.executeQuery(sql.toString()); + + while (rs.next()) + { // return all the records as ActiveUser data elements + ActiveUser usr = new ActiveUserImpl(rs.getInt(1),rs.getString(2),SQLUtil.getFullDateTime(rs,3), + SQLUtil.getFullDateTime(rs,4)); + rc.add(usr); + + } // end while + + } // end try + catch (SQLException e) + { // this becomes a DataException + logger.error("DB error getting active reader list: " + e.getMessage(),e); + throw new DataException("unable to get active reader listing: " + e.getMessage(),e); + + } // end catch + finally + { // make sure we release the connection before we go + if (conn!=null) + datapool.releaseConnection(conn); + + } // end finally + + return new ReadOnlyVector(rc); + + } // end getActiveReaders + + public List getActiveReaders(int limit) throws DataException + { + return getActiveReaders(0,limit); + + } // end getActiveReaders + + public List getActiveReaders() throws DataException + { + return getActiveReaders(-1,-1); + + } // end getActiveReaders + /*-------------------------------------------------------------------------------- * Implementations from interface UserBackend *-------------------------------------------------------------------------------- @@ -1041,6 +1167,12 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend } // end userDefaultPseud + public boolean userIsAnonymous() + { + return sig.userIsAnonymous(); + + } // end userIsAnonymous + /*-------------------------------------------------------------------------------- * Implementations from interface SIGBackend *-------------------------------------------------------------------------------- @@ -1104,6 +1236,9 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void touchRead(Connection conn) throws SQLException { + if (sig.userIsAnonymous()) + return; // anonymous user can't update squat + Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer(); @@ -1133,6 +1268,9 @@ class ConferenceUserContextImpl implements ConferenceContext, ConferenceBackend public void touchPost(Connection conn, java.util.Date post_date) throws SQLException { + if (sig.userIsAnonymous()) + return; // anonymous user can't update squat + Statement stmt = conn.createStatement(); StringBuffer sql = new StringBuffer(); diff --git a/src/com/silverwrist/venice/core/impl/SIGUserContextImpl.java b/src/com/silverwrist/venice/core/impl/SIGUserContextImpl.java index 0a4f9ca..78a956a 100644 --- a/src/com/silverwrist/venice/core/impl/SIGUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/SIGUserContextImpl.java @@ -1102,6 +1102,12 @@ class SIGUserContextImpl implements SIGContext, SIGBackend } // end userDefaultPseud + public boolean userIsAnonymous() + { + return user.userIsAnonymous(); + + } // end userIsAnonymous + /*-------------------------------------------------------------------------------- * Implementations from interface SIGBackend *-------------------------------------------------------------------------------- diff --git a/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java b/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java index 0d758d5..18ca619 100644 --- a/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java @@ -443,13 +443,13 @@ class TopicMessageUserContextImpl implements TopicMessageContext public boolean canHide() { - return ((creator_uid==conf.realUID()) || conf.userCanHide()); + return (((creator_uid==conf.realUID()) && (!conf.userIsAnonymous())) || conf.userCanHide()); } // end canHide public boolean canScribble() { - return ((creator_uid==conf.realUID()) || conf.userCanScribble()); + return (((creator_uid==conf.realUID()) && (!conf.userIsAnonymous())) || conf.userCanScribble()); } // end canScribble @@ -461,6 +461,8 @@ class TopicMessageUserContextImpl implements TopicMessageContext public void setHidden(boolean flag) throws DataException, AccessError { + if (conf.userIsAnonymous()) + return; // no-op if ((creator_uid!=conf.realUID()) && !(conf.userCanHide())) { // we can't change the hidden status! logger.error("trying to set hidden status of post w/o permission!"); @@ -468,7 +470,7 @@ class TopicMessageUserContextImpl implements TopicMessageContext } // end if - if (nuked || (scribble_date!=null)) + if (nuked || (scribble_date!=null) || (hidden==flag)) return; // changing the status of a nuked or scribbled post is futile Connection conn = null; @@ -539,6 +541,8 @@ class TopicMessageUserContextImpl implements TopicMessageContext public void scribble() throws DataException, AccessError { + if (conf.userIsAnonymous()) + return; // no-op if ((creator_uid!=conf.realUID()) && !(conf.userCanScribble())) { // we can't scribble this post logger.error("trying to scribble post w/o permission!"); diff --git a/src/com/silverwrist/venice/core/impl/TopicUserContextImpl.java b/src/com/silverwrist/venice/core/impl/TopicUserContextImpl.java index f763fd4..bf73bda 100644 --- a/src/com/silverwrist/venice/core/impl/TopicUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/TopicUserContextImpl.java @@ -398,7 +398,7 @@ class TopicUserContextImpl implements TopicContext public void setHidden(boolean flag) throws DataException { - if ((hidden==flag) || deleted) + if ((hidden==flag) || deleted || conf.userIsAnonymous()) return; // no-op Connection conn = null; // pooled database connection @@ -474,6 +474,8 @@ class TopicUserContextImpl implements TopicContext public void setUnreadMessages(int count) throws DataException { + if (conf.userIsAnonymous()) + return; // no-op if (count>(top_message+1)) // constrain count to [0, top_message+1] count = top_message + 1; else if (count<0) diff --git a/src/com/silverwrist/venice/core/impl/UserBackend.java b/src/com/silverwrist/venice/core/impl/UserBackend.java index c51ee47..5f937a0 100644 --- a/src/com/silverwrist/venice/core/impl/UserBackend.java +++ b/src/com/silverwrist/venice/core/impl/UserBackend.java @@ -29,4 +29,6 @@ public interface UserBackend public abstract String userDefaultPseud() throws DataException; + public abstract boolean userIsAnonymous(); + } // end interface UserBackend diff --git a/src/com/silverwrist/venice/core/impl/UserContextImpl.java b/src/com/silverwrist/venice/core/impl/UserContextImpl.java index 2446cc6..d452b71 100644 --- a/src/com/silverwrist/venice/core/impl/UserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/UserContextImpl.java @@ -924,6 +924,12 @@ class UserContextImpl implements UserContext, UserBackend } // end userDefaultPseud + public boolean userIsAnonymous() + { + return is_anon; + + } // end userIsAnonymous + /*-------------------------------------------------------------------------------- * Operations private to implementation package *-------------------------------------------------------------------------------- diff --git a/src/com/silverwrist/venice/security/Role.java b/src/com/silverwrist/venice/security/Role.java index 8210392..8d88406 100644 --- a/src/com/silverwrist/venice/security/Role.java +++ b/src/com/silverwrist/venice/security/Role.java @@ -153,7 +153,7 @@ public class Role implements Comparable, SecLevels if (conf_high==null) { // initialize the "conference highband" vector - conf_high = new Vector(1); + conf_high = new Vector(2); conf_high.addElement(new Role(CONFERENCE_ANYADMIN,"Any Conference Administrator")); conf_high.addElement(new Role(CONFERENCE_HOST,"Conference Host")); conf_high.trimToSize(); @@ -278,4 +278,69 @@ public class Role implements Comparable, SecLevels } // end getSIGJoinList + public static List getConferenceReadList() + { + initAllSets(); + Vector rc = new Vector(); + rc.addAll(global_low); + rc.addAll(sig_low); + rc.addAll(conf_low); + rc.add(unrestricted_user); + return new ReadOnlyVector(rc); + + } // end getConferenceReadList + + public static List getConferencePostList() + { + initAllSets(); + Vector rc = new Vector(); + rc.addAll(global_low); + rc.addAll(sig_low); + rc.addAll(conf_low); + rc.add(unrestricted_user); + rc.addAll(conf_high); + return new ReadOnlyVector(rc); + + } // return getConferencePostList + + public static List getConferenceCreateList() + { + return getConferencePostList(); + + } // end getConferenceChangeList + + public static List getConferenceHideList() + { + initAllSets(); + Vector rc = new Vector(); + rc.addAll(conf_high); + rc.addAll(sig_high); + rc.add(global_high.firstElement()); + return new ReadOnlyVector(rc); + + } // end getConferenceHideList + + public static List getConferenceNukeList() + { + return getConferenceHideList(); + + } // end getConferenceNukeList + + public static List getConferenceChangeList() + { + return getConferenceHideList(); + + } // end getConferenceChangeList + + public static List getConferenceDeleteList() + { + initAllSets(); + Vector rc = new Vector(); + rc.addAll(sig_high); + rc.addAll(global_high); + rc.add(no_access); + return new ReadOnlyVector(rc); + + } // end getConferenceDeleteList + } // end class Role diff --git a/src/com/silverwrist/venice/servlets/ConfOperations.java b/src/com/silverwrist/venice/servlets/ConfOperations.java index e82537e..bded0b4 100644 --- a/src/com/silverwrist/venice/servlets/ConfOperations.java +++ b/src/com/silverwrist/venice/servlets/ConfOperations.java @@ -21,6 +21,7 @@ import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.log4j.*; +import com.silverwrist.util.StringUtil; import com.silverwrist.venice.ValidationException; import com.silverwrist.venice.core.*; import com.silverwrist.venice.servlets.format.*; @@ -56,6 +57,23 @@ public class ConfOperations extends VeniceServlet } // end makeCreateConferenceDialog + private EditConferenceDialog makeEditConferenceDialog() throws ServletException + { + final String desired_name = "EditConferenceDialog"; + DialogCache cache = DialogCache.getDialogCache(getServletContext()); + + if (!(cache.isCached(desired_name))) + { // create a template and save it off + EditConferenceDialog template = new EditConferenceDialog(); + cache.saveTemplate(template); + + } // end if + + // return a new copy + return (EditConferenceDialog)(cache.getNewDialog(desired_name)); + + } // end makeEditConferenceDialog + private static boolean validateNewTopic(ServletRequest request, String on_error) throws ErrorBox { boolean is_title_null, is_zp_null; @@ -98,7 +116,7 @@ public class ConfOperations extends VeniceServlet protected VeniceContent doVeniceGet(HttpServletRequest request, VeniceEngine engine, UserContext user, RenderData rdat) - throws ServletException, IOException, VeniceServletResult + throws ServletException, IOException, VeniceServletResult { // get the SIG SIGContext sig = getSIGParameter(request,user,true,"top"); @@ -167,6 +185,106 @@ public class ConfOperations extends VeniceServlet } // end if ("FX" command) + if (cmd.equals("E")) + { // "E" = "Edit Conference Settings" (requires conference parameter) + ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); + on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + + if (!(conf.canChangeConference())) + return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", + on_error); + + // create and return the Edit Conference dialog + EditConferenceDialog dlg = makeEditConferenceDialog(); + try + { // set up and return the dialog + dlg.setupDialog(sig,conf); + setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=E"); + return dlg; + + } // end try + catch (AccessError ae) + { // some sort of access error - display an error dialog + return new ErrorBox("Access Error",ae.getMessage(),on_error); + + } // end catch + catch (DataException de) + { // database error retrieving the conference information + return new ErrorBox("Database Error","Database error getting conference information: " + + de.getMessage(),on_error); + + } // end catch + + } // end if ("E" command) + + if (cmd.equals("A")) + { // "A" = "Manage Aliases" (requires conference parameter) + ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); + on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + + if (!(conf.canChangeConference())) + return new ErrorBox("Access Error","You are not permitted to change this conference's aliases.", + on_error); + + // process alias removal link + String remove = request.getParameter("rem"); + if (!(StringUtil.isStringEmpty(remove))) + { // do removal of an alias + try + { // go ahead and remove the alias! + conf.removeAlias(remove); + + } // end try + catch (AccessError ae) + { // some sort of access error - display an error dialog + return new ErrorBox("Access Error",ae.getMessage(),on_error); + + } // end catch + catch (DataException de) + { // database error creating the conference + return new ErrorBox("Database Error","Database error removing alias: " + de.getMessage(), + on_error); + + } // end catch + + } // end if (removing an alias) + + // display the "Manage Conference Aliases" display + try + { // generate the display box + setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=A"); + return new ManageConferenceAliases(sig,conf); + + } // end try + catch (DataException de) + { // error generating the display box + return new ErrorBox("Database Error","Database error displaying aliases: " + de.getMessage(), + on_error); + + } // end catch + + } // end if ("A" command) + + if (cmd.equals("RP") || cmd.equals("RR")) + { // "RP" = "Report Posters," "RR" = "Report Readers" (requires conference parameter) + ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); + on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + + try + { // generate the listing on this page + setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=" + cmd); + return new ConferenceActivity(sig,conf,cmd.equals("RP")); + + } // end try + catch (DataException de) + { // unable to get the data for the list + return new ErrorBox("Database Error","Database error displaying conference users: " + de.getMessage(), + on_error); + + } // end catch + + } // end if ("RP" and "RR" commands) + // Any unrecognized command shows us the conference list. on_error = "sigprofile?sig=" + sig.getSIGID(); try @@ -190,7 +308,7 @@ public class ConfOperations extends VeniceServlet protected VeniceContent doVenicePost(HttpServletRequest request, VeniceEngine engine, UserContext user, RenderData rdat) - throws ServletException, IOException, VeniceServletResult + throws ServletException, IOException, VeniceServletResult { // get the SIG SIGContext sig = getSIGParameter(request,user,true,"top"); @@ -331,12 +449,129 @@ public class ConfOperations extends VeniceServlet ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); on_error = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); - // TODO: finish this later + try + { // go set the pseud! + String pseud = request.getParameter("pseud"); + if (pseud!=null) + conf.setDefaultPseud(pseud); - return null; + } // end try + catch (DataException de) + { // oops - there was a problem! + return new ErrorBox("Database Error","Database error setting pseud: " + de.getMessage(),on_error); + + } // end catch + + return null; // don't change the view } // end if ("P" command) + if (cmd.equals("E")) + { // "E" = "Edit Conference Settings" (requires conference parameter) + ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); + on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + + if (!(conf.canChangeConference())) + return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", + on_error); + + // create the dialog class + EditConferenceDialog dlg = makeEditConferenceDialog(); + + if (dlg.isButtonClicked(request,"cancel")) + throw new RedirectResult(on_error); // they chickened out - go back to the conference list + + if (dlg.isButtonClicked(request,"update")) + { // they're changing the conference - do what you have to + dlg.loadValues(request); // load the form data + + try + { // run that baby! + dlg.doDialog(conf); + + // success - return back to where we started from + throw new RedirectResult(on_error); + + } // end try + catch (ValidationException ve) + { // validation error - throw it back to the user + dlg.resetOnError(sig,conf,ve.getMessage() + " Please try again."); + + } // end catch + catch (AccessError ae) + { // some sort of access error - display an error dialog + return new ErrorBox("Access Error",ae.getMessage(),on_error); + + } // end catch + catch (DataException de) + { // database error creating the conference + return new ErrorBox("Database Error","Database error updating conference: " + de.getMessage(), + on_error); + + } // end catch + + setMyLocation(request,"confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=E"); + return dlg; // redisplay the dialog + + } // end if + + } // end if ("E" command) + + if (cmd.equals("A")) + { // "A" = "Add Alias" (requires conference parameter) + ConferenceContext conf = getConferenceParameter(request,sig,true,on_error); + on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"; + + if (!(conf.canChangeConference())) + return new ErrorBox("Access Error","You are not permitted to change this conference's settings.", + on_error); + + String new_alias = request.getParameter("alias"); + if (StringUtil.isStringEmpty(new_alias)) + return null; // this is a no-op + + on_error = "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=A"; + String error_message = null; + + if (IDUtils.isValidVeniceID(new_alias)) + { // the alias we have netered is perfectly valid... + try + { // go ahead and add the alias! + conf.addAlias(new_alias); + + } // end try + catch (AccessError ae) + { // some sort of access error - display an error dialog + return new ErrorBox("Access Error",ae.getMessage(),on_error); + + } // end catch + catch (DataException de) + { // database error creating the conference + return new ErrorBox("Database Error","Database error adding alias: " + de.getMessage(), + on_error); + + } // end catch + + } // end if + else // alias is not valid + error_message = "The alias you have entered is not a valid identifier. Please try again."; + + // redisplay the "Manage Conference Aliases" display + try + { // generate the display box + setMyLocation(request,on_error); + return new ManageConferenceAliases(sig,conf); + + } // end try + catch (DataException de) + { // error generating the display box + return new ErrorBox("Database Error","Database error displaying aliases: " + de.getMessage(), + "confops?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&cmd=Q"); + + } // end catch + + } // end if ("A" command) + // unrecognized command! logger.error("invalid command to ConfOperations.doPost: " + cmd); return new ErrorBox("Internal Error","Invalid command to ConfOperations.doPost",on_error); diff --git a/src/com/silverwrist/venice/servlets/format/ConferenceActivity.java b/src/com/silverwrist/venice/servlets/format/ConferenceActivity.java new file mode 100644 index 0000000..6807b0b --- /dev/null +++ b/src/com/silverwrist/venice/servlets/format/ConferenceActivity.java @@ -0,0 +1,139 @@ +/* + * 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): + */ +package com.silverwrist.venice.servlets.format; + +import java.util.*; +import javax.servlet.*; +import javax.servlet.http.*; +import com.silverwrist.venice.core.*; + +public class ConferenceActivity implements JSPRender +{ + /*-------------------------------------------------------------------------------- + * Static data members + *-------------------------------------------------------------------------------- + */ + + // Attribute name for request attribute + protected static final String ATTR_NAME = "com.silverwrist.venice.content.ConferenceActivity"; + + /*-------------------------------------------------------------------------------- + * Attributes + *-------------------------------------------------------------------------------- + */ + + private SIGContext sig; // the SIG we're in + private ConferenceContext conf; // the conference being listed + private boolean posters; // is this a list of posters? + private List records; // the actual data records + + /*-------------------------------------------------------------------------------- + * Constructor + *-------------------------------------------------------------------------------- + */ + + public ConferenceActivity(SIGContext sig, ConferenceContext conf, boolean posters) throws DataException + { + this.sig = sig; + this.conf = conf; + this.posters = posters; + if (posters) + this.records = conf.getActivePosters(); + else + this.records = conf.getActiveReaders(); + + } // end constructor + + /*-------------------------------------------------------------------------------- + * External static functions + *-------------------------------------------------------------------------------- + */ + + public static ConferenceActivity retrieve(ServletRequest request) + { + return (ConferenceActivity)(request.getAttribute(ATTR_NAME)); + + } // end retrieve + + /*-------------------------------------------------------------------------------- + * Implementations from interface VeniceContent + *-------------------------------------------------------------------------------- + */ + + public String getPageTitle(RenderData rdat) + { + if (posters) + return "Users Posting in Conference " + conf.getName(); + else + return "Users Reading Conference " + conf.getName(); + + } // end getPageTitle + + /*-------------------------------------------------------------------------------- + * Implementations from interface JSPRender + *-------------------------------------------------------------------------------- + */ + + public void store(ServletRequest request) + { + request.setAttribute(ATTR_NAME,this); + + } // end store + + public String getTargetJSPName() + { + return "conf_activity.jsp"; + + } // end getTargetJSPName + + /*-------------------------------------------------------------------------------- + * External operations + *-------------------------------------------------------------------------------- + */ + + public String getConfName() + { + return conf.getName(); + + } // end getConfName + + public String getLocator() + { + return "sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + + } // end getLocator + + public boolean isPosterReport() + { + return posters; + + } // end isPosterReport + + public boolean anyElements() + { + return (records.size()>0); + + } // end anyElements + + public Iterator getRecordsIterator() + { + return records.iterator(); + + } // end getRecordsIterator + +} // end class ConferenceActivity diff --git a/src/com/silverwrist/venice/servlets/format/ContentDialog.java b/src/com/silverwrist/venice/servlets/format/ContentDialog.java index 6007668..af5a878 100644 --- a/src/com/silverwrist/venice/servlets/format/ContentDialog.java +++ b/src/com/silverwrist/venice/servlets/format/ContentDialog.java @@ -225,6 +225,12 @@ public class ContentDialog implements Cloneable, ContentRender *-------------------------------------------------------------------------------- */ + public void setTitle(String title) + { + this.title = title; + + } // end setTitle + public void setErrorMessage(String message) { this.error_message = message; diff --git a/src/com/silverwrist/venice/servlets/format/EditConferenceDialog.java b/src/com/silverwrist/venice/servlets/format/EditConferenceDialog.java new file mode 100644 index 0000000..5ef36b2 --- /dev/null +++ b/src/com/silverwrist/venice/servlets/format/EditConferenceDialog.java @@ -0,0 +1,149 @@ +/* + * 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): + */ +package com.silverwrist.venice.servlets.format; + +import java.util.*; +import com.silverwrist.util.StringUtil; +import com.silverwrist.venice.ValidationException; +import com.silverwrist.venice.security.Role; +import com.silverwrist.venice.core.*; + +public class EditConferenceDialog extends ContentDialog +{ + /*-------------------------------------------------------------------------------- + * Constructors + *-------------------------------------------------------------------------------- + */ + + public EditConferenceDialog() + { + super("Edit Conference:",null,"editconfform","confops"); + setHiddenField("cmd","E"); + setHiddenField("sig",""); + setHiddenField("conf",""); + + addFormField(new CDFormCategoryHeader("Basic Information")); + addFormField(new CDTextFormField("name","Conference Name",null,true,32,128)); + addFormField(new CDTextFormField("descr","Description",null,false,32,255)); + addFormField(new CDCheckBoxFormField("hide","Hide conference in the SIG's conference list",null,"Y")); + addFormField(new CDFormCategoryHeader("Security Information")); + addFormField(new CDRoleListFormField("read_lvl","Security level required to read conference",null,true, + Role.getConferenceReadList())); + addFormField(new CDRoleListFormField("post_lvl","Security level required to post to conference",null,true, + Role.getConferencePostList())); + addFormField(new CDRoleListFormField("create_lvl", + "Security level required to create new topics in conference",null, + true,Role.getConferenceCreateList())); + addFormField(new CDRoleListFormField("hide_lvl", + "Security level required to archive or freeze topics", + "(or to hide posts of which you are not the owner)",true, + Role.getConferenceHideList())); + addFormField(new CDRoleListFormField("nuke_lvl", + "Security level required to delete topics or nuke posts", + "(or to scribble posts of which you are not the owner)",true, + Role.getConferenceNukeList())); + addFormField(new CDRoleListFormField("change_lvl", + "Security level required to change conference attributes",null,true, + Role.getConferenceChangeList())); + addFormField(new CDRoleListFormField("delete_lvl", + "Security level required to delete conference",null,true, + Role.getConferenceDeleteList())); + addCommandButton(new CDImageButton("update","bn_update.gif","Update",80,24)); + addCommandButton(new CDImageButton("cancel","bn_cancel.gif","Cancel",80,24)); + + } // end constructor + + protected EditConferenceDialog(EditConferenceDialog other) + { + super(other); + + } // end constructor + + /*-------------------------------------------------------------------------------- + * External operations + *-------------------------------------------------------------------------------- + */ + + public void setupDialog(SIGContext sig, ConferenceContext conf) throws DataException, AccessError + { + setHiddenField("sig",String.valueOf(sig.getSIGID())); + setHiddenField("conf",String.valueOf(conf.getConfID())); + setTitle("Edit Conference: " + conf.getName()); + setFieldValue("name",conf.getName()); + setFieldValue("descr",conf.getDescription()); + if (conf.getHideList()) + setFieldValue("hide","Y"); + else + setFieldValue("hide",""); + setFieldValue("read_lvl",String.valueOf(conf.getReadLevel())); + setFieldValue("post_lvl",String.valueOf(conf.getPostLevel())); + setFieldValue("create_lvl",String.valueOf(conf.getCreateLevel())); + setFieldValue("hide_lvl",String.valueOf(conf.getHideLevel())); + setFieldValue("nuke_lvl",String.valueOf(conf.getNukeLevel())); + setFieldValue("change_lvl",String.valueOf(conf.getChangeLevel())); + setFieldValue("delete_lvl",String.valueOf(conf.getDeleteLevel())); + + } // end setupDialog + + public void doDialog(ConferenceContext conf) throws ValidationException, DataException, AccessError + { + final String yes = "Y"; // the "yes" string + validate(); // validate the dialog entries + + int read_lvl, post_lvl, create_lvl, hide_lvl, nuke_lvl, change_lvl, delete_lvl; + try + { // get all the security levels out of their form fields + read_lvl = Integer.parseInt(getFieldValue("read_lvl")); + post_lvl = Integer.parseInt(getFieldValue("post_lvl")); + create_lvl = Integer.parseInt(getFieldValue("create_lvl")); + hide_lvl = Integer.parseInt(getFieldValue("hide_lvl")); + nuke_lvl = Integer.parseInt(getFieldValue("nuke_lvl")); + change_lvl = Integer.parseInt(getFieldValue("change_lvl")); + delete_lvl = Integer.parseInt(getFieldValue("delete_lvl")); + + } // end try + catch (NumberFormatException nfe) + { // how rude! + throw new InternalStateError("somehow we got a non-numeric result from a numeric dropdown list!"); + + } // end catch + + // sweep through the conference and set the appropriate changes + conf.setName(getFieldValue("name")); + conf.setDescription(getFieldValue("descr")); + conf.setHideList(yes.equals(getFieldValue("hide"))); + conf.setSecurityLevels(read_lvl,post_lvl,create_lvl,hide_lvl,nuke_lvl,change_lvl,delete_lvl); + + } // end doDialog + + public void resetOnError(SIGContext sig, ConferenceContext conf, String message) + { + setHiddenField("sig",String.valueOf(sig.getSIGID())); + setHiddenField("conf",String.valueOf(conf.getConfID())); + setTitle("Edit Conference: " + conf.getName()); + setErrorMessage(message); + + } // end resetOnError + + public Object clone() + { + return new EditConferenceDialog(this); + + } // end clone + +} // end class EditConferenceDialog diff --git a/src/com/silverwrist/venice/servlets/format/ManageConference.java b/src/com/silverwrist/venice/servlets/format/ManageConference.java index c667f73..7ea12a3 100644 --- a/src/com/silverwrist/venice/servlets/format/ManageConference.java +++ b/src/com/silverwrist/venice/servlets/format/ManageConference.java @@ -120,6 +120,12 @@ public class ManageConference implements JSPRender } // end getLocator + public String getDefaultPseud() + { + return conf.getDefaultPseud(); + + } // end getDefaultPseud + public boolean displayAdminSection() { return conf.canChangeConference(); diff --git a/src/com/silverwrist/venice/servlets/format/ManageConferenceAliases.java b/src/com/silverwrist/venice/servlets/format/ManageConferenceAliases.java new file mode 100644 index 0000000..37820cf --- /dev/null +++ b/src/com/silverwrist/venice/servlets/format/ManageConferenceAliases.java @@ -0,0 +1,154 @@ +/* + * 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): + */ +package com.silverwrist.venice.servlets.format; + +import java.util.*; +import javax.servlet.*; +import javax.servlet.http.*; +import com.silverwrist.venice.core.*; + +public class ManageConferenceAliases implements JSPRender +{ + /*-------------------------------------------------------------------------------- + * Static data members + *-------------------------------------------------------------------------------- + */ + + // Attribute name for request attribute + protected static final String ATTR_NAME = "com.silverwrist.venice.content.ManageConferenceAliases"; + + /*-------------------------------------------------------------------------------- + * Attributes + *-------------------------------------------------------------------------------- + */ + + private SIGContext sig; // the SIG we're in + private ConferenceContext conf; // the conference being listed + private List aliases; // list of aliases generated + private String error_message; // error message to display + + /*-------------------------------------------------------------------------------- + * Constructors + *-------------------------------------------------------------------------------- + */ + + public ManageConferenceAliases(SIGContext sig, ConferenceContext conf) throws DataException + { + this.sig = sig; + this.conf = conf; + this.aliases = conf.getAliases(); + this.error_message = null; + + } // end constructor + + public ManageConferenceAliases(SIGContext sig, ConferenceContext conf, String message) throws DataException + { + this.sig = sig; + this.conf = conf; + this.aliases = conf.getAliases(); + this.error_message = message; + + } // end constructor + + /*-------------------------------------------------------------------------------- + * External static functions + *-------------------------------------------------------------------------------- + */ + + public static ManageConferenceAliases retrieve(ServletRequest request) + { + return (ManageConferenceAliases)(request.getAttribute(ATTR_NAME)); + + } // end retrieve + + /*-------------------------------------------------------------------------------- + * Implementations from interface VeniceContent + *-------------------------------------------------------------------------------- + */ + + public String getPageTitle(RenderData rdat) + { + return "Manage Conference Aliases: " + conf.getName(); + + } // end getPageTitle + + /*-------------------------------------------------------------------------------- + * Implementations from interface JSPRender + *-------------------------------------------------------------------------------- + */ + + public void store(ServletRequest request) + { + request.setAttribute(ATTR_NAME,this); + + } // end store + + public String getTargetJSPName() + { + return "manage_aliases.jsp"; + + } // end getTargetJSPName + + /*-------------------------------------------------------------------------------- + * External operations + *-------------------------------------------------------------------------------- + */ + + public int getSIGID() + { + return sig.getSIGID(); + + } // end getSIGID + + public int getConfID() + { + return conf.getConfID(); + + } // end getConfID + + public String getConfName() + { + return conf.getName(); + + } // end getConfName + + public String getLocator() + { + return "sig=" + sig.getSIGID() + "&conf=" + conf.getConfID(); + + } // end getLocator + + public boolean canRemoveAliases() + { + return (aliases.size()>1); + + } // end canRemoveAliases + + public Iterator getAliasIterator() + { + return aliases.iterator(); + + } // end getAliasIterator + + public String getErrorMessage() + { + return error_message; + + } // end getErrorMessage + +} // end class ManageConferenceAliases diff --git a/web/format/conf_activity.jsp b/web/format/conf_activity.jsp new file mode 100644 index 0000000..65b3156 --- /dev/null +++ b/web/format/conf_activity.jsp @@ -0,0 +1,89 @@ +<%-- + 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.*" %> +<% + ConferenceActivity data = ConferenceActivity.retrieve(request); + Variables.failIfNull(data); + RenderData rdat = RenderConfig.createRenderData(application,request,response); +%> +<% rdat.writeContentHeader(out,(data.isPosterReport() ? "Posters in Conference:" + : "Readers in Conference:"),data.getConfName()); %> +<%= rdat.getStdFontTag(null,2) %> + ">Return to + Manage Conference Menu +

+ +<% if (data.anyElements()) { %> + + + + <% if (data.isPosterReport()) { %> + + + <% } else { %> + + + <% } // end if %> + + <% Iterator it = data.getRecordsIterator(); %> + <% while (it.hasNext()) { %> + <% ActiveUser usr = (ActiveUser)(it.next()); %> + + + <% if (data.isPosterReport()) { %> + + + <% } else { %> + + + <% } // end if %> + + <% } // end while %> +
<%= rdat.getStdFontTag(null,2) %>User Name<%= rdat.getStdFontTag(null,2) %>Last Posted<%= rdat.getStdFontTag(null,2) %>Last Read<%= rdat.getStdFontTag(null,2) %>Last Read<%= rdat.getStdFontTag(null,2) %>Last Posted
<%= rdat.getStdFontTag(null,2) %> + " TARGET="_blank"><%= usr.getName() %> + <%= rdat.getStdFontTag(null,2) %> + <%= StringUtil.encodeHTML(rdat.formatDateForDisplay(usr.getLastWrite())) %> + <%= rdat.getStdFontTag(null,2) %> + <% if (usr.getLastRead()==null) { %> + Never + <% } else { %> + <%= StringUtil.encodeHTML(rdat.formatDateForDisplay(usr.getLastRead())) %> + <% } // end if %> + <%= rdat.getStdFontTag(null,2) %> + <%= StringUtil.encodeHTML(rdat.formatDateForDisplay(usr.getLastRead())) %> + <%= rdat.getStdFontTag(null,2) %> + <% if (usr.getLastWrite()==null) { %> + Never + <% } else { %> + <%= StringUtil.encodeHTML(rdat.formatDateForDisplay(usr.getLastWrite())) %> + <% } // end if %> +
+<% } else { %> + <%= rdat.getStdFontTag(null,2) %> + <% if (data.isPosterReport()) { %> + No posters to conference "<%= StringUtil.encodeHTML(data.getConfName()) %>" found. + <% } else { %> + No readers of conference "<%= StringUtil.encodeHTML(data.getConfName()) %>" found. + <% } // end if %> + +<% } // end if %> +

<% rdat.writeFooter(out); %> diff --git a/web/format/manage_aliases.jsp b/web/format/manage_aliases.jsp new file mode 100644 index 0000000..411574c --- /dev/null +++ b/web/format/manage_aliases.jsp @@ -0,0 +1,71 @@ +<%-- + 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 = "java.net.URLEncoder" %> +<%@ 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.*" %> +<% + ManageConferenceAliases data = ManageConferenceAliases.retrieve(request); + Variables.failIfNull(data); + RenderData rdat = RenderConfig.createRenderData(application,request,response); +%> +<% if (rdat.useHTMLComments()) { %><% } %> +<% rdat.writeContentHeader(out,"Managing Conference Aliases:",data.getConfName()); %> +<%= rdat.getStdFontTag(null,2) %> + ">Return to + Manage Conference Menu

+ + <% if (data.getErrorMessage()!=null) { %> + <%= rdat.getStdFontTag("red",2) %><%= StringUtil.encodeHTML(data.getErrorMessage()) %>

+ <% } // end if %> + + Current Aliases:

+ + <% Iterator it = data.getAliasIterator(); %> + <% while (it.hasNext()) { %> + <% String name = (String)(it.next()); %> + + + + + + + <% } // end while %> +
" ALT="*" + WIDTH=14 HEIGHT=14 BORDER=0><%= rdat.getStdFontTag(null,2) %><%= StringUtil.encodeHTML(name) %>     + <% if (data.canRemoveAliases()) { %> + ">" + ALT="Remove" WIDTH=80 HEIGHT=24 BORDER=0> + <% } else { %> <% } %> +

+ + Add New Alias:

+

"> + + + +   + " NAME="add" ALT="Add" + WIDTH=80 HEIGHT=24 BORDER=0> +
+ + +<% rdat.writeFooter(out); %> diff --git a/web/format/manage_conf.jsp b/web/format/manage_conf.jsp index bf2027c..63ebff6 100644 --- a/web/format/manage_conf.jsp +++ b/web/format/manage_conf.jsp @@ -39,9 +39,9 @@ <%= rdat.getStdFontTag(null,2) %> Set default pseud for conference: -   +   " NAME="set" ALT="Set" - WIDTH=80 HEIGHT=24 BORDER=0> + WIDTH=80 ALIGN=BOTTOM HEIGHT=24 BORDER=0>

@@ -53,7 +53,19 @@ <% if (data.displayAdminSection()) { %> <% if (rdat.useHTMLComments()) { %><% } %> - <%-- TODO: fill this in --%> + <% rdat.writeContentHeader(out,"Host Tools",null); %> + <%= rdat.getStdFontTag(null,2) %> + ">Change + Conference Information

+ ">Manage + Conference Aliases

+ Manage Conference Members

+ ">Conference + Posters Report

+ ">Conference + Readers/Lurkers Report

+ Delete Conference

+ <% } // end if (displaying admin section) %> <% rdat.writeFooter(out); %> diff --git a/web/format/newtopic.jsp b/web/format/newtopic.jsp index e726762..d7a5f53 100644 --- a/web/format/newtopic.jsp +++ b/web/format/newtopic.jsp @@ -68,10 +68,10 @@ " ALT="Preview" NAME="preview" WIDTH=80 HEIGHT=24 BORDER=0> -    +   " ALT="Post" NAME="post" WIDTH=80 HEIGHT=24 BORDER=0> -    +   " ALT="Cancel" NAME="cancel" WIDTH=80 HEIGHT=24 BORDER=0> diff --git a/web/format/posts.jsp b/web/format/posts.jsp index 20a6906..bab79f3 100644 --- a/web/format/posts.jsp +++ b/web/format/posts.jsp @@ -45,7 +45,7 @@ ">" ALT="Topic List" WIDTH=80 HEIGHT=24 BORDER=0> -    +   <% if (data.isTopicHidden()) { %> ">" ALT="Show Topic" WIDTH=80 HEIGHT=24 @@ -55,25 +55,25 @@ SRC="<%= rdat.getFullImagePath("bn_hide_topic.gif") %>" 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 @@ -85,7 +85,7 @@ <% } // end if %> <% } // end if %> <% if (data.canArchiveTopic()) { %> -    +   <% if (data.isTopicArchived()) { %> ">" ALT="Unarchive Topic" WIDTH=80 @@ -97,7 +97,7 @@ <% } // end if %> <% } // end if %> <% if (data.canDeleteTopic()) { %> -    +   ">" ALT="Delete Topic" WIDTH=80 HEIGHT=24 BORDER=0> @@ -112,7 +112,7 @@ -    +   " NAME="Go" ALT="Go" ALIGN=BOTTOM WIDTH=80 HEIGHT=24 BORDER=0> @@ -259,7 +259,7 @@ ">" ALT="Topic List" WIDTH=80 HEIGHT=24 BORDER=0> -    +   <% if (data.isTopicHidden()) { %> ">" ALT="Show Topic" WIDTH=80 HEIGHT=24 @@ -269,18 +269,18 @@ SRC="<%= rdat.getFullImagePath("bn_hide_topic.gif") %>" 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 %> @@ -317,11 +317,11 @@ " 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 %> diff --git a/web/format/preview.jsp b/web/format/preview.jsp index 5355a62..77454b8 100644 --- a/web/format/preview.jsp +++ b/web/format/preview.jsp @@ -64,15 +64,15 @@ " ALT="Preview" NAME="preview" WIDTH=80 HEIGHT=24 BORDER=0> -    +   " ALT="Post & Reload" NAME="post" WIDTH=80 HEIGHT=24 BORDER=0> <% if (!(StringUtil.isStringEmpty(data.getNextVal()))) { %> -    +   " ALT="Post & Go Next" NAME="postnext" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %> -    +   " ALT="Cancel" NAME="cancel" WIDTH=80 HEIGHT=24 BORDER=0> diff --git a/web/format/slippage.jsp b/web/format/slippage.jsp index c457486..e816d4c 100644 --- a/web/format/slippage.jsp +++ b/web/format/slippage.jsp @@ -88,15 +88,15 @@ " ALT="Preview" NAME="preview" WIDTH=80 HEIGHT=24 BORDER=0> -    +   " ALT="Post & Reload" NAME="post" WIDTH=80 HEIGHT=24 BORDER=0> <% if (!(StringUtil.isStringEmpty(data.getNextVal()))) { %> -    +   " ALT="Post & Go Next" NAME="postnext" WIDTH=80 HEIGHT=24 BORDER=0> <% } // end if %> -    +   " ALT="Cancel" NAME="cancel" WIDTH=80 HEIGHT=24 BORDER=0> diff --git a/web/format/topics.jsp b/web/format/topics.jsp index 8a7522b..d99061c 100644 --- a/web/format/topics.jsp +++ b/web/format/topics.jsp @@ -33,22 +33,23 @@

" ALT="Conference List" WIDTH=80 HEIGHT=24 - BORDER=0>   + BORDER=0>  <% if (data.canCreateTopic()) { %> <% tmp = rdat.getEncodedServletPath("confops?" + data.getLocator() + "&cmd=T"); %> " ALT="Add Topic" - WIDTH=80 HEIGHT=24 BORDER=0>   + WIDTH=80 HEIGHT=24 BORDER=0>  <% } // end if %> <% if (data.canDoReadNew()) { %> ">" ALT="Read New" WIDTH=80 HEIGHT=24 - BORDER=0>   + BORDER=0>  <% } // end if %> - " - ALT="Manage" WIDTH=80 HEIGHT=24 BORDER=0>   + ">" ALT="Manage" WIDTH=80 HEIGHT=24 + BORDER=0>  <% if (data.canAddToHotlist()) { %> " - ALT="Add to HotList" WIDTH=80 HEIGHT=24 BORDER=0>   + ALT="Add to HotList" WIDTH=80 HEIGHT=24 BORDER=0>  <% } // end if %>
<% if (data.anyTopics()) { %> diff --git a/web/images/bn_add.gif b/web/images/bn_add.gif new file mode 100644 index 0000000..2390ae1 Binary files /dev/null and b/web/images/bn_add.gif differ diff --git a/web/images/bn_remove.gif b/web/images/bn_remove.gif new file mode 100644 index 0000000..2b8e246 Binary files /dev/null and b/web/images/bn_remove.gif differ diff --git a/web/images/bn_set.gif b/web/images/bn_set.gif new file mode 100644 index 0000000..b19c0d1 Binary files /dev/null and b/web/images/bn_set.gif differ