[問題]求救!無法瀏覽會員詳細資料~(已解決)

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

版主: 版主管理群

主題已鎖定
頭像
ciami
星球普通子民
星球普通子民
文章: 28
註冊時間: 2004-06-08 13:24
來自: 渾沌大地

[問題]求救!無法瀏覽會員詳細資料~(已解決)

文章 ciami »

問題外掛:cashmod、瀏覽付費\r
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php ... light=cash
使用版本:phpbb2.0.10
網站位置:http://www.ciami.net/eat/talk/
狀況描述:

裝了cashmod之後,又裝了瀏覽付費\r
發現無法瀏覽會員資料
移除了瀏覽付費...

但要看會員詳細資料時依然會出現下列錯誤訊息\r
Fatal error: Call to a member function on a non-object in /www/ciami/html/eat/talk/includes/usercp_viewprofile.php on line 266

我的usercp_viewprofile.php

代碼: 選擇全部

<?php
/***************************************************************************
 *                           usercp_viewprofile.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: usercp_viewprofile.php,v 1.5.2.2 2004/07/11 16:46:20 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
	exit;
}

if ( empty($HTTP_GET_VARS[POST_USERS_URL]) || $HTTP_GET_VARS[POST_USERS_URL] == ANONYMOUS )
{
	message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
}
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);

$sql = "SELECT *
	FROM " . RANKS_TABLE . "
	ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql);
}

$ranksrow = array();
while ( $row = $db->sql_fetchrow($result) )
{
	$ranksrow[] = $row;
}
$db->sql_freeresult($result);

//
// Output page header and profile_view template
//
$template->set_filenames(array(
	'body' => 'profile_view_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);

//
// Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day
//
$regdate = $profiledata['user_regdate'];
$memberdays = max(1, round( ( time() - $regdate ) / 86400 ));
$posts_per_day = $profiledata['user_posts'] / $memberdays;

// Get the users percentage of total posts
if ( $profiledata['user_posts'] != 0  )
{
	$total_posts = get_db_stat('postcount');
	$percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0;
}
else
{
	$percentage = 0;
}

$avatar_img = '';
if ( $profiledata['user_avatar_type'] && $profiledata['user_allowavatar'] )
{
	switch( $profiledata['user_avatar_type'] )
	{
		case USER_AVATAR_UPLOAD:
			$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_REMOTE:
			$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
		case USER_AVATAR_GALLERY:
			$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
			break;
	}
}

$poster_rank = '';
$rank_image = '';
if ( $profiledata['user_rank'] )
{
	for($i = 0; $i < count($ranksrow); $i++)
	{
		if ( $profiledata['user_rank'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
		{
			$poster_rank = $ranksrow[$i]['rank_title'];
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
		}
	}
}
else
{
	for($i = 0; $i < count($ranksrow); $i++)
	{
		if ( $profiledata['user_posts'] >= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] )
		{
			$poster_rank = $ranksrow[$i]['rank_title'];
			$rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img src="' . $ranksrow[$i]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
		}
	}
}

$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $profiledata['user_id']);
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';

if ( !empty($profiledata['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
	$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $profiledata['user_id']) : 'mailto:' . $profiledata['user_email'];

	$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
	$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
	$email_img = ' ';
	$email = ' ';
}

$www_img = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : ' ';
$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $profiledata['user_website'] . '</a>' : ' ';

if ( !empty($profiledata['user_icq']) )
{
	$icq_status_img = '<a href="http://wwp.icq.com/' . $profiledata['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $profiledata['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
	$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
	$icq =  '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
	$icq_status_img = ' ';
	$icq_img = ' ';
	$icq = ' ';
}

$aim_img = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : ' ';
$aim = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : ' ';

$msn_img = ( $profiledata['user_msnm'] ) ? $profiledata['user_msnm'] : ' ';
$msn = $msn_img;

$yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';

$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
$user_sig = ''; 
if ( $profiledata['user_attachsig'] && $board_config['allow_sig'] ) 
{ 
include($phpbb_root_path . 'includes/bbcode.'.$phpEx); 
$user_sig = $profiledata['user_sig']; 
$user_sig_bbcode_uid = $profiledata['user_sig_bbcode_uid']; 
if ( $user_sig != '' ) 
{ 
if ( !$board_config['allow_html'] && $profiledata['user_allowhtml'] ) 
{ 
$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\\2>", $user_sig); 
} 
if ( $board_config['allow_bbcode'] && $user_sig_bbcode_uid != '' ) 
{ 
$user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $user_sig); 
} 
$user_sig = make_clickable($user_sig); 

if (!$userdata['user_allowswearywords']) 
{ 
$orig_word = array(); 
$replacement_word = array(); 
obtain_word_list($orig_word, $replacement_word); 
$user_sig = preg_replace($orig_word, $replacement_word, $user_sig); 
} 
if ( $profiledata['user_allowsmile'] ) 
{ 
$user_sig = smilies_pass($user_sig); 
} 
$user_sig = str_replace("
", "
<br />
", $user_sig); 
} 
$template->assign_block_vars('switch_user_sig_block', array()); 
}

//
// Generate page
//
$page_title = $lang['Viewing_profile'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->assign_vars(array(
	'USERNAME' => $profiledata['username'],
	'JOINED' => create_date($lang['DATE_FORMAT'], $profiledata['user_regdate'], $board_config['board_timezone']),
	'POSTER_RANK' => $poster_rank,
	'RANK_IMAGE' => $rank_image,
	'POSTS_PER_DAY' => $posts_per_day,
	'POSTS' => $profiledata['user_posts'],
	'PERCENTAGE' => $percentage . '%', 
	'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day), 
	'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage), 

	'SEARCH_IMG' => $search_img,
	'SEARCH' => $search,
	'PM_IMG' => $pm_img,
	'PM' => $pm,
	'EMAIL_IMG' => $email_img,
	'EMAIL' => $email,
	'WWW_IMG' => $www_img,
	'WWW' => $www,
	'ICQ_STATUS_IMG' => $icq_status_img,
	'ICQ_IMG' => $icq_img, 
	'ICQ' => $icq, 
	'AIM_IMG' => $aim_img,
	'AIM' => $aim,
	'MSN_IMG' => $msn_img,
	'MSN' => $msn,
	'YIM_IMG' => $yim_img,
	'YIM' => $yim,

	'LOCATION' => ( $profiledata['user_from'] ) ? $profiledata['user_from'] : ' ',
	'OCCUPATION' => ( $profiledata['user_occ'] ) ? $profiledata['user_occ'] : ' ',
	'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
	'L_SIGNATURE' => $lang['Signature'], 
    'USER_SIG' => $user_sig,
	'AVATAR_IMG' => $avatar_img,

	'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $profiledata['username']), 
	'L_ABOUT_USER' => sprintf($lang['About_user'], $profiledata['username']), 
	'L_AVATAR' => $lang['Avatar'], 
	'L_POSTER_RANK' => $lang['Poster_rank'], 
	'L_JOINED' => $lang['Joined'], 
	'L_TOTAL_POSTS' => $lang['Total_posts'], 
	'L_SEARCH_USER_POSTS' => sprintf($lang['Search_user_posts'], $profiledata['username']), 
	'L_CONTACT' => $lang['Contact'],
	'L_EMAIL_ADDRESS' => $lang['Email_address'],
	'L_EMAIL' => $lang['Email'],
	'L_PM' => $lang['Private_Message'],
	'L_ICQ_NUMBER' => $lang['ICQ'],
	'L_YAHOO' => $lang['YIM'],
	'L_AIM' => $lang['AIM'],
	'L_MESSENGER' => $lang['MSNM'],
	'L_WEBSITE' => $lang['Website'],
	'L_LOCATION' => $lang['Location'],
	'L_OCCUPATION' => $lang['Occupation'],
	'L_INTERESTS' => $lang['Interests'],

	'U_SEARCH_USER' => append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username'])),

	'S_PROFILE_ACTION' => append_sid("profile.$phpEx"))
);

$cm_viewprofile->post_vars($template,$profiledata,$userdata);
$template->pparse('body');

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

?>

補充:
測試帳號:test
測試密碼:test
 
最後由 ciami 於 2004-11-15 15:48 編輯,總共編輯了 1 次。
頭像
ciami
星球普通子民
星球普通子民
文章: 28
註冊時間: 2004-06-08 13:24
來自: 渾沌大地

文章 ciami »

找出cash安裝檔

代碼: 選擇全部

## EasyMod 0.0.10 Compatible
############################################################## 
## MOD Title: Cash Mod
## MOD Author: Xore < mods@xore.ca > (Robert Hetzler) http://www.xore.ca
## MOD Description: Cash Mod for users to gain money/points by posting 
## MOD Version: 2.2.1
## 
## Installation Level: Intermediate
## Installation Time: 15 Minutes 
## Files To Edit: common.php
##                memberlist.php
##                posting.php
##                privmsg.php
##                profile.php
##                viewtopic.php
##                includes/functions.php
##                includes/functions_post.php
##                includes/usercp_viewprofile.php
##                templates/subSilver/memberlist_body.tpl
##                templates/subSilver/profile_view_body.tpl
##                templates/subSilver/viewtopic_body.tpl
## Included Files: cash.php
##                 admin/admin_cash.php
##                 admin/cash_config.php
##                 admin/cash_currencies.php
##                 admin/cash_events.php
##                 admin/cash_exchange.php
##                 admin/cash_forums.php
##                 admin/cash_groups.php
##                 admin/cash_help.php
##                 admin/cash_log.php
##                 admin/cash_recount.php
##                 admin/cash_reset.php
##                 admin/cash_settings.php
##                 includes/classes_cash.php
##                 includes/functions_cash.php
##                 language/lang_english/lang_cash.php
##                 templates/subSilver/cash_donate.tpl
##                 templates/subSilver/cash_exchange.tpl
##                 templates/subSilver/cash_modedit.tpl
##                 templates/subSilver/cash_viewprofile.tpl
##                 templates/subSilver/cash_viewtopic.tpl
##                 templates/subSilver/admin/cash_config.tpl
##                 templates/subSilver/admin/cash_currencies.tpl
##                 templates/subSilver/admin/cash_event.tpl
##                 templates/subSilver/admin/cash_events.tpl
##                 templates/subSilver/admin/cash_exchange.tpl
##                 templates/subSilver/admin/cash_forum.tpl
##                 templates/subSilver/admin/cash_group.tpl
##                 templates/subSilver/admin/cash_groups.tpl
##                 templates/subSilver/admin/cash_help.tpl
##                 templates/subSilver/admin/cash_log.tpl
##                 templates/subSilver/admin/cash_menu.tpl
##                 templates/subSilver/admin/cash_navbar.tpl
##                 templates/subSilver/admin/cash_reset.tpl
##                 templates/subSilver/admin/cash_resetting.tpl
##                 templates/subSilver/admin/cash_settings.tpl
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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/ 
############################################################## 
## Author Notes:
##
##     Please read the README.txt, there is
##          IMPORTANT & NECESSARY installation information there
##
##     Many thanks to everyone who has contributed, they can be found in
##          credits.txt
##     My apologies if i've missed anyone
##
############################################################## 
## MOD History:
## v2.2.1 Fixed a few minor bugs
## v2.2.0 A bundle of new features
## v2.0.2 Another Bug fix, plus help/support link.
## v2.0.1 A few bug fixes...
## v2.0.0 Multiple currencies, fixed log_actions mod incompatibility
##        And a bunch of other stuff ;-)
## v1.1.2 EasyMOD Compliance
## v1.1.1 Bug fix for admin panels
## v1.1.0 Forum management added, donations, admin editing, logging, quotes stripping
##        Renaming from MoneySystems to Cash Mod
## v1.0.1 SQL update, with quotes
## v1.0.0 First version release. no bugs, i hope :P
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
# 
#-----[ COPY ]------------------------------------------ 
#
copy cash.php                                      to cash.php
copy admin/admin_cash.php                          to admin/admin_cash.php
copy admin/cash_config.php                         to admin/cash_config.php
copy admin/cash_currencies.php                     to admin/cash_currencies.php
copy admin/cash_events.php                         to admin/cash_events.php
copy admin/cash_exchange.php                       to admin/cash_exchange.php
copy admin/cash_forums.php                         to admin/cash_forums.php
copy admin/cash_groups.php                         to admin/cash_groups.php
copy admin/cash_help.php                           to admin/cash_help.php
copy admin/cash_log.php                            to admin/cash_log.php
copy admin/cash_recount.php                        to admin/cash_recount.php
copy admin/cash_reset.php                          to admin/cash_reset.php
copy admin/cash_settings.php                       to admin/cash_settings.php
copy includes/classes_cash.php                     to includes/classes_cash.php
copy includes/functions_cash.php                   to includes/functions_cash.php
copy language/lang_english/lang_cash.php           to language/lang_english/lang_cash.php
copy templates/subSilver/cash_donate.tpl           to templates/subSilver/cash_donate.tpl
copy templates/subSilver/cash_exchange.tpl         to templates/subSilver/cash_exchange.tpl
copy templates/subSilver/cash_modedit.tpl          to templates/subSilver/cash_modedit.tpl
copy templates/subSilver/cash_viewprofile.tpl      to templates/subSilver/cash_viewprofile.tpl
copy templates/subSilver/cash_viewtopic.tpl        to templates/subSilver/cash_viewtopic.tpl
copy templates/subSilver/admin/cash_config.tpl     to templates/subSilver/admin/cash_config.tpl
copy templates/subSilver/admin/cash_currencies.tpl to templates/subSilver/admin/cash_currencies.tpl
copy templates/subSilver/admin/cash_event.tpl      to templates/subSilver/admin/cash_event.tpl
copy templates/subSilver/admin/cash_events.tpl     to templates/subSilver/admin/cash_events.tpl
copy templates/subSilver/admin/cash_exchange.tpl   to templates/subSilver/admin/cash_exchange.tpl
copy templates/subSilver/admin/cash_forum.tpl      to templates/subSilver/admin/cash_forum.tpl
copy templates/subSilver/admin/cash_group.tpl      to templates/subSilver/admin/cash_group.tpl
copy templates/subSilver/admin/cash_groups.tpl     to templates/subSilver/admin/cash_groups.tpl
copy templates/subSilver/admin/cash_help.tpl       to templates/subSilver/admin/cash_help.tpl
copy templates/subSilver/admin/cash_log.tpl        to templates/subSilver/admin/cash_log.tpl
copy templates/subSilver/admin/cash_menu.tpl       to templates/subSilver/admin/cash_menu.tpl
copy templates/subSilver/admin/cash_navbar.tpl     to templates/subSilver/admin/cash_navbar.tpl
copy templates/subSilver/admin/cash_reset.tpl      to templates/subSilver/admin/cash_reset.tpl
copy templates/subSilver/admin/cash_resetting.tpl  to templates/subSilver/admin/cash_resetting.tpl
copy templates/subSilver/admin/cash_settings.tpl   to templates/subSilver/admin/cash_settings.tpl

# 
#-----[ SQL ]------------------------------------------
#
#   There is an automatic sql installer that works currently for mysql and mssql
#   It is neccessary to copy the file sql_install.php to your main phpbb directory and run it from there
#   After that, you want to delete the file immediately.
#
#   If you prefer to run the queries manually yourself, or to translate it to a different dbms
#   than mysql or mssql, the raw queries are located in sql_221.txt, but are only available for mysql.
#   I will try to include more dbms's for the installer for future releases, but nothing is guaranteed
#   at present
#

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

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

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
if ( defined('IN_CASHMOD') )
{
	include($phpbb_root_path . 'includes/functions_cash.'.$phpEx);
}

# 
#-----[ OPEN ]------------------------------------------ 
#
memberlist.php

# 
#-----[ FIND ]------------------------------------------ 
# 
define('IN_PHPBB', true);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
define('IN_CASHMOD', true);
define('CM_MEMBERLIST', true);

# 
#-----[ FIND ]------------------------------------------ 
# 
$select_sort_mode = '<select name="mode">';

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
$cm_memberlist->droplists($mode_types_text,$mode_types);

# 
#-----[ FIND ]------------------------------------------ 
# 
	default:

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
	case $cm_memberlist->modecheck($mode):
		$order_by = $cm_memberlist->getfield($mode) . " $sort_order LIMIT $start, " . $board_config['topics_per_page'];
		break;

# 
#-----[ FIND ]------------------------------------------ 
# 
	ORDER BY $order_by";

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
$cm_memberlist->generate_columns($template,$sql,8);

# 
#-----[ FIND ]------------------------------------------ 
# 
			'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
		);

		$cm_memberlist->listing($template,$row

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

# 
#-----[ FIND ]------------------------------------------ 
# 
define('IN_PHPBB', true);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
define('IN_CASHMOD', true);
define('CM_POSTING', true);

# 
#-----[ FIND ]------------------------------------------ 
# 
		$sql = "SELECT f.*, t.topic_status, t.topic_title

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
t.topic_title

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
, t.topic_poster

# 
#-----[ FIND ]------------------------------------------ 
# 
		$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';

# 
#-----[ BEFORE, ADD ]------------------------------------------ \r
# 
		$temp = $submit;
		$submit = !(!$submit || ( isset($board_config['cash_disable']) && !$board_config['cash_disable'] && (($mode == 'editpost') || ($mode == 'delete'))));

# 
#-----[ FIND ]------------------------------------------ 
# 
		$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
		$submit = $temp;
		unset($temp);

# 
#-----[ FIND ]------------------------------------------ 
# 
		$post_data['poster_post'] = ( $post_info['poster_id'] == $userdata['user_id'] ) ? true : false;

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
		$post_data['post_text'] = ( ($mode == 'editpost') || ($mode == 'delete') ) ? $post_info['post_text'] : '';
		$post_data['bbcode_uid'] = ( ($mode == 'editpost') || ($mode == 'delete') ) ? $post_info['bbcode_uid'] : '';

# 
\n#-----[ FIND ]------------------------------------------ 
# 
		$post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0;

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
		$post_data['topic_poster'] = ( $mode == 'reply' ) ? $post_info['topic_poster'] : 0;

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

# 
#-----[ FIND ]------------------------------------------ 
# 
define('IN_PHPBB', true);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
define('IN_CASHMOD', true);

# 
#-----[ FIND ]------------------------------------------ 
# 
				$emailer->reset();

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
			}
			$pmer = new cash_user($userdata['user_id'],$userdata);
			$pmer->give_pm_amount();
			while ( false ) {

# 
#-----[ OPEN ]------------------------------------------ 
#
\nprofile.php

# 
#-----[ FIND ]------------------------------------------ 
# 
define('IN_PHPBB', true);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
if ( (isset($HTTP_GET_VARS['mode']) && ($HTTP_GET_VARS['mode'] == 'viewprofile')) || (isset($HTTP_POST_VARS['mode']) && ($HTTP_POST_VARS['mode'] == 'viewprofile')) )
{
	define('IN_CASHMOD', true);
	define('CM_VIEWPROFILE',true);
}

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

# 
#-----[ FIND ]------------------------------------------ 
# 
define('IN_PHPBB', true);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
define('IN_CASHMOD', true);
define('CM_VIEWTOPIC', true);

# 
#-----[ FIND ]------------------------------------------ 
# 
	LIMIT $start, ".$board_config['posts_per_page'];

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
$cm_viewtopic->generate_columns($template,$forum_id,$sql);

# 
#-----[ FIND ]------------------------------------------ 
# 
		'U_POST_ID' => $postrow[$i]['post_id'])

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	);

	$cm_viewtopic->post_vars($postrow[$i],$userdata,$forum_id

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

# 
#-----[ FIND ]------------------------------------------ 
# 
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	if ( defined('IN_CASHMOD') )
	{
		if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_cash.'.$phpEx)) )
		{
			include($phpbb_root_path . 'language/lang_english/lang_cash.' . $phpEx);
		}
		else\r
		{
			include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_cash.' . $phpEx);
		}
	}

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

# 
#-----[ FIND ]------------------------------------------ 
# 
	$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
	$cash_message = $GLOBALS['cm_posting']->update_post($mode, $post_data, $forum_id, $topic_id, $post_id, $topic_type, $bbcode_uid, $post_username, $post_message);

# 
#-----[ FIND ]------------------------------------------ 
# 
	$message = $lang['Stored']

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
$lang['Stored']

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
 . '<br />' . $cash_message

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

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
		$GLOBALS['cm_posting']->update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);

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

# 
#-----[ FIND ]------------------------------------------ 
# 
$template->pparse('body');
	
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
$cm_viewprofile->post_vars($template,$profiledata,$userdata);

# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/memberlist_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# in subSilver, the full line is 
#	  <th class="thTop" nowrap="nowrap">{L_POSTS}</th>
#
	{L_POSTS}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# on the next line
#
	  <!-- BEGIN cashrow -->
	  <th class="thTop" nowrap="nowrap">{cashrow.NAME}</th>
	  <!-- END cashrow -->

# 
#-----[ FIND ]------------------------------------------ 
# in subSilver, the full line is 
#	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>
#
	 {memberrow.POSTS}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# on the next line
#
	  <!-- BEGIN cashrow -->
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.cashrow.CASH_DISPLAY}</span></td>
	  <!-- END cashrow -->

# 
#-----[ FIND ]------------------------------------------ 
# in subSilver, the full line is 
#	  <td class="catBottom" colspan="8" height="28"> </td>
# 
colspan="8"

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
8

# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------ 
#
{NUM_COLUMNS}

# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/profile_view_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# in subSilver, the full line is 
#		  <td> <b><span class="gen">{INTERESTS}</span></b></td>
# 
{INTERESTS}

# 
#-----[ FIND ]------------------------------------------ 
# (on the next line)
# 
		</tr>
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
		{CASH}

# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/viewtopic_body.tpl

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

#
#-----[ IN-LINE FIND ]------------------------------------------ 
#
{postrow.POSTER_FROM}

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
#
<br />{postrow.CASH}

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
其中有段\r
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------
#
$template->pparse('body');

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$cm_viewprofile->post_vars($template,$profiledata,$userdata);


我將此步驟移除後
就可以看到會員詳細資料了....

雖然問題解決了
可是不知道沒有新增這步驟會不會造成什麼影響呢?? :roll:
幻狼神威
竹貓忠實會員
竹貓忠實會員
文章: 389
註冊時間: 2002-10-29 01:54
來自: 薔薇幻境
聯繫:

文章 幻狼神威 »

ciami 寫:雖然問題解決了
可是不知道沒有新增這步驟會不會造成什麼影響呢?? :roll:
這樣你的會員詳細資料的頁面就無法顯示貨幣資訊了吧.......
[必看] phpBB 架站討論區發文規則與發問格式
學好phpBB的訣竅:
 1. 善用竹貓星球的搜尋功能,可以找到所有相似並解決的主題。
 2. 簡單清楚的把你的問題打在主題上,讓懂的人一看就能了解。
 3. 依照發文格式發文,能幫助大家比較容易的找出問題在那裡。
 4. 一時沒有回應不表示沒人理你,大家都需要一點思考的時間。
 5. 解決問題後請修改第一篇主題,並感謝曾經幫過你的高手們。


切記:PM並不能解決問題,版上發問可以集大家的意見,您的問題可能更快的被解決.....
   ↑蘿莉不在此限.......XD"
頭像
ciami
星球普通子民
星球普通子民
文章: 28
註冊時間: 2004-06-08 13:24
來自: 渾沌大地

文章 ciami »

原來如此啊...
謝謝你的告知..

我後來重新檢查了安裝檔
發現少了


#
#-----[ OPEN ]------------------------------------------
#
profile.php

#
#-----[ FIND ]------------------------------------------
#
define('IN_PHPBB', true);

#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( (isset($HTTP_GET_VARS['mode']) && ($HTTP_GET_VARS['mode'] == 'viewprofile')) || (isset($HTTP_POST_VARS['mode']) && ($HTTP_POST_VARS['mode'] == 'viewprofile')) )
{
define('IN_CASHMOD', true);
define('CM_VIEWPROFILE',true);
}


真是太粗心了...
主題已鎖定

回到「外掛問題討論」