The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Doing maths with variables.
Hello:
Lets say I have {vb:raw post.somenumber} and {vb:raw post.anothernumber}. How could I sum both numbers and display it? I thought about something like {vb:raw post.somenumber + post.anothernumber}, but it didn't work. How could I do it? Thanks. |
#2
|
|||
|
|||
There is a {vb:math } curly tag, but I seem to remember trying to use it and finding that it only worked with constants. If that doesn't work, there's nothing you can do except do the math in php in a plugin.
Edit: I might be wrong - I searched all templates for vb:math and found this example: Code:
{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2} |
#3
|
|||
|
|||
It worked! Thansk!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|