Closed trueliarx closed 4 years ago
-Issue 1-
Hi, I see two problems with your script:
1) "after" will add the modification after a line below, "after" would break your code, use "iafter", will insert the code aftert he search inline instead of the line before.
2) This line: <span class="help-box"><?php _e('This website is proudly using the <a title="Osclass web" href="https://github.com/navjottomer/osclass/">classifieds scripts</a> software <strong>Osclass</strong>', 'bender'); ?></span>
it's not exists in oc-includes/osclass/gui/footer.php but yes in oc-includes/osclass/gui/admin/settings.php.
I don't think that's the right way to modify what appears in that part of the footer, your script should be like this:
<file path="oc-includes/osclass/gui/footer.php">
<operation error="skip">
<search><![CDATA[This website is proudly using the <a title="Osclass web" href="%s">classifieds scripts</a> software <strong>Osclass</strong>]]></search>
<add position="iafter"><![CDATA[ - footertext]]></add>
</operation>
</file>
-Issue 2-
I will see what can be done there, for security it not allow take files with . (dot) interspersed and the plugin then rename them. You can use: -
-Language (Italian)-
OMG! thank you very much for the contribution, it will be added by default in the next version, for now I can add it in the attached files of the release, with your permission I will add you in the credits, attached your github user.
Really grateful, @trueliarx, I hope my answer to the issue 1 has helped you.
-Issue 1- In my case that specific file and modification doesn't work, no matter if after/iafter/replace. There are no errors in the logs and other modifications (in other php files) of the same xml are working . I deleted the caches and tried to debug but the problem is still there
-issue 2- It's up to you. It's just a case that I faced the problem since I use a lot vqmod with opencart and my xml files are usually named with an extra dot that is related to my name. Not really an issue.
-Language (Italian- You are welcome. Thank you for your plugin. You can use the translation as you prefer.
In my case that specific file and modification doesn't work, no matter if after/iafter/replace. There are no errors in the logs and other modifications (in other php files) of the same xml are working
Which one are you using?
<file path="oc-includes/osclass/gui/footer.php">
<operation error="skip">
<search><![CDATA[<span class="help-box"><?php _e('This website is proudly using the <a title="Osclass web" href="https://github.com/navjottomer/osclass/">classifieds scripts</a> software <strong>Osclass</strong>', 'bender'); ?></span>]]></search>
<add position="after"><![CDATA[ - footertext]]></add>
</operation>
</file>
Or
<file path="oc-includes/osclass/gui/footer.php">
<operation>
<search><![CDATA[This website is proudly using the <a title="Osclass web" href="%s">classifieds scripts</a> software <strong>Osclass</strong>]]></search>
<add position="iafter"><![CDATA[ - footertext]]></add>
</operation>
</file>
This my full xml script:
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Testing issue</id>
<version>1.0</version>
<vqmver>2.x</vqmver>
<author>CodexiLab</author>
<file path="oc-includes/osclass/gui/footer.php">
<operation>
<search><![CDATA[This website is proudly using the <a title="Osclass web" href="%s">classifieds scripts</a> software <strong>Osclass</strong>]]></search>
<add position="iafter"><![CDATA[ - footertext]]></add>
</operation>
</file>
</modification>
It work for me: https://i.imgur.com/Xy40nni.png
Did you remove error="skip"? so you can generate a vQmod error log.
It's up to you. It's just a case that I faced the problem since I use a lot vqmod with opencart and my xml files are usually named with an extra dot that is related to my name. Not really an issue.
I'm going to look at the OpenCart files so that vQmod for Osclass has the same behavior. Thanks for watching.
Ok, I found out the problem.
I don't know how but the same files where in the themes/bender folder (by default since 2.9 it's empty) and osclass loaded those files. I just deleted the theme files and it worked.
I'm sorry for the wasted time. Practically there's no real issue.
Cheers!
Yeah, also when there is no theme installed, Osclass by default takes the bender that is in the gui folder.
Don't worry, we are here to help each other.
Hello,
thank you for your vqmod plugin for osclass.
I'm using osclass 3.9 and the vqmod plugin 1.2.1.
-Issue 1- I have some problems with it when it comes to modifying files in oc-includes/osclass/gui/*
For example to add a footer text to the default theme (that is stored in a different location with osclass 3.9)
-Issue 2- (not very important)
when I upload the mod files it gets renamed in the wrong way if the xml file have dot (.).
For example if the file is "myname.mymodname.xml.zip" (with myname.mymodname.xml inside the zip file) the "name" and the relative xml file (that the plugin copies in vqmod/xml/) are renamed to "myname.xml"
-Language (Italian)-
I translated the .po file in the italian language
You can download it from here if you need it https://we.tl/t-Sa4JfSuJVm
Regards