Post by qahar » Sat Jan 15, 2011 3:27 am

Qphoria wrote:Ok I cleaned up the first post to make it easier to understand (i hope):
http://forum.opencart.com/viewtopic.php ... 15#p120715
Also updated the vQmod collection file: quick explanation for newbie. :P

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by Lao » Sat Jan 15, 2011 5:59 am

Q, can you tell me how can I delete files in vqcache folder? Right now permissions of this folder are "fle (755)" and I can't change them.

I'm using Open Cart 1.5.4.1 on http://www.importpieseauto.ro


User avatar
Lao
Active Member

Posts

Joined
Tue Nov 23, 2010 3:31 pm
Location - Craiova, Romania

Post by Qphoria » Sat Jan 15, 2011 6:06 am

Lao wrote:Q, can you tell me how can I delete files in vqcache folder? Right now permissions of this folder are "fle (755)" and I can't change them.
They autodelete for you but you should always have rights with 755 or just change the folder to 777

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by marc_cole » Sat Jan 15, 2011 7:20 am

Q,

Is there a way to script a minimum OC version requirement for VQM scripts? For example, let's say we have a script that requires v1.4.9.1 or higher. Is there a way to code that so if someone was to try to install it on 1.4.8 or lower, it just wouldn't run? Or better yet, produce a dialog saying "You need at least v1.4.9.x to run this mod."?

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


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by Lao » Sat Jan 15, 2011 5:45 pm

Qphoria wrote:
Lao wrote:Q, can you tell me how can I delete files in vqcache folder? Right now permissions of this folder are "fle (755)" and I can't change them.
They autodelete for you but you should always have rights with 755 or just change the folder to 777
I can't change to 777, I can't do anything on vqcache folder. And although it's 755 it's "fle (0755)", while others are "flcdmpe (0755)".

I'm using Open Cart 1.5.4.1 on http://www.importpieseauto.ro


User avatar
Lao
Active Member

Posts

Joined
Tue Nov 23, 2010 3:31 pm
Location - Craiova, Romania

Post by Qphoria » Sun Jan 16, 2011 3:39 am

Lao wrote:
Qphoria wrote:
Lao wrote:Q, can you tell me how can I delete files in vqcache folder? Right now permissions of this folder are "fle (755)" and I can't change them.
They autodelete for you but you should always have rights with 755 or just change the folder to 777
I can't change to 777, I can't do anything on vqcache folder. And although it's 755 it's "fle (0755)", while others are "flcdmpe (0755)".
Then get a new host.. You should have full control of your own folders

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Sun Jan 16, 2011 6:20 am

yeah his host probably does not run either suphp or fastcgi and files written by the server are probably owned by the server user instead of the user most hosts have moved to one of the two where this does not happen, because it helps with security at the same time.

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 » Sun Jan 16, 2011 6:37 am

Xsecrets wrote:yeah his host probably does not run either suphp or fastcgi and files written by the server are probably owned by the server user instead of the user most hosts have moved to one of the two where this does not happen, because it helps with security at the same time.
And that is just fine and normal. Most hosts are going to 0755 max chmod but that doesnt prevent reading or writing. But if he cant even delete files from ftp or cpanel then he needs a new host. vQmod files are text files like any other.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Sun Jan 16, 2011 7:49 am

yes, but they are written by the server so if he has an old setup they will be owned by user nobody or www-data and the permissions will be 755 meaning that user myusername will not have permission to write to or delete those files. This used to be a problem with lots of webhosts when the server wrote out files, but like I said most host have moved to systems where the server runs as myusername so the files are written as you and you can control them. At any rate the advice is the same. Find a new host.

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 grooverdan » Sun Jan 16, 2011 8:52 pm

Nice work Qphoria!

I started up a little collection http://gitorious.org/opencart-patches/o ... ster/vqmod. Some need a few additional files that I'll commit soon. non_us_paypal_phone.xml maybe should go in as a fix however the framework for maintainable modifications is really good. Thank you.

New member

Posts

Joined
Sun Jul 04, 2010 9:08 am

Post by Qphoria » Mon Jan 17, 2011 12:09 am

grooverdan wrote:Nice work Qphoria!

I started up a little collection http://gitorious.org/opencart-patches/o ... ster/vqmod. Some need a few additional files that I'll commit soon. non_us_paypal_phone.xml maybe should go in as a fix however the framework for maintainable modifications is really good. Thank you.
Awesome :) great to see its working so well. A lot of nice vQmod scripts there

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JNeuhoff » Mon Jan 17, 2011 5:56 pm

I am in the process of switching some of my extensions over to VQMod, and I was wondering whether you could put the VQMod to the regular OpenCart extensions section, this way I could create permanent links to there in my install texts. Alternatively, could I make it downloadable from my own site?

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Xsecrets » Mon Jan 17, 2011 9:05 pm

Yeah That would be nice. I have one of mine as a vqmod as well, but haven't added it to my download mostly because of that issue.

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 » Mon Jan 17, 2011 10:16 pm

I am working on making its own domain. http://www.vQmod.com is purchased and being set up
For now you can use http://tinyurl.com/vqmodoc

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by daymobrew » Mon Jan 17, 2011 10:50 pm

Excellent extension - I was dreading maintaining core file modifications across updates.

I am having trouble enabling logging to a non-default location (I do not want to open write permissions to the root folder of my site). I want to put the log file in the 'vqcache' directory.
I added the following to my index.php file but no log file is being created.

Code: Select all

require_once('./vqmod.php');
$vqmod = new VQMod('./vqmod');
$vqmod->logFilePath = './vqcache/vqmod.log';
$vqmod->logging = TRUE;
It works when I modify the $logFilePath in vqmod.php but that is obviously not the best idea.

New member

Posts

Joined
Wed Dec 22, 2010 7:36 am

Post by dry_flood » Tue Jan 18, 2011 6:19 pm

Hey

First of all, well done!!! This is a fantastic tool and an amazing achievement.

Just to chime in my 2 pennies.

Would it be possible to add functionality so that a developer can create a list of dependant files with relative filename and location for a mod in the xml file.

For example, the "At-a-glance" mod requires several other files to run and is not just a code addition.

This way we could create an GUI for the cart backend where we can list all VQmod scripts and if we choose to delete a script, we can delete all of the dependant files too and keep the cart directories clean?

Cheers
Gaz

New member

Posts

Joined
Tue Dec 14, 2010 4:33 am

Post by Qphoria » Tue Jan 18, 2011 10:22 pm

dry_flood wrote:Hey

First of all, well done!!! This is a fantastic tool and an amazing achievement.

Just to chime in my 2 pennies.

Would it be possible to add functionality so that a developer can create a list of dependant files with relative filename and location for a mod in the xml file.

For example, the "At-a-glance" mod requires several other files to run and is not just a code addition.

This way we could create an GUI for the cart backend where we can list all VQmod scripts and if we choose to delete a script, we can delete all of the dependant files too and keep the cart directories clean?

Cheers
Gaz
Hmm.... perhaps something like:

Code: Select all

<dependents>
catalog/controller/module/xxx.php
catalog/model/catalog/xxx.php
</dependents>
or maybe it should be more structured

Code: Select all

<dependent file="catalog/controller/module/xxx.php" />
<dependent file="catalog/model/catalog/xxx.php" />
Technically tho, that would just be informational and the custom GUI would read that information so you could add that to your scripts now. I don't know that vQmod would need that information. Tho, I suppose maybe to do a test for file_exists. If one of the dependent files don't exist, don't execute the rest of the script.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Tue Jan 18, 2011 10:27 pm

daymobrew wrote:Excellent extension - I was dreading maintaining core file modifications across updates.

I am having trouble enabling logging to a non-default location (I do not want to open write permissions to the root folder of my site). I want to put the log file in the 'vqcache' directory.
I added the following to my index.php file but no log file is being created.

Code: Select all

require_once('./vqmod.php');
$vqmod = new VQMod('./vqmod');
$vqmod->logFilePath = './vqcache/vqmod.log';
$vqmod->logging = TRUE;
It works when I modify the $logFilePath in vqmod.php but that is obviously not the best idea.
I am going to change that a bit because you are right.. tho it should actually create 2 log files.. one when the construct loads with the root path, and then one when the new path is set. But no matter, I shouldn't have it creating the log in the construct because it prevents the setting of a diff file path that way. For now the only way is in the code. I'll fix that for 1.0.7

I am also going to change the default directory structure a bit like I show in this post to keep things cleaner and more self contained

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Wed Jan 19, 2011 6:13 am

UPDATED FILE IN FIRST POST
v1.0.7 - 2011-JAN-18
- Default directory structure changed to put everything inside the /vqmod/ folder
- xml files are now moved to /vqmod/xml/*.xml
- Redesigned the construct to be simpler
- Construct no longer requires a path or log option
- New init() function handles initialization
- Improved log function to use file_put_contents instead of fopen
- Set logging = true by default

ATTENTION!
THIS UPDATE WILL REQUIRE SOME CHANGES IF YOU ARE UPGRADING FROM A PREVIOUS VERSION OF VQMOD!
READ THE opencart_install.txt FILE FOR THE UPGRADE STEPS.


This change will also fix the issue shown above. The new syntax will be:

Code: Select all

require_once('./vqmod/vqmod.php');  <-- Moved class inside the /vqmod/ folder
$vqmod = new VQMod();  <-- No more params for the instantiation. Logging enabled by default
$vqmod->logFilePath = './vqcache/vqmod.log';  <-- This works but the log was moved already so you won't need it.
$vqmod->logging = FALSE;  <-- Specifically set this if you want to disable logging

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JNeuhoff » Wed Jan 19, 2011 6:55 am

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.

MHC Web Design
Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * TrustPilot Reviews * Google Rich Snippets * Google Tag Manager * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 7 guests