miniBB Support Forums | 17 years on The Web
miniBB ® 

miniBB

®
  
 | Begin | Register | Reply | Search | Statistics | File Bank | Manual |
Bugs miniBB Support Forums / Bugs /   
 

Statistics missing

 
Author marsbar
Associated Member
#1 | Posted: 2 Nov 2014 11:38 
G'day, Paul.

Yesterday I upgraded my miniBB to version 3.1 and updated a number of add-ons for compatibility.

I just noticed my miniBB's statistics page does not seem to be working properly. Forum figures that usually appear across the top of the statistics page are either missing or wrong; i.e., "Number of users:" and "Number of topics:" are missing; and "Number of posts:" is showing a zero.

Also, page load time information fails to load, so I've removed the reference to it from the footer section for now.

I have not noticed any error messages.

Any advice/help you can provide will be gratefully received.

With thanks -
marsbar

Author Paul
Lead Developer
#2 | Posted: 3 Nov 2014 21:13 
It's because of the human factor. I have updated bb_func_stats.php in the end 2013 and some way lost my remark of it.

I've updated both the Updates History and the core miniBB.zip package with the new version of this file, you need to upgrade it on your end. Let me know if it was a cure.

Thanks for discovering this. My mistake...

Author Paul
Lead Developer
#3 | Posted: 3 Nov 2014 21:15 
As about page's information... that's a bit weird... you must make sure, first of all, you now have display_footer() function in your version of bb_functions.php. That's all that was replaced regarding footer's timing.

Author marsbar
Associated Member
#4 | Posted: 4 Nov 2014 00:39 | Edited by: marsbar 
Paul:
Thanks for discovering this. My mistake...

No worries, Paul--nobody died. ;-) Your revised bb_func_stats.php has brought the missing figures back--thank you!

Paul:
As about page's information... that's a bit weird... you must make sure, first of all, you now have display_footer() function in your version of bb_functions.php. That's all that was replaced regarding footer's timing.

Yes, the display_footer() function exists, and my miniBB is using the bb_functions.php from the v3.1 package.
Perhaps the way my main_footer.html calls the loading time is wrong (please see code below)?
{$l_loadingtime} {$totaltime}

Gratefully as always -
marsbar

Author Paul
Lead Developer
#5 | Posted: 10 Nov 2014 17:08 
Could you try to put this under setup_options.php ?..

function display_footer(){
//Loading footer
global $l_loadingtime;
$endtime=get_microtime();
$GLOBALS['totaltime']=sprintf ("%01.3f", ($endtime-$GLOBALS['starttime']));
if(isset($GLOBALS['includeFooter']) and $GLOBALS['includeFooter']!='') include($GLOBALS['includeFooter']); else echo ParseTpl(makeUp('main_footer'));
}

Also, is your footer loaded using some other module or code? Or is it like in default miniBB package?

Author marsbar
Associated Member
#6 | Posted: 19 Nov 2014 22:54 
Thank you, Paul, for getting back to me.
The function works like a charm: loading time reading has come back.
And yes, my miniBB's footer is loaded the standard miniBB way (i.e., not loaded via some other module or code).
Cheers,
marsbar

Author Paul
Lead Developer
#7 | Posted: 20 Nov 2014 23:43 
Ok, thanks for reply - but... what did you specifically applied to your code to achieve the final (good) result? Thx.

Author marsbar
Associated Member
#8 | Posted: 23 Nov 2014 23:16 
Paul:
what did you specifically applied to your code to achieve the final (good) result?

Sorry, Paul: I am not exactly sure I understand your question ... but this is what I did:
1) made suggested change to setup_options.php
2) added "{$l_loadingtime} {$totaltime}" to my miniBB's main_footer.html

Cheers,
marsbar

Author hubba
Guest
#9 | Posted: 4 Jan 2019 13:39 
Unfortunately, the solution suggested in comment #5 produces a problem with the copyright message in the latest version (3.4).
If I add the display_footer-function in setup_options.php, the loading time will be displayed, but the copyright message disappears. (which is not what I or minibb wants)

I tried adding the updated display_footer-function taken from bb_functions.php (including $freeWareKeys and the $GLOBAL for 'violating_the_copyright...') to my setup_options.php, but $totaltime is still empty.

Maybe Paul can give us a nudge in the right direction. :)

Thank you,
all the best
hubba

Author hubba
Guest
#10 | Posted: 4 Jan 2019 13:59 
ok, I was able to fix it by defining 'totaltime' in bb_functions.php as a global variable again. (like it was in older versions)

//Loading footer
$endtime=get_microtime();
$GLOBALS['totaltime']=sprintf ("%01.3f", ($endtime-$GLOBALS['starttime']));

$totaltime, as well as the copyright-message now appear normally again.
Nothing needs to be added to setup_options.php.

Sorry for the confusion and thank you for your attention.

Author Paul
Lead Developer
#11 | Posted: 4 Jan 2019 18:36 | Edited by: Paul 
hubba
You're right, replacing $totaltime to $GLOBALS['totaltime'] in the current version's display_footer() function of bb_functions.php is the most proper solution, specially when it comes to the custom footer script. I will consider it as a bug fix in the next version. Probably I've missed this, 'cause we don't display the total loading time "officially" in the recent releases anymore, but it's of course still could be added up on your wish.

This replacement also should fix the problem described above. No need to add a standalone function to setup_options.php anymore (despite the display_footer() could be still overwritten anywhere).

Thank you for dropping a note on this!

Author nour
Partaker
#12 | Posted: 28 Jan 2019 17:19 
Paul:
Could you try to put this under setup_options.php ?..

function display_footer(){
//Loading footer
global $l_loadingtime;
$endtime=get_microtime();
$GLOBALS['totaltime']=sprintf ("%01.3f", ($endtime-$GLOBALS['starttime']));
if(isset($GLOBALS['includeFooter']) and $GLOBALS['includeFooter']!='') include($GLOBALS['includeFooter']); else echo ParseTpl(makeUp('main_footer'));
}

Also, is your footer loaded using some other module or code? Or is it like in default miniBB package?

Hi,
I'm working on a statistic tool for a website (just a homework) and I found this to be part what it seems a full system.
My question is : can I take this statistics tool without having to do with all other parts of the system ?

Author Paul
Lead Developer
#13 | Posted: 28 Jan 2019 18:36 
nour:
I'm working on a statistic tool for a website (just a homework) and I found this to be part what it seems a full system.
My question is : can I take this statistics tool without having to do with all other parts of the system ?

The miniBB statistics is strictly related to the internal forum data. If your data is of another sort, I'm not sure how you could concatenate both things.

Bugs miniBB Support Forums / Bugs /
 Statistics missing
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


 ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.

 ⇑