EE 1
EE 2
Simple Math

Developer

Laisvunas

3rd Party (Commercial)
Current Version: 1.1.1

License Agreement

Buy Now!

$10.00
Qty:

Compatibility

  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Better Workflow
  • Matrix

Requirements

  • jQuery for the Control Panel

Categories

Plugin

Tags

Provides support for doing simple mathematical operations in templates.

PARAMETERS

1) calculate - Required. Alows you to input a string consisting of numbers,
symbols of mathematical operations and round brackets, e.g
calculate = “(10 + 5) / 3”. Symbols of supported mathematical operations are:
+ (addition), - (subtraction), * (multiplication), / (division),
% (division remainder), ++ (increment),—(decrement).

2) invalid_input - Optional. Accepts two values: “alert” and “silence”.
Default value is “silence”. If the value is “alert”, then in cases when
the plugin has some problem with parameters,  PHP alert is being shown;
if the value is “silence”, then in cases when the plugin has
some problem with parameters, it finishes its work without any alert being shown.
Set this parameter to “alert” for development, and to “silence” - for deployment.

3) var1, var2, var3, var4 ... var48, var49, var50 - Optional. Allows you to input numbers.
Used to gain more security - the values of these parameters will be checked if they really are numbers.
Each these parameters can be used inside “calculate” parameter. E.g. var1=“10” var2=“5” var3=“3” calculate=”({var1} + {var2}) / {var3}”

4) on_non_numeric_vars - Optional. Allows you to specify what variable {math_plus_result} should output in case
some of var1, var2, var3, etc. variables were found to be non numeric.

USAGE

Use this plugin as folllows:

{exp:simple_math calculate="(10 + 5) / 3"}

Or use it this way:

{exp:simple_math calculate="({var1} + {var2}) / {var3}" var1="10" var2="5" var3="3"}

Simple Math Links

This entry was created May 15, 2009, 3:25 pm.
This entry was last updated May 11, 2012, 2:56 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!