Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

megastruktur

Newbie
  
  • Posts

    2
  • Joined

  • Last visited

About megastruktur

  • Birthday 02/20/1989

Information

  • Gender
    Мужчина
  • Interests
    Оккультизм, программирование, Dungeons and Dragons.

Recent Profile Visitors

631 profile views

megastruktur's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Итак, может быть кому-то понадобится. 1. Открываем файл /admin/cointroller/common/home.php 2. Находим метод public function index() 3. В самом конце ЭТОГО метода (где-нибудь после строчки $results = $this->model_sale_order->getOrders($data);, ежели таковая имеется) дописываем: //// <---- Clear cache button handler: $this->data['clear_cache'] = $this->data['home'] = HTTPS_SERVER . 'index.php?route=common/home&clear_cache=true&token=' . $this->session->data['token']; if(isset($this->request->get['clear_cache'])){ // specify an array of what we need to clear: $cacheDirs = array( 'image_cache' => DIR_IMAGE . 'cache' , 'vqmod_cache' => dirname(DIR_APPLICATION) . '/vqmod/vqcache' , 'system_cache' => DIR_CACHE ); foreach ($cacheDirs as $cacheDir) { foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($cacheDir, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST) as $path) { $path->isDir() ? rmdir($path->getPathname()) : unlink($path->getPathname()); } } } //// ----> 4. Открываем файл /admin/view/template/common/home.tpl 5. Находим строчку <h1><img src="view/image/home.png" alt="" /> <?php echo $heading_title; ?></h1> 6. Сразу после нее добавляем: <div class='buttons'><a href="<?php echo $clear_cache ?>" class="button"><span>Clear Cache</span></a></div> Кнопка все почистиит, как Алмаз :-) Расположена она, как нетрудно догадаться, в админ-панели на главной странице, в хэдере, прямо напротив надписи "Панель управления". !!! Обратите внимание на то, какие директории оно очищает! Ежели у Вас нет VQmod, то уберите его из массива $cacheDirs. Ну или ежели необходимо что-то еще удалить - туда, в массив, дописывайте.
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.