Hi,

As the "people you might know" and the "mutual friends" block are not created via views, I'm unable to customize them. Can anyone give me a tipp how I can theme them showing user pictures instead of user names?

Thank you

Ben

Comments

mariusooms’s picture

Hi Ben, according to the module code, theming the block is on the TODO list. I haven't tried this, but you could try altering line #263 of friendlist_block.module.

Change this line:

<?php
  $picture = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $account) : '';
?>

to this:

<?php
  $picture = theme('user_picture', $account);
?>

Hopefully we will be able to make the blocks theme-able soon.

Regards,

Marius

irakli’s picture

The blocks are currently themes using the item_list theming function:

return theme('item_list', $list, NULL, 'ul', array('class' => $list_class));

You should be able to hook into it. You will be able to determine what is being themed by analyzing class attribute which takes following two values respectively:

friendlist_mutual_friends
and
friendlist_who_you_might_know

Running blocks through a more specific theming function is a good idea, but probably not an immediate priority vs fixing some functional issues?

mercmobily’s picture

Title: Theme friendlist blocks » Theme friendlist blocks -- OR, friendlist_blocks_display_user_list should be a theme function

Hi Ben,

Yep, theming of the blocks should be possible since it's basicaly just an item_list of $picture .' '. theme('username', $account) (which is the username really).

There is very little that CSS shoiuldb't be able to do.

However, I agree that friendlist_blocks_display_user_list should be a theme function to be honest, since it really is all about output. I am adding this as a feature request -- the way the block part of the module is created, it will be easy to turn that function into a theme!

Bye,

Merc.

mercmobily’s picture

Category: support » feature