會員註冊 / 登入  |  電腦版  |  Jump to bottom of page

JForum中文社群 JForum Chinese Users Community » [分享]JForum tp101 theme

發表人: andowson, 七段學員
2007-03-18 17:46:17
最近利用JForum來架設另外一個比較具專業感的網站,花了兩天時間參考分享火力站長Some為phpBB2所做的一個portal-like風格,我將它修改為JForum可用的版本。

修改的重心是header.htm, bottom.htm及style.css,其他的修改就是再把breadcrumb加上去,或是把原來的->改為>。

附上修改後的風格包,您可以先安裝好JForum後,將下載的檔案解壓縮後放在templates/tp101目錄下,然後修改jforum-custom.conf中的設定如下
template.dir=tp101
重新載入JForum應該就可以了
另外上方圖片的原始檔放在psd_source目錄下,修改header.psd再重新產生header.jpg覆蓋掉images目錄下的header.jpg即可。

展示網站:
http://forum.30elite.com
參考網站:
http://holy.be/bbs/t-1-1360.html

檔案名稱 tp101.zip
描述 Taipei 101 template for JForum v2.1.7
檔案大小 818 Kbytes
下載次數 59 次
[Disk] 下載


發表人: mohawk, 十級學員
2007-12-25 14:44:22
2.1.8版本找不到 template.dir
若自行加上 會出錯

發表人: andowson, 七段學員
2007-12-26 02:05:29
 
mohawk wrote:2.1.8版本找不到 template.dir
若自行加上 會出錯

安裝完成後的jforum-custom.conf是沒有template.dir這個參數沒錯, 但是在SystemGlobals.properties內是有的,它的值預設是default,我們可以自己手動加到jforum-custom.conf去, 這樣就可以覆蓋掉SystemGlobals.properties內的設定了(因JForum是先載入SystemGlobals.properties的參數值, 再載入jforum-custom.conf的參數值)

原先的檔案是針對JForum v2.1.7修改出來的, 當時花了不少時間去慢慢調整, 如果時間夠應該也可以對v2.1.8做更好的調整, 以下是我簡單的升級步驟, 供您參考

#下載JForum
cd /home/30elite
wget http://www.jforum.net/releases/jforum-2.1.8.zip
#解壓縮
unzip jforum-2.1.8.zip

#備份資料庫
su - postgres
pg_dump elite > /tmp/elite.bak
#更新schema
psql elite elite -f /home/30elite/jforum-2.1.8/upgrade/2.1.8/postgresql_2.1.7_to_2.1.8.sql
exit

#複製現有風格檔過去
cp -rfp /home/30elite/jforum-2.1.8/templates/default /home/30elite/jforum-2.1.8/templates/tp101
cp -p /home/30elite/www/templates/tp101/images/form_shadow.gif /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/images/header.jpg /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/images/header.swf /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/images/member*.gif /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/images/menu*.gif /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/images/shadow*.gif /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/images/top.jpg /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/images/top2.jpg /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/images/top_bg.jpg /home/30elite/jforum-2.1.8/templates/tp101/images/.
cp -p /home/30elite/www/templates/tp101/js/swfobject.js /home/30elite/jforum-2.1.8/templates/tp101/js/.
cp -rfp /home/30elite/www/templates/tp101/styles/style.css /home/30elite/jforum-2.1.8/templates/tp101/styles/.
cp -rfp /home/30elite/www/templates/tp101/header.htm /home/30elite/jforum-2.1.8/templates/tp101/header.htm
cp -rfp /home/30elite/www/templates/tp101/bottom.htm /home/30elite/jforum-2.1.8/templates/tp101/bottom.htm

#複製現有設定過去
cp -rfp /home/30elite/www/WEB-INF/config/jforum-custom.conf /home/30elite/jforum-2.1.8/WEB-INF/config/.
cp -rfp /home/30elite/www/upload/* /home/30elite/jforum-2.1.8/upload
cp -rfp /home/30elite/www/images/avatar/* /home/30elite/jforum-2.1.8/images/avatar

#更改權限為可寫入
chmod 775 /home/30elite/jforum-2.1.8/tmp
chmod -R 775 /home/30elite/jforum-2.1.8/upload
chmod -R 775 /home/30elite/jforum-2.1.8/images
chmod 775 /home/30elite/jforum-2.1.8/WEB-INF
chown -R 30elite:tomcat /home/30elite/jforum-2.1.8

#變更目錄名稱
mv /home/30elite/www /home/30elite/oldwww
mv /home/30elite/jforum-2.1.8 /home/30elite/www


#修改/home/30elite/www/WEB-INF/config/modulesMapping.properties ,將install改為註解或刪除

#install = net.jforum.view.install.InstallAction


#修改 /home/30elite/www/templates/tp101/header.htm,將v2.1.7版的<title>標籤上方換為v2.1.8版的templates/default/header.htm的<title>標籤上方程式碼

<#setting number_format = "#"/>
<#setting datetime_format = dateTimeFormat/>
<#assign logged = logged?default(false)/>
<#assign language = language?default("en_US")/>
<#assign hasCodeBlock = hasCodeBlock?default(false)/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<style type="text/css">@import url( ${contextPath}/templates/${templateName}/styles/style.css?${startupTime} );</style>
<style type="text/css">@import url( ${contextPath}/templates/${templateName}/styles/${language}.css?${startupTime} );</style>

<#if hasCodeBlock>
<style type="text/css">@import url( ${contextPath}/templates/${templateName}/styles/SyntaxHighlighter.css?${startupTime} );</style>
</#if>

<title>${pageTitle?default("JForum")?html}</title>

#加上熱門主題連結

<tr>
<td><a id="hottest" class="mainmenu" href="${JForumContext.encodeURL("/hottestTopics/list")}"><img src="${contextPath}/templates/${templateName}/images/icon_mini_recentTopics.gif" alt="[Hottest Topics]" /> ${I18n.getMessage("ForumBase.hottestTopics")}</a></td>
</tr>

#加上管理日誌連結

<#if canAccessModerationLog?default(false)>
<tr>
<td><a id="moderationlog" class="mainmenu" href="${JForumContext.encodeURL("/moderation/showActivityLog")}"><img src="${contextPath}/templates/${templateName}/images/icon_mini_members.gif" alt="[Moderation Log]" /> ${I18n.getMessage("ModerationLog.moderationLog")}</a></td>
</tr>
</#if>

#修改 /home/30elite/www/templates/tp101/bottom.htm,將v2.1.7的<iframe>標籤上方到</table>標籤間加上v2.1.8版的templates/default/bottom.htm的<iframe>標籤上方到</table>標籤間的程式碼

<#if hasCodeBlock>
<#include "highlighter_js.htm"/>
</#if>


#刪除forum_list.htm下方的登入表單
#修改post_show.htm
#刪除post_show_user_inc.htm中的<br>
#修改templates/tp101/styles/style.css,加上v.2.1.8新增的部分

附檔是我改過的tp101.zip(沒有psd檔)

檔案名稱 tp101.tar.gz
描述 Taipei 101 template for JForum v2.1.8
檔案大小 330 Kbytes
下載次數 25 次
[Disk] 下載





會員註冊 / 登入  |  電腦版  |  Jump to top of page