2

Is there any application /software where you can see the outcome of the file that vqmod will change and see what it looks like?

example

$var = 'ABC';

In Vqmod make the changes to make ABC into 123,

<?xml version="1.0" encoding="UTF-8"?>
    <modification
                xmlns="https://github.com/vqmod/vqmod"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="https://github.com/vqmod/vqmod https://raw.githubusercontent.com/vqmod/vqmod/master/vqmod.xsd">
                >
        <id>Replace 123 with ABC</id>
        <version>1.0.0</version>
        <vqmver>2.5.0</vqmver>
        <author>qphoria</author>

        <file name="relative/path/myfile.php">
            <operation>
                <search position="replace"><![CDATA[
                $var = 'ABC';
                ]]></search>

                <add><![CDATA[
                $var = 123;
                ]]></add>
            </operation>
        </file> 
    </modification>

Above xml scriptis a slight modification from GitHub

but without applying/installing the xml file is there a way to see:

$var = 123; 

in a seperate window/output.

This is a simplistic example but for more complex vqmod's it would be helpful to see if one has messed any code mistakenly. I am not too familiar with the search process for the search field.

EDIT: What are VqCache files? Do they contain the changed files?

EDIT So I am starting to believe that the vqcache files are similar to what I've been looking for. It would be nice to see while I am typing up the vqmod though

Sarfaraaz
  • 488
  • 6
  • 17
  • 1
    vQmod creates its own version of the modified files in the vqcache folder. I would suggest you to have a development environment set up for things like this, so you can just copy the XML files to the vqmod/xml folder on there, and she what the results are. From my experience, vQmod works reliably, so you can literally just open a text editor, and do a search and replace based on your search criteria from the XML files, and replace all occurrences of that string (unless you've specified an index attribute in your search tag). – Tibor B. Jun 11 '15 at 11:29
  • @TiborB. I'm attempting to use it modify a large codebase already so for debugging would be nice to see where my vqmod is affecting the code. does vqmod replaced the called page with the changed code at runtime or does it just write to the files? if it just writes to the files I can use an enviroment like that easier but if there is software to do that already that would be great(ie. copy file to folder run vqmod changes and return them in a new window/div) – Sarfaraaz Jun 11 '15 at 12:21
  • 1
    It loads the original file, does the replacement based on the XML file, and creates a new version in the vqcache folder, and executes the new version instead of the original file. – Tibor B. Jun 11 '15 at 13:54
  • @TiborB. Thanks that is helpful reassurance on that – Sarfaraaz Jun 11 '15 at 14:21

0 Answers0