First, let me add my thanks for rejuvenating the old FireBoard project. With Kunena moving towards a native Joomla! 1.5 implamentation, I've gotten back to work on the forum on my Web site.
The upgrade to Kunena 1.0.8 went fine, but I noticed a couple of small things that I'm working on. I hope this is the right place to post code. If not,please redirect me to the appropriate section.
I noticed the pathway for the user list had a comma between each item except the last two. Debugging the
fb_pathway.php file in the template folder led me to think that the code with the next() function was indicating the end of the array one element to early. A simple fix that seems to work for me is to switch the addition of $divider to being pre-pended rather than appended. Here's the code I came up with that works on my site. One caveat is that my site only lets registered, logged-in users into the forum so there are never any guests. I made the changes I think will work for guests, but they haven't been tested.
HTH,
Warren Bedell
Code:
foreach ($users as $user) {
if ($user->userid != 0)
{
//// [1] WEB 10-Mar-2009 next() tripped one entry too soon so switched to pre-pending the divider
//// $lastone = next($users)===FALSE;
//// if($lastone && !$totalguest){
//// $divider = '';
//// }
if ( $user->showOnline > 0 ){
//// [1] WEB 10-Mar-2009 next() tripped one entry too soon so switched to pre-pending the divider
$fireonline .= $divider . CKunenaLink::GetProfileLink($fbConfig, $user->userid, $user->username);
$divider = ", ";
}
}
else
{
$totalguest = $totalguest + 1;
}
}
if ($totalguest > 0) {
if ($totalguest==1) {
//// [1] WEB 10-Mar-2009 next() tripped one entry too soon so switched to pre-pending the divider
$fireonline .= $divider . '('.$totalguest.') '._WHO_ONLINE_GUEST;
} else {
//// [1] WEB 10-Mar-2009 next() tripped one entry too soon so switched to pre-pending the divider
$fireonline .= $divider . '('.$totalguest.') '._WHO_ONLINE_GUESTS;
}
}