To make private_nodes work with buddylist2 I did the following:

1) Changed all instances of buddylist_get_buddies() to buddy_api_get_buddies()
2) Changed the function private_nodes_get_uid_of_buddies as follows:

function private_nodes_get_uid_of_buddies($uid){

if (function_exists('buddy_api_get_buddies')) {
$buddies = buddy_api_get_buddies($uid);
}

if(is_array($buddies)){

// these lines commented out by jameadows
/*
foreach($buddies as $b){
$buddies_uid[]=$b['uid'];
}
*/
// the following line added by jameadows
$buddies_uid=array_keys($buddies);

}
return $buddies_uid;
}

A cleaner fix would probably wrap the calls to buddylist_get_buddies/buddy_api_get_buddies inside a wrapper function, but this quick and dirty hack seems to be working too.

Other than that it seems to be working great, thanks for the private_nodes module, just what I needed!

Comments

mariusooms’s picture

Thanks for figuring this out, will give it try.

Regards,
Marius