VMODS - idea for not overwriting functions

Designer
Depuis Romania
Membre depuis juin 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
Depuis Sweden
Membre depuis 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
Depuis Romania
Membre depuis juin 2024

got it. thank you

Vous
Ce site n'utilise aucun cookie ni aucune technologie de suivi tierce. Nous pensons pouvoir faire mieux que les autres et nous nous soucions vraiment de votre vie privée.