![]() |
Percentage of PM Quota Used
1 Attachment(s)
Percentage of PM Quota Used 4.0
Description: It show the percentage of PM quota that the user used. Installation:
Styles & Templates-> Style Manager-> Stylevars-> Private_Messages-> pm_percent Languages: - English History: 17-12-10: v4.0 First Release 29-12-10: v4.0.1 Fixed displayed porcentage This hack is created for your use free of charge. No payment is requested. However, if you would like to donate money for the work I put in to this hack, a donation would show your appreciation. |
You're percentage seems to be off. It is showing 2 when it should be .013, or .01.
Quote:
This works: Code:
$totalpmpercent = $vbulletin->userinfo['pmtotal'] / $vbulletin->userinfo['permissions']['pmquota']; |
Quote:
It should be 1.3 but as I am using ceil function which returns the next highest value, it displays 2. I will use vb_number_format in next release. |
13 divided by 1,000 is not 1.3, it is .013. I did a quota percent for my site a while back and have always used the code I posted. With ceil, it would show as .02. Just trying to help. ;)
|
Quote:
13 / 1000 * 100 = 1.3 |
Okay, but that is not the true percentage then. The way I do it doesn't multiply by 100, which is misleading. No offense meant. ;)
|
Quote:
http://en.wikipedia.org/wiki/Percentage Or use: http://www.csgnetwork.com/csgpercent.html 13 is what percent of 1000? Result: 1.3 % |
According to your second link, you are 100% right. It still doesn't look right to me, but I can't argue with it anymore. Sorry for my confusion. And here I thought was good in math in school. ;)
Here's what I came up with using your method: Code:
$pmpercent = vb_number_format($vbulletin->userinfo['pmtotal'] / $vbulletin->userinfo['permissions']['pmquota'] * 100, 2); |
Quote:
Also I am thinking using round function. |
Yes, round would be better. And thanks for catching me on the percentage error. I Have been doing it wrong all along, it seems. ;)
|
Has the code been updated to reflect the proper percentage?
Is it possible to move the display to the top? Mine currently shows at the bottom. Thanks |
Any updates?
|
Quote:
|
Thanks, must have missed that. Anyway of moving the Folder Controls which shows the percentage above the Inbox and full list of PM's?
|
I know that this is old tread, but can this be displayed at top? also possible to notify the user ,with a email that his mail box is getting closed to be full? Using vb4.2.1.
Thanks |
Does this work on 4.2 patch1?
|
All times are GMT. The time now is 05:50 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|