Forgot?

How receive user avatar

Reply Topic
Link to this post 31 Jul 12

Hi everyone. I would like to use ninjaboard avatars in other module.
for example if i have got some php files with some code
at first i get user id


$user =& JFactory::getUser();
$id= $user->get('id');

then, how correctly receive such code

<a class="avatar" href="##" style="background-image: url(###); height: 100px; width: 100px;"/>

which is rendered by such function ?


<?= @helper('com://site/ninjaboard.template.helper.avatar.image', array()) ?>

I do not know what values i must put into array to get user avatar

Link to this post 01 Aug 12

Hi No_Qt

The following should give you what you want, from outside of Ninjaboard


<?php echo KService::get('com://site/ninjaboard.tamplate.helper.avatar', array('id' => JFactory::getUser()->id)); ?>

Let me know if you need any more help

Link to this post 01 Aug 12

@Richie thank you very much (=

Forums Joomla Extension Support NinjaBoard How receive user avatar