alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
</tr> <tr> <#list poll.options as option> <tr> <td>${option.text} <td nowrap="nowrap" width="210"> <img class="icon_vote_lcap" src="${contextPath}/images/transp.gif" alt="" /> <td nowrap="nowrap">[ ${option.voteCount} ] </tr> </#list> </tr> <tr> <td colspan="4" class="strong" align="center">${I18n.getMessage("PostShow.pollTotalVotes")} ${poll.totalVotes} </tr> </table> </#macro> <#macro row1Class topic><#if topic.type == TOPIC_ANNOUNCE>row1Announce<#elseif topic.type == TOPIC_STICKY>row1sticky<#else>row1 <#macro row2Class topic><#if topic.type == TOPIC_ANNOUNCE>row2Announce<#elseif topic.type == TOPIC_STICKY>row2sticky<#else>row2 <#macro row3Class topic><#if topic.type == TOPIC_ANNOUNCE>row3Announce<#elseif topic.type == TOPIC_STICKY>row3sticky<#else>row3 <#-- ****************** --> <#-- Moderation buttons --> <#-- ****************** --> <#macro moderationButtons> <#if moderator && openModeration?default(false)> <#if can_remove_posts?default(false)> <#if can_move_topics?default(false)> <#if can_lockUnlock_topics?default(false)> <input type="submit" name="topicLock" value="  ${I18n.getMessage("Lock")}  " class="liteoption" onclick="return lockUnlock();" /> <input type="submit" name="topicUnlock" value="  ${I18n.getMessage("Unlock")}  " class="liteoption" onclick="return lockUnlock();" /> </#if> </#if> </#macro> <#-- ****************** --> <#-- Moderation images --> <#-- ****************** --> <#macro moderationImages> <script type="text/javascript"> function todo(name) { var todo = document.getElementById("moderationTodo"); todo.name = name; todo.value = "1"; } function deleteTopic() { if (confirm("${I18n.getMessage("Moderation.ConfirmDelete")}") && askModerationReason()) { todo("topicRemove"); document.formModeration.returnUrl.value = "${JForumContext.encodeURL("/forums/show/${topic.forumId}")}"; document.formModeration.log_type.value = "1"; document.formModeration.submit(); } } function moveTopic() { todo("topicMove"); document.formModeration.submit(); } function lockUnlock(lock) { if (askModerationReason()) { document.formModeration.log_type.value = "3"; todo(lock ? "topicLock" : "topicUnlock"); document.formModeration.submit(); } } </script> <#if isModerator || isAdmin> <#if can_remove_posts?default(false)> <a href="javascript:deleteTopic();"> </#if> <#if can_move_topics?default(false)> <a href="javascript:moveTopic();"> </#if> <#if can_lockUnlock_topics?default(false)> <#if topic.status == STATUS_LOCKED> <a href="javascript:lockUnlock(false);"> <#else> <a href="javascript:lockUnlock(true);"> </#if> </#if> </#if> </#macro> <#-- ********************** --> <#-- Forum navigation combo --> <#-- ********************** --> <#macro forumsComboTable> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td nowrap="nowrap"> <form action="" name="f" id="f" accept-charset="${encoding}"> <span class="gensmall">${I18n.getMessage("ForumIndex.goTo")}:  <select onchange="if(this.options[this.selectedIndex].value != -1){ document.location = '${contextPath}/forums/show/'+ this.options[this.selectedIndex].value +'${extension}'; }" name="select"> <option value="-1" selected="selected">${I18n.getMessage("ForumIndex.goToSelectAForum")} <#list allCategories as category> <optgroup label="${category.name}"> <#list category.getForums() as forum> <option value="${forum.id}">${forum.name} </#list> </optgroup> </#list> </select>   <input class="liteoption" type="button" value="${I18n.getMessage("ForumIndex.goToGo")}" onclick="if(document.f.select.options[document.f.select.selectedIndex].value != -1){ document.location = '${contextPath}/forums/show/'+ document.f.select.options[document.f.select.selectedIndex].value +'${extension}'; }" /> </form> </td> </tr> </table> </#macro>

Other jforum examples (source code examples)

Here is a short list of links related to this jforum presentation.ftl source code file:

jforum example source code file (presentation.ftl)

This example jforum source code file (presentation.ftl) 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.

Java - jforum tags/keywords

delete, displays, forum, lock, lock, moderation, status_locked, status_unlocked, topic_announce, topic_announce, topic_sticky, topic_sticky, unlock, unlock

The jforum presentation.ftl source code

<#-- ********************************************* -->
<#-- Displays the topic folder image by its status -->
<#-- ********************************************* -->
<#macro folderImage topic>
	<#if topic.movedId == 0 || (forum?exists && topic.forumId == forum.id)>
		<#if topic.read>
			<#if topic.status == STATUS_UNLOCKED>
				<#if topic.type == TOPIC_ANNOUNCE>
					<img class="icon_folder_announce" src="${contextPath}/images/transp.gif" alt="" />
				<#elseif topic.type == TOPIC_STICKY>
					<img class="icon_folder_sticky" src="${contextPath}/images/transp.gif" alt="" />
				<#else>
					<#if topic.isHot()>
						<img class="icon_folder_hot" src="${contextPath}/images/transp.gif" alt="" />
					<#else>
						<img class="icon_folder" src="${contextPath}/images/transp.gif" alt="" />
					</#if>
				</#if>
			<#else>
				<img class="icon_folder_lock" src="${contextPath}/images/transp.gif" alt="" />
			</#if>
		<#else>
			<#if topic.status == STATUS_UNLOCKED>
				<#if topic.type == TOPIC_ANNOUNCE>
					<img class="icon_folder_announce_new" src="${contextPath}/images/transp.gif" alt="" />
				<#elseif topic.type == TOPIC_STICKY>
					<img class="icon_folder_sticky_new" src="${contextPath}/images/transp.gif" alt="" />
				<#else>
					<#if topic.isHot()>
						<img class="icon_folder_new_hot" src="${contextPath}/images/transp.gif" alt="" />
					<#else>
						<img class="icon_folder_new" src="${contextPath}/images/transp.gif" alt="" />
					</#if>
				</#if>
			<#else>
				<img class="icon_folder_lock_new" src="${contextPath}/images/transp.gif" alt="" />
			</#if>
		</#if>
	<#else>
		<img class="icon_topic_move" src="${contextPath}/images/transp.gif" alt="" />
	</#if>
</#macro>

<#macro renderPoll poll>
	<table class="poll">
		<tr>
			<td colspan="4" class="strong" align="center">${poll.label}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 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.