[外掛] 顯示分區、主題、文章及會員號碼
發表於 : 2006-06-05 , 13:12
[外掛] 顯示分區、主題、文章及會員號碼
http://phpbb-tw.net/phpbb/viewtopic.php?t=31602
http://phpbb-tw.net/phpbb/viewtopic.php?t=31602
代碼: 選擇全部
##############################################################
## MOD Title: Forum, Topic, Post and User # display
## MOD Author: kp3011 <kp3011@hotmail.com> (Cheung Pui Pan) http://269m.hk.st
## MOD Description: This will display the f#, t#, p# and u# alongside with the post, forum and memberlist.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 5~10 Minutes
## Files To Edit:
## viewtopic.php
## viewforum.php
## memberlist.php
## templates/*/viewtopic_body.tpl
## templates/*/viewforum_body.tpl
## templates/*/memberlist_body.tpl
##
## Included Files: (N/A)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## MOD History:
##
## 2005-01-12 - Version 1.0.0
## - initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files related To This MOD
##############################################################
#
#-----[ OPEN viewtopic.php ]------------------------------------------
#-----[ FIND ]------------------------------------------
//
// Send vars to template
//
$template->assign_vars(array(
#-----[ ADD, AFTER ]------------------------------------------
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
#-----[ FIND ]------------------------------------------
'POST_DATE' => $post_date,
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
'SIGNATURE' => $user_sig,
'EDITED_MESSAGE' => $l_edited_by,
#-----[ ADD, AFTER ]------------------------------------------
'POSTER_ID' => $poster_id,
'POST_ID' => $postrow[$i]['post_id'],
#
#-----[ OPEN templates/*/viewtopic_body.tpl ]------------------------------------------
#-----[ FIND ]------------------------------------------
{TOPIC_TITLE}
#-----[ IN-LINE ADD, AFTER ]------------------------------------------
(t#{TOPIC_ID})
#-----[ FIND ]------------------------------------------
<a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}
#-----[ IN-LINE ADD, AFTER ]------------------------------------------
(f#{FORUM_ID})
#-----[ FIND ]------------------------------------------
{postrow.POSTER_NAME}</a></b><br />
#-----[ IN-LINE ADD, AFTER ]------------------------------------------
u#: {postrow.POSTER_ID}</span><br />
#-----[ FIND ]------------------------------------------
{postrow.POSTER_AVATAR}<br /><br />
#-----[ IN-LINE ADD, AFTER ]------------------------------------------
p#: {postrow.POST_ID}<br /><br />
#
#-----[ OPEN viewforum.php ]------------------------------------------
#-----[ FIND ]------------------------------------------
make_jumpbox('viewforum.'.$phpEx);
$template->assign_vars(array(
#-----[ ADD, AFTER ]------------------------------------------
'FORUM_ID' => $forum_id,
#-----[ FIND ]------------------------------------------
$template->assign_block_vars('topicrow', array(
'ROW_COLOR' => $row_color,
'ROW_CLASS' => $row_class,
#-----[ ADD,AFTER ]------------------------------------------
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
#
#-----[ OPEN templates/*/viewforum_body.tpl ]------------------------------------------
#-----[ FIND ]------------------------------------------
{FORUM_NAME}
#-----[ IN-LINE ADD, AFTER ]------------------------------------------
(f#{FORUM_ID})
#-----[ FIND ]------------------------------------------
<th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap"> {L_TOPICS} </th>
#-----[ ADD, AFTER ]------------------------------------------
<th width="50" align="center" class="thTop" nowrap="nowrap"> t# </th>
#-----[ FIND ]------------------------------------------
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
{topicrow.GOTO_PAGE}</span></td>
#-----[ ADD, AFTER ]------------------------------------------
<td class="row2" align="center" valign="middle"><span class="postdetails"><b>{topicrow.TOPIC_ID}</b></span></td>
#-----[ FIND ]------------------------------------------
<td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
#-----[ REPLACE WITH ]------------------------------------------
<td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
#-----[ FIND ]------------------------------------------
<td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_DISPLAY_TOPICS}: {S_SELECT_TOPIC_DAYS}
#-----[ REPLACE WITH ]------------------------------------------
<td class="catBottom" align="center" valign="middle" colspan="7" height="28"><span class="genmed">{L_DISPLAY_TOPICS}: {S_SELECT_TOPIC_DAYS}
#
#-----[ OPEN memberlist.php ]------------------------------------------
#-----[ FIND ]------------------------------------------
'ROW_NUMBER' => $i,
#-----[ REPLACE WITH ]------------------------------------------
'ROW_NUMBER' => $user_id,
#
#-----[ OPEN templates/*/memberlist_body.tpl ]------------------------------------------
#-----[ FIND ]------------------------------------------
<th height="25" class="thCornerL" nowrap="nowrap">#</th>
#-----[ REPLACE WITH ]------------------------------------------
<th height="25" class="thCornerL" nowrap="nowrap">u#</th>
#
#-----[ OPEN index.php ]------------------------------------------
#-----[ FIND ]------------------------------------------
'L_FORUM_FOLDER_ALT' => $folder_alt,
#-----[ ADD, AFTER ]------------------------------------------
'FORUM_ID' => $forum_id,
#
#-----[ OPEN templates/*/index_body.tpl ]------------------------------------------
#-----[ FIND ]------------------------------------------
<th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
#-----[ ADD, AFTER ]------------------------------------------
<th width="50" class="thTop" nowrap="nowrap"> f# </th>
#-----[ FIND ]------------------------------------------
<td class="rowpic" colspan="4" align="right"> </td>
#-----[ REPLACE WITH ]------------------------------------------
<td class="rowpic" colspan="5" align="right"> </td>
#-----[ FIND ]------------------------------------------
<td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a> <a href="{catrow.forumrow.U_QUICK_TOPIC}"><img src="{QUICK_TOPIC_IMG}" alt="{L_QUICK_TOPIC}" border="0" /></a><br />
</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
#-----[ ADD, AFTER ]------------------------------------------
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall"><b>{catrow.forumrow.FORUM_ID}</b></span></td>
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM