Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way to print the user's avatar/profile picture in the default block item template? (user_relationship_locator_default_block_item.tpl.php)
For example, in this issue using the code provided you can print the user avatar in the page.tpl.php and select what image style to use: http://drupal.org/node/980546
Once we have the variable loaded and the image style, then be able to print in the block such as:
<?php
/**
* @file
* Theme for individual block item
*
* $requester
* $requestee
* $relationship
*/
?>
<li>
<a title='Profile' href="<?php print base_path();?>user/<?php print $requestee->uid ?>">
<?php print $requestee->user_avatar?>
</a>
<a class="user-link" href="<?php print base_path();?>user/<?php print $requestee->uid ?>"><?php print $requestee->name?></a>
<div class="relationship-link">
<?php print theme('user_relationships_request_relationship_direct_link', array('relate_to' => $requestee, 'relationship_type' => $relationship)); ?>
</div>
</li>
Comments
Comment #1
mrf CreditAttribution: mrf commentedThe above example worked for me. This template file is simple by design, leaving these type of modifications up to the themer / site developer.
Comment #2
broncomania CreditAttribution: broncomania commentedWith imagecache you can use this.
Comment #3
mrf CreditAttribution: mrf commentedReminder to set up a docs page about this ... eventually.
Comment #3.0
mrf CreditAttribution: mrf commentedAdded link to issue