AL8 Forum
»
Discuz 2.0 及 2.2 插件發佈
» 【插件】發貼時可加入指定會員才可看第1版
‹‹ 上一主題
|
下一主題 ››
26
1/2
1
2
››
標題: 【插件】發貼時可加入指定會員才可看第1版
打印
|
推薦
|
訂閱
|
收藏
ywndaniel
0000200
頭銜: Newbie
帖子: 33
精華:
6
積分: 4565 點
現金: 621 元
存款: 38531 元
閱讀權限: 10
註冊: 2004-1-24
狀態: 離線
#1
大
中
小
發表於 2004-7-4 23:33
資料
個人空間
短消息
加為好友
【插件】發貼時可加入指定會員才可看第1版
HACK名稱: 發貼時可加入指定會員才可看第1版
修改文件: viewthread.php, include/newthread.php, include/editpostphp,
修改模板: post_newthread, post_editpost, forumdisplay
後台升級
[Copy to clipboard]
[
-
]
CODE:
ALTER TABLE `cdb_threads` ADD `actmember` varchar( 15 ) NOT NULL;
ALTER TABLE `cdb_posts` ADD `actmember` varchar( 15 ) NOT NULL
打開viewthread.php
找到
[Copy to clipboard]
[
-
]
CODE:
$query = $db->query("SELECT * FROM $table_threads WHERE tid='$tid'");
if(!$thread = $db->fetch_array($query)) {
showmessage('thread_nonexistence');
}
在下面加入
[Copy to clipboard]
[
-
]
CODE:
//指定會員開始
$querypost = $db->query("SELECT p.*, m.username FROM $table_posts p LEFT JOIN $table_members m ON m.username=p.author WHERE p.tid='$tid'");
while($post = $db->fetch_array($querypost)) {
if($post['actmember']!='' && !$isadmin && $discuz_user!=$post['author'] && $discuz_user!=$post['actmember'])
{
showmessage('八卦,人地都唔係寫比你o既。');//隨意修改不是指定會員進入的信息
}
}
//指定會員結束
打開include/newthread.php
找到
[Copy to clipboard]
[
-
]
CODE:
if(!$isadmin && !$issupermod && !$ismoderator && $forum['lastpost']) {
$lastpost = explode("\t", $forum['lastpost']);
if(($timestamp - $floodctrl) <= $lastpost[1] && $username == $lastpost[2]) {
showmessage('post_flood_ctrl');
}
}
在下面加入
[Copy to clipboard]
[
-
]
CODE:
//指定會員開始
if($actmember!='')
{
$touser = $actmember;
$touser = addslashes(htmlspecialchars($touser));
$query = $db->query("SELECT uid,username FROM $table_members WHERE username='$actmember'");
if (!$db->num_rows($query)) {
showmessage("該用戶不存在!不能發貼,請返回。");
}
}
//指定會員結束
找到
[Copy to clipboard]
[
-
]
CODE:
$db->query("INSERT INTO $table_threads (fid, creditsrequire, icon, author, subject, dateline, lastpost, lastposter, topped, digest, closed, pollopts, attachment)
VALUES ('$fid', '$viewperm', '$posticon', '$username', '$subject', '$timestamp', '$timestamp', '$username', '$topped', '$digest', '$closed', '$pollopts', '$attach_type')");
$tid = $db->insert_id();
$db->query("INSERT INTO $table_posts (fid, tid, aid, icon, author, subject, dateline, message, useip, usesig, bbcodeoff, smileyoff, parseurloff)
VALUES ('$fid', '$tid', '$aid', '$posticon', '$username', '$subject', '$timestamp', '$message', '$onlineip', '$usesig', '$bbcodeoff', '$smileyoff', '$parseurloff')");
$pid = $db->insert_id();
改為
[Copy to clipboard]
[
-
]
CODE:
//指定會員開始
$db->query("INSERT INTO $table_threads (fid, creditsrequire, icon, author, subject, dateline, lastpost, lastposter, topped, digest, closed, pollopts, attachment, actmember)
VALUES ('$fid', '$viewperm', '$posticon', '$username', '$subject', '$timestamp', '$timestamp', '$username', '$topped', '$digest', '$closed', '$pollopts', '$attach_type', '$actmember')");
$tid = $db->insert_id();
$db->query("INSERT INTO $table_posts (fid, tid, aid, icon, author, subject, dateline, message, useip, usesig, bbcodeoff, smileyoff, parseurloff, actmember)
VALUES ('$fid', '$tid', '$aid', '$posticon', '$username', '$subject', '$timestamp', '$message', '$onlineip', '$usesig', '$bbcodeoff', '$smileyoff', '$parseurloff', '$actmember')");
//指定會員結束
$pid = $db->insert_id();
打開include/editpost.php
找到
[Copy to clipboard]
[
-
]
CODE:
$query = $db->query("SELECT author, dateline FROM $table_posts WHERE pid='$pid' AND tid='$tid' AND fid='$fid'");
$orig = $db->fetch_array($query);
$orig[author] = addslashes($orig['author']);
改為
[Copy to clipboard]
[
-
]
CODE:
//指定會員開始
$query = $db->query("SELECT author, dateline, actmember FROM $table_posts WHERE pid='$pid' AND tid='$tid' AND fid='$fid'");
$orig = $db->fetch_array($query);
$orig[author] = addslashes($orig['author']);
$orig[actmember] = addslashes($orig['actmember']);
//指定會員結束
找到
[Copy to clipboard]
[
-
]
CODE:
$postinfo['subject'] = str_replace('"', """, $postinfo['subject']);
$postinfo['message'] = dhtmlspecialchars($postinfo['message']);
$postinfo['message'] = preg_replace("/\n{2}\[ Last edited by .+? on .+? at .+? \]$/s", '', $postinfo['message']);
在下面加入
[Copy to clipboard]
[
-
]
CODE:
//指定會員開始
$postinfo['actmember'] = dhtmlspecialchars($postinfo['actmember']);
//指定會員結束
找到
[Copy to clipboard]
[
-
]
CODE:
if(!$delete) {
if(strlen($subject) > 100) {
showmessage('post_subject_toolang');
}
在下面加入
[Copy to clipboard]
[
-
]
CODE:
//指定會員開始
if($actmember!='')
{
$touser = $actmember;
$touser = addslashes(htmlspecialchars($touser));
$query = $db->query("SELECT uid,username FROM $table_members WHERE username='$actmember'");
if (!$db->num_rows($query)) {
showmessage("該用戶不存在!不能發貼,請返回。");
}
}
//指定會員結束
AL8 Forum © All rights reserved.
ywndaniel
0000200
頭銜: Newbie
帖子: 33
精華:
6
積分: 4565 點
現金: 621 元
存款: 38531 元
閱讀權限: 10
註冊: 2004-1-24
狀態: 離線
#2
大
中
小
發表於 2004-7-4 23:34
資料
個人空間
短消息
加為好友
找到
[Copy to clipboard]
[
-
]
CODE:
if($tempfetch[topped]==0 or !$isadmin){
if(!$isadmin){
$subject = dhtmlspecialchars($subject);
在下面加入
[Copy to clipboard]
[
-
]
CODE:
//指定會員開始
$actmember = dhtmlspecialchars($actmember);
//指定會員結束
找到
[Copy to clipboard]
[
-
]
CODE:
$db->unbuffered_query("UPDATE $table_threads SET icon='$posticon', subject='$subject' $polloptsadd WHERE tid='$tid'");
改為
[Copy to clipboard]
[
-
]
CODE:
$db->unbuffered_query("UPDATE $table_threads SET icon='$posticon', actmember='$actmember', subject='$subject' $polloptsadd WHERE tid='$tid'");
找到
[Copy to clipboard]
[
-
]
CODE:
$db->query("UPDATE $table_posts SET aid='$aid', message='$message', usesig='$usesig', bbcodeoff='$bbcodeoff', parseurloff='$parseurloff',
smileyoff='$smileyoff', icon='$posticon', subject='$subject' WHERE pid='$pid'");
$db->unbuffered_query("UPDATE $table_threads SET attachment='$attach_type'$viewpermadd WHERE tid='$tid'");
} else {
$db->query("UPDATE $table_posts SET message='$message', usesig='$usesig', bbcodeoff='$bbcodeoff', parseurloff='$parseurloff',
smileyoff='$smileyoff', icon='$posticon', subject='$subject' WHERE pid='$pid'");
改為
[Copy to clipboard]
[
-
]
CODE:
//指定會員開始
$db->query("UPDATE $table_posts SET aid='$aid', message='$message', usesig='$usesig', bbcodeoff='$bbcodeoff', parseurloff='$parseurloff',
smileyoff='$smileyoff', icon='$posticon', subject='$subject', actmember='$actmember' WHERE pid='$pid'");
$db->unbuffered_query("UPDATE $table_threads SET attachment='$attach_type'$viewpermadd WHERE tid='$tid'");
} else {
$db->query("UPDATE $table_posts SET message='$message', usesig='$usesig', bbcodeoff='$bbcodeoff', parseurloff='$parseurloff',
smileyoff='$smileyoff', icon='$posticon', subject='$subject', actmember='$actmember' WHERE pid='$pid'");
//指定會員結束
打開post_editpost模版
找到
[Copy to clipboard]
[
-
]
CODE:
<tr>
<td bgcolor="{ALTBG1}" width="20%">{lang subject}:</td>
<td bgcolor="{ALTBG2}">
<input type="text" name="subject" size="45" value="$postinfo[subject]" tabindex="3">
<input type="hidden" name="origsubject" value="$postinfo[subject]">
</td></tr>
在下面加入
[Copy to clipboard]
[
-
]
CODE:
<!--{if $allowsetviewperm && $isfirstpost}-->
<tr>
<td bgcolor="{ALTBG1}" width="20%">發貼給指定會員:</td>
<td bgcolor="{ALTBG2}">
<input type="text" name="actmember" size="45" value="$postinfo[actmember]" tabindex="3">
<input type="hidden" name="origactmember" value="$postinfo[actmember]">
</td></tr>
<!--{/if}-->
打開post_newthread模版
找到
[Copy to clipboard]
[
-
]
CODE:
<td bgcolor="{ALTBG1}" width="20%">{lang subject}:</td>
<td bgcolor="{ALTBG2}">
<input type="text" name="subject" size="45" value="$subject" tabindex="3"></td>
</tr>
在下面加入
[Copy to clipboard]
[
-
]
CODE:
<tr>
<td bgcolor="{ALTBG1}" width="20%">發貼給指定會員:</td>
<td bgcolor="{ALTBG2}">
<input type="text" name="actmember" size="45" value="$actmember" tabindex="3"></td>
</tr>
打開forumdisplay模版
找到
[Copy to clipboard]
[
-
]
CODE:
<a href="viewthread.php?fpage=$page&tid=$thread[tid]">$thread[subject]
在更換為
[Copy to clipboard]
[
-
]
CODE:
<!--{if !$thread['actmember']}-->
<a href="viewthread.php?fpage=$page&tid=$thread[tid]">$thread[subject]
<!--{else}-->
<a href="viewthread.php?fpage=$page&tid=$thread[tid]">$thread[subject] <font color=red>給指定會員: $thread[actmember]</font>
<!--{/if}-->
[ Last edited by Poka on 2004-11-16 at 16:53 ]
AL8 Forum © All rights reserved.
RINGOYAU
0000081
頭銜: Lord
帖子: 387
精華:
7
積分: 29620 點
現金: 923 元
存款: 37634 元
閱讀權限: 25
註冊: 2004-1-9
狀態: 離線
#3
大
中
小
發表於 2004-7-4 23:35
資料
個人空間
短消息
加為好友
Thanks a lot~~
AL8 Forum © All rights reserved.
jimmychim
0000456
頭銜: Member
帖子: 74
精華: 0
積分: 610 點
現金: 245 元
存款: 2267 元
閱讀權限: 15
註冊: 2004-2-19
狀態: 離線
#4
大
中
小
發表於 2004-7-9 21:19
資料
個人空間
主頁
短消息
加為好友
這個是什麼東東
AL8 Forum © All rights reserved.
ericericeric
0000657
頭銜: Member
帖子: 81
精華:
1
積分: 3150 點
現金: 22 元
存款: 1600 元
閱讀權限: 15
註冊: 2004-3-7
狀態: 離線
#5
大
中
小
發表於 2004-7-10 16:25
資料
個人空間
短消息
加為好友
不太明白???
可否解釋一次???
AL8 Forum © All rights reserved.
tonypak1985
0000790
頭銜: Conqueror
帖子: 108
精華:
2
積分: 3890 點
現金: 669 元
存款: 0 元
閱讀權限: 20
註冊: 2004-3-15
來自: hk
狀態: 離線
#6
大
中
小
發表於 2004-7-12 10:50
資料
個人空間
短消息
加為好友
板主睇唔睇到架???
AL8 Forum © All rights reserved.
Qoo橙汁
0003489
頭銜: Newbie
帖子: 46
精華: 0
積分: 995 點
現金: 138 元
存款: 0 元
閱讀權限: 10
註冊: 2004-6-27
狀態: 離線
#7
大
中
小
發表於 2004-8-4 16:05
資料
個人空間
短消息
加為好友
thx @@
AL8 Forum © All rights reserved.
魔戒王
0008926
頭銜: Newbie
帖子: 20
精華: 0
積分: 290 點
現金: 0 元
存款: 0 元
閱讀權限: 10
註冊: 2004-10-2
狀態: 離線
#8
大
中
小
發表於 2004-10-4 16:50
資料
個人空間
短消息
加為好友
好贵。。。。。。。。。。
不过我需要哩个功能。买佐先。。
AL8 Forum © All rights reserved.
glio
0009742
頭銜: Conqueror
帖子: 264
精華:
1
積分: 5145 點
現金: 13 元
存款: 18061 元
閱讀權限: 20
註冊: 2004-10-13
狀態: 離線
#9
大
中
小
發表於 2004-10-14 21:55
資料
個人空間
短消息
加為好友
咁貴﹗
AL8 Forum © All rights reserved.
Kira26
0009871
頭銜: Newbie
帖子: 11
精華: 0
積分: 100 點
現金: 0 元
存款: 0 元
閱讀權限: 10
註冊: 2004-10-16
狀態: 離線
#10
大
中
小
發表於 2004-10-16 21:02
資料
個人空間
短消息
加為好友
no $$$$$$$$$$$$$$$$
AL8 Forum © All rights reserved.
arhin
0010286
頭銜: Newbie
帖子: 24
精華: 0
積分: 600 點
現金: 39 元
存款: 0 元
閱讀權限: 10
註冊: 2004-10-23
狀態: 離線
#11
大
中
小
發表於 2004-10-28 22:34
資料
個人空間
短消息
加為好友
好呀~~~真係多謝你
AL8 Forum © All rights reserved.
wacisunny
0006606
頭銜: Conqueror
帖子: 104
精華: 0
積分: 2200 點
現金: 100 元
存款: 670 元
閱讀權限: 20
註冊: 2004-9-1
狀態: 離線
#12
大
中
小
發表於 2004-10-30 21:11
資料
個人空間
短消息
加為好友
不明白是什麼意思ㄟ
可不可以說清楚一些
第一版是哪一版
AL8 Forum © All rights reserved.
ny9111111
0010350
頭銜: Newbie
帖子: 29
精華: 0
積分: 110 點
現金: 26 元
存款: 173 元
閱讀權限: 10
註冊: 2004-10-24
狀態: 離線
#13
大
中
小
發表於 2004-11-7 11:27
資料
個人空間
短消息
加為好友
THX~~~~~~~~~~~~~
AL8 Forum © All rights reserved.
helren
0010872
頭銜: Conqueror
帖子: 236
精華: 0
積分: 4000 點
現金: 0 元
存款: 1355 元
閱讀權限: 20
註冊: 2004-11-2
來自: hong kong
狀態: 離線
#14
大
中
小
發表於 2004-11-7 12:43
資料
個人空間
主頁
短消息
加為好友
好貴啊!!~
AL8 Forum © All rights reserved.
東方不敗
0012761
頭銜: Newbie
帖子: 21
精華: 0
積分: 209 點
現金: 300 元
存款: 0 元
閱讀權限: 10
註冊: 2004-12-8
狀態: 離線
#15
大
中
小
發表於 2004-12-12 02:11
資料
個人空間
短消息
加為好友
謝謝啦
AL8 Forum © All rights reserved.
kofkyo
0012232
頭銜: Conqueror
帖子: 126
精華: 0
積分: 2430 點
現金: 0 元
存款: 23 元
閱讀權限: 20
註冊: 2004-11-27
狀態: 離線
#16
大
中
小
發表於 2004-12-20 13:50
資料
個人空間
短消息
加為好友
就是la~
AL8 Forum © All rights reserved.
蛇
0013403
頭銜: Member
帖子: 60
精華: 0
積分: 1265 點
現金: 0 元
存款: 372 元
閱讀權限: 15
註冊: 2004-12-19
狀態: 離線
#17
大
中
小
發表於 2004-12-29 09:06
資料
個人空間
短消息
加為好友
好貴....
AL8 Forum © All rights reserved.
loveyoyo
0014292
頭銜: Member
帖子: 62
精華: 0
積分: 1230 點
現金: 50 元
存款: 0 元
閱讀權限: 15
註冊: 2005-1-3
狀態: 離線
#18
大
中
小
發表於 2005-1-24 00:09
資料
個人空間
短消息
加為好友
在這裡看到最貴的價格,希望內容很豐富∼
作業系統:Microsoft IIS 5.0
PHP:5.0.2
mySQL:3.23.57
Discuz!:2.5
AL8 Forum © All rights reserved.
feng04
0014200
頭銜: Member
帖子: 52
精華: 0