Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Important [Resolved] Total user count wrong

More
14 years 10 months ago #98891 by sozzled

jaybuzzard wrote: ... applied the righthands stats removal and it worked

I knew it would.

jaybuzzard wrote: Is there anyway I could only remove the total users but keep the latest member and the user list

That's not exactly what you originally asked for, but it can be done ... if you really must fix the problem before you go to sleep tonight.

You need to edit the file ../components/com_kunena/template/default/plugin/stats/frontstats.php

Simple if you are a [PHP] surgeon.

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

More
14 years 10 months ago #98893 by jaybuzzard
I done it Whoop Whoop :)

Now I will wait for the doctor to tell what code I need to insert into the frontstats.php file to display the total user count from the userlist ? :)

cheers
Jay

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

More
14 years 10 months ago #99126 by jaybuzzard
Where has the doctor gone :S

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

More
14 years 10 months ago #99131 by sozzled

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

More
14 years 10 months ago - 14 years 10 months ago #99376 by jaybuzzard
Nice to chat the other night Sozzled :), also got some tapes that need converting to dvd ;)

Right the code which I need to change or adapt to fix the stats problem is the following

This if from the Frontstats.php (../components/com_kunena/template/default/plugin/stats/frontstats.php)

<?php echo JText::_('COM_KUNENA_STAT_TOTAL_USERS'); ?>: <strong><?php echo $userlist1; ?></strong> <span class="divider">|</span>

I need it to show the total registered user amount from the userlist.php (../components/com_kunena/template/default/userlist/userlist.php) file. which is the following:

<h2><span><?php printf(JText::_('COM_KUNENA_USRL_REGISTERED_USERS'), $this->app->getCfg('sitename'), intval($this->total));?></span></h2>

I am not a php coder so have tried numerous different methods and playing around and cannot get it to show on the frontstats :evil:

I am sure that someone who knows php could just say..... aahhh you just need to move this or change this and it will work (I Hope :) )

regards
Jay
Last edit: 14 years 10 months ago by jaybuzzard.

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

More
14 years 10 months ago #99578 by Matias
I'm not following the forum every day as there are a lot of other tasks in my lists, too. $this->total in userlist comes from SQL query in that page, so there's not a direct way to use it.

If you replate lib/kunena.stats.class.php function loadTotalMembers() in line ~93 with this:
Code:
public function loadTotalMembers() { if ($this->totalmembers === null) { if ($this->_config->userlist_count_users == '0' ) $where = '1'; elseif ($this->_config->userlist_count_users == '1' ) $where = 'block=0 OR activation=""'; elseif ($this->_config->userlist_count_users == '2' ) $where = 'block=0 AND activation=""'; elseif ($this->_config->userlist_count_users == '3' ) $where = 'block=0'; $this->_db->setQuery ( "SELECT COUNT(*) FROM #__users WHERE {$where}" ); $this->totalmembers = $this->_db->loadResult (); KunenaError::checkDatabaseError(); } }

You should see the right number in there, too (just pick up which option you want to use from your configuration)..

Yes, it was a bug.

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

Time to create page: 0.241 seconds