VMODS - idea for not overwriting functions

Designer
Von Romania
Mitglied seit Juni 2024

I have an idea, not sure if is good or not.
The issue is, when you have multiple VMODS and use the replace command for one VMOD and in case another VMOD wants to use the original code that was replaced with the first VMOD, will not find it and crachses the VMOD even if is the latest version of VMOD - so basically the 2 VMODS are killing each other.

What about when you use a REPLACE method for example:

... instead of this:

FIND:

some PHP code original LiteCart code

INSERT:

the new PHP VMOD code

TO USE THIS:

FIND:

some PHP code original LiteCart code

INSERT:

*/ some PHP code original LiteCart code */
the new PHP VMOD code

.. basically in the INSERT box I would put back the original code but commented out in case another VMOD is looking for the code is still there even if is commented out - I know there is much more to this, but should be nice a similar solution

tim
Founder
Von Sweden
Mitglied seit Mai 2013
tim

The mods have a fallback directive to just ignore or throw a warning if a find clause is not matched. Try that. Or think of some rearrangement of code that doesn't produce this problem for you.

onerror="warning|ignore|cancel"

Designer
Von Romania
Mitglied seit Juni 2024

got it. thank you

Sie
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.