%@ page import="java.util.*, java.text.*, com.Yasna.forum.*, com.Yasna.forum.util.*" %> <%@ include file="../authenticate_i.jsp" %> <% ///////////// // Header // The header file looks for the following variables. String pageTitle = "Boulder Biodiesel Forum"; %> <%@ include file="../header_i.jsp" %> <%! ////////////////////////////////// // customize the look of this page // Colors of the table that displays a list of forums final static String threadTableBgcolor = "#006600"; final static String threadTableFgcolor = "#99ff66"; final static String threadTableHeaderFgcolor = "#66dd33"; final static String threadTableHiLiteColor = "#00ff00"; final static String threadPagingRowColor = "#99ee66"; %> <%! /////////////////// // global variables // number of threads to display per page: private final int[] threadRange = { 15,25,50,100 }; // default starting index and number of threads to display // per page (for paging) private final int DEFAULT_RANGE = 15; private final int START_INDEX = 0; %> <% ////////////////////// // get parameters int range = ParamUtils.getIntParameter(request,"range",DEFAULT_RANGE); int start = ParamUtils.getIntParameter(request,"start",0); int forumID = ParamUtils.getIntParameter(request,"forum",1); %> <% //////////////////// // Load up the forum // If the forum is not found, a ForumNotFoundException will be thrown // and the user will be redirected to the error page Forum forum = forumFactory.getForum(forumID); // Get some properties of the forum String forumName = forum.getName(); int numThreads = forum.getThreadCount(); int numMessages = forum.getMessageCount(); %> <% boolean canPost = false; try { canPost = forum.hasPermission(ForumPermissions.CREATE_THREAD); } catch (Exception ignore) {} %> <% ///////////// // Toolbar // The toolbar file looks for the following variables. To make a particular // "button" not appear, set a variable to null. boolean showToolbar = true; String viewLink = null; String postLink = (canPost) ? "../forum/post.jsp?forum=" + forumID : null; String replyLink = null; String searchLink = null; // we can show a link to a user account if the user is logged in (handled // in the toolbar jsp) String accountLink = "../forum/userAccount.jsp"; %> <%@ include file="../toolbar_i.jsp" %> <% //////////////////// // Breadcrumb bar // The breadcrumb file looks for the variable "breadcrumbs" which // represents a navigational path, ie "Home > My Forum > Hello World" String[][] breadcrumbs = { { "Home", "../" }, { "Forums", "./" }, { forumName, "" } }; %> <%@ include file="../breadcrumb_i.jsp" %> <%@ include file="../forum/search_i.jsp" %> <%-- table for list of threads --%>
Topics: <%= numThreads %>, Messages: <%= numMessages %>
|
||||||||
<%-- range options --%>
<%-- /range options --%> <% ///////////////////// // page footer %> <%@ include file="../footer_i.jsp" %>