[問題]好友列表1.1.1安裝問題

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

版主: 版主管理群

主題已鎖定
krc
星球公民
星球公民
文章: 58
註冊時間: 2004-08-18 01:56
來自: 你心靈深處
聯繫:

[問題]好友列表1.1.1安裝問題

文章 krc »

外掛名稱:Buddylist 1.1.1
外掛來源:http://www.phpbbhacks.com/viewhack.php?id=909

依照外掛中說明安裝完成後於網頁中出現以下錯誤訊息:

代碼: 選擇全部

Parse error: parse error, unexpected T_VARIABLE in e:\appserv\www\phpbb\language\lang_chinese_traditional_taiwan\lang_main.php on line 1131

我依照訊息將lang_main.php這個檔案打開後
發現是安裝說明書中這段程式碼所引起\r
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// Buddy list
//
$lang['Buddylist'] = 'Buddylist';
$lang['Buddy'] = 'Buddy';
$lang['Add_buddy'] = 'Add to your buddylist';
$lang['Remove_buddy'] = 'Remove from your buddylist';
$lang['Buddy_added'] = 'The user has been added to your buddylist';
$lang['Buddy_removed'] = 'The user has been removed from your buddylist';
$lang['Click_return_page'] = 'Click %sHere%s to return to the page';
$lang['Confirm_remove_buddy'] = 'Are you sure you want to remove this buddy from your list?';

$lang['Online'] = 'Online';
$lang['Offline'] = 'Offline';
$lang['Buddies_online'] = 'Online buddies';
$lang['Buddies_offline'] = 'Offline buddies';
$lang['No_buddies'] = 'You currently have no buddies in your list';
$lang['No_buddies_online'] = 'You currently have no buddies online';
$lang['No_buddies_offline'] = 'You currently have no buddies offline';

而且我test過,只要將這段移除錯誤訊息就不再出現!
原本說明中$lang['Buddy[color=red]_[/color]list'] = 'Buddylist';
少了段低線,我也加上了,可是還是出現錯誤??
關於這錯誤訊息該如何克服呢~~真的好想加這個外掛 :cry: ~~~~
~~目前架站環境~~
資料庫版本:appserv2.30 版
PHPBB版本:2.0.10中文正體版
作業系統:win xp 架立於E槽之下
網路環境:中華ADSL 2M/512K
神川小羽
調皮の小羽
調皮の小羽
文章: 1461
註冊時間: 2004-05-01 05:55
來自: 謎樣之筱語
聯繫:

文章 神川小羽 »

1131行上下5行貼來看看
-.-
krc
星球公民
星球公民
文章: 58
註冊時間: 2004-08-18 01:56
來自: 你心靈深處
聯繫:

文章 krc »

重裝了三次,還是決定放棄,
因為安裝三次結果都一樣,好像部份mod有衝突
把安裝結果跟各位分享,
在安裝後未登入前是看的到會員列表的選項\r
一但以會員身份登入後,此選項就會消失,並且在觀看文章時,只能觀看自己發表的文章
若觀看其他會員所發表的文章,就會出現一個訊息\r

代碼: 選擇全部

Could not retrieve buddy information

DEBUG MODE

SQL Error : 1146 Table 'phpbb.phpbb_buddies' doesn't exist

SELECT buddy_id FROM phpbb_buddies WHERE user_id = 13 AND buddy_id = 2

Line : 309
File : e:\appserv\www\phpbb\includes\functions_buddylist.php
所以.........................唉,決定先拆掉再說..............
~~目前架站環境~~
資料庫版本:appserv2.30 版
PHPBB版本:2.0.10中文正體版
作業系統:win xp 架立於E槽之下
網路環境:中華ADSL 2M/512K
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

你有輸入 SQL 語法嗎?
不回答來自 私人訊息, 電子郵件, 及時通 的相關 phpBB 問題
除非是個人疏失所造成的問題

這世界還有拼命守護的價值嗎...
頭像
shihchieh
竹貓忠實會員
竹貓忠實會員
文章: 509
註冊時間: 2002-10-07 13:02

文章 shihchieh »

你第一次就已經裝成功了,只是你的語系檔內加上的程式碼有一段少了分號;而產生的錯誤,可惜~
---
Do you fear death ?
krc
星球公民
星球公民
文章: 58
註冊時間: 2004-08-18 01:56
來自: 你心靈深處
聯繫:

文章 krc »

天霸大大,您所說的SQL碼,我查看了一下說明檔裡,並沒有註明要輸入SQL碼也~~@@~~還是我安裝的版本不對~~
BUDDYLIST1.1.1內容如下

代碼: 選擇全部

###############################################
##	Hack Title:		Buddylist
##	Hack Version:	1.1.1
##	Author:			Freakin' Booty ;-P
##	Description:	Add and remove buddies from a list. PM or email someone right from the
##					list, instead of searching for them through the memberlist first.
##					See a buddy's online/offline status.
##					This version allows you to have the buddylist on any page you want; all you need to do, is
##					add a few lines in the page. Read "Buddylist 1.1.1 Installation Instructions (1).html" for more info.
##
##	Compatibility:	2.0.4 - 2.0.5
##
##	Installation Level: Easy
##	Installation Time: 15 - 25 minutes
##	Files To Edit: 10
##		common.php
##		privmsg.php
##		viewtopic.php
##		includes/constants.php
##		includes/usercp_viewprofile.php
##		language/lang_english/lang_main.php
##		templates/subSilver/subSilver.cfg
##		templates/SubSilver/privmsgs_read_body.tpl
##		templates/SubSilver/profile_view_body.tpl
##		templates/SubSilver/viewtopic_body.tpl
##
##	Included Files: 5
##		db_update.php
##		includes/functions_buddylist.php
##		templates/subSilver/buddylist_body.tpl
##		templates/subSilver/images/lang_english/icon_buddy.gif
##		templates/subSilver/images/lang_english/icon_remove_buddy.gif
##
##	History:
##		See "Buddylist 1.1.1 - version history.txt".
##
##	Author Notes:
##		Please read the "Buddylist 1.1.1 Installation Instructions (1).html" as well, or you will not be able to see the buddylist!
##
##	Support:		http://www.phpbbhacks.com/forums
##	Copyright:		?003 Buddylist 1.1.1 - Freakin' Booty ;-P
##
###############################################
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
##   Please visit http://www.phpbbhacks.com/forums for support.
###############################################
##
###############################################
##	This hack is released under the GPL License.
##	This hack can be freely used, but not distributed, without permission.
##	Intellectual Property is retained by the hack author(s) listed above.
###############################################

#
#-----[ COPY ]--------------------------------------------
#
# Make sure to run this file once as an administrator and then delete it immediately
#
db_update.php		=> db_update.php

#
#-----[ COPY ]--------------------------------------------
#
includes/functions_buddylist.php			=> includes/functions_buddylist.php
templates/subSilver/buddylist_body.tpl		=> templates/subSilver/buddylist_body.tpl
templates/subSilver/images/lang_english/icon_buddy.gif			=> templates/subSilver/images/lang_english/icon_buddy.gif
templates/subSilver/images/lang_english/icon_remove_buddy.gif	=> templates/subSilver/images/lang_english/icon_remove_buddy.gif

#
#-----[ OPEN ]--------------------------------------------
#
common.php

#
#-----[ FIND ]--------------------------------------------
#
include($phpbb_root_path . 'includes/db.'.$phpEx);

#
#-----[ AFTER, ADD ]--------------------------------------
#
include($phpbb_root_path . 'includes/functions_buddylist.'.$phpEx);

#
#-----[ OPEN ]--------------------------------------------
#
privmsg.php

#
#-----[ FIND ]--------------------------------------------
#
//
// Define the box image links
//

#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// Buddylist actions
//
$buddy_id = ( isset($HTTP_GET_VARS['b']) ) ? intval($HTTP_GET_VARS['b']) : 0;
$buddy_action = ( isset($HTTP_GET_VARS['buddy']) ) ? $HTTP_GET_VARS['buddy'] : '';
if( $buddy_id && $buddy_action != '' )
{
	if( $buddy_action == 'add' )
	{
		add_buddy($userdata['user_id'], $buddy_id);
	}
	else if( $buddy_action == 'remove' )
	{
		remove_buddy($userdata['user_id'], $buddy_id);
	}
}
//
// END: Buddylist actions
//

#
#-----[ FIND ]--------------------------------------------
#
	$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

#
#-----[ AFTER, ADD ]--------------------------------------
#
	if( $user_id_to == $userdata['user_id'] )
	{
		list($buddy_img, $buddy) = get_buddy_img($user_id_to, $user_id_from);
	}
	else
	{
		$buddy_img = '';
		$buddy = '';
	}

#
#-----[ FIND ]--------------------------------------------
#
		'WWW' => $www,

#
#-----[ AFTER, ADD ]--------------------------------------
#
		'BUDDY_IMG' => $buddy_img,
		'BUDDY' => $buddy,

#
#-----[ OPEN ]--------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]--------------------------------------------
#
//
// Is user watching this thread?
//

#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// Buddylist actions
//
$buddy_id = ( isset($HTTP_GET_VARS['b']) ) ? intval($HTTP_GET_VARS['b']) : 0;
$buddy_action = ( isset($HTTP_GET_VARS['buddy']) ) ? $HTTP_GET_VARS['buddy'] : '';
if( $buddy_id && $buddy_action != '' )
{
	if( $buddy_action == 'add' )
	{
		add_buddy($userdata['user_id'], $buddy_id);
	}
	else if( $buddy_action == 'remove' )
	{
		remove_buddy($userdata['user_id'], $buddy_id);
	}
}
//
// END: Buddylist actions
//

\n#
#-----[ FIND ]--------------------------------------------
#
	$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

#
#-----[ AFTER, ADD ]--------------------------------------
#
	list($buddy_img, $buddy) = get_buddy_img($userdata['user_id'], $poster_id);

#
#-----[ FIND ]--------------------------------------------
#
		'YIM' => $yim,

#
#-----[ AFTER, ADD ]--------------------------------------
#
		'BUDDY_IMG' => $buddy_img,
		'BUDDY' => $buddy,

#
#-----[ OPEN ]--------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]--------------------------------------------
#
define('BANLIST_TABLE', $table_prefix.'banlist');

#
#-----[ AFTER, ADD ]--------------------------------------
#
define('BUDDIES_TABLE', $table_prefix.'buddies');

# 
#-----[ OPEN ]--------------------------------------------
#
includes/usercp_viewprofile.php

#
#-----[ FIND ]--------------------------------------------
#
$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));

#
#-----[ AFTER, ADD ]--------------------------------------
#
//
// Buddylist actions
//
$buddy_id = ( isset($HTTP_GET_VARS['b']) ) ? intval($HTTP_GET_VARS['b']) : 0;
$buddy_action = ( isset($HTTP_GET_VARS['buddy']) ) ? $HTTP_GET_VARS['buddy'] : '';
if( $buddy_id && $buddy_action != '' )
{
	if( $buddy_action == 'add' )
	{
		add_buddy($userdata['user_id'], $buddy_id);
	}
	else if( $buddy_action == 'remove' )
	{
		remove_buddy($userdata['user_id'], $buddy_id);
	}
}
//
// END: Buddylist actions
//

#
#-----[ FIND ]--------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

#
#-----[ AFTER, ADD ]--------------------------------------
#
list($buddy_img, $buddy) = get_buddy_img($userdata['user_id'], $profiledata['user_id']);

#
#-----[ FIND ]--------------------------------------------
#
	'WWW' => $www,

#
#-----[ AFTER, ADD ]--------------------------------------
#
	'BUDDY_IMG' => $buddy_img,
	'BUDDY' => $buddy,

#
#-----[ FIND ]--------------------------------------------
#
	'L_WEBSITE' => $lang['Website'],

#
#-----[ AFTER, ADD ]--------------------------------------
#
	'L_BUDDY' => $lang['Buddy'],

# 
#-----[ OPEN ]--------------------------------------------
#
# make sure to copy/edit this for every language installed
#
language/lang_english/lang_main.php

#
#-----[ FIND ]--------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// Buddy list
//
$lang['Buddylist'] = '好友列表表';
$lang['Buddy'] = '好友';
$lang['Add_buddy'] = '加入到好友列表';
$lang['Remove_buddy'] = '從好友列表中移除';
$lang['Buddy_added'] = '此人已經加入到你的好友列表裏';
$lang['Buddy_removed'] = '這(些)人已經從你的好友列表中移除了';
$lang['Click_return_page'] = '點選 %s這裡%s 返回好友列表';
$lang['Confirm_remove_buddy'] = '你確定要從好友列表中移除這個人?';

$lang['Online'] = '線上';
$lang['Offline'] = '離線';
$lang['Buddies_online'] = 'Online buddies';
$lang['Buddies_offline'] = 'Offline buddies';
$lang['No_buddies'] = '目前您尚未建立您的好友列表';
$lang['No_buddies_online'] = '在線上的好友';
$lang['No_buddies_offline'] = '已離線的好友';

# 
#-----[ OPEN ]--------------------------------------------
#
# make sure to copy/edit this file for every template installed
#
templates/subSilver/privmsgs_read_body.tpl

#
#-----[ FIND ]--------------------------------------------
#
{PROFILE_IMG}

#
#-----[ AFTER, ADD ]--------------------------------------
#
 {BUDDY_IMG}

# 
#-----[ OPEN ]-------------------------------------------- 
#
# make sure to copy/edit this file for every template installed
#
templates/subSilver/profile_view_body.tpl

#
#-----[ FIND ]--------------------------------------------
#
<noscript>{ICQ_IMG}</noscript></td>
		</tr>

#
#-----[ AFTER, ADD ]--------------------------------------
#
		<tr> 
		  <td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_BUDDY}:</span></td>
		  <td class="row1" valign="middle">{BUDDY_IMG}</td>
		</tr>

# 
#-----[ OPEN ]--------------------------------------------
#
# make sure to copy/edit this file for every template installed
#
templates/subSilver/subSilver.cfg

#
#-----[ FIND ]--------------------------------------------
#
$images['icon_email'] = "$current_template_images/{LANG}/icon_email.gif";

#
#-----[ AFTER, ADD ]--------------------------------------
#
//
// Buddylist 
//
$images['icon_buddy'] = "$current_template_images/{LANG}/icon_buddy.gif";
$images['icon_buddy_remove'] = "$current_template_images/{LANG}/icon_buddy_remove.gif";

# 
#-----[ OPEN ]--------------------------------------------
#
# make sure to copy/edit this file for every template installed
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]--------------------------------------------
#
{postrow.PROFILE_IMG}

#
#-----[ AFTER, ADD ]--------------------------------------
#
 {postrow.BUDDY_IMG}

#
# READ
#
Buddylist 1.1.0 Installation instructions (1).html

#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
yuan大大,您說的是真低嗎~~
這樣讓我又燃起了一線希望,語系檔少一段分號;
..............難道是.....我又在恍神了~~

看來改天精神好一點,再來重新TEST看看~~
~~目前架站環境~~
資料庫版本:appserv2.30 版
PHPBB版本:2.0.10中文正體版
作業系統:win xp 架立於E槽之下
網路環境:中華ADSL 2M/512K
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

代碼: 選擇全部

# 
#-----[ COPY ]-------------------------------------------- 
# 
# Make sure to run this file once as an administrator and then delete it immediately 
# 
db_update.php      => db_update.php
將執行檔上傳到phpBB2目錄下
然後以管理員的身份登入後,在網址輸入(以birthday做範例)
http://(你的網址)/(你的phpBB2資料夾名稱)/birthday_db_update.php

例:http://MyHome/phpBB2/birthday_db_update.php

之後安全性上的考量,在執行完後請記得刪除"執行檔"
不回答來自 私人訊息, 電子郵件, 及時通 的相關 phpBB 問題
除非是個人疏失所造成的問題

這世界還有拼命守護的價值嗎...
krc
星球公民
星球公民
文章: 58
註冊時間: 2004-08-18 01:56
來自: 你心靈深處
聯繫:

文章 krc »

天霸大大\r
我這次先照您所說的先執行db_update.php這個檔後
再進行安裝
安裝後呢,發現................
一點變化都沒有???
而且就連登入會員後首頁中好友列表的選項也沒出現\r
於事我又再次執行db_update.php這個檔
就出現一堆看不懂的訊息~

代碼: 選擇全部

CREATE TABLE phpbb_buddies (user_id mediumint(8) unsigned NOT NULL default '0', buddy_id mediumint(8) unsigned NOT NULL default '0') TYPE=MyISAM;
+++ Error: Table 'phpbb_buddies' already exists
那.........這些訊息到底是什麼義思呢??
到底這次安裝有沒有裝成功啊
因為看不出有任何變化也 :?:
~~目前架站環境~~
資料庫版本:appserv2.30 版
PHPBB版本:2.0.10中文正體版
作業系統:win xp 架立於E槽之下
網路環境:中華ADSL 2M/512K
ms821
星球公民
星球公民
文章: 91
註冊時間: 2004-06-02 23:54

文章 ms821 »

+++ Error: Table 'phpbb_buddies' already exists
意思是您先前已經執行過SQL 碼, 這資料欄已存在..
我的論壇喔...歡迎來坐坐
http://www.moszonehk.net/phpBB2
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

krc 寫:天霸大大\r
我這次先照您所說的先執行db_update.php這個檔後
再進行安裝
安裝後呢,發現................
一點變化都沒有???
而且就連登入會員後首頁中好友列表的選項也沒出現\r
請先確定你應該修改的檔案都有改完後 登入看看會員的公開資料頁面有多什麼東西~
不回答來自 私人訊息, 電子郵件, 及時通 的相關 phpBB 問題
除非是個人疏失所造成的問題

這世界還有拼命守護的價值嗎...
krc
星球公民
星球公民
文章: 58
註冊時間: 2004-08-18 01:56
來自: 你心靈深處
聯繫:

文章 krc »

天霸大大
我以會員身份登入後
若查看其他會員的個人資料是將其他人加入好友,
但是最重要的是在首頁上方的選項中「好友列表」這個選項並沒出來
如圖
圖檔

且我已依照說明檔再次依序覆蓋安裝過
但........這個首頁的選項就是不出現\r
不知是那一個檔有錯誤~~??
~~目前架站環境~~
資料庫版本:appserv2.30 版
PHPBB版本:2.0.10中文正體版
作業系統:win xp 架立於E槽之下
網路環境:中華ADSL 2M/512K
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

krc 寫:我以會員身份登入後
若查看其他會員的個人資料是將其他人加入好友,
但是最重要的是在首頁上方的選項中「好友列表」這個選項並沒出來
只能說你沒改錯,但是有漏看說明文件 :mrgreen:
Buddylist 1.1.1 Installation Instructions (1).html
Buddylist 1.1.1 Installation Instructions (2).html
  • 私人訊息頁面:
#
#-----[ OPEN 打開 ]------------------------------------------------
#

代碼: 選擇全部

privmsg.php
#
#-----[ FIND 尋找 ]------------------------------------------------
#

代碼: 選擇全部

// 
// End session management 
// 
#
#-----[ AFTER, ADD 之後, 加上 ]------------------------------------
#

代碼: 選擇全部

// 
// Buddylist actions 
// 
$buddy_id = ( isset($HTTP_GET_VARS['b']) ) ? intval($HTTP_GET_VARS['b']) : 0; 
$buddy_action = ( isset($HTTP_GET_VARS['buddy']) ) ? $HTTP_GET_VARS['buddy'] : ''; 
if( $buddy_id && $buddy_action != '' ) 
{ 
  if( $buddy_action == 'add' ) 
  { 
    add_buddy($userdata['user_id'], $buddy_id); 
  } 
  else if( $buddy_action == 'remove' ) 
  { 
    remove_buddy($userdata['user_id'], $buddy_id); 
  } 
} 
// 
// END: Buddylist actions 
// 
#
#-----[ FIND 尋找 ]------------------------------------------------
#

代碼: 選擇全部

$template->pparse('body'); 

include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 

?>


#
#-----[ BEFORE ADD 之前, 加上 ]------------------------------------
#

代碼: 選擇全部

get_buddies($userdata);
#
#-----[ OPEN 打開 ]------------------------------------------------
#

代碼: 選擇全部

templates/subSilver/privmsgs_body.tpl 
#
#-----[ FIND 尋找 ]------------------------------------------------
#

代碼: 選擇全部

	  <td align="right" valign="top" nowrap="nowrap"><b><span class="gensmall"><a href="javascript:select_switch(true);" class="gensmall">{L_MARK_ALL}</a> :: <a href="javascript:select_switch(false);" class="gensmall">{L_UNMARK_ALL}</a></span></b><br /><span class="nav">{PAGINATION}<br /></span><span class="gensmall">{S_TIMEZONE}</span></td>
	</tr>
  </table>
</form>
#
#-----[ AFTER, ADD 之後, 加上 ]------------------------------------
#

代碼: 選擇全部

<table width="100%" cellspacing="0" cellpadding="0" border="0"> 
  <tr> 
    <td>{BUDDYLIST}</td> 
  </tr> 
</table> 
#
#-----[ SAVE/CLOSE ALL FILES 儲存/關閉所有檔案 ]-------------------
#
# EoM 外掛修正結束
不回答來自 私人訊息, 電子郵件, 及時通 的相關 phpBB 問題
除非是個人疏失所造成的問題

這世界還有拼命守護的價值嗎...
jeffyuan
星球公民
星球公民
文章: 173
註冊時間: 2005-04-21 22:47

文章 jeffyuan »

已完成安裝\r
可是在pm中的~從好友列表中移除~
是文字狀態~蠻醜的
jeffyuan
星球公民
星球公民
文章: 173
註冊時間: 2005-04-21 22:47

文章 jeffyuan »

已解決
主題已鎖定

回到「外掛問題討論」