1 頁 (共 1 頁)

[問題]區分發表主題與回覆外掛

發表於 : 2005-01-03 00:19
pcrick
之前可能發表錯地方了!!!
問題外掛:區分發表主題與回覆
參考連結: http://phpbb-tw.net/phpbb/viewtopic.php ... 2%D0%BC%C6
使用版本:phpBB 2.0.11
網站位置:http://localhost
狀況描述: 執行reply_install.php時,出現'Error adding field to the tablefont'訊息.
雖然文章旁的顯示都沒問題,但只要刪文就會出現\r

代碼: 選擇全部

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_reply = user_reply - 1 WHERE user_id = 2' at line 3

UPDATE phpbb_users SET user_reply = user_reply + 1 WHERE user_id = 2

Line : 296
File : c:\appserv\www\phpbb2\modcp.php
請問可以手動輸入SQL
P.S:已留言給作者,但都沒有回應,真是急啊! :cry:

發表於 : 2005-01-03 00:29
webspirit
我都不知裝了幾遍也沒碰過這種事 @.@

發表於 : 2005-01-03 07:06
依夢兒
如果只是要在每一位會員的個人資料中顯示他的發表主題數和回覆文章數有多少,請見:
http://phpbb-tw.net/phpbb/viewtopic.php?p=134403#134403

發表於 : 2005-01-03 09:28
pcrick
webspirit 寫:我都不知裝了幾遍也沒碰過這種事 @.@
可能我比較倒楣吧!^ :cry: ^
我想是不是資料庫的問題?因為作者的reply_install.php中有下列訊息~

代碼: 選擇全部

if( !$userdata['session_logged_in'] ) 
{ 
   header('Location: ' . append_sid("login.$phpEx?redirect=reply_install.$phpEx", true)); 
} 
if( $userdata['user_level'] != ADMIN ) 
{ 
   message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); 
} 
  
$sql = "ALTER TABLE ".USERS_TABLE." ADD `user_reply` mediumint(8) UNSIGNED DEFAULT '0' NOT NULL AFTER `user_posts`"; 

if ( !$db->sql_query($sql) ) 
{ 
   message_die(GENERAL_MESSAGE, [color=red]'Error adding field to the tablefont'[/color]); 
} 
else 
{ 
   $text = 'Field has installed successfully' . '<br>'; 
} 
我的語法很差,請問有沒有人知道這是什麼意思?

發表於 : 2005-01-03 11:14
webspirit
你的 MySQL 版本?

發表於 : 2005-01-03 22:43
pcrick
webspirit 寫:你的 MySQL 版本?
MySQL Database Version 4.0.16!
辛苦您了!!!THANKS!!!

發表於 : 2005-01-03 22:57
webspirit
其實不確定是不是 MySQL 版本的問題
我是用 4.0.22

發表於 : 2005-01-04 01:04
pcrick
webspirit 寫:其實不確定是不是 MySQL 版本的問題
我是用 4.0.22
那請問要如何升級呢??? :-o

發表於 : 2005-01-04 09:26
webspirit
下載執行就好啦 ^^

發表於 : 2005-01-07 10:47
pcrick
webspirit 寫:下載執行就好啦 ^^
還是一樣呢!!! :cry: :cry: :cry:

發表於 : 2005-01-07 11:31
webspirit
什麼意思?
是升級 MySQL 後還是無法安裝?
有沒有先以管理員身份登入 phpBB 後再執行 reply_install.php?

發表於 : 2005-01-09 01:31
pcrick
webspirit 寫:什麼意思?
是升級 MySQL 後還是無法安裝?
有沒有先以管理員身份登入 phpBB 後再執行 reply_install.php?
已經升級至mysql-4.0.23,有以管理員身份登入,但還是同樣的問題??? :cry: :cry:

P.S:進入mysql看,其實已建立user_reply這一欄了!!

發表於 : 2005-01-14 00:29
pcrick
依夢兒 寫:如果只是要在每一位會員的個人資料中顯示他的發表主題數和回覆文章數有多少,請見:
http://phpbb-tw.net/phpbb/viewtopic.php?p=134403#134403
感謝依夢兒!!! ;-) ;-)
剛剛試了一下,成功了!但我還是比較想要在viewtopic body中顯示!
不知道我原來的問題可以解決嗎???