The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Averaging Data held in 3 User profile fields
I currently am developing a system on my forums that will help establish a users experience level as it relates to 3D graphics.
I will be using three custom proflie fields for base values. They are: Modeling Texturing Animation I would like to average these three values (1-10 scale for each) and establish an overall experience value that I can display. This is a photoshop mockup: The OVERALL (3D) bar will be a value based on the values entered in the MTA areas. (M + T + A / 30 * 10 = Value) Example: M(4) + T(8) + A(8) / 30 * 10 = 6.6 Rounded up would be a 7 Assume: M = Field10 (Number from 1 - 10) T = Field11 (Number from 1 - 10) A = Field12 (Number from 1 - 10) Overall = the average of these fields Is it possible to average data held in the Custom Profile Fields to a whole value (1 - 10). 1. I am unsure how to code so the value is rounded to a whole value. (1,2,3, etc) 2. I then want to display an image (see example) that corresponds to the averaged value. Can anyone help me? Aceman |
#2
|
|||
|
|||
Not tested but try something like:
Add a new plugin on postbit_display_complete hook with teh following code: PHP Code:
This is not tested, so you might have to tweak it a little. |
#3
|
||||
|
||||
This worked PERFECTLY!
THANK YOU! Aceman |
#4
|
|||
|
|||
Glad to be able to help you.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|