The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
![]()
What does the $newuserid variable represent?
|
#12
|
||||
|
||||
![]()
Either way - to figure out percentages, you divide the small number by the big number, and multiple by 100.
Looking at your code, I think you're doing it the other way round. (Presuming that $numbermembers is the total number, and $newuserid is the fraction of that.) If $newuserid is the bigger number, ignore the variable switch I made in the vb_number_format function below. I've also removed the if statement, as I can't see what the difference is between the code in each branch. PHP Code:
|
#13
|
||||
|
||||
![]()
Also, instead of $newuserid, shouldn't it be $activemembers?
|
#14
|
||||
|
||||
![]() Quote:
![]() I used this same code at one time and it seems that any boards that have over 1000 posts mess up with the percentage like this. It ends up showing like 15,300%. What would cause this to be happening? On my small site I don't have that problem. It works great for me. |
#15
|
||||
|
||||
![]()
What do you get with $numbermembers / $newuserid?
|
#16
|
||||
|
||||
![]()
I get this:
Quote:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|