<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "In forums/list.., i want show last post title, how can i do ??"]]></title>
		<link>https://forum.andowson.com/posts/list/7.page</link>
		<description><![CDATA[Latest messages posted in the topic "In forums/list.., i want show last post title, how can i do ??"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>In forums/list.., i want show last post title, how can i do ??</title>
				<description><![CDATA[ my english is bad 
<br>
Hi andowson and everybody, i like jforum, i using jforum 2.1.9, but this version not show last post title in .../forums/list.. , and I did the following: 
<br>
<br>
In file \WEB-INF\config\database\generic\generic_queries.sql, i edit 
<br>
[quote]ForumModel.lastPostInfo = SELECT post_time, p.topic_id, t.topic_replies, post_id, u.user_id, username, [color=red]t.topic_title[/color] \ 
<br>
 FROM jforum_posts p, jforum_users u, jforum_topics t, jforum_forums f \ 
<br>
 WHERE t.forum_id = f.forum_id \ 
<br>
 AND t.topic_id = p.topic_id \ 
<br>
 AND f.forum_last_post_id = t.topic_last_post_id \ 
<br>
 AND t.topic_last_post_id = p.post_id \ 
<br>
 AND p.forum_id = ? \ 
<br>
 AND p.user_id = u.user_id \ 
<br>
 AND p.need_moderate = 0[/quote] 
<br>
<br>
In file \net\jforum\dao\generic\GenericForumDAO.java, i edit it and compile to class file 
<br>
<br>
[quote]if (rs.next()) { 
<br>
 lpi.setUsername(rs.getString("username")); 
<br>
 lpi.setUserId(rs.getInt("user_id")); 
<br>
<br>
 final SimpleDateFormat sdf = new SimpleDateFormat(SystemGlobals.getValue(ConfigKeys.DATE_TIME_FORMAT), Locale.getDefault()); 
<br>
 lpi.setPostDate(sdf.format(rs.getTimestamp("post_time"))); 
<br>
 lpi.setPostId(rs.getInt("post_id")); 
<br>
 lpi.setTopicId(rs.getInt("topic_id")); 
<br>
 lpi.setPostTimeMillis(rs.getTimestamp("post_time").getTime()); 
<br>
 lpi.setTopicReplies(rs.getInt("topic_replies")); 
<br>
 [color=red]lpi.setTitle(rs.getString("topic_title"));[/color] 
<br>
 lpi.setHasInfo(true); 
<br>
<br>
<br>
 // Check if the topic is consistent 
<br>
 TopicDAO topicDao = DataAccessDriver.getInstance().newTopicDAO(); 
<br>
 Topic topic = topicDao.selectById(lpi.getTopicId()); 
<br>
<br>
 if (topic.getId() == 0) { 
<br>
 // Hm, that's not good. Try to fix it 
<br>
 topicDao.fixFirstLastPostId(lpi.getTopicId()); 
<br>
 } 
<br>
<br>
 tryFix = false; 
<br>
 }[/quote] 
<br>
<br>
In file \net\jforum\entities\LastPostInfo.java, i edit it and compile to class file: 
<br>
<br>
[quote]/** 
<br>
 * @return Returns the title. 
<br>
 */ 
<br>
 public String getTitle() { 
<br>
 return this.topicTitle; 
<br>
 } 
<br>
<br>
 /** 
<br>
 * @param title The title to set. 
<br>
 */ 
<br>
 public void setTitle(final String title) { 
<br>
 this.topicTitle = title; 
<br>
 }[/quote] 
<br>
<br>
In the forum_list.htm, : 
<br>
<br>
[quote]&lt;#assign url = JForumContext.encodeURL("/posts/list/${startPage}${lpi.topicId}") + "#p" + lpi.postId/&gt; 
<br>
 &lt;a href="${url}" class="last_title"&gt;&lt;img src="${contextPath}/templates/${templateName}/images/icon_latest_reply.gif" border="0" alt="[Latest Reply]" /&gt;[color=red]${lpi.title}[/color]&lt;/a&gt;[/quote] 
<br>
<br>
I restart tomcat, and it show title :D , but, when i post a new topic, it show old title :((, when i restart tomcat, it show new title, 
<br>
<br>
I need your help, thank you very much :"&gt;]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/480/993.page</guid>
				<link>https://forum.andowson.com/posts/preList/480/993.page</link>
				<pubDate><![CDATA[Sun, 24 Apr 2011 11:53:41]]> GMT</pubDate>
				<author><![CDATA[ newbiejforum]]></author>
			</item>
			<item>
				<title>回覆:In forums/list.., i want show last post title, how can i do ??</title>
				<description><![CDATA[ Hi newbiejforum, 
<br>
You can check out the latest code of JForum 2.2.1 from http://jforum2.googlecode.com/ and start from net.jforum.view.forum.PostAction.java#insertSave() method, and find the line: 
<br>
<br>
[code]ForumRepository.reloadForum(post.getForumId());[/code] 
<br>
<br>
see http://code.google.com/p/jforum2/source/detail?r=56 and you can find the answer. 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/480/994.page</guid>
				<link>https://forum.andowson.com/posts/preList/480/994.page</link>
				<pubDate><![CDATA[Mon, 25 Apr 2011 00:43:40]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回覆:In forums/list.., i want show last post title, how can i do ??</title>
				<description><![CDATA[ Hi andowson, 
<br>
When i add this line in the PostAction.java, and compline to class, i get an error: 
<br>
<br>
[quote]PostAction.java:1052: cannot find symbol 
<br>
symbol : variable StringUtils 
<br>
location: class net.jforum.view.forum.PostAction 
<br>
 if (StringUtils.isBlank(p.getSubject())) { 
<br>
 ^ 
<br>
PostAction.java:1437: cannot access javax.servlet.ServletOutputStream 
<br>
class file for javax.servlet.ServletOutputStream not found 
<br>
 os = response.getOutputStream(); 
<br>
[/quote] 
<br>
<br>
I find in WEB-INF\lib ( all .jar file), but this file javax/servlet/ServletOutpitStream.class not found, 
<br>
How can i do next step ?? 
<br>
thank you very much !! 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/480/996.page</guid>
				<link>https://forum.andowson.com/posts/preList/480/996.page</link>
				<pubDate><![CDATA[Mon, 25 Apr 2011 16:23:16]]> GMT</pubDate>
				<author><![CDATA[ newbiejforum]]></author>
			</item>
			<item>
				<title>回覆:In forums/list.., i want show last post title, how can i do ??</title>
				<description><![CDATA[ Hi newbiejforum, 
<br>
Did you check out the JForum 2.2.1 code? 
<br>
There is a line of import at the top of PostAction.java: 
<br>
<br>
[code]import org.apache.commons.lang.StringUtils;[/code] 
<br>
<br>
And you'll need to add commons-lang-2.5.jar in your CLASSPATH to compile it. 
<br>
Also you'll need to add servlet-api.jar to your CLASSPATH, too.]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/480/997.page</guid>
				<link>https://forum.andowson.com/posts/preList/480/997.page</link>
				<pubDate><![CDATA[Mon, 25 Apr 2011 17:21:22]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回覆:In forums/list.., i want show last post title, how can i do ??</title>
				<description><![CDATA[ [quote=newbiejforum]Hi andowson,
<br>
When i add this line in the PostAction.java, and compline to class, i get an error:
<br>
<br>
[quote]PostAction.java:1052: cannot find symbol
<br>
symbol : variable StringUtils
<br>
location: class net.jforum.view.forum.PostAction
<br>
 if (StringUtils.isBlank(p.getSubject())) {
<br>
 ^
<br>
PostAction.java:1437: cannot access javax.servlet.ServletOutputStream
<br>
class file for javax.servlet.ServletOutputStream not found
<br>
 os = response.getOutputStream();
<br>
[/quote]
<br>
<br>
I find in WEB-INF\lib ( all .jar file), but this file javax/servlet/ServletOutpitStream.class not found,
<br>
How can i do next step ??
<br>
thank you very much !!
<br>
[/quote]
<br>
<br>
<br>
It is not show new last post title too :(]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/480/998.page</guid>
				<link>https://forum.andowson.com/posts/preList/480/998.page</link>
				<pubDate><![CDATA[Tue, 26 Apr 2011 09:11:44]]> GMT</pubDate>
				<author><![CDATA[ newbiejforum]]></author>
			</item>
			<item>
				<title>回覆:In forums/list.., i want show last post title, how can i do ??</title>
				<description><![CDATA[ Hi newbiejforum, 
<br>
<br>
My suggestion is that you can download jforum-2.2.1.war and install it. 
<br>
<br>
Here is the download page: 
<br>
http://code.google.com/p/jforum2/downloads/list 
<br>
<br>
And see if JForum 2.2.1 works for you. 
<br>
<br>
If it works, then you can start your customization on JForum 2.2.1's codebase. 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/480/999.page</guid>
				<link>https://forum.andowson.com/posts/preList/480/999.page</link>
				<pubDate><![CDATA[Tue, 26 Apr 2011 17:28:42]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回覆:In forums/list.., i want show last post title, how can i do ??</title>
				<description><![CDATA[ Thank you very much, andowson !! :oops:]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/480/1000.page</guid>
				<link>https://forum.andowson.com/posts/preList/480/1000.page</link>
				<pubDate><![CDATA[Tue, 26 Apr 2011 20:07:27]]> GMT</pubDate>
				<author><![CDATA[ newbiejforum]]></author>
			</item>
	</channel>
</rss>