$scount = count($sarray);
for ( $i = 0; $i < $scount; $i++ ) {
$story = array();
$story['id'] = $sarray[$i]->storyid();
$story['poster'] = $sarray[$i]->uname();
if ( $story['poster'] != false ) {
$story['poster'] = "<a href='".XOOPS_URL."/userinfo.php?uid=".$sarray[$i]->uid()."'>".$story['poster']."</a>";
} else {
$story['poster'] = $xoopsConfig['anonymous'];
}
You see that? "$array[$i]->uid()" !!!! Guess it´s the Id of the poster so below the above code paste this:
global $xoopsDB;
$result = $array[i$]->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'];
And forget class.newsstory.php
Try it.
I also add in my articles 5 links to articles of the same author! Look in my site Luso-Poemas
The issue of the missing blocks never afeted me. I don´t use them. But i´ll take a look. Bye.
Sorry for the bad english!