<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA["jforum论坛二次开发--小修小改汇总贴" 主题的最后发表文章]]></title>
		<link>http://www.mydwbi.com/posts/list/18.page</link>
		<description><![CDATA[最后发表在 "jforum论坛二次开发--小修小改汇总贴" 主题的信息]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>jforum论坛二次开发--小修小改汇总贴</title>
				<description><![CDATA[ ***************************************** <br /> lynx286原创, 首发[url]www.mydwbi.com[/url] <br /> [url]http://www.mydwbi.com/posts/list/0/103.page[/url]<br /> 欢迎转贴, 但转贴请不要删除此段版权说明. <br /> *****************************************<br /> <br /> [list][size=18][color=blue]将会员列表改成按id排序（新注册用户排前面）[/color][/size][/list]<br /> <br /> web-inf\config\database\generic\generic_queries.sql<br /> <br /> 将58-59行  "order by username"  改成 "order by user_id desc"<br /> <br /> <br /> [list][size=18][color=blue]添加网站地图[/color][/size][/list]<br /> -生成sitemap.xml<br /> jforum 的url后缀是.page不是常规的.htm .html .asp .jsp 所以很多sitemap.xml builder不能识别jforum中的链接,所以自动生成不了sitemap.xml(本人猜想是这个原因),后来找半天找到一个工具叫SOFTplus GSiteCrawler的可以自定义页面后缀,从而自动生成sitemap.xml.<br /> <br /> -添加国际化属性<br /> zh_CN.properties中最后添加:mydwbi.sitemap=\u7f51\u7ad9\u5730\u56fe<br /> <br /> -添加入口链接<br /> 在forum_list.htm中第181行下添加:<br /> [code]<br /> &lt;td&gt;&nbsp;&nbsp;&lt;/td&gt;<br /> &lt;td align="center" width="20"&gt;&lt;img   /&gt;&lt;/td&gt;<br /> &lt;td&gt;&lt;span class="gensmall"&gt;&lt;ａ ｈｒｅｆ="${contextPath}/sitemap.xml"&gt;${I18n.getMessage("mydwbi.sitemap")}&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;<br /> [/code]<br /> <br /> <br /> <br /> <br /> [list][size=18][color=blue]修改版权信息[/color][/size][/list]<br /> 修改bottom.htm 11行.<br /> <br /> <br /> [list][size=18][color=blue]将发贴时&quot;pool&quot;,&quot;attachments&quot;,&quot;options&quot;改成中文[/color][/size][/list]<br /> -添加国际化属性<br /> mydwbi.Options=\u9009\u9879<br /> mydwbi.Pool=\u6295\u7968<br /> mydwbi.Attach=\u9644\u4ef6<br /> <br /> -修改模板<br /> 将post_form.htm中第369,372,375行&quot;pool&quot;,&quot;attachments&quot;,&quot;options&quot;改成:<br /> ${I18n.getMessage(&quot;mydwbi.Options&quot;)}<br /> ${I18n.getMessage(&quot;mydwbi.Pool&quot;)}<br /> ${I18n.getMessage(&quot;mydwbi.Attach&quot;)}<br /> <br /> [list][size=18][color=blue]让发贴的表情符号列表多显示几个表情[/color][/size][/list]<br /> 修改post_form.htm261行，改成：&lt;#if (count &lt; 32)&gt;<br /> <br /> <br /> [list][size=18][color=blue]特定用户显示ip[/color][/size][/list]<br /> post_show_user_inc.htm36，37行改成：<br /> [code]<br /> &lt;#if (post.userIp?exists && isModerator) || (post.userIp?exists && session.username = &quot;lynx286&quot;)&gt;<br /> ${I18n.getMessage(&quot;PostShow.userIP&quot;)}: &lt;a href="http://whois.domaintools.com/${post.userIp}"  target="_blank"&gt;${post.userIp}&lt;/a&gt;[/code]<br /> <br /> 即如果当前登陆用户为该版版主或用户名为lynx286,就显示发贴人ip地址<br /> <br /> <br /> [list][size=18][color=blue]进入板块后显示主题列表页面发表人栏显示帖子发表时间[/color][/size][/list]<br /> 进入板块后显示主题列表页面指： /forums/show/xxxx.page  页面<br /> forum_show.htm页面224行改成：<br /> [code]&lt;span class="postdetails"&gt;${topic.firstPostTime}&lt;br /&gt;&lt;a &gt;[/code]<br /> 176行改成：width=140<br /> <br /> <br /> [list][size=18][color=blue]bmp图片也显示缩略图[/color][/size][/list]<br /> 用户经常用print screen键拷贝屏幕图片，并发到帖子上，是bmp格式，不能显示缩略图，要下载才能看，不太方便。这里改一下可显示缩略图 。<br /> AttachmentCommon.java  254行添加："bmp".equals(extension) ||]]></description>
				<guid isPermaLink="true">http://www.mydwbi.com/posts/preList/103/394.page</guid>
				<link>http://www.mydwbi.com/posts/preList/103/394.page</link>
				<pubDate><![CDATA[Mon, 12 May 2008 02:16:45]]> GMT</pubDate>
				<author><![CDATA[ lynx286]]></author>
			</item>
			<item>
				<title>回复:jforum论坛二次开发--小修小改汇总贴</title>
				<description><![CDATA[ 解决在线用户列表同一用户名显示N次问题。<br /> 现象如附件图片。<br /> <br /> [list]ForumAction.java<br /> this.context.put(&quot;userSessions&quot;, onlineUsersList);  这一行前添加：<br /> removeDuplicate(onlineUsersList);[/list]<br /> <br /> ForumAction.java<br /> 添加一个方法：<br /> [code]public static void removeDuplicate(List list) {<br /> 		for (int i = 0; i &lt; list.size() - 1; i++) {<br /> 			for (int j = list.size() - 1; j &gt; i; j--) {<br /> 				String jName = ((UserSession) list.get(j)).getUsername();<br /> 				String iName = ((UserSession) list.get(i)).getUsername();<br /> 				if (jName.equals(iName)) {<br /> 					list.remove(j);<br /> 				}<br /> 			}<br /> 		}<br /> 		// System.out.println(list);<br /> 	}<br /> [/code]]]></description>
				<guid isPermaLink="true">http://www.mydwbi.com/posts/preList/103/1479.page</guid>
				<link>http://www.mydwbi.com/posts/preList/103/1479.page</link>
				<pubDate><![CDATA[Wed, 23 Jul 2008 01:19:23]]> GMT</pubDate>
				<author><![CDATA[ lynx286]]></author>
			</item>
			<item>
				<title>回复:jforum论坛二次开发--小修小改汇总贴</title>
				<description><![CDATA[ [list]将整个论坛页面宽度由满屏改为固定宽度[/list]<br /> header.htm  31行： &lt;table width="950" border="0" ALIGN="center"&gt;<br /> <br /> [list]将论坛跳转下拉框放到上面[/list]<br /> post_show.htm 等页面 90 行，加上下面代码：<br /> [code]<br /> &lt;td align="left"&gt;<br /> 					&lt;span class="gensmall"&gt;${I18n.getMessage("ForumIndex.goTo")}:&nbsp;&lt;/span&gt;<br /> 					&lt;select onchange="if(this.options[this.selectedIndex].value != -1){ document.location = '${contextPath}/forums/show/'+ this.options[this.selectedIndex].value +'${extension}'; }" name="select"&gt;<br /> 						&lt;option value="-1" selected="selected"&gt;${I18n.getMessage("ForumIndex.goToSelectAForum")}&lt;/option&gt;				<br /> 						<br /> 						&lt;#list allCategories as category&gt;<br />                             &lt;optgroup label="${category.name}"&gt;<br /> 		<br /> 							&lt;#list category.getForums() as forum&gt;<br /> 								&lt;option value="${forum.id}"&gt;${forum.name}&lt;/option&gt;<br /> 							&lt;/#list&gt;<br /> 							&lt;/optgroup&gt;<br /> 						&lt;/#list&gt;<br /> 					&lt;/select&gt;<br /> 					&nbsp;<br /> 					&lt;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}'; }" /&gt;<br /> 				  &lt;/td&gt;<br /> [/code]<br /> 此段代码可以从 macros\presentaion.ftl  中 &lt;#macro forumsComboTable&gt;  里面拷贝。]]></description>
				<guid isPermaLink="true">http://www.mydwbi.com/posts/preList/103/1660.page</guid>
				<link>http://www.mydwbi.com/posts/preList/103/1660.page</link>
				<pubDate><![CDATA[Sat, 9 Aug 2008 01:37:30]]> GMT</pubDate>
				<author><![CDATA[ lynx286]]></author>
			</item>
			<item>
				<title>回复:jforum论坛二次开发--小修小改汇总贴</title>
				<description><![CDATA[ 添加"热门下载"页面<br /> <br /> urlPattern.properties 添加: mydwbi.hottestDownload.0 =<br /> templatesMapping.properties 添加: mydwbi.hottestDownload = hottest_download.htm<br /> TemplateKeys.java 添加:  public static final String MYDWBI_HOTTEST_DOWNLOAD = "mydwbi.hottestDownload";<br /> MydwbiAction.java 添加:<br /> [code]<br /> public void hottestDownload() {<br /> 		this.setTemplateName(TemplateKeys.MYDWBI_HOTTEST_DOWNLOAD);<br /> 		this.context.put("pageTitle", I18n<br /> 				.getMessage("mydwbi.hottestDownloadTitle"));<br /> 		this.context.put("hottestDown", this.getHottestDown());<br /> 		this.request.setAttribute("template", null);<br /> <br /> 	}<br /> <br /> 	List getHottestDown() {<br /> 		List list = new ArrayList();<br /> 		PreparedStatement p = null;<br /> 		ResultSet rs = null;<br /> 		try {<br /> 			p = JForumExecutionContext<br /> 					.getConnection()<br /> 					.prepareStatement(<br /> 							"select f.forum_name,t.topic_title,t.topic_id,ad.attach_id,ad.real_filename,ad.filesize,ad.download_count from jforum_forums f,jforum_posts p,jforum_topics t, jforum_attach a,jforum_attach_desc ad where p.topic_id = t.topic_id  and p.forum_id = f.forum_id and p.post_id = a.post_id  and a.attach_id = ad.attach_id  and a.privmsgs_id = 0 order by ad.download_count desc LIMIT 0,50");<br /> 			rs = p.executeQuery();<br /> 			while (rs.next()) {<br /> 				HottestAttach ha = new HottestAttach();<br /> 				ha.setForumName(rs.getString("forum_name"));<br /> 				ha.setTopicId(rs.getInt("topic_id"));<br /> 				ha.setTopicName(rs.getString("topic_title"));<br /> 				ha.setAttachId(rs.getInt("attach_id"));<br /> 				ha.setAttachName(rs.getString("real_filename"));<br /> 				ha.setFilesize(rs.getInt("filesize")/1024);<br /> 				ha.setDownloadCount(rs.getInt("download_count"));<br /> 				list.add(ha);<br /> 			}<br /> 		} catch (SQLException e) {<br /> 			throw new DatabaseException(e);<br /> 		} finally {<br /> 			DbUtils.close(rs, p);<br /> 		}<br /> 		return list;<br /> 	}<br /> [/code]<br /> <br /> hottest_download .htm如附件]]></description>
				<guid isPermaLink="true">http://www.mydwbi.com/posts/preList/103/1967.page</guid>
				<link>http://www.mydwbi.com/posts/preList/103/1967.page</link>
				<pubDate><![CDATA[Tue, 9 Sep 2008 08:56:46]]> GMT</pubDate>
				<author><![CDATA[ lynx286]]></author>
			</item>
			<item>
				<title>回复:jforum论坛二次开发--小修小改汇总贴</title>
				<description><![CDATA[ 顶！！！！！！！！！！！！！！！！！！！]]></description>
				<guid isPermaLink="true">http://www.mydwbi.com/posts/preList/103/2280.page</guid>
				<link>http://www.mydwbi.com/posts/preList/103/2280.page</link>
				<pubDate><![CDATA[Tue, 14 Oct 2008 03:35:37]]> GMT</pubDate>
				<author><![CDATA[ ibudo]]></author>
			</item>
			<item>
				<title>回复:jforum论坛二次开发--小修小改汇总贴</title>
				<description><![CDATA[ 后台中的那个  管理会员的 尚未启用  怎么启用呀？？？  谢谢哈 ]]></description>
				<guid isPermaLink="true">http://www.mydwbi.com/posts/preList/103/2947.page</guid>
				<link>http://www.mydwbi.com/posts/preList/103/2947.page</link>
				<pubDate><![CDATA[Sun, 22 Mar 2009 02:54:52]]> GMT</pubDate>
				<author><![CDATA[ lybvt]]></author>
			</item>
			<item>
				<title>jforum论坛二次开发--小修小改汇总贴</title>
				<description><![CDATA[ 用户个人信息页面是否可以屏蔽掉呢？/user/edit/“用户ID号”.list]]></description>
				<guid isPermaLink="true">http://www.mydwbi.com/posts/preList/103/3694.page</guid>
				<link>http://www.mydwbi.com/posts/preList/103/3694.page</link>
				<pubDate><![CDATA[Sun, 6 Dec 2009 23:59:07]]> GMT</pubDate>
				<author><![CDATA[ kyo0502]]></author>
			</item>
			<item>
				<title>jforum论坛二次开发--小修小改汇总贴</title>
				<description><![CDATA[ [quote=kyo0502]用户个人信息页面是否可以屏蔽掉呢？/user/edit/“用户ID号”.list[/quote]<br /> <br /> <br /> just a demo!]]></description>
				<guid isPermaLink="true">http://www.mydwbi.com/posts/preList/103/10611.page</guid>
				<link>http://www.mydwbi.com/posts/preList/103/10611.page</link>
				<pubDate><![CDATA[Tue, 13 Sep 2011 08:00:38]]> GMT</pubDate>
				<author><![CDATA[ flygolee]]></author>
			</item>
	</channel>
</rss>
