![]() |
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. |
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} |
It worked! Thansk!
|
All times are GMT. The time now is 07:41 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:
|