PDA

View Full Version : Manipulating variables (such as multiplying variable x2)


L2V
07-11-2009, 01:13 AM
I've been having a tough time trying to find an answer to question about templating in vB3.8. Is it possible to manipulate a variable such as dividing or multiplying it? In my case, I want to take the standard avatar in postbit and divide the $post[avwidth] and $post[avheight] by 2 (so that the image is displayed as half the size). I know I can reduce the avatar size limit but that defeats the purpose of what I am trying to do. Is there a way to do $post[avwidth] / 2 or $post[avwidth] * .5 or something?:confused:

Lynne
07-11-2009, 02:47 AM
This may help you - Perform simple calculations inside templates! (https://vborg.vbsupport.ru/showthread.php?t=188930). I haven't looked to see if it will work for those particular variables, but it may. Just try it out on a test style or test site.

L2V
07-14-2009, 04:50 PM
Thanks Lynne!