[問題]Automatic Subject on Reply

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
aiken
竹貓忠實會員
竹貓忠實會員
文章: 1514
註冊時間: 2003-11-09 11:02
來自: 大頭真論壇
聯繫:

[問題]Automatic Subject on Reply

文章 aiken »

##############################################################
## MOD Title: Automatic Subject on Reply
## MOD Author: drathbun < drathbun@forumtopics.com > (Dave Rathbun)
## MOD Description: Simple mod to add a default subject on all post replies
## MOD Version: 1.0.1
##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit: posting.php
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ 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/downloads/
##############################################################
## Author Notes:
## This very simple mod provides a default subject on all post replies
## It essentially duplicates the "Quote" function of a default subject.
## 2.0.4 compatible as written
## Installation Notes
## The "After, Add" operation is used in the mod notes because that's one of the
## available options. However, what you can really do is replace the line:
## $subject = '';
## with the "After, Add" code. The code will work if installed per these
## instructions, so it should be compatible with any automatic mod installers.
## But the reason for the mod instructions being written the way they are is
## there are two instances of the line
##
## $subject = '';
##
## in the code. I had to provide enough lines to be specific.
##
## 2.0.3 compatible with one additional edit, detailed here. You have to add the
## topic_title to the sql that retrieves the post info. In 2.0.4 this change has
## already been made, and therefore is not included in the standard mod install
## operations.
##
## OPEN posting.php
## FIND $sql = "SELECT f.*, t.topic_status
## IN-LINE AFTER, ADD , t.topic_title
##
##
## 1.0.1 update notes
## Changed initial subject to limit to 60 characters. MySQL does not
## require this mod, but other databases might.
##
## No language entries or template changes are required for this very simple mod.
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

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

#
#-----[ FIND ]------------------------------------------
#
else if ( $mode == 'reply' )
{
$user_sig = ( $userdata['user_sig'] != '' ) ? $userdata['user_sig'] : '';

$username = ( $userdata['session_logged_in'] ) ? $userdata['username'] : '';
$subject = '';

#
#-----[ AFTER, ADD ]------------------------------------------
#
// begin Automatic Subject on Reply mod
$subject = $post_info['topic_title'];
if ( !preg_match('/^Re:/', $subject) && strlen($subject) > 0)
{
$subject = substr('Re: ' . $subject, 0, 60);
}
// end Automatic Subject on Reply mod


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

●網站位置: http://aikenlin.idv.tw
●架設主機作業系統:Windows Xp Pro
●快速架站程式:無
●上網方式:東森 CABLE
●安裝的程式:Apache 2.0.48 MySQL 4.0.16 PHP 4.3.4
●phpBB2 版本:phpBB 2.0.3
●問題外掛:Automatic Subject on Reply
●參考連結:http://www.phpbb.com/phpBB/viewtopic.ph ... 351#884351

我裝了這支外掛之後回覆文章已經可以自動的加上標題了
可是使用快速回覆就破功....
viewtopic.php 研究了好久還是沒有辦法解決...
就是沒有辦法把主題的變數傳回posting.php...才疏學淺..... :cry:
有沒有高手可以幫忙一下....
竹貓忠實會員
竹貓忠實會員
文章: 1058
註冊時間: 2003-05-15 00:30
來自: Game.Hack-遊戲駭客
聯繫:

文章 »

貴站竟然有小弟的Logo~離題了^^||
有事問問題,沒事答問題。
廣告不是這樣打滴!遊戲駭客
aiken
竹貓忠實會員
竹貓忠實會員
文章: 1514
註冊時間: 2003-11-09 11:02
來自: 大頭真論壇
聯繫:

文章 aiken »

ㄛ....那個sanyo是你啊...
我還在納悶那是誰咧...因為目前小站是家族式經營....
人口稀少咧.....
竹貓忠實會員
竹貓忠實會員
文章: 1058
註冊時間: 2003-05-15 00:30
來自: Game.Hack-遊戲駭客
聯繫:

文章 »

不是@@~快改版了!等小弟月底改版在告訴你
因為現在站還有點醜醜的。。。這次改版是花了我快三個月的心血!
有事問問題,沒事答問題。
廣告不是這樣打滴!遊戲駭客
主題已鎖定

回到「外掛問題討論」