Post by JAY6390 » Thu Jan 10, 2013 10:50 pm

This thread is intended to allow people to easily request features they would like to see in the vQmod system, discussion on ideas/current features. Bugs are to be reported on the official google code site here. It is not intended as a thread for general consumer issues with third party vQmod xml files. Those need to be supported by the developer of the vQmod xml itself. Two features we've been asked for before and rejected are

Code: Select all

- SQL support to run queries
- New file creation
Both of these requests have been rejected so please don't reiterate them

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

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

Post by sputnik-1 » Sat Nov 09, 2013 7:12 am

[FEATURES]
Could we have a $DEBUG variable that could be set to TRUE, and that puts vQmod into debugging mode please?

When in DEBUG mode vQmod could write a lot more to the log file such as the filename, line number and line of text where a <search> modification pattern has been found. On the next line of the log file vQmod could then write the same line with the <add> modification that vQmod has made to that line. This could be used on a development server for testing vQmod xml scripts, to compare the original line of text with the modified line of text, to make sure the
xml scripts are doing exactly what the developer wants them to. Once the developer is happy the xml script is performing as intended, the script can then be uploaded to the live server.

Another thing I'd like to see in vQmod is the ability to use :

<!-- ===== this is an xml comment on one line ===== -->

xml single line comment syntax.

This would make it possible to put comments anywhere in the vQmod xml scripts as needed.

User avatar
New member

Posts

Joined
Sun Apr 28, 2013 5:01 am

Post by JAY6390 » Wed Aug 20, 2014 7:26 am

Got a 2.5.0 beta release that would like a few people to test, so if you're interested please get in touch. New features/bug fixes are
- Better performance by caching files checked already
- Show error details for invalid XML files not just they can't be loaded (ie the line number and character)
- Lock vqcache files when writing to them
- Negative offset for replace method removes lines before matched line
- Error handling of missing <search> or <add> tags in an <operation>
- Fixed (I hope) the installer of a weird bug (https://code.google.com/p/vqmod/issues/detail?id=145)
- Cleaned up some basic formatting

Jay

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

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

Post by billynoah » Wed Aug 20, 2014 9:16 am

JAY6390 wrote:- Negative offset for replace method removes lines before matched line
You rock!

Having worked with vQmod extensively over the last year since posting in that thread I find I hardly ever use replace anymore, but this feature is greatly appreciated all the same.

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by JAY6390 » Thu Aug 21, 2014 9:19 am

Updated beta now available that will work with OpenCart 2.0. Anyone that wants a copy, get in touch via PM

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

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

Post by billynoah » Fri Aug 29, 2014 11:46 pm

Hey Jay,

Just a wild thought for a future version that I know may not be realistic but here goes...

What about implementing a jQuery style CSS search position to match elements in tpl files? something like:

<search css="true" position="prepend"><![CDATA["#tab-shipping .form"]]></search>

I think it's pretty self explanatory - finds the element(s) with class "form" inside #tab-shipping and prepends in this case.

Additional position options could be "prepend" and "append" just as they are used in jQuery. "before" and "after" and the rest would still be useful but prepend and append would be key here.

Probably don't need to explain but the idea here is that sometimes you want to match a single or multiple elements inside another with only a certain id or class name.

How hard would this be? I know you are already parsing the xml in the vqmod itself so could this functino be extended to the modified files as well? I often find myself using "index" for things like this (when I need to add something after the third form element for example) but as you know the index can change if other vqmods are involved. A CSS search would be really awesome for modifying tpl files.

Please let me know your thoughts.
Last edited by billynoah on Sat Aug 30, 2014 12:06 am, edited 2 times in total.

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by JAY6390 » Sat Aug 30, 2014 12:06 am

vQmod 2.5.0 has now been released. For now, it's only available to download from
http://forum.opencart.com/viewtopic.php ... 45#p513645
while we sort out alternate download locations

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

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

Post by JAY6390 » Sat Aug 30, 2014 12:28 am

billynoah wrote:Hey Jay,

Just a wild thought for a future version that I know may not be realistic but here goes...

What about implementing a jQuery style CSS search position to match elements in tpl files? something like:

<search css="true" position="prepend"><![CDATA["#tab-shipping .form"]]></search>

I think it's pretty self explanatory - finds the element(s) with class "form" inside #tab-shipping and prepends in this case.

Additional position options could be "prepend" and "append" just as they are used in jQuery. "before" and "after" and the rest would still be useful but prepend and append would be key here.

Probably don't need to explain but the idea here is that sometimes you want to match a single or multiple elements inside another with only a certain id or class name.

How hard would this be? I know you are already parsing the xml in the vqmod itself so could this functino be extended to the modified files as well? I often find myself using "index" for things like this (when I need to add something after the third form element for example) but as you know the index can change if other vqmods are involved. A CSS search would be really awesome for modifying tpl files.

Please let me know your thoughts.
Hi Billy something like that would be great, but isn't practical unfortunately. It's a similar idea to the dom traversal suggestion from a fair while back and the main pitfall would be any php intertwined with the html

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

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

Post by billynoah » Sat Aug 30, 2014 12:46 am

Sorry if this has been discussed.. would you mind explaining (or sharing link to explanation) about how the php would be a pitfall? Are there any potential workarounds for this?

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by JAY6390 » Sat Aug 30, 2014 1:03 am

billynoah wrote:Sorry if this has been discussed.. would you mind explaining (or sharing link to explanation) about how the php would be a pitfall? Are there any potential workarounds for this?
Sure - I think I actually deleted the old discussion on it, but basically with having php able to echo content, it can go pretty much anywhere and since php isn't parsed by vQmod, it means it can cause a lot of headaches

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

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

Post by JNeuhoff » Sat Aug 30, 2014 1:08 am

billynoah wrote:Sorry if this has been discussed.. would you mind explaining (or sharing link to explanation) about how the php would be a pitfall? Are there any potential workarounds for this?
There are various PHP XML and DOM parsers. However, VQMod doesn't even parse the source file to be modified, it just reads it in as an array of lines.

If we were to modify the HTML output using some kind of a PHP DOM Parser, this would have nothing to do with VQmod. It would be a quite different approach, for which there'd be better places to integrate this, such as allowing a preRender or postRender method in the controller which could deal with this. An XML parser would be even better, unfortunately OpenCart doesn't use XHTML5, rather, it uses HTML5. Either way, the parser would only be able to parse the HTML elements, not any embedded PHP-sections nor Javascript sections. We'd have to find workarounds for this problem.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by billynoah » Sat Aug 30, 2014 1:15 am

I see. Yeah the idea for this would basically only apply to HTML elements. I've had a look at the functions and understand about how it reads the files as an array. And yes this would really be quite a different approach.

If it could be integrated with the current system successfully I think it would make vQmod quite robust and I'm sure you would agree. But I can also see why the obstacles might be a bit discouraging and counter to the current direction of this project.

Thanks for taking time to explain.

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by JAY6390 » Sat Aug 30, 2014 1:31 am

As JNeuhoff's already said, vQmod works in a place where it's just not going to be ideal. vQmod runs on the file loads, where as the best place to do what you want would be in the rendering methods in the response library class. You could probably design another system to do this, which could work completely separate. This could be done using either a vqmod hook, ocmod hook or override engine class to catch the html before it's output. Of course, you could simply use JavaScript to do what you want

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

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

Post by rph » Wed Sep 03, 2014 3:50 am

billynoah wrote:Just a wild thought for a future version that I know may not be realistic but here goes...

What about implementing a jQuery style CSS search position to match elements in tpl files?
I started a similar topic at http://forum.opencart.com/viewtopic.php ... 9&p=478386 . Being able to edit output on the DOM level would be extremely powerful feature for OpenCart. The big problem is OpenCart uses javascript with embedded HTML which throws DOMDocument for a loop. The only parser I've found that can handle it is HTML5-PHP but it's very slow.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by robster » Sat Sep 06, 2014 12:24 am

Sorry if this has been covered already but I have just downloaded latest VQmod version 2.5.0 and it would not let me install it (and I have done this hundreds of times on previous versions). I just get 404 no access.

I replaced it with 2.4.1 and it installed straight away.

What do you think could be causing that?

Rob

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by JAY6390 » Sat Sep 06, 2014 12:34 am

Hi Rob

Can you provide me ftp details so I can take a look as to why your server isn't working with it. I've tested this on a number of flavours of linux, windows and on OSX without issue. The latest version was given a change with the .htaccess files to make them (supposedly) more reliable to prevent access where there shouldn't be any such as people trying to download your mods.cache or log files. If you want to e-mail me at jay@jaygilford.com I can take a look for you

Cheers
Jay

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

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

Post by robster » Sat Sep 06, 2014 12:48 am

Hi Jay

Done

Rob

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by billynoah » Sat Sep 20, 2014 1:23 am

2.5 won't install for me. Just keep getting "client denied by host configuration" in error log. 2.4 works fine. Presumably this is something to do with changes you made to the .htaccess and I don't have time at the moment to dig into it but just thought you should know.

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by rph » Sat Sep 20, 2014 5:29 am


-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by billynoah » Sat Sep 20, 2014 8:53 am


Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm
Who is online

Users browsing this forum: No registered users and 12 guests