you know komodo has an option in the edit menu fix line endings that will remove all the green squiggles at once.marc_cole wrote:True, but try reading a log with half of it underlined in green squiggles!Qphoria wrote: anyway it's just a log
I fixed it on my copy, so all's well that ends well.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I left in regex="false" in <search> and my mod wasn't working. The target file was listed in the log as a file to be modified.
Then I removed regex="false" and it worked.
Maybe line 364 of vqmod.php need to check that $regex is true.
Code: Select all
if ($regex && !$this->testRegEx($search, "test string")) {
Code: Select all
if ($regex == true && !$this->testRegEx($search, "test string")) {
I know, but I'd have to do that pretty much every single time I viewed the log, which would get old fast. Anyway, I just wanted Q to know in case it was more widespread than just me. After changing my copy of the php file, I no longer have the problem. I just have to remember to make the change on all the updates.Xsecrets wrote:you know komodo has an option in the edit menu fix line endings that will remove all the green squiggles at once.

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English

UTC time is hard-coded in vqmod.php
Code: Select all
date_default_timezone_set('UTC');
Code: Select all
date_default_timezone_set('America/Los_Angeles');
Thanks.
OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English
technically it should be pulled based on your php.ini setting for timezone.. but i was getting errors if that wasn't set so I just forced it to UTC for now. I was just going to remove the time stamp as I really only cared about the microseconds.marc_cole wrote:One more suggestion and then I'll stop — for now.
UTC time is hard-coded in vqmod.phpCould you code it to automatically retrieve the local time so that the timestamp in the log reflects that? I've manually changed that line to read:Code: Select all
date_default_timezone_set('UTC');
but again, that's something I have to do with each revision.Code: Select all
date_default_timezone_set('America/Los_Angeles');
Thanks.
Perhaps I can check if the ini_get has the timezone set already and use that.
I hope it doesn't get removed. It may be a moot point, but I like to see when it was last run.Qphoria wrote:I was just going to remove the time stamp as I really only cared about the microseconds.
OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I plan to submit my xml files to the module authors.
This is a fantastic module. Thank you for it.
set the position="replace"
set the offset equal to the number of lines in the block minus the first line
set the <add> to just be empty. use trim="true" to ensure there are no spaces
Example. If i have this block of code that i want to remove:
Code: Select all
foreach ($download_query->rows as $download) {
$download_data[] = array(
'download_id' => $download['download_id'],
);
}
Code: Select all
<operation>
<search position="replace" offset="4"><![CDATA[
foreach ($download_query->rows as $download) {
]]></search>
<add trim="true"><![CDATA[
]]></add>
</operation>
Thanks.Qphoria wrote:yep.. just search for the first line..
set the position="replace"
set the offset equal to the number of lines in the block minus the first line
set the <add> to just be empty. use trim="true" to ensure there are no spaces
BTW, it leaves blank lines instead of deleting them - just looks strange when I view source and see 41 blank lines.
Could the lines be removed with array_splice() ?
In applyMod():
Code: Select all
} elseif ($position == 'replace') { //replace
$existing_line = "";
if ($offset) {
for ($i=0; $i<=$offset; $i++) {
$filedata[$linenum + $i] = '';
}
Code: Select all
if ($offset) {
array_splice($filedata, $linenum, $offset); // $filedata will be modified.
}
atm its a mess to install mods etc that modify the core files, with vQmod this would fix alot of the problems, like re-add modified code when upgrading
anyway, vQmod makes life alot esier for people that want to run a store without needing to re-code it half of the time
1. I've already edited some core files, is this a problem? Can I still use vQmod? (I'm thinking I can).
2. Once vQmod is installed, should I then go back and find all of the core files I've modified and create an xml for each mod? (I'm thinking yes).
Thanks.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
I've always HATED modifying core files, and stopped upgrading my old cart (OSC) to newer versions because I'd made so many modifications and it was too much of a hassle to compare all the files. Not any more!
Now I've just got to go back and find all of the core edits I've made and turn them into xml files. Should be fun

BTW, here's my first attempt at a vQmod: http://forum.opencart.com/viewtopic.php ... 0&p=130679, which seems to be working successfully.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Users browsing this forum: No registered users and 2 guests