<%-- Forum listing cell: --%>
<% // If the category is not the root category, print out a link to go
// back to the root category
if (category.getID() != rootCategory.getID()) {
%>
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<%-- back to main category --%>
<%= SkinUtils.getLocalizedString("skin.default.index.back_to_main_cat",locale) %>
<% List parents = new java.util.LinkedList();
parents.add(category);
ForumCategory parentCat = category.getParentCategory();
while (parentCat.getID() != rootCategory.getID()) {
parents.add(0, parentCat);
parentCat = parentCat.getParentCategory();
}
for (int i=0; i
»
<%= c.getName() %>
<% }
else {
%>
»
<%= c.getName() %>
<% }
}
%>
|
<% } %>
"
cellpadding="0" cellspacing="0" border="0" width="100%">
"
cellpadding="4" cellspacing="1" border="0" width="100%">
">
 |
"
color="<%= JiveGlobals.getJiveProperty("skin.default.tableHeaderTextColor") %>"
face="<%= JiveGlobals.getJiveProperty("skin.default.headerFontFace") %>">
<%-- FORUM NAME --%>
FORUM / CATEGORY NAME
|
"
color="<%= JiveGlobals.getJiveProperty("skin.default.tableHeaderTextColor") %>"
face="<%= JiveGlobals.getJiveProperty("skin.default.headerFontFace") %>">
<%-- TOPICS/MESSAGES --%>
<%= SkinUtils.getLocalizedString("skin.default.index.topics_messages",locale).toUpperCase(locale) %>
|
"
color="<%= JiveGlobals.getJiveProperty("skin.default.tableHeaderTextColor") %>"
face="<%= JiveGlobals.getJiveProperty("skin.default.headerFontFace") %>">
<%-- LAST POST --%>
<%= SkinUtils.getLocalizedString("skin.default.global.last_post",locale).toUpperCase(locale) %>
|
<% // Start by displaying the name of the category, if the current
// category is not the root category:
if (rootCategory.getID() != category.getID()) {
%>
">
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.categoryFontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.categoryTextColor") %>">
<%= category.getName() %>
|
<% }
// Next, list all forums in the current category:
Iterator forums = category.forums();
// If there are no forums in this category and if this is not the
// root category, print a message that indicates there are no forums
// in this category:
if (!forums.hasNext() && rootCategory.getID() != category.getID()) {
%>
">
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= SkinUtils.getLocalizedString("skin.default.index.no_forums_in_category", locale) %>
|
<% }
while (forums.hasNext()) {
Forum forum = (Forum)forums.next();
String description = forum.getDescription();
ForumMessage lastPost = null;
if (!"false".equals(JiveGlobals.getJiveProperty("skin.default.showLastPostLink"))) {
lastPost = SkinUtils.getLastPost(forum);
}
%>
">
<% if (SkinUtils.isNew(forum, lastVisited)) { %>
<% } else { %>
<% } %>
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= forum.getName() %>
<%= (description!=null)?description:"" %>
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= SkinUtils.getLocalizedNumber(forum.getThreadCount(),locale) %> <%= SkinUtils.getLocalizedString("skin.default.global.slash",locale) %> <%= SkinUtils.getLocalizedNumber(forum.getMessageCount(),locale) %>
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= SkinUtils.formatDate(request,pageUser,forum.getModifiedDate()) %>
<% if (lastPost != null) {
User lastPostAuthor = lastPost.getUser();
%>
">
<% StringBuffer buf = new StringBuffer("[[name]] »");
String lastPostLink = buf.toString();
if (lastPostAuthor == null) {
String name = lastPost.getProperty("name");
if (name != null) {
lastPostLink = StringUtils.replace(lastPostLink, "[[name]]", ""+name+"");
List nameDisplay = new ArrayList(1);
nameDisplay.add(lastPostLink);
%>
<%= SkinUtils.getLocalizedString("skin.default.global.last_post_by", locale, nameDisplay) %>
<% } else {
lastPostLink = StringUtils.replace(lastPostLink, "[[name]]", "Guest");
List nameDisplay = new ArrayList(1);
nameDisplay.add(lastPostLink);
%>
<%= SkinUtils.getLocalizedString("skin.default.global.last_post_by", locale, nameDisplay) %>
<% }
}
else {
lastPostLink = StringUtils.replace(lastPostLink, "[[name]]", lastPostAuthor.getUsername());
List nameDisplay = new ArrayList(1);
nameDisplay.add(lastPostLink);
%>
<%= SkinUtils.getLocalizedString("skin.default.global.last_post_by", locale, nameDisplay) %>
<% } %>
<% } %>
|
<% } // end of while loop to display forums
// Now display any subcategories in this forum:
Iterator subCategories = category.categories();
while (subCategories.hasNext()) {
ForumCategory subCategory = (ForumCategory)subCategories.next();
// There are 2 ways to display this subcategory. It will be either
// "closed" or "open". "Closed" means we'll print out the category
// name and we'll make it a link so the user can click on it and
// drill down to the category. No forums will be displayed. "Open"
// means we'll show the category name (not a link) and the forums
// under it. We only show a category open when 1) the current
// category is the root category and 2) when the total depth of the
// category tree is 1 (meaning only 1 level of subcategories).
// "Closed" case:
if (category.getID() != rootCategory.getID() || !oneCategoryLevel) {
%>
">
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.categoryFontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.categoryTextColor") %>">
<%= subCategory.getName() %>
<% if (subCategory.getDescription() != null) { %>
<%= subCategory.getDescription() %>
<% } %>
|
<% }
// "Open" case:
else {
%>
">
"
face="<%= JiveGlobals.getJiveProperty("skin.default.categoryFontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.categoryTextColor") %>">
<%= subCategory.getName() %>
<% if (subCategory.getDescription() != null) { %>
<%= subCategory.getDescription() %>
<% } %>
|
<% // Iterate through the forums in this subcategory, print them:
Iterator subForums = subCategory.forums();
if (!subForums.hasNext()) {
%>
">
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= SkinUtils.getLocalizedString("skin.default.index.no_forums_in_category", locale) %>
|
<% }
while (subForums.hasNext()) {
Forum forum = (Forum)subForums.next();
String description = forum.getDescription();
ForumMessage lastPost = null;
if (!"false".equals(JiveGlobals.getJiveProperty("skin.default.showLastPostLink"))) {
lastPost = SkinUtils.getLastPost(forum);
}
%>
">
<% if (SkinUtils.isNew(forum, lastVisited)) { %>
<% } else { %>
<% } %>
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= forum.getName() %>
<%= (description!=null)?description:"" %>
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= SkinUtils.getLocalizedNumber(forum.getThreadCount(),locale) %> <%= SkinUtils.getLocalizedString("skin.default.global.slash",locale) %> <%= SkinUtils.getLocalizedNumber(forum.getMessageCount(),locale) %>
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= SkinUtils.formatDate(request,pageUser,forum.getModifiedDate()) %>
<% if (lastPost != null) {
User lastPostAuthor = lastPost.getUser();
%>
">
<% StringBuffer buf = new StringBuffer("[[name]] »");
String lastPostLink = buf.toString();
if (lastPostAuthor == null) {
String name = lastPost.getProperty("name");
if (name != null) {
lastPostLink = StringUtils.replace(lastPostLink, "[[name]]", ""+name+"");
List nameDisplay = new ArrayList(1);
nameDisplay.add(lastPostLink);
%>
<%= SkinUtils.getLocalizedString("skin.default.global.last_post_by", locale, nameDisplay) %>
<% } else {
lastPostLink = StringUtils.replace(lastPostLink, "[[name]]", "Guest");
List nameDisplay = new ArrayList(1);
nameDisplay.add(lastPostLink);
%>
<%= SkinUtils.getLocalizedString("skin.default.global.last_post_by", locale, nameDisplay) %>
<% }
}
else {
lastPostLink = StringUtils.replace(lastPostLink, "[[name]]", lastPostAuthor.getUsername());
List nameDisplay = new ArrayList(1);
nameDisplay.add(lastPostLink);
%>
<%= SkinUtils.getLocalizedString("skin.default.global.last_post_by", locale, nameDisplay) %>
<% } %>
<% } %>
|
<% } // end while to print out sub-forums
} // end "open" case
} // end while for print out subscategories
%>
|
<%-- The message "Denotes new messages since your last visit": --%>
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<%= SkinUtils.getLocalizedString("skin.default.index.new_messages_explained",locale) %>
|
<%-- end forum listing cell --%>
|
 |
<%-- Popular discussions / search box cell: --%>
<% // Only show search if it is enabled:
if ("true".equals(JiveGlobals.getJiveProperty("search.enabled"))) {
%>
<%@ include file="searchbox.jsp" %>
<% } // end if search is enabled %>
<% // Get an iterator of popular discussions
Iterator popularDiscussions = forumFactory.popularThreads();
// only show the popular discussions box if there *are* popular discussions:
if (popularDiscussions.hasNext()) {
%>
"
cellpadding="1" cellspacing="0" border="0" width="200">
"
cellpadding="4" cellspacing="0" border="0" width="100%">
|
"
color="<%= JiveGlobals.getJiveProperty("skin.default.sidebarHeaderTextColor") %>"
face="<%= JiveGlobals.getJiveProperty("skin.default.headerFontFace") %>">
<%= SkinUtils.getLocalizedString("skin.default.index.popular_discussions",locale).toUpperCase(locale) %>
|
|
"
cellpadding="3" cellspacing="0" border="0" width="100%">
<% // Loop through the iterator of popular discussions:
while (popularDiscussions.hasNext()) {
ForumThread thread = (ForumThread)popularDiscussions.next();
String subject = thread.getName();
// Clip the length of the subject if it's over a certain length.
// This prevents long subjects from screwing up the layout of
// the page.
if (subject.length() > 25) {
subject = StringUtils.chopAtWord(subject, 50)
+ SkinUtils.getLocalizedString("skin.default.global.elipse",locale);
}
// Get the forum associated with this thread
Forum forum = thread.getForum();
// Number of replies to the thread
int numReplies = thread.getMessageCount()-1;
%>
|
<%-- Bullet: --%>
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
|
"
face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<%= subject %>
<%= SkinUtils.getLocalizedString("skin.default.global.replies",locale) %><%= SkinUtils.getLocalizedString("skin.default.global.colon",locale) %>
<%= SkinUtils.getLocalizedNumber(numReplies,locale) %>
"
face="<%= JiveGlobals.getJiveProperty("skin.default.buttonFontFace") %>">
<%= forum.getName() %>
|
<% } // end while %>
|
<% } // end if popularDiscussions.hasNext() %>
<%-- end popular discussions / search box cell --%>
|