Kunena 6.2.6 released

The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Question User List Pathway Divider Problem & Possible Fix

More
15 years 1 month ago #1 by WarrenB
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; } }

Please Log in or Create an account to join the conversation.

Time to create page: 0.352 seconds