maxlazar / mx-calculator Goto Github PK
View Code? Open in Web Editor NEWMX Calculator for ExpressionEngine
License: MIT License
MX Calculator for ExpressionEngine
License: MIT License
I don't think the parameters work on EE 6. Tested several of them and they don't seem to do anything.
I can use mx-calc with php 7.4, but with php 8 I get following error:
Deprecated
preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
user/addons/mx_calc/libraries/evalmath.class.php, line 330
I tried in vain to get in touch with Max Lazar.
Any solutions, anybody?
I would like to request some features:
{exp:mx_calc expression="{grid_field:numbers_column} * {template_variable} + {exp:stash:get:value} / {template_partial}"}
where the variables are numeric valuesparse='inward'
for above exampledecimals='2'
force_zeros='yes'
decimal_seperator=','
thousand_seperator='.'
Hey Max,
Thanks for the excellent add-on! I've used this in many of my EE installs and I'm really glad it exists.
I'm using this add-on on a site with EE 3.4.3 on a PHP 7 server.
I'm getting this PHP warning on any template I use the add-on:
Deprecated
Methods with the same name as their class will not be constructors in a future version of PHP; EvalMath has a deprecated constructor
user/addons/mx_calc/libraries/evalmath.class.php, line 88
Severity: E_DEPRECATED
More info can be seen here: http://php.net/manual/en/migration70.deprecated.php
I can only see this when logged in as admin in the EE control panel because EE is configured to suppress PHP warnings for non-super admins.
I replaced the constructor with this. I'm not sure if anything else relies on the constructor method, i.e. $this->EvalMath()
, so I wanted backwards compatibility:
public function __construct() {
}
public function EvalMath() {
self::__construct();
}
I'll try making a merge request soon.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.