The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hack Help
I have this new fields in my user table called QUADS and BIKES
In my getinfo I have them showing statistically. Quads: 2 Bikes: 5 The counter counts threads made in certain forum ids. What I want to do is have something showing the average amount of Quad and Bike posts per month. I only can come up with this. PHP Code:
I dont no how to combine both values of quads and bikes and average a monthly value to it. That what I need help on. I hope someone understands me hehe. |
#2
|
||||
|
||||
you add them with a +
so something like this: PHP Code:
|
#3
|
|||
|
|||
Well the variable is this.
$userinfo[quads] and this $userinfo[bikes] So how would the code look in full. That is sorta what I am looking for hehe. Thanks for helping. |
#4
|
||||
|
||||
PHP Code:
|
#5
|
|||
|
|||
I dont see how that would work in any way just by looking at it though?
unless maybe it should be this $userinfo[quadsandbikes] = $userinfo[quads] + $userinfo[bikes]; I could try that. |
#6
|
||||
|
||||
huh? now you have $userinfo[quadsandbikes] ???
I missed a = in the code.. i edited it. this is how adding works, try it in a test file: PHP Code:
|
#7
|
|||
|
|||
i tried the code you mentioned up a few and it still doesnt work. It only shows the monthly average for just quads.
say quads counter was 5 and bikes counter was 10 the average would be 7.5 It is still not adding both values together as one. |
#8
|
||||
|
||||
try this.
PHP Code:
|
#9
|
|||
|
|||
I understand what you mean by that test thing u told me to do. It works it sasys 33 but the thing is the variables are getting pulled from the database on the board but your variables have values right there in the php already. I don't know if that is causing a conflict though maybe?
|
#10
|
|||
|
|||
Nope that did not work neither. Same thing. Just showing the average for the quads.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|