简介
JForum 是一个功能强大 ,易于管理的Java编写的论坛。它的设计完全遵从MVC设计模式,能够在任何Servlet容器与EJB服务器上运行。而且可以轻松的定制与扩展JForum论坛。
JForum是一个功能完善,强大,支持多论坛版块.功能包括:无限版块、无限分类(版块分类),主题观注,邮件提示,站内信息,用户分组,高级灵活的限制设置,等等。
安装指南
1. Downloading JForum from http://www.jforum.net/download.jsp
2. unzip *.zip
3. mv JForum-x.x.x to jform
4. mv jforum /usr/local/tomcat/webapps
5. http://localhost:8080/jforum/install.jsp // jforum 2.1.7
Please give write access for the user who is running the webserver
to the file 'index.htm' and for the directory 'WEB-INF/config' and its
subdirectories before continuing.
Missing index.redirect file.
http://www.jforum.net/posts/downloadAttach/328.page
http://localhost:8080/jforum/ // jforum 2.1.6 根据安装向导完成jforum安装,可选择中文
创建数据库
mysqladmin -u root -p create jforum 或
mysql>create database jforum;
mysql>GRANT ALL PRIVILEGES ON jforum.* TO jforum@localhost IDENTIFIED BY 'jforum';
mysql>flush privileges;
Hack JForum
修改 .page 的后缀 为 .html
对于 2.1.6 版本,修改以下三个文件 1. WEB-INF/config/SystemGlobals.properties
servlet.extension = .page -> servlet.extension = .html
2. WEB-INF/web.xml (修改两处)
<url-pattern>*.page</url-pattern> -> <url-pattern>*.html</url-pattern>
3. index.htm
<script>
document.location = "forums/list.page; -> forums/list.html
</script>
http://localhost:8080/jforum/
这样就 OK 啦 :)
下面的修改不知道是什么版本?
1.修改
1.WEB-INF/config/SystemGlobals.properties
servlet.extension = .page -> servlet.extension = .html
2.WEB-INF/web.xml(两处)
<url-pattern>*.page</url-pattern> -> <url-pattern>*.html</url-pattern>
3.src/net/forums/InstallServlet.java:
+ "/forums/list.page"); -> + "/forums/list.html");
4.src/net/jforum/view/forum/PostAction.java
"/posts/list/" + t.getId() + ".page"); -> "/posts/list/" + t.getId() + ".html");
5.UserInfo.java
"user/profile/"+id+".page"); -> "user/profile/"+id+".html");
2.修改模版文件.htm中.page的链接
[...] 由于项目中需要用到jforum的二次开发,下面把处理的过程总结一下: 1 修改首页forum_list,想把首页改造成类似于门户形式的,首页需要显示板块列表,新入用户,活跃用户排行,以及最新帖子列表 和公告等等 新入用户排行 由于用的是freemarker的模板,这个可以直接通过修改模板文件,所在的模板文件即可, 在forum_list 增加 <#list users as user> 只需改为 <#list users?sort_by(”registrationDate”) as user >可以实现 也可直接修改SQL语句也行,因为web-infconfigdatabasegenericgeneric_queries.sql 将58-59行 “order by username” 改成 “order by user_id desc” 还需要完成用户头像的显示,这个问题的解决直接找到根源 修改SQL语句 在select后面加上,头像这个属性就行了。 [...]
[...] 由于项目中需要用到jforum的二次开发,下面把处理的过程总结一下: 1 修改首页forum_list,想把首页改造成类似于门户形式的,首页需要显示板块列表,新入用户,活跃用户排行,以及最新帖子列表 和公告等等 新入用户排行 由于用的是freemarker的模板,这个可以直接通过修改模板文件,所在的模板文件即可, 在forum_list 增加 <#list users as user> 只需改为 <#list users?sort_by(”registrationDate”) as user >可以实现 也可直接修改SQL语句也行,因为web-infconfigdatabasegenericgeneric_queries.sql 将58-59行 “order by username” 改成 “order by user_id desc” 还需要完成用户头像的显示,这个问题的解决直接找到根源 修改SQL语句 在select后面加上,头像这个属性就行了。 [...]