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

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
狂龍天
星球普通子民
星球普通子民
文章: 6
註冊時間: 2003-07-20 00:45

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

文章 狂龍天 »

裝完最後回覆顯示於首頁後~我發覺無法再裝今天昨天的外掛~
後來查一下程式碼~發覺兩個外掛在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-08-24 14:16 編輯,總共編輯了 1 次。
動機不明
喝咖啡的綠皮猴
喝咖啡的綠皮猴
文章: 1179
註冊時間: 2002-03-06 20:37
來自: GOP (重啟)

文章 動機不明 »

您好
感謝您提供這方面的修改訊息~
但是因為每個人的程式碼內容不一樣,因此本篇僅供參考!

(有需要的朋友請各位在修改時千萬小心比對,不要莽撞的就覆蓋下去了喔~)
非官方外掛問題區公告: [必看]請配合發問格式及明確主題發問(2006 02/24更新)
七點要求:
1. 發問前先搜尋,確定沒有重複後再發表
2. 主題要明確
3. 依照發問格式
4. 禁連續推文
5. 請盡量減少使用地方性語言
6. 解決問題後請修改第一篇主題,並感謝曾經幫過你的前輩們 ^^
7. 請不要將檔案內容完整貼出喔! 只要提供問題行及上下各五行就可以了
主題已鎖定

回到「非官方認證外掛」