https://www.icyphoenix.com/viewtopic.php?f=26&t=1664
-----------------------------------
The_White_Eagle
Tue 17 Apr, 2007 18:40

MR And PCP
-----------------------------------
hey there

I have installed MR already but now I'm busy installing the PCP from Pierre

I must search in viewtopic.php for this
[code linenumbers=false]$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);[/code]

but I only find this because I have MR installed

[code linenumbers=false]
// Mighty Gorgon - Multiple Ranks - BEGIN
require_once($phpbb_root_path . 'includes/functions_mg_ranks.'.$phpEx);
$ranks_sql = query_ranks();
// Mighty Gorgon - Multiple Ranks - END
[/code]

I must change it to this

[code linenumbers=false]
//-- mod : profile cp ------------------------------------------------------------------------------
//-- delete
// $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);
//-- add
$buddys = array();
if (count($user_ids) > 0)
{
	$s_user_ids = implode(', ', $user_ids);

	// get base info
	$sql = "SELECT * FROM " . BUDDYS_TABLE . " WHERE user_id=" . $userdata['user_id'] . " and buddy_id in ($s_user_ids)";
	if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, "Could not obtain buddys information.", '', __LINE__, __FILE__, $sql);
	while ( $row = $db->sql_fetchrow($result) )
	{
		$buddys[ $row['buddy_id'] ]['buddy_my_ignore'] = $row['buddy_ignore'];
		$buddys[ $row['buddy_id'] ]['buddy_my_friend'] = !$row['buddy_ignore'];
		$buddys[ $row['buddy_id'] ]['buddy_friend'] = false;
		$buddys[ $row['buddy_id'] ]['buddy_visible'] = false;
	}

	// check if in the topic author's friend list and "always visible" status he granted
	$sql = "SELECT * FROM " . BUDDYS_TABLE . " WHERE buddy_id=" . $userdata['user_id'] . " and user_id in ($s_user_ids)";
	if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, "Could not obtain buddys information.", '', __LINE__, __FILE__, $sql);
	while ( $row = $db->sql_fetchrow($result) )
	{
		if ( !isset($buddys[ $row['user_id'] ]) ) $buddys[ $row['user_id'] ]['buddy_my_ignore'] = false;
		if ( !isset($buddys[ $row['user_id'] ]) ) $buddys[ $row['user_id'] ]['buddy_my_friend'] = false;
		$buddys[ $row['user_id'] ]['buddy_friend'] = !$row['buddy_ignore'];
		$buddys[ $row['user_id'] ]['buddy_visible'] = $row['buddy_visible'];
	}
}
//-- fin mod : profile cp --------------------------------------------------------------------------
[/code]

But how must I do that now?

thnx already


