第 1 頁 (共 1 頁)
[請教]文章遮蔽外掛 0.8.0
發表於 : 2005-01-11 14:24
由 webspirit
問題外掛:文章遮蔽外掛 0.8.0
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=31554
使用版本:phpBB 2.0.11
網站位置:localhost
狀況描述:
經安裝執行,發生錯誤
includes/functions_post.php 的這段\r
代碼: 選擇全部
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig , hideit) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig , $post_hideit)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig", hideit = $post_hideit " . $edited_sql . WHERE post_id = $post_id";
有問題
發表於 : 2005-01-11 14:47
由 Martinet
請把錯誤訊息貼上吧="=||
要不我怎麼知道怎麼錯..||
發表於 : 2005-01-11 14:55
由 webspirit
因為其錯誤訊息只是\r
Parse error: parse error in G:\Program Files\Apache Group\Apache2\htdocs\phpbbtest04\includes\functions_post.php on line 268
所以就沒貼上
對不起
發表於 : 2005-01-11 16:50
由 Martinet
^^||
等會檢查安裝檔
改成下面這樣\r
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig , hideit) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig , $post_hideit)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig, hideit = $post_hideit " . $edited_sql . " WHERE post_id = $post_id";
發表於 : 2005-01-11 17:35
由 webspirit
經修改後測試,運作無誤,感恩 ^^
另我已將原「安裝.txt」重新編輯,修正原搜尋修改的順序及 lang_main.php 的部份語句\r
但不知該如何發表
另有個疑問是,您發表的是 0.8.0 版
但安裝.txt 裡卻是 1.0.1 版???
發表於 : 2005-01-11 19:07
由 Martinet
嗯?又沒改XD
那是我從垃圾桶外掛複製的title..所以有些會沒改到=0=....
webspirit 寫:另我已將原「安裝.txt」重新編輯,修正原搜尋修改的順序及 lang_main.php 的部份語句\r
但不知該如何發表
pm給我就行了^^"
我把他改上去\r
謝謝你啦!:D
發表於 : 2005-01-11 19:25
由 Martinet
發現一個錯誤
無法編輯文章..=口=
找到\r
$is_auth['mod']
取代為\r
$is_auth['auth_mod']
發表於 : 2005-01-11 21:18
由 webspirit
修正後的安裝說明已 PM ^^
發表於 : 2005-01-16 09:44
由 Martinet
又發現問題
搜尋作者文章,或者是搜尋設定以文章顯示時都可以偷看到內容
解決辦法如下
#
#-----[ 打開 ]-----------------------------------------
#
search.php
#
#-----[ 找到 ]-----------------------------------------
#
$template->assign_block_vars("searchresults", array(
'TOPIC_TITLE' => $topic_title,
'FORUM_NAME' => $searchset[$i]['forum_name'],
'POST_SUBJECT' => $post_subject,
'POST_DATE' => $post_date,
'POSTER_NAME' => $poster,
'TOPIC_REPLIES' => $searchset[$i]['topic_replies'],
'TOPIC_VIEWS' => $searchset[$i]['topic_views'],
'MESSAGE' => $message,
'MINI_POST_IMG' => $mini_post_img,
'L_MINI_POST_ALT' => $mini_post_alt,
'U_POST' => $post_url,
'U_TOPIC' => $topic_url,
'U_FORUM' => $forum_url)
);
#
#-----[ 前面加上 ]-----------------------------------------
#
// Martinet's Hideit Mod
$is_auth_mm = auth(AUTH_ALL, $searchset[$i]['forum_id'], $userdata, $searchset[$i]);
if($searchset[$i]['hideit'] == 1 && !$is_auth_mm['auth_mod'])
{
$message = '<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td align="center"><span class="genmed"><b>'.$lang['MARTINET_hideit_hided_title'].'</b></span></td>
</tr>
<tr>
<td class="quote" align="center">
'.$lang['MARTINET_hideit_hided_text'].'
</td></tr>
</table>
<span class="postbody"><br>
';
}
else if($searchset[$i]['hideit'] == 1 && $is_auth_mm['auth_mod'])
{
$message = '<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td align="center"><span class="genmed"><b>'.$lang['MARTINET_hideit_hideshow_title'].'</b></span></td>
</tr>
<tr>
<td class="quote" align="center">
'.$lang['MARTINET_hideit_hideshow_text'].'
</td></tr>
</table>
<span class="postbody"><br>
'.$message;
}
發表於 : 2005-01-16 10:08
由 webspirit
已依指示修正\r
感恩 ^^