block_type == UR_BLOCK_MY ? $user->uid : $account->uid;
$showing_all_types = $settings->rtid == UR_BLOCK_ALL_TYPES;
$rows = array();
foreach ($relationships as $rtid => $relationship) {
if ($the_other_uid == $relationship->requester_id) {
$rtype_heading = $relationship->is_oneway ?
t("@rel_name of", array('@rel_name' => $relationship->name, '@rel_plural_name' => $relationship->plural_name)) :
t("@rel_plural_name", array('@rel_name' => $relationship->name, '@rel_plural_name' => $relationship->plural_name));
$relatee = $relationship->requestee;
}
else {
$rtype_heading = t("@rel_plural_name", array('@rel_name' => $relationship->name, '@rel_plural_name' => $relationship->plural_name));
$relatee = $relationship->requester;
}
$title = $rtype_heading;
$username = theme('username', $relatee);
$picture = theme('user_picture', $relatee);
$rows[$title][] = $picture;
$rows2[$title2][] = $username;
}
echo '
';
foreach ($rows as $title => $users) {
for($i=0; $i
value;
$pictureUrl = $pictureTitleTrimmed[1][0];
$altText = $pictureTitleTrimmed[2][0];
$nameLength = strlen($nameAlone);
if($nameLength<=11){
$newName=$nameAlone;
} else {
$newName = substr($nameAlone, 0, 11);
$newName .= '...';
}
echo '';
if(strlen($rows[$title][$i])==31){
$pictureUrl = 'http://'.$address.'/sites/all/themes/raamatumaailm/images/ajutine85x85.jpg';
echo '
';
echo '
';
} else {
echo '
';
echo '
';
}
echo '
';
}
echo '';
}
/*$name = $relationship->requestee->name;
$nameLength = strlen($name);
if($nameLength<=7){
$newName=$name;
} else {
$newName = substr($name, 0, 7);
$newName .= '...';
}
if(file_exists($_SERVER{'DOCUMENT_ROOT'}.$relationship->requester->picture)){
echo '
';
} else {
echo '
';
}
*/
echo ' ';
echo '';
//$output[] = theme('item_list', ($rtid == UR_BLOCK_ALL_TYPES ? array($users) : $users), $showing_all_types ? $title : NULL);
//print implode('', $output);
}
/* removing printing out empty placeholder so the block is hidden when no data
// No relationships so figure out how we present that
else {
if ($settings->rtid == UR_BLOCK_ALL_TYPES) {
$rtype_name = 'relationships';
}
else {
$rtype = user_relationships_type_load($settings->rtid);
$rtype_name = $rtype->plural_name;
}
if ($account->uid == $user->uid) {
print t('You have no @rels', array('@rels' => $rtype_name));
}
else {
print t('!name has no @rels', array('!name' => theme('username', $account), '@rels' => $rtype_name));
}
}
*/
?>