Hymseen
I´m a newbie in Xoops, php and sql so I did it the same way as you... researching. I don´t know if this is the best or optimized or convencional way to do do it but here it goes:
I "messed" in 3 files:
article.php (to get the avatar on each article)
class/class.newsstory.php (to get the avatar in front page)
templates/news_item.html (to display the avatar)
In article.php around line 270 and below "$xoopsTpl->assign('mail_link',
'mailto:?subject='.sprintf(_NW_INTARTICLE,$xoopsConfig['sitename']).'&body='.sprintf(_NW_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/news/article.php?storyid='.$article->storyid());"
I pasted this code:
global $xoopsDB;
$result = $article->uid();
$result2 = $xoopsDB->query("SELECT user_avatar FROM ".$xoopsDB->prefix("users")." where uid='$result'");
$result3 = $xoopsDB->fetchArray($result2);
$story['avatar_url'] = XOOPS_URL.'/uploads/'.$result3['user_avatar'];
In class/class.newsstory.php around line 600 (in the function "function prepare2show($filescount)") below "$story['posttime'] = formatTimestamp($story['posttimestamp'],getmoduleoption('dateformat'));" i´ve pasted this code (similar but not equal):
global $xoopsDB;
$result = $this->uid();
$result2 = $xoopsDB->query("SELECT user_avatar FROM ".$xoopsDB->prefix("users")." where uid='$result'");
$result3 = $xoopsDB->fetchArray($result2);
$story['avatar_url'] = XOOPS_URL.'/uploads/'.$result3['user_avatar'];
In news_item.html you have to paste this in where you want the avatar to be displayed:
<img src="<{$story.avatar_url}>">
I used this way:
<div class="itemBody"><img src="<{$story.avatar_url}>"
align="right"/><p class="itemText"><{$story.text}>p>
so it replace the topic image!
One thing to have in mind: Some themes have their own news_item.html so if your theme as it you have do do your changes there!
Clear your templates and refresh the news module.
Tip:You can also get a default avatar for your users by modifing uploads/blank.gif
Well, I think that´s all.
Let me know if you where sucessful!
Thanks!