Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 24 Aug 2012, 11:29
Seductor Seductor is offline
 
Join Date: May 2011
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.
Reply With Quote
  #2  
Old 24 Aug 2012, 13:19
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #3  
Old 24 Aug 2012, 14:46
Seductor Seductor is offline
 
Join Date: May 2011
It worked! Thansk!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 06:28.

Layout Options | Width: Wide Color: