Page 8 of 35

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Wed Jan 19, 2011 7:07 am
by Qphoria
JNeuhoff wrote:Hard to keep up with all the changes. :)

Have created more than 50 <modification>s for my system and modules over the past few days.
On the plus side the scripts dont need to be updated, just improving the main class but the end result remains transparent

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Wed Jan 19, 2011 7:16 am
by Qphoria
I've got http://www.vQmod.com up now.
Im going to try to set up a script repository for people to be able to share their free scripts with others. It will have more use as more projects get setup to work with vQmod.

Still working on the xml generator form as well and ill put that up on the site too

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Wed Jan 19, 2011 2:42 pm
by tommyz
Still working on the xml generator form as well and ill put that up on the site too
Thanks for your hard work and for creating this essential solution for opencart. Luckily I am setting up a new opencart store, so I will use VQMod to begin with which will save me work later.

I am waiting patiently for the xml generator which will really help light developers such as myself. Please post when you have it up and running ;)

I do hope that mod developers will start to either provide a vqmod xml files with their extensions which will make installations a plug-n-play thing, or that at least they save us some time comparing files and tell us which lines to add/change/replace in the core files instead of just providing the modified core files.

Do you recommend creating a vqmod_extension_name.xml for each module and placing it inside /public_html/vqmod or having all the xml in one file (vqmod_opencart.xml). Will the vqmod scan /vqmod/ for xml files, or do I need to tell it specific file names?

just the thoughts/questions of a newcomer,

Tom
???

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Wed Jan 19, 2011 2:55 pm
by Qphoria
tommyz wrote: Do you recommend creating a vqmod_extension_name.xml for each module and placing it inside /public_html/vqmod or having all the xml in one file (vqmod_opencart.xml). Will the vqmod scan /vqmod/ for xml files, or do I need to tell it specific file names?
Never edit existing xml files that you didn't author.. always keep separate mods in separate files, but keep the entire individual mod together in one file. This way you always know that fileA handles one mod and fileB handles another mod. There is no limit. Any files in the folder will automatically be scanned.

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Thu Jan 20, 2011 12:05 am
by keithb
Q. Well done creating this VQMod so quickly - I can see where the inspiration for your animated logo came from now :-)
I have been trying to keep up with all the changes (using 1.4.9.3 btw with VirtualQMod_1.0.7 ) and think it certainly speeds up testing mods and doing changes.

Whilst testing I found that the logfile actually gets created as both [store_folder]/vqmod/vqmod.log and [store_folder]/admin/vqmod/vqmod.log depending on whether you start with [store_folder]/index.php (i.e. storefront) or [store_folder]/admin/index.php (i.e. admin)
I find this a little confusing as the log does actually contain all the info for both admin and shop changes so I thought it would be better if the same single file was always used (which may have been your intention anyway?)

It seems to be to use of a relative rather than an absolute file path for the log (which you have used elsewhere for vqcache and vqprotect.txt).

I simply changed one line (although I believe it could be simplified further by defining the original class variables for $logfilepath, $vqCachePath and $protectedFilelist without their prefix of './' but that is up to you if you agree. I just think it may be more technically 'correct' ;) )

In Init function in vqmod.php about line
FIND line 237

Code: Select all

if (file_exists($this->logFilePath)) {
And put this BEFORE it

Code: Select all

$this->logFilePath = $this->cwd . '/' . str_replace("./", "", $this->logFilePath);


I noticed that you did originally have a similar line but have commented it out? Perhaps in the speed this has been changing?

Sorry this post is a bit long winded...

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Thu Jan 20, 2011 12:30 am
by Qphoria
keithb wrote:Q. Well done creating this VQMod so quickly - I can see where the inspiration for your animated logo came from now :-)
I have been trying to keep up with all the changes (using 1.4.9.3 btw with VirtualQMod_1.0.7 ) and think it certainly speeds up testing mods and doing changes.

Whilst testing I found that the logfile actually gets created as both [store_folder]/vqmod/vqmod.log and [store_folder]/admin/vqmod/vqmod.log depending on whether you start with [store_folder]/index.php (i.e. storefront) or [store_folder]/admin/index.php (i.e. admin)
I find this a little confusing as the log does actually contain all the info for both admin and shop changes so I thought it would be better if the same single file was always used (which may have been your intention anyway?)

It seems to be to use of a relative rather than an absolute file path for the log (which you have used elsewhere for vqcache and vqprotect.txt).

I simply changed one line (although I believe it could be simplified further by defining the original class variables for $logfilepath, $vqCachePath and $protectedFilelist without their prefix of './' but that is up to you if you agree. I just think it may be more technically 'correct' ;) )

In Init function in vqmod.php about line
FIND line 237

Code: Select all

if (file_exists($this->logFilePath)) {
And put this BEFORE it

Code: Select all

$this->logFilePath = $this->cwd . '/' . str_replace("./", "", $this->logFilePath);


I noticed that you did originally have a similar line but have commented it out? Perhaps in the speed this has been changing?
yep that is a bug.. I was supposed to add that line back in. The vqmod.log should only be in one place. Thanks for the heads up

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Thu Jan 20, 2011 5:03 am
by Lao
Hey Q!

I uploaded 1.0.7 and I get the following message when trying to enter Admin:

"VQMOD: Could not create ./vqmod directory. Ensure the root is writable or create manually".

The following folders have 777 permissions: vqmod, vqcache, xml and root. "vqmod.php" also has 777.

What can I check?

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Thu Jan 20, 2011 5:10 am
by Qphoria
yea it was a bug, now fixed in first post. :)

Fixed here:
v1.0.8 - 2011-JAN-19
- Fixed bug with a separate vqmod.log file being created in the admin
- Added logging for source files that are referenced but don't exist to help troubleshoot

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Thu Jan 20, 2011 5:13 am
by Lao
Yeap, working with 1.0.8

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Fri Jan 21, 2011 6:34 pm
by timmieboy
Hi,

Can you maybe help me with installing this script, I really like to have the possibility to randomly show the latest product and I understood that your script is doing that. Unfortunately after a good read I still do not understand what to do, because I am not an expert I do not want to do things what can interupt my shop. I see two files with text about the script, can you tell me wich one I have to follow and what the simple steps are. Do I install the vqmod folder in the root or somewhere else, where do I upload the xml files, etc. I hope you can help me.

Thx

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Fri Jan 21, 2011 7:19 pm
by JNeuhoff
timmieboy wrote:Hi,

Can you maybe help me with installing this script, I really like to have the possibility to randomly show the latest product and I understood that your script is doing that. Unfortunately after a good read I still do not understand what to do, because I am not an expert I do not want to do things what can interupt my shop. I see two files with text about the script, can you tell me wich one I have to follow and what the simple steps are. Do I install the vqmod folder in the root or somewhere else, where do I upload the xml files, etc. I hope you can help me.

Thx
You basically upload the 'vqmod' folder to your Opencart server's root directory. And then edit the following 2 files:
  • index.php
    /admin/index.php
as per the embedded installation instructions.

Re: [MOD] - VirtualQMod - Virtual File Modification System

Posted: Mon Jan 24, 2011 9:44 pm
by timmieboy
Ok, thanks, I will look into that.

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Posted: Tue Jan 25, 2011 7:34 pm
by timmieboy
Hi,

I have tried to install it. After I uploaded the folder I changed the index.php and the admin/index.php, unfortunately it givs me a blank page after changing this. Can you tell me what I did wrong.

Thx

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Posted: Tue Jan 25, 2011 8:57 pm
by Qphoria
if you can PM me ftp info I can take a look

Re: [MOD] - VirtualQMod - Multiple Line Endings

Posted: Wed Jan 26, 2011 12:08 am
by marc_cole
Q,

When viewing vqmod.log in Komodo, there are a bunch of lines that are underlined with green squiggles. According to ActiveState, this is due to having multiple types of line endings in a file. I guess some IDE's are more sensitive than others.

I went through vqmod.php and replaced all occurrences of \r\n with \n and that solved it. Just thought you might like to know in case you wanted to make the change for v1.0.9.

Marc

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Posted: Wed Jan 26, 2011 12:18 am
by Qphoria
From what I understand, it is good practice to use \r\n because \r is for linux users, and \n is for windows users. I think if you remove all \r then you can't view it properly in linux.

Now i could probably check the OS before logging but \r\n typically doesn't cause any errors in most editors.. i think komodo is a good editor but perhaps being a bit too sensitive.. notepad++, ultraedit, notepad etc never complain about both.

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Posted: Wed Jan 26, 2011 12:23 am
by marc_cole
Qphoria wrote:Now i could probably check the OS before logging but \r\n typically doesn't cause any errors in most editors..
Could you force all lines in the log to be \r\n? That would eliminate the problem in Komodo.

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Posted: Wed Jan 26, 2011 12:41 am
by Qphoria
marc_cole wrote:
Qphoria wrote:Now i could probably check the OS before logging but \r\n typically doesn't cause any errors in most editors..
Could you force all lines in the log to be \r\n? That would eliminate the problem in Komodo.
All lines should be \r\n already

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Posted: Wed Jan 26, 2011 12:47 am
by marc_cole
Qphoria wrote:All lines should be \r\n already
They're not on my setup. My log has a mixture of LF and CRLF.

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Posted: Wed Jan 26, 2011 1:08 am
by Qphoria
strange.. there are the same number of \r and \n and \r\n in the code so I'm not sure... anyway it's just a log ;)