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

bensemmel - March 10, 2009 - 21:52
Project:FriendList
Version:6.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

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

#1

mariusooms - March 11, 2009 - 09:01

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

#2

irakli - April 6, 2009 - 04:51

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?

#3

mercmobily - June 8, 2009 - 14:53
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.

#4

mercmobily - June 10, 2009 - 12:14
Category:support request» feature request
 
 

Drupal is a registered trademark of Dries Buytaert.