Post by Qphoria » Fri Feb 04, 2011 9:42 am

I'd recommend reading the first 5 pages... the short answer is no

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Sat Feb 05, 2011 3:15 am

Just wanted to point out that inline comments (like <!-- This is a comment -->) don't work. This isn't vital, but would be nice to have for multiple-modification files. My work-around was to put <title>Example Title</title> before the <file> tag, which seems to parse fine.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Qphoria » Sat Feb 05, 2011 3:20 am

Johnathan wrote:Just wanted to point out that inline comments (like <!-- This is a comment -->) don't work. This isn't vital, but would be nice to have for multiple-modification files. My work-around was to put <title>Example Title</title> before the <file> tag, which seems to parse fine.
They certainly work for me. Even in the vqmod_opencart.xml file I have things like <!-- 2 matches --> which work fine.
Almost of all my vQmod scripts I make have comment tags in them.

Just remember the rules of xml/html.. no nested comments:

Code: Select all

<!-- 
<file>
<!-- 2 matches -->
</file>
 -->
will not work. Kind of a major fail by the xml/html spec creators

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fido-x » Sat Feb 05, 2011 12:23 pm

What do you expect? After all, XML was originally developed by Microsoft.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Johnathan » Sat Feb 05, 2011 12:47 pm

Qphoria wrote:They certainly work for me. Even in the vqmod_opencart.xml file I have things like <!-- 2 matches --> which work fine.
Almost of all my vQmod scripts I make have comment tags in them.

Just remember the rules of xml/html.. no nested comments:

Code: Select all

<!-- 
<file>
<!-- 2 matches -->
</file>
 -->
will not work. Kind of a major fail by the xml/html spec creators
Huh...that's weird. I swear they were causing the file to not work earlier, but I can't reproduce it now. I must be going crazy.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by fido-x » Mon Feb 07, 2011 1:02 pm

Here's something that's not in the documentation. By modifying install/index.php, you can vqmod the installation process.

Replace:

Code: Select all

// Startup 
require_once(DIR_SYSTEM . 'startup.php'); 
with:

Code: Select all

//VirtualQMOD
require_once('../vqmod/vqmod.php');
$vqmod = new VQMod();

// Startup
require_once($vqmod->modCheck(DIR_SYSTEM . 'startup.php')); 

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Qphoria » Mon Feb 07, 2011 1:21 pm

FYI TO ALL:
We have a new "vQmod" section in the Free Modifications subforum for vQmod scripts:
http://forum.opencart.com/viewforum.php?f=23

This should make it easier to browse all the available free vQmod scripts available

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Tue Feb 08, 2011 5:46 am

Johnathan wrote:Huh...that's weird. I swear they were causing the file to not work earlier, but I can't reproduce it now. I must be going crazy.
Turns out I'm not crazy. My computer was trying to sabotage me, that's all. I had a system-wide auto-correct to replace -- with — and it was doing it on the sly after I'd add the closing comment tag. Since it was a mono-space font, though, if I fixed it by adding a second hyphen again, it still wouldn't work because the first was actually an m-dash masquerading as a hyphen.

Wow, what a saga, and one that I'm sure you all cared to know about. :bang:

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Digital Sushi » Thu Feb 10, 2011 2:22 am

Maybe I'm being silly but how in the world do I install this and make sure it's working? The readme in the .zip file only states about upgrading from an older version.

Active Member

Posts

Joined
Mon Oct 18, 2010 10:23 pm
Location - South Africa

Post by Qphoria » Thu Feb 10, 2011 3:14 am

Digital Sushi wrote:Maybe I'm being silly but how in the world do I install this and make sure it's working? The readme in the .zip file only states about upgrading from an older version.
Perhaps you should read down further in that document

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Thu Feb 10, 2011 3:17 am

Qphoria wrote:
Digital Sushi wrote:Maybe I'm being silly but how in the world do I install this and make sure it's working? The readme in the .zip file only states about upgrading from an older version.
Perhaps you should read down further in that document
To be honest that threw me the first time too. You pretty much expect install instructions to be first and upgrade instructions below them.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Thu Feb 10, 2011 3:21 am

Premadonnas

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Digital Sushi » Thu Feb 10, 2011 3:45 am

Qphoria wrote:Premadonnas
Lady pants :laugh:

But at any rate I got it working. Thanks!

Active Member

Posts

Joined
Mon Oct 18, 2010 10:23 pm
Location - South Africa

Post by JAY6390 » Thu Feb 10, 2011 7:06 pm

BUG:
When using systems that have plesk installed, some of them have multiple paths to the files. This causes an issue when it comes time to match them up and thus fails to make any mods whatsoever. Example: I had a client who's files were coming up as
/var/www/vhosts/domain.com/httpdocs/
for the root folder for source files using $_SERVER['SCRIPT_FILENAME']
when in fact it was
/home/vhosts/domain.com/httpdocs/
Easily fixed of course using a str_replace, but better to get it fixed for all other server configs etc

FIX:
Open /vqmod/vqmod.php
Find

Code: Select all

$sourcefile = str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile)); 
Replace with

Code: Select all

$sourcefile = realpath(str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile))); 
And it works :)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by ocnewby » Thu Feb 10, 2011 10:23 pm

How does vQmod handle searches that span multiple lines?

Specifically on my system the display of the lines in notepad shows as 1 long string, but in other editors it shows as properly formatted text.

Notepad is the default editor in my filezilla ftp.

I can get notepad to show properly by pasting the info in another editor, copying it back to notepad and then it shows properly. I am thinking its because of how notepad handles the cr/lf characters.

Am I breaking how vQmod works if I do that? I have been looking thru some of the xml docs that vqmod uses to see if I could answer the question myself, but I do not see any multiple line search/replace operations in the ones I look at.

Newbie

Posts

Joined
Sat Jan 22, 2011 2:37 pm

Post by Qphoria » Thu Feb 10, 2011 10:30 pm

ocnewby wrote:How does vQmod handle searches that span multiple lines?
The problem with cr/lf is definitely a PITA.. so that is why I do it a bit differently.
See here:
http://forum.opencart.com/viewtopic.php ... 60#p129979

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Thu Feb 10, 2011 10:32 pm

JAY6390 wrote: FIX:
Open /vqmod/vqmod.php
Find

Code: Select all

$sourcefile = str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile)); 
Replace with

Code: Select all

$sourcefile = realpath(str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile))); 
And it works :)
Thanks for the info. I've actually changed a lot of path stuff in the upcoming 1.0.9 and that line actually doesn't exist any longer, so I may need you to test this again with the new version to see if I may have inherently fixed it as I do have realpath in place now for the main path, but it may need to be addressed again.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ocnewby » Fri Feb 11, 2011 10:29 am

I am sorry, but I still don't understand.
The problem with cr/lf is definitely a PITA.. so that is why I do it a bit differently.
I looked at the link you posted and it shows how to replace a block of code, but not how to search for and positively identify it.

It appears that in vQmod one needs to specify a specific occurrence of a shorter piece of code and then replace a block of text rather than positively identifying the actual code in the middle

My post actually had several related issues.
1. How to search for text using vQmod that spans multiple lines of code.
2. What is the difference when text is displayed in a long concatenated string or formatted/indented like a programmer editor. eg: basic windows notepad VS Notepad2
3. Am I changing the code text if I copy the long concatenated string into notepad 2, and then paste it back to notepad for re-upload to the server?
4. If I am changing the actual code text in statement 3., then would I be breaking my vQmod operation by doing that?

Maybe a future revision of vQmod could specify a search that specified a start text, and an end text and that would more positively identify a section of code? Actually as I type this that sounds like a good way to bypass cr/lf issues.

That kind of mod is WAYYYY beyond what I know, but you are obviously a guru.

Thanks in advance. :drunk:

Newbie

Posts

Joined
Sat Jan 22, 2011 2:37 pm

Post by fido-x » Fri Feb 11, 2011 10:40 am

JAY6390 wrote: FIX:
Open /vqmod/vqmod.php
Find

Code: Select all

$sourcefile = str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile));  
Replace with

Code: Select all

$sourcefile = realpath(str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile)));  
And it works :)
This fix may only apply to "virtual" servers. I applied this in my own development setup (XAMPP & Windows) and found that it prevented the VirtualQmod system from working altogether.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Xsecrets » Fri Feb 11, 2011 1:56 pm

ocnewby wrote: 1. How to search for text using vQmod that spans multiple lines of code.
you can't

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US
Who is online

Users browsing this forum: No registered users and 4 guests