User Tools

Site Tools


vMod by LiteCart

vMod is a virtual modification technology specially developed for LiteCart. The work is inspired by vQmod originally created by Qphoria.

vMod focuses on lightweight and simplicity but also introduces features previously not seen in vQmod. Some of the notorious differences are:

  • Simple and high performing code. A little over half the footprint of vQmod (16 kb instead of 26kb).
  • String aliases allowing you to define one value for all occurrences in the file.
  • Multiline matching which is not possible in vQmod.
  • Allowing line offsets both before AND after.
  • Virtual files meaning define your new files inside the vmod instead of uploading them separately.
  • Replace all the contents of a file (Deprecated in vQmod 2.40).
  • Cache serializing to JSON instead of PHP serialize() allowing up to 300% faster performance in fetching cache.
  • Regular expression path aliases


<?xml version="1.0" encoding="UTF-8"?>
  <description>This is a sample modification</description>
  <alias key="foo" value="bar" />
    <description>Description of foo.</description>
  <new filename="path/for/newfile.php"><![CDATA[
  <file path="path/to/" name="file.php,anotherfile.php">
    <operation onerror="warning|ignore|cancel">
      <find indexes="1" trim="true|false" regexp="false"><![CDATA[
      <ignoreif trim="true|false" regex="true|false"><![CDATA[
      <insert position="top|bottom|before|after|replace" offset-before="0" offset-after="0" trim="true|false" regexp="true|false"><![CDATA[

Lightweight Example

<?xml version="1.0" encoding="UTF-8"?>
  <description>This is an example modification</description>
  <file name="path/to/file.php">
        I like green tomatoes.
      <insert position="replace"><![CDATA[
        I like green apples.


vmod > title

vmod > description

vmod > version

vmod > author

vmod > alias

vmod > file: path

vmod > file: name

vmod > file: path

vmod > file: filename

vmod > file > operation

vmod > file > operation > find

vmod > file > operation > find: regexp

vmod > file > operation > insert: trim

vmod > file > operation > insert: regexp

vmod.txt · Last modified: 2020/01/07 23:35 by admin