miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Changing amount of User Activities "bars" under Profile

Author Vodicka
Registered
#1 | Posted: 2 Feb 2009 08:58 | Edited by: Vodicka 
I would like to know how to limit number of bars in user activity "chart" (in user profile). For my users top 10 would be just enough.

I already succeeded in limiting number of shown latest topics and posts by adding the following line into bb_plugins.php:

if($action=='userinfo') $viewmaxtopic=10;


Would something similar be possible for the chart too?

P.S.

Please correct the title. (Simply...) Shame on me!

Author Paul
Lead Developer
#2 | Posted: 2 Feb 2009 10:10 
Bars just show all forums user has been participated in. If the amount seems to be big, it means you have a lot of forums, and basically, if you limit that chart, it won't be useful and objective anymore. So I suppose for you it would be better to remove it at all, put

define('NOT_SHOW_LATEST_REPLIES');

under bb_plugins.php or setup_options.php.

To limit the amount of bars, you need to modify bb_func_usernfo.php file, introducing new limiting variable in /* Activities */ block. For example you introduce:

$limitBars=5;
$currentLimit=0;

Then in the cycle which begins as

foreach($forums as $k=>$val){

...
...

$currentLimit++;
if($currentLimit>$limitBars) break;

}

you need to refer to that war. Example is shown above.

Author Vodicka
Registered
#3 | Posted: 2 Feb 2009 16:39 
You are right and in future I may opt for dismissing the chart completely. For now I have limited the number of bars to ten and it works just fine. Thank you!

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Changing amount of User Activities "bars" under Profile Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


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 ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB