Cancel the help, I have figured it out....great mod idea though! This code will display a third column titled "your friend" and place a green check if that person is added as your friend as well. Goes great with my idea to remove the "view people who have added you as a friend" and just display both on the same page. just call "do_viewfriends2()" at the end of do_viewfriends() and remove all instances of the image and link for "{* display "people who have added me as a friend" link *}" in "\your template\user_center.tpl"
In the "user.php" file, replace the do_viewfriends2() function with the following:
Code:
function do_viewfriends2(){
global $db, $user;
$friend = new Friend;
$friends = $friend->get_friend_list_2();
$friend4 = new Friend;
$myfriends = $friend4->get_friend_list();
echo "<h2>People who have added you as a friend</h2>";
if ($friends){
echo '<table style=width:50% class=listing><th>username</th><th>message</th><th>your friend</th>';
foreach($friends as $myfriend) {
echo '<tr><td>';
if(Enable_Gravatar){
echo ' <img src="http://www.gravatar.com/avatar.php?gravatar_id='. md5($myfriend->user_email) .'&size=20&rating=' . Gravatar_Maxrating . '">';
}
echo '<a href="'. my_pligg_base. '/user.php?login=' . $myfriend->user_login . '">' . $myfriend->user_login.'</a></td>';
echo '<td><a href="#view_message" rel="view_message~!~view=small_msg_compose~!~login=' .$myfriend->user_login . '" class="lbOn"><img src='.my_pligg_base.'/templates/mollio-beat/images/user_message.png border=0></a></td>';
$temp=$myfriend->user_login;
foreach($myfriends as $myfriend2) {
if ($myfriend2->user_login == $myfriend->user_login) {
echo '<td><img src='.my_pligg_base.'/templates/mollio-beat/images/green_check.gif border=0></a></td>';
}
}
}
echo '</tr></table>';
}
else {
echo "<br /><br /><center><strong>nobody has added you as a friend</strong></center>";
}
}