1 頁 (共 1 頁)

[外掛修改]裝了最後回覆顯示於首頁後想裝今天昨天的修改法

發表於 : 2003-07-22 14:24
狂龍天
裝完最後回覆顯示於首頁後~我發覺無法再裝今天昨天的外掛~
後來查一下程式碼~發覺兩個外掛在index.php的地方有重疊的部份~
所以就把程式碼改一改~如果你想兩個都裝的話~
可以依我的方法將index.php的該位置置換成下面的程式碼~

代碼: 選擇全部

######################################################## 
## Mod Title:  last_topic_title_index plus today_yesterday_mod_1_2_0   
## Mod Version: 1.0.0 
## Author:       狂龍天 <jackal760604@hotmail.com> 
## Description:  裝了最後回覆顯示於首頁的外掛後想裝今天昨天的外掛時請 
##                    依下方改 
## 
## Installation Level:  fairly easy 
## Installation Time:   1 minutes 
## Files To Edit:       index.php 
##                           
###############################################
##先裝完最後回覆顯示於首頁的外掛~然後裝今天昨天外掛~
##跳過index.php~~~~改完後依下面方法改~
######### 
# 
#---- [ OPEN ] -------- 
# 

index.php 

# 
#----- [ FIND ] ---- 
# 

$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';								
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $topic_title2 . '">' . $topic_title . '</a><br>';
$last_post .= $last_post_time . ' <a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . ' ';

# 
#---- [ REPLACE WITH ] ---- 
# 

$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';								
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $topic_title2 . '">' . $topic_title . '</a><br>';
// OLD
//$last_post .= $last_post_time . ' <a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . ' ';
//
// TODAY AT MOD
//
if ( $board_config['time_today'] < $forum_data[$j]['post_time'])
	{ 
	$last_post .=  sprintf($lang['Today_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . ' <a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . ' ';
	}
else if ( $board_config['time_yesterday'] < $forum_data[$j]['post_time'])
	{ 
		$last_post .= sprintf($lang['Yesterday_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . ' <a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . ' ';
	}
	else
	{ 
		$last_post .= $last_post_time . ' <a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . ' ';
	} 
// END MOD

發表於 : 2003-07-23 01:22
動機不明
您好
感謝您提供這方面的修改訊息~
但是因為每個人的程式碼內容不一樣,因此本篇僅供參考!

(有需要的朋友請各位在修改時千萬小心比對,不要莽撞的就覆蓋下去了喔~)