alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td width="100%" nowrap> <a class="nav" href="<%=indexUrl%>"> »  <a class="nav" href="index">Admin CP »  Forum/Category Management </td> </tr> </table> <br/> <table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center"> <tr class="pagedesc"> <td> <b>Forum/Category Management is where you can manage all aspects of your forums/categories. It is very intuitive and easy to use. To reorder your forums or categories, just click <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/up.gif" border="0"> to bring it up, or click <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/down.gif" border="0"> to move it down. (Note that if the order equals 0, you cannot move it up.) To add new forum in a category, click the AddForum link in that category. To edit your forum/category, just click the Edit picture (<img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/button_edit.gif" border="0">). <br/>Choose below tasks to continue:
<% CategoryCache categoryCache = CategoryCache.getInstance(); ForumCache forumCache = ForumCache.getInstance(); Collection categoryBeans = categoryCache.getBeans(); Collection forumBeans = forumCache.getBeans(); %> <%if ( permission.canAddCategory() ) {%> <a href="addcategory" class="command">Add new Category
<%}%> <%if ( permission.canAddForum() && (categoryBeans.size() > 0) ) {%> <a href="addforum" class="command">Add new Forum
<%}%> </td> </tr> </table> <br/> <table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center"> <tr class="theader"> <td colspan="2">Name/Description <td align="center"> <td align="center">Creation Date <td align="center">Type <td align="center">Mode Moderation <td align="center">Add Forum <td align="center">Group Permission <td align="center">Member Permission <td align="center">Edit <td align="center">Delete </tr> <% for (Iterator catIterator = categoryBeans.iterator(); catIterator.hasNext(); ) { CategoryBean categoryBean = (CategoryBean)catIterator.next(); %> <tr class="tcat"> <td colspan="2"> <b><%=categoryBean.getCategoryName()%>
<%=MyUtil.filter(categoryBean.getCategoryDesc(), false/*html*/, true/*emotion*/, true/*mvnCode*/, true/*newLine*/, true/*URL*/)%> </td> <td> <table width="100%"> <tr class="tcat"> <td width="40%" align="center"> <% if (categoryBean.getCategoryOrder() > 0) { %> <a href="updatecategoryorder?category=<%=categoryBean.getCategoryID()%>&action=up"><fmt:message key=" title=""> <% } %> </td> <td width="40%" align="center"><%=categoryBean.getCategoryOrder()%> <td width="30%" align="center"><fmt:message key=" title=""> </tr> </table> </td> <td align="center"><%=onlineUser.getGMTTimestampFormat(categoryBean.getCategoryCreationDate())%> <td align="center"> <td align="center"> <td align="center"> <%if ( permission.canAddForum() ) {%> <a href="addforum?category=<%=categoryBean.getCategoryID()%>" class="command">Add Forum <%}%> </td> <td align="center"> <td align="center"> <td align="center"> <%if ( permission.canEditCategory() ) {%> <a href="editcategory?category=<%=categoryBean.getCategoryID()%>">Edit category: <%=categoryBean.getCategoryName()%> <%}%> </td> <td align="center"> <%if ( (forumCache.getNumberOfBeans(categoryBean.getCategoryID()) == 0) && (permission.canDeleteCategory()) ) {%> <a class="command" href="deletecategory?category=<%=categoryBean.getCategoryID()%>">Delete <%}%> </td> </tr> <% int forumCountInCurrentCategory = 0; for (Iterator forumIterator = forumBeans.iterator(); forumIterator.hasNext(); ) { ForumBean forumBean = (ForumBean)forumIterator.next(); if (forumBean.getCategoryID() == categoryBean.getCategoryID()) { forumCountInCurrentCategory++; String color = (forumCountInCurrentCategory%2 == 1) ? "trow1" : "trow2"; %> <tr class="<%=color%>"> <td width="20" align="center" nowrap> <td width="30%"> <b <%if(forumBean.getForumStatus() == ForumBean.FORUM_STATUS_DISABLED){%>class="disabledItem"<%}%>><%=forumBean.getForumName()%>
<%=MyUtil.filter(forumBean.getForumDesc(), false/*html*/, true/*emotion*/, true/*mvnCode*/, true/*newLine*/, true/*URL*/)%> </td> <td> <table width="100%"> <tr class="<%=color%>"> <td width="30%" align="center"> <% if (forumBean.getForumOrder() > 0) { %> <a href="updateforumorder?forum=<%=forumBean.getForumID()%>&action=up"><fmt:message key=" title=""> <% } %> </td> <td width="40%" align="center"><%=forumBean.getForumOrder()%> <td width="30%" align="center"><fmt:message key=" title=""> </tr> </table> </td> <td align="center"><%=onlineUser.getGMTTimestampFormat(forumBean.getForumCreationDate())%> <td align="center"><%=forumBean.getForumTypeName()%> <td align="center"><%=forumBean.getForumModeName()%> <td align="center"> <td align="center"> <%if ( permission.canAssignToForum(forumBean.getForumID()) ) {%> <a href="assigngrouptoforum?forum=<%=forumBean.getForumID()%>">Edit Group Permissions for forum : <%=forumBean.getForumName()%> <%}%> </td> <td align="center"> <%if ( permission.canAssignToForum(forumBean.getForumID()) ) {%> <a href="assignmembertoforum?forum=<%=forumBean.getForumID()%>">Edit Member Permissions for forum : <%=forumBean.getForumName()%> <%}%> </td> <td align="center"> <%if ( permission.canEditForum(forumBean.getForumID()) ) {%> <a href="editforum?forum=<%=forumBean.getForumID()%>">Edit forum: <%=forumBean.getForumName()%> <%}%> </td> <td align="center"> <%if ( permission.canDeleteForum(forumBean.getForumID()) ) {%> <a class="command" href="deleteforum?forum=<%=forumBean.getForumID()%>">Delete <%}%> </td> </tr> <% }//if } //for forumIndex if (forumCountInCurrentCategory == 0) { %> <tr class="trow1"> <td colspan="11" align="center">There are no forums in this category. Click AddForum to add one. </tr> <% } } //for catIndex if (categoryBeans.size() == 0) { %> <tr class="trow2"> <td colspan="11" align="center">There are no categories. </tr> <% }// if no category %> </table> <br/> </fmt:bundle> <%@ include file="footer.jsp"%> </body> </html>

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/forummanagement.jsp,v 1.47 2005/01/20 12:06:34 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.47 $
 - $Date: 2005/01/20 12:06:34 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2005 by MyVietnam.net
 -
 - This program is free software; you can redistribute it and/or
 - modify it under the terms of the GNU General Public License
 - as published by the Free Software Foundation; either version 2
 - of the License, or any later version.
 -
 - All copyright notices regarding mvnForum MUST remain intact
 - in the scripts and in the outputted HTML.
 - The "powered by" text/logo with a link back to
 - http://www.mvnForum.com and http://www.MyVietnam.net in the
 - footer of the pages MUST remain visible when the pages
 - are viewed on the internet or intranet.
 -
 - This program is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 - GNU General Public License for more details.
 -
 - You should have received a copy of the GNU General Public License
 - along with this program; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 -
 - Support can be obtained from support forums at:
 - http://www.mvnForum.com/mvnforum/index
 -
 - Correspondence and Marketing Questions can be sent to:
 - info@MyVietnam.net
 -
 - @author: Minh Nguyen  minhnn@MyVietnam.net
 - @author: Mai  Nguyen  mai.nh@MyVietnam.net
 --%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.MyUtil" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<html>
<head>
  <title> - Forum/Category Management
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%@ include file="header.jsp"%>
<br/>

<table width="95%" align="center">
  <tr class="nav">
    <td>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.