[推薦: 2.0.6] 回覆文章時可看到主題名稱

Officially Approved MODs
由 phpBB Group 官方發展小組認證的 MOD!

版主: 版主管理群

版面規則
請注意!只有發表在 [2.0.x] MOD Database Releases 的外掛,才算是官方認證的外掛。
主題已鎖定
bensonwu
星球普通子民
星球普通子民
文章: 5
註冊時間: 2003-09-01 16:41

[推薦: 2.0.6] 回覆文章時可看到主題名稱

文章 bensonwu »

MOD Name: View Topic Name While Posting MOD
Author: GPHemsley
MOD Description: This will allow you to see what topic you are replying to when you are posting a reply.

MOD Version: 1.0.5 (Updated: 08/18/03)
Installation Level: Easy
Installation Time: ~ 5 Minutes


Download File: View_Topic_Name_While_Posting_Mod_1-0-5.zip
File Size: 7997 Bytes

在回覆文章時 竟然看不到該文章的主題名稱?!
這個mod就是補上這個小缺失...
蠻好裝的 沒什麼要特別注意

代碼: 選擇全部

############################################################## 
## MOD Title: View Topic Name While Posting MOD
## MOD Author: GPHemsley < GPHemsley@aol.com > (Gordon P. Hemsley) http://www.lttp.net/
## MOD Description: This will allow you to see what topic you are replying to when you are 
## posting a reply.
## MOD Version: 1.0.5
## 
## Installation Level: Easy
## Installation Time: 3-5 minutes.
## Files To Edit: 2
##              - posting.php
##              - templates/subSilver/posting_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/ 
############################################################## 
## Author Notes: 
##
## The MOD shows you the name of the topic you are replying to and provides a link back if you 
## want/need it. This does not show when posting a new topic or send a private message.
############################################################## 
## MOD History:
##
##   2003-08-11 - Version 1.0.5
##      - Fixed a bit of the MOD template.
##      - Compatible with phpBB 2.0.6.
##      - No need to update files if you have 1.0.4 installed.

##   2003-07-25 - Version 1.0.4
##      - Fixed some more of the MOD template.
##      - Made sure that it appeared during Quoting and Editing, as well.
##      - Included upgrade MODs for previous versions. Take caution when using EasyMOD.
##
##   2003-07-25 - Version 1.0.3
##      - Fixed the MOD template.
##      - Added descriptive Author Notes.
##      - No need to update files if you have Version 1.0.2 installed.
##
##   2003-06-01 - Version 1.0.2
##      - Fixed the problem of the -> [Topic Title] not showing because of a typo.
##      - Added a forgotten MOD Indentifier comment around inserted code.
##
##   2003-05-31 - Version 1.0.1
##      - Fixed the problem of the -> showing when not posting a reply.
##      - Added MOD Indentifier comments around inserted code.
##
##   2003-05-21 - Version 1.0.0
##      - Allows for the showing of the topic name when posting.
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ OPEN ]------------------------------------------
#
posting.php

#
#-----[ FIND ]------------------------------------------
#
	$forum_name = $post_info['forum_name'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin View Topic Name While Posting MOD
      $topic_title = $post_info['topic_title'];
// End View Topic Name While Posting MOD

#
#-----[ FIND ]------------------------------------------
#
	'FORUM_NAME' => $forum_name,
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin View Topic Name While Posting MOD
	'TOPIC_SUBJECT' => $topic_title,
// End View Topic Name While Posting MOD

#
#-----[ FIND ]------------------------------------------
#
	'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Begin View Topic Name While Posting MOD
      'U_VIEW_TOPIC' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"), 
// End View Topic Name While Posting MOD

#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('switch_not_privmsg', array());
#
#-----[ AFTER, ADD ]------------------------------------------
#

// Begin View Topic Name While Posting MOD
if ( $mode == 'reply' || $mode == 'quote' || $mode == 'editpost' )
{
$template->assign_block_vars('switch_not_privmsg.reply_mode', array());
}
// End View Topic Name While Posting MOD

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl

#
#-----[ FIND ]------------------------------------------
#
		-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
		-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a>
<!-- // Begin View Topic Name While Posting MOD -->
			<!-- BEGIN reply_mode -->
            -> <a href="{U_VIEW_TOPIC}" class="nav">{TOPIC_SUBJECT}</a>
			<!-- END reply_mode -->
<!-- // End View Topic Name While Posting MOD -->
		</span></td>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Bot
星球普通子民
星球普通子民
文章: 26
註冊時間: 2002-11-13 01:05

文章 Bot »

上面這個是針對2.0.6的版本..
2.0.3要再改一個地方..
posting.php
找到這一塊..

代碼: 選擇全部

	case 'vote':
		if ( empty( $topic_id) )
		{
			message_die(GENERAL_MESSAGE, $lang['No_topic_id']);
		}

		$sql = "SELECT f.*, t.topic_status  
			FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
			WHERE t.topic_id = $topic_id
				AND f.forum_id = t.forum_id";
		break;
加上紅色那部分..

代碼: 選擇全部

	case 'vote':
		if ( empty( $topic_id) )
		{
			message_die(GENERAL_MESSAGE, $lang['No_topic_id']);
		}

		$sql = "SELECT f.*, t.topic_status[color=red], t.topic_title[/color]
			FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
			WHERE t.topic_id = $topic_id
				AND f.forum_id = t.forum_id";
		break;
jerrychf
星球公民
星球公民
文章: 41
註冊時間: 2003-03-06 10:17

文章 jerrychf »

有一個問題...
為什麼在posting_body.tpl中找不到這句的??

代碼: 選擇全部

-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
我是用phpbb2.06還有subsilver的....就算只是找{U_VIEW_FORUM}也是找不到耶...
主題已鎖定

回到「官方認證外掛」