Showing the avatar picture next to nickname would be a nice and useful feature. It’s Easier to recognize a user. Thanks beforehand!

Shoutbox is cool!

Comments

disterics’s picture

Version: 6.x-1.x-dev » master
disterics’s picture

Assigned: Unassigned » disterics

Sounds like a cool feature to include in the next release

sdk’s picture

subscribing

kakajoe’s picture

+1

vmed’s picture

... would be very nice !

mstef’s picture

Status: Active » Closed (fixed)

This can be done inside the theme by overriding the shoutbox theme functions in template.php. Grab a copy of Drupal Commons and see how it's done there. It's very simple.

vmed’s picture

... could you specify in more details how to configure the theme, and how to override the theme functions with the part of drupal commons ?

please..

thanks

johan

mstef’s picture

Well, this is just a normal part of Drupal..

If you look inside a module, well, modules that are written correctly, just about all functions that actually output themed data should be declared like theme_shoutbox_post_whatever($shout, $user) (for examples...)..

That means that inside your theme, in the template.php file, you can:

my_theme_shoutbox_post_whatever($shout, $user) {
  // Do whatever you want to the output
}

If you look inside the shoutbox module, you'll see plenty of theme functions that you can override. If you download Drupal Commons and look inside the acquia_commons theme, inside the template.php file, there's an example of how to add the user avatars to the shouts. (it helps having imagecache installed so the images can all be set to the same size).

Get it?

vmed’s picture

thanks for your good reply,

i changed some code in my template.php file with belongs to my danland theme, cleared cache !, but no changes to my shoutbox !

..anything more maybe ?

thanks

johan

kap316’s picture

Status: Closed (fixed) » Active

@mikestefff I appreciate the info, but to us newbies to coding, is it possible to give us the exact code to add avatars next to the username ? I have searched everywhere. I checked out drupal commons.. still confused!

This would be a great addition to the already awesome module! Thanks in advance!

BeaPower’s picture

same here, what is the code?

BeatleMike’s picture

I downloaded drupal commons and found no mention of shoutbox in any of it. The acquia_commons theme was not included in it either, so probably why. Would love some help on this.