Post by vincent_angbt » Fri Jun 24, 2016 2:40 pm

ojars26 wrote:this is my final change - made for my self. :)

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
  <name>Opencart 2.x-2.2 filemanager upload_add_underscore and view-fix</name>
  <code>8859B85845BE3476E907250B88</code>
  <version>1.0.2</version>
  <author>ojars26</author>
  <file path="admin/controller/common/filemanager.php">
	<operation>
      <search>
        <![CDATA['name'  => implode(' ', $name),]]>
      </search>
      <add position="replace">
        <![CDATA['name'  => basename($image), //without added spaces, longnames fixed with in filemanager.tpl adding style="word-wrap: break-word;"]]>
      </add>
    </operation>
	<operation>
      <search>
        <![CDATA[$filename = basename(html_entity_decode($this->request->files['file']['name'], ENT_QUOTES, 'UTF-8'));]]>
      </search>
      <add position="after">
        <![CDATA[$filename = str_replace(' ', '_', preg_replace('/\s+/', ' ', $filename)); //Remove extra spaces & replace spaces with underscore]]>
      </add>
    </operation>
  </file>
  <file path="admin/view/template/common/filemanager.tpl">
	<operation>
      <search>
        <![CDATA[<div class="col-sm-3 text-center">]]>
      </search>
      <add position="replace">
        <![CDATA[<div class="col-sm-3 text-center" style="word-wrap: break-word;">]]>
      </add>
    </operation>
  </file>
</modification>

This work perfectly...

New member

Posts

Joined
Tue Dec 17, 2013 11:35 am

Post by straightlight » Fri Jul 15, 2016 9:00 pm

A new solution has been discovered: http://forum.opencart.com/viewtopic.php ... 68#p628989

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 89 guests