My blog has moved!

You will be automatically redirected to the new address. If that does not occur, visit
and update your bookmarks.

Friday, January 11, 2013

Virtual File Modification System (vQmod)

Have you ever thought of modifying the core of any framework? Then vQMod is the best way to do it.

transparent-400x113"vQmod™" (aka Virtual Quick Mod) is an override system designed to avoid having to change core files. The concept is quite simple... Instead of making changes to the core files directly, the changes are created as xml search/replace script files. These script files are parsed during page load as each "source" core file is loaded with the "include" or "require" php functions. The source is then patched with the script file changes, and saved to a temp file. That temp file is then substituted for the original during execution. The original source file is never altered. This results in a "virtual" change to the core during execution without any actual modification to the core files.

  • No actual code changes are made. All changes are "virtual", hence the name.
  • Modifications are stored in their own files and applied "on-the-fly" at runtime
  • Instant Single file "plug-n-play". Add the file to apply the mod, remove the file to remove the mod.
  • No worries about losing custom core changes during upgrades
  • Multiple modifications can be made to the same file without conflict
  • Easily update or enhance customizations without having to edit any code
  • Full visual of the actual changes taking place in the generated temp files for debugging
  • Fails gracefully back to the original sourcefile if there is an error
  • Exceptional logging option to track every change made
  • Only need to modify the index.php file to add the vQmod code one time.
  • Simple structured xml format. (See readme for full breakdown of xml syntax)
  • Multiple options for find/replace, regex, positions, offsets, indexing, error handling, and more!

This system can be used for any php script, forum, shopping cart, cms, etc. Anywhere custom modifications are made for reuse. The logging option is invaluable for debugging understanding exactly what is happening.

For example,

'Replace' Example

  1. Create a new text file and call it "replace-demo.xml"
  2. Add the minimum required xml structure


$var = 'ABC';
<?xml version="1.0" encoding="UTF-8"?>
        <id>Replace ABC with 123</id>
        <file name="path/to/myfile.php">
                        <search position="replace"><![CDATA[
                        $var = 'ABC';
                        $var = '123';
$var = '123';
For more details :
Download the library :


  1. Hi,Building a functioning and attractive site takes more than some photos you found on the web and some generic text.The site functions in Web Design Cochin and presents itself to the world on the internet is no small feat nor should it be left to chance or luck.Thanks.........