AL8 Forum
»
Discuz 5.0 及 5.5 插件發佈
» 左側四格V1.1特別加強版 forD5.5(最終修訂版)
‹‹ 上一主題
|
下一主題 ››
75
1/4
1
2
3
4
››
標題:
[D5.5]
左側四格V1.1特別加強版 forD5.5(最終修訂版)
打印
|
推薦
|
訂閱
|
收藏
本主題被作者加入到個人文集中
所需閱讀權限
1
patrickho
0044259
頭銜: Forum Legend
自述: 特派潛水員
帖子: 1965
精華: 0
積分: 160 點
現金: 0 元
存款: 9417 元
閱讀權限: 70
註冊: 2006-4-29
狀態: 離線
#1
大
中
小
發表於 2007-7-26 20:07
資料
個人空間
主頁
短消息
加為好友
左側四格V1.1特別加強版 forD5.5(最終修訂版)
插件名稱:左側四格V1.1 for5.5
適合版本:Discuz 5.5
左側四格(改自4.0)
作者:
c3762
參考以下文章
AL8 首頁六格顯示 for Discuz 5.5.0
作者:
范倫鐵諾
AL8 首頁四格顯示 for Discuz 5.0.0
作者:
alan888
[今日到訪]或[本星期到訪]的簡單插件for d5正式版
原修改者:boo
演示:
http://3talk.nets.hk
比起上一版的好處
QUOTE:
1.能夠填上不需要顯示回帖區域的 fid 編號
2.增加24小時到訪會員
3.熱門論壇
4.強化個人資料
27/7 18:08 請進行第10步的步驟,修改論壇運行的日期
26/7 23:11
前使用者必需加回步驟9.3
注意:此版安裝程繁雜,安裝前請記得備份,初學者需再詳細確認步驟。
請先把go.gif放在 /images/go.gif
index_foruminfo.htm 放在 templates\default
注意:如果已安了
AL8 首頁六格顯示 for Discuz 5.5.0
只
需修改
藍色
步驟
如使用
左側四格(改自4.0)
作者:
c3762
請修改本貼步驟1-8,10-11及到#8(本貼8樓進行升級)
27/7 17:48前必需重新安裝1.1步驟,否則登陸時可能出現錯誤
27/7 23:46請重新上傳index_foruminfo.htm
修改
說明:
1. 修改 include/cache.func.php
1.1找
[Copy to clipboard]
[
-
]
CODE:
'medals' => array('medals')
更換為
[Copy to clipboard]
[
-
]
CODE:
'medals' => array('medals'),
'newtopic' => array('newtopic'),
'newreply' => array('newreply'),
1.2再找
[Copy to clipboard]
[
-
]
CODE:
case 'medals':
$table = 'medals';
$cols = 'medalid, name, image';
$conditions = "WHERE available='1'";
break;
在下面加上
(注意填妥"填上不需要顯示回帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號"
填上不需要顯示帖子區域
由於使用快取檔型式, 故某些私密區不能判斷會員權限來顯示發帖及回帖, 所以要先修改及取代下紅字部份 "填上
不需要顯示
帖子區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號" 部份, 例如希望不顯示 fid 1,3,5 便填上 "$fids="1,3,5";"
如果希望全部顯示者, 請將下兩段的
NOT IN ($fids)
(藍色字顯示部份)刪除, 否則會出現數據錯誤的顯示
[Copy to clipboard]
[
-
]
CODE:
case newtopic:
$table = 'threads t';
$cols = "t.tid, t.typeid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name, tt.name AS idname";
$fids="[color=Red]填上不需要顯示回帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號[/color]";
$conditions = "LEFT JOIN {$tablepre}threadtypes tt ON (tt.typeid=t.typeid) LEFT JOIN {$tablepre}forums f ON (f.fid=t.fid) WHERE t.fid<>'$fid' AND f.fid [color=Red]NOT IN ($fids)[/color] ORDER BY t.dateline DESC LIMIT 0, 7";
break;
case newreply:
$table = 'threads t';
$cols = "t.tid, t.typeid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name, tt.name AS idname";
$fids="[color=Red]填上不需要顯示回帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號[/color]";
$conditions = "LEFT JOIN {$tablepre}threadtypes tt ON (tt.typeid=t.typeid) LEFT JOIN {$tablepre}forums f ON (f.fid=t.fid) WHERE t.fid<>'$fid' AND f.fid [color=Blue]NOT IN ($fids)[/color] AND t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 7";
break;
case todayvisit:
$table = 'members';
$cols = "COUNT(*)";
$datecut = time() - (3600 * 24);
$conditions = "WHERE lastactivity>='$datecut' ORDER BY lastvisit DESC";
break;
1.2找
[Copy to clipboard]
[
-
]
CODE:
$GLOBALS['totlamembers'] = $data['totalmembers'] = $db->result($query, 0);
在下面加上
[Copy to clipboard]
[
-
]
CODE:
$datecut = time() - (3600 * 24);
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}members WHERE regdate>='$datecut'");
$GLOBALS['totalmembers'] = $data['totalmembers'] = $db->result($query, 0);code]1.3找[code] case 'forumlinks':
global $forumlinkstatus;
上面加上
[Copy to clipboard]
[
-
]
CODE:
case 'newreply':
$hack_cut_str = 36; //標題的字元長度
$new_reply_threadlist = array();
$rthread = array();
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
while($rthread = $db->fetch_array($query)){
$rthread['forumname'] = $rthread['name'];
$rthread['view_subject'] = $rthread[idname] ? cutstr( "$rthread[idname] $rthread[subject]",$hack_cut_str) : cutstr($rthread['subject'],$hack_cut_str);
$rthread['subject'] = cutstr($rthread['subject'],46);
$rthread['date']= gmdate('Y-n-j G:i', $rthread['dateline'] + 8 * 3600);
$rthread['lastreplytime']= gmdate('Y-n-j G:i', $rthread['lastpost'] + 8 * 3600);
if($rthread['highlight']) {
$string = sprintf('%02d', $rthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$rthread['highlight'] = 'style="';
$rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$rthread['highlight'] .= '"';
} else {
$rthread['highlight'] = '';
}
$new_reply_threadlist = "<a href=\"redirect.php?tid=$rthread[tid]&goto=lastpost#lastpost\" title=\"論壇: $rthread[forumname]\r\n標題: $rthread[subject]\r\n作者: $rthread[author]\r\n發表時間: $rthread[date]\r\n瀏覽次數: $rthread[views] 次\r\n回覆: $rthread[replies] 次\r\n最後回覆: $rthread[lastreplytime]\r\n最後發表: $rthread[lastposter]\" $rthread[highlight]>$rthread[view_subject]</a><br>";
$data[] = array('content' => $new_reply_threadlist);
}
break;
case 'newtopic':
$hack_cut_str = 36; //標題的字元長度
$new_post_threadlist = array();
$nthread = array();
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
while($nthread = $db->fetch_array($query)){
$nthread['forumname'] = $nthread['name'];
$nthread['view_subject'] = $nthread[idname] ? cutstr( "$nthread[idname] $nthread[subject]",$hack_cut_str) : cutstr($nthread['subject'],$hack_cut_str);
$nthread['subject'] = cutstr($nthread['subject'],46);
$nthread['date']= gmdate('Y-n-j G:i', $nthread['dateline'] + 8 * 3600);
$nthread['lastreplytime']= gmdate('Y-n-j G:i', $nthread[lastpost] + 8 * 3600);
if($nthread['highlight']) {
$string = sprintf('%02d', $nthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$nthread['highlight'] = 'style="';
$nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$nthread['highlight'] .= '"';
} else {
$nthread['highlight'] = '';
}
$new_post_threadlist = $nthread[replies] ? "<a href=\"redirect.php?tid=$nthread[tid]&goto=lastpost#lastpost\" title=\"論壇: $nthread[forumname]\r\n標題: $nthread[subject]\r\n作者: $nthread[author]\r\n發表時間: $nthread[date]\r\n瀏覽次數: $nthread[views] 次 \r\n回覆: $nthread[replies] 次\r\n最後回覆: $nthread[lastreplytime]\r\n最後發表: $nthread[lastposter]\" $nthread[highlight] >$nthread[view_subject]</a><br>" : "<a href=\"redirect.php?tid=$nthread[tid]&goto=lastpost#lastpost\" title=\"論壇: $nthread[forumname]\r\n標題: $nthread[subject]\r\n作者: $nthread[author]\r\n發表時間: $nthread[date]\r\n瀏覽次數: $nthread[views] 次\r\n回覆: 暫時沒有回覆\" $nthread[highlight] >$nthread[view_subject]</a><br>";
$data[] = array('content' => $new_post_threadlist);
}
break;
2. 修改 include/newthread.inc.php
找
[Copy to clipboard]
[
-
]
CODE:
showmessage('post_newthread_succeed', "viewthread.php?tid=$tid&extra=$extra");
在上面加上
[Copy to clipboard]
[
-
]
CODE:
require DISCUZ_ROOT.'./include/cache.func.php';
updatecache('newtopic');
3. 修改 include/newreply.inc.php
找
[Copy to clipboard]
[
-
]
CODE:
showmessage('post_reply_succeed', "viewthread.php?tid=$tid&pid=$pid&page=".(@ceil(($thread['replies'] + 2) / $ppp))."&extra=$extra#pid$pid");
在上面加上
[Copy to clipboard]
[
-
]
CODE:
require DISCUZ_ROOT.'./include/cache.func.php';
updatecache('newreply');
4. 修改 topicadmin.php
找
(第一段約第 15 行那句)
[Copy to clipboard]
[
-
]
CODE:
require_once DISCUZ_ROOT.'./include/misc.func.php';
在下面加上
[Copy to clipboard]
[
-
]
CODE:
require_once DISCUZ_ROOT.'./include/cache.func.php';
找
[Copy to clipboard]
[
-
]
CODE:
showmessage((isset($resultarray['message']) ? $resultarray['message'] : 'admin_succeed'), $resultarray['redirect']);
在上面加上
[Copy to clipboard]
[
-
]
CODE:
updatecache('newreply');
updatecache('newtopic');
5. 修改 logging.php
[Copy to clipboard]
[
-
]
CODE:
$sessionexists = 0;
在下面加上
[Copy to clipboard]
[
-
]
CODE:
require_once DISCUZ_ROOT.'./include/cache.func.php';
updatecache('todayvisit');
6.修改 include/counter.inc.php
[Copy to clipboard]
[
-
]
CODE:
if(!$sessionexists) {
if(strpos($visitor['agent'], 'Netscape')) {
$visitor['browser'] = 'Netscape';
} elseif(strpos($visitor['agent'], 'Lynx')) {
$visitor['browser'] = 'Lynx';
} elseif(strpos($visitor['agent'], 'Opera')) {
$visitor['browser'] = 'Opera';
} elseif(strpos($visitor['agent'], 'Konqueror')) {
$visitor['browser'] = 'Konqueror';
} elseif(strpos($visitor['agent'], 'MSIE')) {
$visitor['browser'] = 'MSIE';
} elseif(substr($visitor['agent'], 0, 7) == 'Mozilla') {
$visitor['browser'] = 'Mozilla';
} else {
$visitor['browser'] = 'Other';
}
if(strpos($visitor['agent'], 'Win')) {
$visitor['os'] = 'Windows';
} elseif(strpos($visitor['agent'], 'Mac')) {
$visitor['os'] = 'Mac';
} elseif(strpos($visitor['agent'], 'Linux')) {
$visitor['os'] = 'Linux';
} elseif(strpos($visitor['agent'], 'FreeBSD')) {
$visitor['os'] = 'FreeBSD';
} elseif(strpos($visitor['agent'], 'SunOS')) {
$visitor['os'] = 'SunOS';
} elseif(strpos($visitor['agent'], 'OS/2')) {
$visitor['os'] = 'OS/2';
} elseif(strpos($visitor['agent'], 'AIX')) {
$visitor['os'] = 'AIX';
} elseif(preg_match("/(Bot|Crawl|Spider)/i", $visitor['agent'])) {
$visitor['os'] = 'Spiders';
} else {
$visitor['os'] = 'Other';
}
更換為
[Copy to clipboard]
[
-
]
CODE:
if(!$sessionexists || $discuz_uid) {
if(strpos($visitor['agent'], "MSIE 7.0")) {
$visitor_browser = "Internet Explorer 7.0";
$visitor['browser'] = 'MSIE';
} elseif(strpos($visitor['agent'], "MSIE 6.0")) {
$visitor_browser = "Internet Explorer 6.0";
$visitor['browser'] = 'MSIE';
} elseif(strpos($visitor['agent'], "MSIE 5.5")) {
$visitor_browser = "Internet Explorer 5.5";
$visitor['browser'] = 'MSIE';
} elseif(strpos($visitor['agent'], "MSIE 5.0")) {
$visitor_browser = "Internet Explorer 5.0";
$visitor['browser'] = 'MSIE';
} elseif(strpos($visitor['agent'], "MSIE 4.01")) {
$visitor_browser = "Internet Explorer 4.01";
$visitor['browser'] = 'MSIE';
} elseif(strpos($visitor['agent'], "Netscape")) {
$visitor_browser = "Netscape";
$visitor['browser'] = 'Netscape';
} elseif(strpos($visitor['agent'], "Lynx")) {
$visitor_browser = "Lynx";
$visitor['browser'] = 'Lynx';
} elseif(strpos($visitor['agent'], "Opera")) {
$visitor_browser = "Opera";
$visitor['browser'] = 'Opera';
} elseif(strpos($visitor['agent'], "Konqueror")) {
$visitor_browser = "Konqueror";
$visitor['browser'] = 'Konqueror';
} elseif(strpos($visitor['agent'], "Firefox")) {
$visitor_browser = "Firefox";
$visitor['browser'] = 'Mozilla';
} elseif(strpos($visitor['agent'], "Mozilla/5.0")) {
$visitor_browser = "Mozilla";
$visitor['browser'] = 'Mozilla';
} else {
$visitor_browser = "其它";
$visitor['browser'] = 'Other';
}
if(strpos($visitor['agent'], "NT 5.1")) {
if(strpos($visitor['agent'], "SV1")){
$visitor_os = "Windows XP SP2";
$visitor['os'] = 'Windows';
}else{
$visitor_os = "Windows XP";
$visitor['os'] = 'Windows';
}
}elseif(strpos($visitor['agent'], "NT 6.0")) {
$visitor_os = "Win Vista";
$visitor['os'] = 'Windows';
}elseif(strpos($visitor['agent'], "NT 5.2")) {
$visitor_os = "Windows Server 2003";
$visitor['os'] = 'Windows';
}elseif(strpos($visitor['agent'], "NT 5")) {
$visitor_os = "Windows 2000";
$visitor['os'] = 'Windows';
} elseif(strpos($visitor['agent'], "4.9")) {
$visitor_os = "Windows ME";
$visitor['os'] = 'Windows';
} elseif(strpos($visitor['agent'], "NT 4")) {
$visitor_os = "Windows NT 4.0";
$visitor['os'] = 'Windows';
} elseif(strpos($visitor['agent'], "98")) {
$visitor_os = "Windows 98";
$visitor['os'] = 'Windows';
} elseif(strpos($visitor['agent'], "95")) {
$visitor_os = "Windows 95";
$visitor['os'] = 'Windows';
} elseif(strpos($visitor['agent'], "Mac")) {
$visitor_os = "Mac";
$visitor['os'] = 'Mac';
} elseif(strpos($visitor['agent'], "Linux")) {
$visitor_os = "Linux";
$visitor['os'] = 'Linux';
} elseif(strpos($visitor['agent'], "Unix")) {
$visitor_os = "Unix";
$visitor['os'] = 'Other';
} elseif(strpos($visitor['agent'], "FreeBSD")) {
$visitor_os = "FreeBSD";
$visitor['os'] = 'FreeBSD';
} elseif(strpos($visitor['agent'], "SunOS")) {
$visitor_os = "SunOS";
$visitor['os'] = 'SunOS';
} elseif(strpos($visitor['agent'], "OS/2")) {
$visitor_os = "OS/2";
$visitor['os'] = 'OS/2';
}elseif(strpos($visitor['agent'], "AIX")) {
$visitor_os = "AIX";
$visitor['os'] = 'AIX';
} elseif(preg_match("/(Bot|Crawl|Spider)/i", $visitor['agent'])) {
$visitor_os = "Spiders";
$visitor['os'] = 'Spiders';
} else {
$visitor_os = "其他";
$visitor['os'] = 'Other';
}
7. 修改 index.php
7.1找
[Copy to clipboard]
[
-
]
CODE:
$discuz_action = 1;
下加
[Copy to clipboard]
[
-
]
CODE:
if(isset($statvars['hotforum'])) {
$hotforum = unserialize($statvars['hotforum']);
} else {
$query = $db->query("SELECT posts, threads, fid, name FROM {$tablepre}forums WHERE status>0 ORDER BY posts DESC LIMIT 1");
$hotforum = $db->fetch_array($query);
$db->query("REPLACE INTO {$tablepre}statvars (type, variable, value)
VALUES ('main', 'hotforum', '".addslashes(serialize($hotforum))."')");
}
7.2找
[Copy to clipboard]
[
-
]
CODE:
$catlist = $forumlist = $sublist = $pmlist = array();
在上面加上
[Copy to clipboard]
[
-
]
CODE:
if(!$statstatus && $discuz_uid){
require_once DISCUZ_ROOT.'./include/counter.inc.php';
}
require_once DISCUZ_ROOT.'./include/misc.func.php';
$mem_home = convertip($onlineip, $datadir = "./");
@include './forumdata/cache/cache_newtopic.php';
@include './forumdata/cache/cache_newreply.php';
找
[Copy to clipboard]
[
-
]
CODE:
'forumlinks', 'birthdays', 'supe_updateusers'
在後面插入
[Copy to clipboard]
[
-
]
CODE:
, 'foruminfo'
8. 修改 register.php
8.1找
[Copy to clipboard]
[
-
]
CODE:
$styleid = $styleid ? $styleid : $_DCACHE['settings']['styleid'];
在下面加上
[Copy to clipboard]
[
-
]
CODE:
$datecut = time() - (3600 * 24);
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}members WHERE regdate>='$datecut'");
$todaynewmems = $db->result($query, 0);
找
[Copy to clipboard]
[
-
]
CODE:
updatesettings();
在上面加上
[Copy to clipboard]
[
-
]
CODE:
$_DCACHE['settings']['todaynewmems'] = $todaynewmems;
9.修改discuz模版
9.1刪除以下文字
[Copy to clipboard]
[
-
]
CODE:
<div style="width: {TABLEWIDTH}; clear: both; overflow: hidden;">
<div class="left" style="line-height: 18px;">
<span class="bold"><!--{if $gid || !$discuz_uid}--><a href="$indexname">$bbname</a><!--{else}-->$discuz_user<!--{/if}-->
<!--{if $supe_status && $discuz_uid}-->
-
<!--{if !$xspacestatus}-->
<a href="$supe_siteurl/index.php?action/register" target="_blank">{lang supe_signin_xspace}</a>
<!--{else}-->
<a href="$supe_siteurl/index.php?action/space/uid/$discuz_uid" target="_blank">{lang supe_myxspace}</a>
<!--{/if}-->
<!--{/if}-->
</span>
<br>
{lang credits}: <span class="bold smalltxt">$credits</span> <span id="creditlist">{lang credits_detail}<script type="text/javascript">menuregister(false, "creditlist", true)</script></span> / {lang index_status}:
<!--{if $validdays}-->
<a href="member.php?action=groupexpiry"><span class="bold">$grouptitle</span>($validdays)</a>
<!--{else}-->
<span class="bold">$grouptitle</span><!--{/if}-->
<!--{if $allowinvisible && $discuz_uid}-->{lang online_status}:
<!--{if !empty($invisible)}-->
<a href="member.php?action=switchstatus" title="{lang login_switch_normal_mode}">{lang login_invisible_mode}</a>
<!--{else}-->
<a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}">{lang login_normal_mode}</a>
<!--{/if}-->
<!--{/if}--><br>
{lang your_lastvisit} <span class="smalltxt">$lastvisittime</span><br>
</div>
<div class="right" style="line-height: 18px;">
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> |
<!--{if $discuz_uid}-->
<!--{if $allowuseblog}-->
<a href="blog.php?uid=$discuz_uid" target="_blank">{lang blog}</a> |
<!--{/if}-->
<!--{/if}-->
<a href="digest.php">{lang digest}</a> |
<a href="member.php?action=markread">{lang mark_read}</a>
<!--{if $rssstatus}--><a href="rss.php?auth=$rssauth" target="_blank"><img src="images/common/xml.gif" border="0" class="absmiddle" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
<br>
{lang total} <span class="smalltxt">$threads</span> {lang index_threads} / <span class="smalltxt">$posts</span> {lang index_posts} / {lang index_today} <span class="smalltxt">$todayposts</span> {lang index_posts}<br>
{lang total} <span class="smalltxt">$totalmembers</span> {lang index_members} / {lang welcome_newmember} <a href="viewpro.php?username=$memberenc"><span class="bold">$lastmember</span></a>
</div>
</div><br>
<!--{if empty($gid)}-->
<!--{if !empty($announcements)}-->
<div id="announcement" style="clear: both; width: {TABLEWIDTH}">$announcements</div>
<script type="text/javascript">announcement();</script>
<!--{/if}-->
<!--{if $qihoo_status && $searchboxstatus}-->
<div class="subtable" style="clear: both; width: {TABLEWIDTH}">
<div class="right">
<form method="post" action="search.php?srchtype=qihoo" onSubmit="this.target='_blank';">
<input type="hidden" name="searchsubmit" value="yes">
<input type="text" name="srchtxt" value="$qihoo_searchboxtxt" size="30" class="input" style="{BGCODE};" onmouseover="this.focus();this.value='';this.onmouseover=null;">
<select name="stype"><option value="" selected>{lang qihoo_search_filltext}</option><option value="1">{lang qihoo_search_title}</option><option value="2">{lang qihoo_search_author}</option></select>
<input name="searchsubmit" class="button" type="submit" value="{lang search}">
</form>
</div>
<!--{if $qihoo_links['keywords']}-->
<span class="bold">{lang qihoo_hot_searches}</span>
<!--{loop $qihoo_links['keywords'] $link}-->
$link
<!--{/loop}-->
<!--{/if}-->
</div>
<div class="subtable" style="clear: both; width: {TABLEWIDTH}">
<div class="right">
<!--{if $customtopics}-->
<span class="bold">{lang qihoo_custom_topics}</span> $customtopics [<a href="###" onclick="window.open('misc.php?action=customtopics', '', 'width=320,height=450,resizable=yes,scrollbars=yes');">{lang edit}</a>]
<!--{/if}-->
</div>
<!--{if $qihoo_links['topics']}-->
<span class="bold">{lang qihoo_topics}</span>
<!--{loop $qihoo_links['topics'] $url}-->
{$url}
<!--{/loop}-->
<!--{/if}-->
</div>
<!--{/if}-->
<!--{/if}-->
9.2找
[Copy to clipboard]
[
-
]
CODE:
<!--{if !empty($newpmexists) || $announcepm}-->
<div style="clear: both; margin-top: 5px" id="pmprompt">
{template pmprompt}
</div>
<!--{/if}-->
下面加入
[Copy to clipboard]
[
-
]
CODE:
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="{ALTBG1}" align="center">
<tr>
<td width="185" height="100%" valign="top" bgcolor="{ALTBG1}">
<center>
</p>
{template index_foruminfo}
</center>
</td>
<td height="100%" valign="top">
9.3找
[Copy to clipboard]
[
-
]
CODE:
<div class="tableborder" style="width: 300px; padding: 9px; background-color: {ALTBG1}"><span class="smalltxt">
<img src="{IMGDIR}/red_forum.gif" class="absmiddle" alt="" /> {lang forum_newposts}
<img src="{IMGDIR}/forum.gif" class="absmiddle" alt="" /> {lang forum_nonewpost}</span></div>
上面加入
[Copy to clipboard]
[
-
]
CODE:
</table>
10.修改index_foruminfo.htm
找
[Copy to clipboard]
[
-
]
CODE:
var now=new Date();var spday=new Date
在後修改論壇正式開放的日期
11.更新緩存
你完成了
[
本帖最後由 patrickho 於 2007-8-18 13:13 編輯
]
附件:
您所在的用戶組無法下載或查看附件
AL8 Forum © All rights reserved.
rextsang
0045651
頭銜: Forum Legend
暱稱: Moderator
自述: 我唔係板主
帖子: 11188
精華: 0
積分: 3360 點
現金: 0 元
存款: 41568 元
閱讀權限: 70
註冊: 2006-5-26
狀態: 離線
#2
大
中
小
發表於 2007-7-26 20:28
資料
個人空間
短消息
加為好友
純支持...
#非黃金廣告位
AL8 Forum © All rights reserved.
patrickho
0044259
頭銜: Forum Legend
自述: 特派潛水員
帖子: 1965
精華: 0
積分: 160 點
現金: 0 元
存款: 9417 元
閱讀權限: 70
註冊: 2006-4-29
狀態: 離線
#3
大
中
小
發表於 2007-7-26 20:33
資料
個人空間
主頁
短消息
加為好友
回覆 #2 rextsang 的帖子
改到你死,for有心人用
AL8 Forum © All rights reserved.
ab260531
0069716
頭銜: Lord
帖子: 376
精華: 0
積分: 510 點
現金: 160 元
存款: 2956 元
閱讀權限: 25
註冊: 2007-3-12
狀態: 離線
#4
大
中
小
發表於 2007-7-26 21:56
資料
個人空間
短消息
加為好友
INSH風格裝左...我諗應該好怪la...都係吾裝la...十卜你呵...
留位更新...
AL8 Forum © All rights reserved.
c3762
0007771
頭銜: Conqueror
帖子: 128
精華: 0
積分: 880 點
現金: 80 元
存款: 796 元
閱讀權限: 20
註冊: 2004-9-16
狀態: 離線
#5
大
中
小
發表於 2007-7-26 21:59
資料
個人空間
短消息
加為好友
來支持一下自己的東東的改良版^^
AL8 Forum © All rights reserved.
patrickho
0044259
頭銜: Forum Legend
自述: 特派潛水員
帖子: 1965
精華: 0
積分: 160 點
現金: 0 元
存款: 9417 元
閱讀權限: 70
註冊: 2006-4-29
狀態: 離線
#6
大
中
小
發表於 2007-7-26 22:58
資料
個人空間
主頁
短消息
加為好友
回覆 #4 ab260531 的帖子
細框用唔靚
認同
AL8 Forum © All rights reserved.
123qaq
0059968
頭銜: Newbie
帖子: 31
精華: 0
積分: 490 點
現金: 100 元
存款: 0 元
閱讀權限: 10
註冊: 2006-12-7
狀態: 離線
#7
大
中
小
發表於 2007-7-26 23:01
資料
個人空間
短消息
加為好友
如果安左之前個版,咁有冇得升
AL8 Forum © All rights reserved.
patrickho
0044259
頭銜: Forum Legend
自述: 特派潛水員
帖子: 1965
精華: 0
積分: 160 點
現金: 0 元
存款: 9417 元
閱讀權限: 70
註冊: 2006-4-29
狀態: 離線
#8
大
中
小
發表於 2007-7-26 23:10
資料
個人空間
主頁
短消息
加為好友
如使用左側四格(改自4.0)作者:c3762
升級方法:
1.打開index.php
1.1刪除
[Copy to clipboard]
[
-
]
CODE:
//新貼//
$hack_cut_str = 36; //修改標題顯示字數
$new_post_threadlist = array();
$nthread = array();
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
$nthread['forumname'] = $nthread['name'];
$nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
$nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
$nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
if($nthread['highlight']) {
$string = sprintf('%02d', $nthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$nthread['highlight'] = 'style="';
$nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$nthread['highlight'] .= '"';
} else {
$nthread['highlight'] = '';
}
$new_post_threadlist[] = $nthread;
}
//新貼//
//新回覆
$hack_cut_str = 36; //修改標題顯示字數
$new_reply_threadlist = array();
$rthread = array();
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 10");
while($rthread = $db->fetch_array($query)) {
$rthread['forumname'] = $rthread['name'];
$rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
$rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
$rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
if($rthread['highlight']) {
$string = sprintf('%02d', $rthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$rthread['highlight'] = 'style="';
$rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$rthread['highlight'] .= '"';
} else {
$rthread['highlight'] = '';
}
$new_reply_threadlist[] = $rthread;
}
//回覆//
2.修改Discuz模板
找
[Copy to clipboard]
[
-
]
CODE:
<table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" style="table-layout: fixed">
<!--左右分割開始前斷Start--><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="{ALTBG2}" align="center">
</p>
<tr>
<td width="185" height="100%" valign="top" bgcolor="{ALTBG2}">
<center>
<!--論壇資料Start-->
<table border="0" width="94%" cellspacing="0" cellpadding="3" style="border: 1 solid #aab6ba" valign=top>
<tr>
<td width="100%" align="left" bgcolor="{BORDERCOLOR}" style="font-family: Tahoma, Verdana; font-size: 12px; color: {HEADERTEXT}; font-weight: bold;" class="header">
<p>論壇資料</td>
</tr>
<tr>
<td width="100%" align="left" bgcolor="{ALTBG2}">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="100%">
<a href="index.php"><strong>$bbname</strong></a><br>
<img src="images/go.gif"> 會員總數: <span class="bold">$totalmembers </span> 位<br>
<img src="images/go.gif"> 主題總數: <span class="bold">$threads </span>篇<br>
<img src="images/go.gif"> 帖子總數: <span class="bold">$posts </span> 篇<br>
<img src="images/go.gif"> 歡迎新會員: <a href="viewpro.php?username=$memberenc"><span class="bold">$lastmember</span></a><br>
<li><a href="search.php?srchfrom=$newthreads&searchsubmit=yes">查看新帖</a><br>
<li><a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_mytopics}</a><br>
<li><a href="digest.php">精華區</a><br>
<li><a href="blog.php?uid=$discuz_uid" target="_blank">{lang blog}</a><br>
<li><a href="member.php?action=markread">標記已讀</a><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<!--論壇資料End-->
<!--用戶資料及快速登陸Start-->
<table border="0" width="94%" cellspacing="0" cellpadding="3" style="border: 1 solid #aab6ba" valign=top>
<tr>
<td width="100%" align="left" bgcolor="{BORDERCOLOR}" style="font-family: Tahoma, Verdana; font-size: 12px; color: {HEADERTEXT}; font-weight: bold;" class="header">
<p>個人資料</td>
</tr>
<tr>
<td width="100%" align="left" bgcolor="{ALTBG2}">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="100%">
<p><!--{if !$discuz_uid}-->
<img src="images/go.gif"> 請先<a href="register.php">註冊</a>成為會員
<form method="post" name="login" action="logging.php?action=login">
<input type="hidden" name="formhash" value="{FORMHASH}">
<input type="hidden" name="referer" value="$referer">
<input type="hidden" name="cookietime" value="2592000"><br>
名稱: <input type="text" name="username" size="20" maxlength="40" tabindex="1"> <br>
{lang password}: <input type="password" name="password" size="20" tabindex="2"><br>
隱身: <select name="loginmode"><option value=""> {lang use_default}</option>
<option value="normal"> {lang login_normal_mode}</option>
<option value="invisible"> {lang login_invisible_mode}</option>
</select>
<br>
Cookies:
<select name=cookietime><option $task_checked selected value=0>不紀錄</option>
<option $hour_checked value=3600>{lang login_one_hour}</option>
<option $day_checked value=86400>{lang login_one_day}</option>
<option $month_checked value=2592000>{lang login_one_month}</option>
<option $year_checked value=31536000>{lang login_permanent}</option></select><br>
<center><input type="submit" name="loginsubmit" value="登入"></center><br>
<tr><td>{lang security_question} : <select name="questionid" tabindex="3">
<option value="0">{lang security_question_0}</option>
<option value="1">{lang security_question_1}</option>
<option value="2">{lang security_question_2}</option>
<option value="3">{lang security_question_3}</option>
<option value="4">{lang security_question_4}</option>
<option value="5">{lang security_question_5}</option>
<option value="6">{lang security_question_6}</option>
<option value="7">{lang security_question_7}</option><br>
</select>
<tr><td><input type="text" name="answer" size="18" tabindex="4">
<!--{if $seccodecheck}-->
{lang seccode} : <input type="text" name="seccodeverify" size="15" tabindex="3" maxlength="4" AUTOCOMPLETE="off"> <img src="seccode.php?sid=$sid" align="absmiddle"><br>
<!--{/if}-->
<br>
<input type="submit" name="loginsubmit" value="{lang submit}" tabindex="4"><br>
</td></form></tr>
<!--{else}-->
<tr><td><img src="images/go.gif"> {lang index_status}: <!--{if $validdays}--><a href="member.php?action=groupexpiry">$grouptitle</span>($validdays)</a><!--{else}-->$grouptitle<!--{/if}--> <br>
<tr><td><img src="images/go.gif"> 用戶名: <span class="bold">$discuz_userss</span>
<!--{if $invisible}-->{lang login_invisible_mode}<!--{/if}-->/ <a href="logging.php?action=logout">{lang logout}</a><br>
<tr><td><img src="images/go.gif"> {lang credits}: <span class="bold">$credits</span>
<!--{loop $extcredits $id $credit}--><br>
<tr><td><img src="images/go.gif"> $credit[title]: <span class="bold">$GLOBALS[extcredits.$id]</span> $credit[unit]
<!--{/loop}-->
<!--{/if}-->
<tr><td><img src="images/go.gif"> IP: <span class="bold">$onlineip</span><br>
<tr><td><img src="images/go.gif"> 上次訪問: <span class="bold">$lastvisittime</span><br>
<tr><td><img src="images/go.gif"> {lang timenow}: <span class="bold">$currenttime</span><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<!--用戶資料及快速登陸End-->
<!--最新主題Start-->
<table border="0" width="94%" cellspacing="0" cellpadding="3" style="border: 1 solid #aab6ba" valign=top>
<tr>
<td width="100%" align="left" bgcolor="{BORDERCOLOR}" style="font-family: Tahoma, Verdana; font-size: 12px; color: {HEADERTEXT}; font-weight: bold;" class="header">
<p>最新主題</td>
</tr>
<tr bgcolor="{ALTBG2}">
<td><!--{loop $new_post_threadlist $nthread}-->
<!--{if $nthread[replies]}-->
<img src="images/go.gif"> <a href="redirect.php?tid=$nthread[tid]&goto=newpost" title="最新話題 {LF}{lang forum}: $nthread[forumname]{LF}{lang subject}: $nthread[subject]{LF}{lang author}: $nthread[author]{LF}發表{lang time}: $nthread[date]{LF}{lang replies}: $nthread[replies] 次{LF}最後回覆: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]">$nthread[view_subject]</a>
<!--{else}-->
<img src="images/go.gif"> <a href="redirect.php?tid=$nthread[tid]&goto=newpost" title="最新話題 {LF}{lang forum}: $nthread[forumname]{LF}{lang subject}: $nthread[subject]{LF}{lang author}: $nthread[author]{LF}發表{lang time}: $nthread[date]{LF}{lang replies}: 暫時沒有回覆">$nthread[view_subject]</a><!--{/if}-->
$nthread[multipage]<br>
<!--{/loop}--></td>
</tr>
</table>
<br>
<!--最新主題End-->
<!--最新回覆Start-->
<table border="0" width="94%" cellspacing="0" cellpadding="3" style="border: 1 solid #aab6ba" valign=top>
<tr>
<td width="100%" align="left" bgcolor="{BORDERCOLOR}" style="font-family: Tahoma, Verdana; font-size: 12px; color: {HEADERTEXT}; font-weight: bold;" class="header">
<p>最新回覆</td>
</tr>
<tr bgcolor="{ALTBG2}">
<td><!--{loop $new_reply_threadlist $rthread}-->
<img src="images/go.gif"> <a href="redirect.php?tid=$rthread[tid]&goto=lastpost#lastpost" title="最新回覆 {LF}{lang forum}: $rthread[forumname]{LF}{lang subject}: $rthread[subject]{LF}{lang author}: $rthread[author]{LF}發表{lang time}: $rthread[date]{LF}{lang replies}: $rthread[replies] 次{LF}最後回覆: $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]">$rthread[view_subject]</a>
$rthread[multipage]<br>
<!--{/loop}--></td>
</tr>
</table>
<br>
<!--最新回覆End-->
<!--論壇選項及快速搜尋Start-->
<table border="0" width="94%" cellspacing="0" cellpadding="3" style="border: 1 solid #aab6ba" valign=top>
<tr>
<td width="100%" align="left" bgcolor="{BORDERCOLOR}" style="font-family: Tahoma, Verdana; font-size: 12px; color: {HEADERTEXT}; font-weight: bold;" class="header">
<p>快速搜尋</td>
</tr>
<form method="post" action="search.php">
<tr bgcolor="{ALTBG2}" align="center">
<td align="center">
<p align="left">
<input type="hidden" name="formhash" value="{FORMHASH}">
<table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center">
<tr><td>
<p align="center">{lang search_keywords}<br><input type="text" name="srchtxt" size="20" maxlength="40"></td></tr></table>
<center><input type="submit" name="searchsubmit" value="{lang submit}"></center>
</td></tr></form>
</table>
<br>
<!--論壇選項及快速搜尋End-->
<!--計數器Start-->
<table border="0" width="94%" cellspacing="0" cellpadding="3" style="border: 1 solid #aab6ba" valign=top>
<tr>
<td width="100%" align="left" bgcolor="{BORDERCOLOR}" style="font-family: Tahoma, Verdana; font-size: 12px; color: {HEADERTEXT}; font-weight: bold;" class="header">
<p>計數器</td>
</tr>
<tr>
<td width="100%" bgcolor="{ALTBG2}">
<img src="images/go.gif"> 在線人數: <span class="bold">$onlinenum</span>($guestcount 遊客)<br>
<img src="images/go.gif"> 最高紀錄: <span class="bold">$onlineinfo[0]</span><br>
<img src="images/go.gif"> 今日到訪會員: <span class="bold">$totalmembers</span>
</td>
</tr>
</table>
<br>
<!--計數器End-->
<!--聯盟論壇Start-->
<table border="0" width="94%" cellspacing="0" cellpadding="