Jump to content

Tab for Ext [support]


Recommended Posts

Tab for Ext

Просмотр файла

Замена неудобного выпадающего списка на кнопки, в разделе выбора дополнений административной части.
Архив выгрузить в корень сайта и заменить.
Путь заменяемого файла: admin/view/template/marketplace/
Заменяемый файл: extension.twig
 

 

Link to comment
Share on other sites

Идея хорошая. Реализация не очень.

Ни в коем случае нельзя заменять какие либо системные файлы.

В данном случае вы могли файл назвать extension_new.twig

Запаковать архив в ocmod  ( tab_for_ext_oc3x.ocmod.zip )

Ну и добавить модификатор install.xml который бы просто подменил путь до шаблона
 

<?xml version="1.0" encoding="utf-8"?>
<modification>
  <name>Tab for Ext</name>
  <code>Tab for Ext</code>
  <version>1.0</version>
  <author>freeworld</author>
  <link>Tab for Ext</link>
  <file path="admin/controller/marketplace/extension.php">
    <operation>
      <search><![CDATA[$this->response->setOutput($this->load->view('marketplace/extension', $data));]]></search>
      <add position="replace"><![CDATA[$this->response->setOutput($this->load->view('marketplace/extension_new', $data));]]></add>
    </operation>
  </file>
</modification>

Получаете безопасную установку/удаление через админку. Не затрагиваете системные файлы.

Link to comment
Share on other sites

В 30.01.2025 в 18:11, Tom сказал:

Ну и добавить модификатор install.xml который бы просто подменил путь до шаблона

еще лучше сделать это альтернативным пунктом меню, без подмены и с сохранением старого

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...