示例#1
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('seo_keyword_model');
     $this->load->model('seo_service_company_model');
     $this->load->library('form_validation');
 }
 public function update($id)
 {
     $seo = Seo::find($id);
     $itemID = Input::get('id');
     $seo->updateFromInput();
     return Redirect::to('admin/seo/' . $id . '/edit?type=' . $this->type . '&id=' . $itemID)->with('seo_updated', true);
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('seo_model');
     $this->load->library('form_validation');
     $this->load->helper('seo');
 }
示例#4
0
 /**
  * constructor
  *
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     if (!isset($this->through_seo) or $this->through_seo === false) {
         Seo::instance()->set_pagination($this);
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->load->model('edm_email_model');
     $this->load->library('form_validation');
     $this->load->helper('seo');
     $this->template->add_js('static/js/ajax/seo.js');
 }
示例#6
0
 public static function returnExtFormElements()
 {
     $mod_tpl = static::returnTpl();
     $class = __CLASS__;
     ##
     ## EXTFORM SEO
     ##
     ExtForm::add("seo", function ($name = 'seo', $value = '', $params = null) use($mod_tpl, $class) {
         if (!Allow::action('seo', 'edit', true)) {
             return false;
         }
         ## default template
         $tpl = "extform_seo";
         ## custom template
         if (@$params['tpl']) {
             $tpl = $params['tpl'];
             unset($params['tpl']);
         }
         #$value = $element_meta->seo;
         /*
                         ## Don't work with i18n versions
                         if ( $value === false || $value === null ) {
                             $val = Form::text($name);
                             Helper::dd($val);
                             preg_match("~value=['\"]([^'\"]+?)['\"]~is", $val, $matches);
                             Helper::dd($matches);
                             $val = @$matches[1];
                             $array = json_decode($val, true);
                             if ($array)
                                 $value = $array;
                         }
                         #*/
         ## return view with form element
         return View::make($mod_tpl . $tpl, compact('name', 'value', 'params'));
     }, function ($params) use($mod_tpl, $class) {
         #Helper::dd($params);
         $module = isset($params['module']) ? $params['module'] : false;
         $unit_id = isset($params['unit_id']) ? $params['unit_id'] : false;
         $data = isset($params['data']) ? $params['data'] : false;
         $locale = isset($params['locale']) ? $params['locale'] : NULL;
         if (!$module || !$unit_id) {
             return false;
         }
         #Helper::dd($data);
         #$data['module'] = $module;
         #$data['unit_id'] = $unit_id;
         #Helper::dd($data);
         foreach ($data as $d => $dat) {
             if (!is_string($dat)) {
                 continue;
             }
             $data[$d] = trim($dat);
         }
         $seo = Seo::firstOrCreate(array('module' => $module, 'unit_id' => $unit_id, 'language' => $locale));
         $seo->update($data);
         return $seo;
     });
 }
示例#7
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('seo_model');
     $this->load->model('user_model');
     $this->load->model('seo_service_company_model');
     $this->load->library('form_validation');
     $this->template->add_js('static/js/sorttable.js');
 }
示例#8
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('seo_model');
     $this->load->model('seo_service_company_model');
     $this->load->library('form_validation');
     $this->load->helper('validation_helper');
     $this->load->library('excel');
 }
示例#9
0
文件: seo.php 项目: hardsshah/seo
 function verifySlug($data)
 {
     if (!empty($data[$this->Controller->modelClass])) {
         $data = $data[$this->Controller->modelClass];
     }
     $slug = Seo::slug($data, array('id' => false));
     if ($this->Controller->params['pass'][1] != $slug) {
         $this->Controller->redirect(array('action' => $this->Controller->action, Seo::slug($data)), 301);
     }
 }
示例#10
0
 public function getNews()
 {
     $sql = "SELECT \n\t\t\t\tCONCAT(:url,:seo,'/',N.idnews,'/',NT.seo) as loc,\n\t\t\t\tDATE_FORMAT(N.adddate,'%Y-%m-%d') as lastmod\n\t\t\t\tFROM news N\n\t\t\t\tLEFT JOIN newstranslation NT ON N.idnews = NT.newsid AND NT.languageid = :languageid\n\t\t\t\tWHERE N.publish = 1\n\t\t\t\tGROUP BY N.idnews";
     $stmt = Db::getInstance()->prepare($sql);
     $stmt->bindValue('url', URL);
     $stmt->bindValue('languageid', Helper::getLanguageId());
     $stmt->bindValue('seo', Seo::getSeo('news'));
     $stmt->execute();
     $Data = array();
     while ($rs = $stmt->fetch()) {
         $Data[] = array('loc' => $rs['loc'], 'lastmod' => $rs['lastmod']);
     }
     return $Data;
 }
 public static function display_seo()
 {
     $pageTitle = Yii::app()->name;
     $pageDescription = Yii::app()->name;
     if (isset($_GET['id'])) {
         $meta = Seo::model()->findByAttributes(array('controller' => Yii::app()->controller->id, 'action' => Yii::app()->controller->action->id, 'item_id' => $_GET['id']));
         if ($meta) {
             $pageTitle = $meta->title;
             $pageDescription = $meta->description;
         }
     }
     echo PHP_EOL . '<meta name="description" content="' . CHtml::encode($pageDescription) . '">' . PHP_EOL;
     echo '<title>' . CHtml::encode($pageTitle) . '</title>' . PHP_EOL;
 }
示例#12
0
 public function __construct()
 {
     parent::__construct();
     $this->load->model('solr/email_search_model');
     $this->load->helper('solr');
     $this->load->model('order_model');
     $this->load->model('user_model');
     $this->load->model('shipping_code_model');
     $this->load->model('shipping_code_model');
     $this->load->model('shipping_type_model');
     $this->load->library('form_validation');
     $this->load->helper('validation_helper');
     $this->load->helper('seo');
     $this->config->load('config_shiqi');
     $this->url = 'http://service.reasonablespread.com/service.asmx?WSDL';
 }
示例#13
0
 function edit()
 {
     if (isset($_POST['save'])) {
         $id = $this->input->post('id');
         $data = array('page_title' => trim($this->input->post('page_title')), 'site_title' => trim($this->input->post('site_title')), 'metadesc' => trim($this->input->post('metadesc')), 'metakey' => trim($this->input->post('metakey')), 'created_date' => date('y:m:d h:m:s'), 'state' => 1);
         $dataIn = $this->crud_model->updateData('seopage', 'id', $id, $data);
         if ($dataIn) {
             $this->admintemp->write('message', 'Edited Successfully');
             redirect('seo');
         } else {
             $this->admintemp->write('message', 'Error occured while editing');
             Seo::index();
         }
     } else {
         Seo::_edit();
     }
 }
 public function parseUrl($manager, $request, $pathInfo, $rawPathInfo)
 {
     //file_put_contents("log.txt", print_r($pathInfo, true), FILE_APPEND);
     $al = $pathInfo;
     // предположим, что передавамый путь псевдоним
     $alias = Seo::model()->findByAttributes(array('url' => $al));
     if (!$alias) {
         // если ничего загрузить не удалось
         return false;
         // возращаем обычный url
     } else {
         //file_put_contents("log.txt", print_r($_GET, true));
         $route = $alias->controller . '/' . $alias->action;
         // скливаем маршрут из контроллера и действия
         //$_GET = $this->ParamsStringIntoArray('id='.$alias->item_id); // "набиваем" $_GET массив оригинальными значениями, извлекая их из строки $alias->item_id
         $_GET['id'] = $alias->item_id;
         return $route;
         // возвращаем оригинальный маршрут (GET параметры уже прикреплены)
     }
 }
 /**
  * @param string $applicationIdentifier
  * @return bool
  */
 public static function applicationHasSeoSpeciality($applicationIdentifier)
 {
     return Seo::hasSpeciality($applicationIdentifier);
 }
示例#16
0
<?php

if (!_acl::isAllow('seotextformats')) {
    die("Access denied");
}
$Seo = new Seo();
unset($parsed_res);
$tpl->Assign('h1', 'Добавление формата сеотекста');
if (isset($_POST['smb'])) {
    if ($Seo->addSeotextFormats($_POST)) {
        $tpl->Assign('msg', 'Новый формат добавлен.');
        unset($_POST);
    } else {
        $tpl->Assign('msg', 'Формат не добавлен.');
        $tpl->Assign('errm', 1);
    }
}
if (!isset($_POST['smb'])) {
    $_POST['id'] = 0;
}
$ii = count($GLOBALS['IERA_LINKS']);
$GLOBALS['IERA_LINKS'][$ii]['title'] = "Формат сеотекстов";
$GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/seotextformats/';
$GLOBALS['IERA_LINKS'][$ii]['title'] = "Добавление формата сеотекста";
$tpl_center = $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_seotextformats_ae.tpl');
示例#17
0
 private function setContent($page)
 {
     Seo::setSeo($page);
     Content::setContent($page);
     Breadcrumbs::setCrumbs($page);
 }
示例#18
0
<?php

if (!_acl::isAllow('seotextformatsedit')) {
    die("Access denied");
}
$Seo = new Seo();
unset($parsed_res);
if (isset($GLOBALS['REQAR'][1]) && is_numeric($GLOBALS['REQAR'][1])) {
    $id = $GLOBALS['REQAR'][1];
} else {
    header('Location: ' . $GLOBALS['URL_base'] . '404/');
    exit;
}
if (!($format_seo = $Seo->getFieldsFormatById($id))) {
    die('Ошибка при выборе формата сеотекста.');
}
$tpl->Assign('h1', 'Редактирование формата сеотекста');
if (isset($_POST['smb'])) {
    if ($Seo->updateSeotextFormats($_POST)) {
        $tpl->Assign('msg', 'Редактирование прошло успешно.');
        $success = true;
        $tpl->Assign('success', $success);
        $format_seo = $Seo->getFieldsFormatById($id);
        unset($_POST);
    } else {
        unset($format_seo);
        $tpl->Assign('msg', 'Произошла ошибка! Повторите попытку.');
        $tpl->Assign('errm', 1);
    }
}
if (!empty($format_seo)) {
示例#19
0
<?php

/* @type $Params string[] */

$clusterIdentifier     = ClusterTool::clusterIdentifier();
$page                  = $Params['Page'];
$speciality            = $Params['Speciality'];
$applicationidentifier = $Params['ApplicationIdentifier'];
$result = "";

if ( isset($applicationidentifier) && isset($page) && $page >= 1 && isset($speciality) )
{
    $keywords = Seo::fetchKeywords($applicationidentifier, $speciality, $page);
    $count    = Seo::fetchKeywordsCount($applicationidentifier, $speciality);

    $tpl = eZTemplate::factory();
    $tpl->setVariable('rows', $keywords);
    $tpl->setVariable('count', $count);
    $tpl->setVariable('application_name', $applicationidentifier);
    $tpl->setVariable('speciality', $speciality);
    $tpl->setVariable('page', $page);

    $result = $tpl->fetch('design:esibuild/app_content/seo/keywords_list.tpl');
}

echo $result;

flush();
eZExecution::cleanExit();
示例#20
0
<?php

if (!_acl::isAllow('seotextformats')) {
    die("Access denied");
}
$Seo = new Seo();
unset($parsed_res);
$tpl->Assign('h1', 'Форматы сеотекста');
$ii = count($GLOBALS['IERA_LINKS']);
$GLOBALS['IERA_LINKS'][$ii]['title'] = "Форматы сеотекста";
if (isset($_POST['clear_filters'])) {
    $_POST['filter_type'] = null;
} else {
    if (isset($_POST['filter_type'])) {
        $where = ' WHERE type = ' . $_POST['filter_type'];
    }
}
/*Pagination*/
if (isset($_GET['limit']) && is_numeric($_GET['limit'])) {
    $GLOBALS['Limit_db'] = $_GET['limit'];
}
if (isset($_GET['limit']) && $_GET['limit'] != 'all' || !isset($_GET['limit'])) {
    if (isset($_POST['page_nbr']) && is_numeric($_POST['page_nbr'])) {
        $_GET['page_id'] = $_POST['page_nbr'];
    }
    $cnt = count($Seo->getSeotextFormats($where ? $where : null));
    $tpl->Assign('cnt', $cnt);
    $GLOBALS['paginator_html'] = G::NeedfulPages($cnt);
    $limit = ' LIMIT ' . $GLOBALS['Start'] . ',' . $GLOBALS['Limit_db'];
} else {
    $GLOBALS['Limit_db'] = 0;
示例#21
0
 public function rewrite($link)
 {
     $url = '';
     $is_home = false;
     $uri = new Uri($link);
     if ($uri->getVar('route')) {
         $seo = new Seo($this->registry);
         switch ($uri->getVar('route')) {
             case 'common/home':
                 $is_home = true;
                 break;
             case 'product/product':
                 if ($this->config->get('config_seo_category')) {
                     if ($uri->getVar('path') and $this->config->get('config_seo_category') == 'last') {
                         $categories = explode('_', $uri->getVar('path'));
                         $categories = array(end($categories));
                     } else {
                         $categories = array();
                         $category_id = $seo->getCategoryIdBySortOrder($uri->getVar('product_id'));
                         if (!is_null($category_id)) {
                             $categories = $seo->getParentCategoriesIds($category_id);
                             $categories[] = $category_id;
                             if ($this->config->get('config_seo_category') == 'last') {
                                 $categories = array(end($categories));
                             }
                         }
                     }
                     foreach ($categories as $category) {
                         $alias = $seo->getAlias($category, 'category');
                         if ($alias) {
                             $url .= '/' . $alias;
                         }
                     }
                     $uri->delVar('path');
                 }
                 if ($uri->getVar('product_id')) {
                     $alias = $seo->getAlias($uri->getVar('product_id'), 'product');
                     if ($alias) {
                         $url .= '/' . $alias;
                     }
                     $uri->delVar('product_id');
                     $uri->delVar('manufacturer_id');
                     $uri->delVar('path');
                     $uri->delVar('search');
                 }
                 break;
             case 'product/category':
                 if ($uri->getVar('path')) {
                     $categories = explode('_', $uri->getVar('path'));
                     foreach ($categories as $category) {
                         $alias = $seo->getAlias($category, 'category');
                         if ($alias) {
                             $url .= '/' . $alias;
                         }
                     }
                     $uri->delVar('path');
                 }
                 break;
             case 'information/information':
                 if ($uri->getVar('information_id')) {
                     $alias = $seo->getAlias($uri->getVar('information_id'), 'information');
                     if ($alias) {
                         $url .= '/' . $alias;
                     }
                     $uri->delVar('information_id');
                 }
                 break;
             case 'product/manufacturer/info':
                 if ($uri->getVar('manufacturer_id')) {
                     $alias = $seo->getAlias($uri->getVar('manufacturer_id'), 'manufacturer');
                     if ($alias) {
                         $url .= '/' . $alias;
                     }
                     $uri->delVar('manufacturer_id');
                 }
                 break;
             default:
                 if (!$this->seoDisabled($uri->getVar('route'))) {
                     $url = '/' . $uri->getVar('route');
                 }
                 break;
         }
         $uri->delVar('route');
     }
     if ($url or $is_home) {
         // Add language code to URL
         if ($this->config->get('config_seo_lang_code')) {
             $url = '/' . $this->session->data['language'] . $url;
         }
         $uri->delVar('lang');
         // Append the suffix if enabled
         if ($this->config->get('config_seo_suffix') && !$is_home) {
             $url .= '.html';
         }
         $path = $uri->getPath();
         if ($is_home or $this->config->get('config_seo_rewrite')) {
             $path = str_replace('index.php/', '', $path);
             $path = str_replace('index.php', '', $path);
         }
         $path .= $url;
         $uri->setPath($path);
         return $uri->toString();
     } else {
         return $link;
     }
 }
    /**
     * @return bool
     */
    public function htmlBuildSeoResult()
    {
        $this->pushResult("application_headline", $this->applicationLocalized()->headline);
        $this->pushResult("application_identifier", $this->applicationObject()->attribute("identifier"));

        // Speciality list
        if(!isset($this->seoParams["speciality"]) && !isset($this->seoParams["keyword"]))
        {
            $this->pushResult("list_specialities", true);

            $seos = Seo::fetchSpecialities($this->applicationObject()->identifier);

            $rows = array();
            foreach ( $seos as $seo )
            {
                $seo['nb_results'] = $seo['count'];
                $letter            = strtoupper( substr( $seo['speciality'], 0, 1 ) );
                
                if ( !isset( $rows[$letter] ) )
                    $rows[$letter]=array();

                $rows[$letter][]=$seo;
            }
            $this->pushResult("rows", $rows);

            // Speciality list headline
            $this->pushResult("seoTitle", ezpI18n::tr("seo/speciality-list", "HEADLINE", null, array(
                "%application" => $this->applicationLocalized()->headline
            )));
        }
        // Keyword list
        else if(isset($this->seoParams["speciality"]) && !isset($this->seoParams["keyword"]))
        {
            $keywords = Seo::fetchKeywords($this->applicationObject()->identifier, $this->seoParams["speciality"], 1, 100);
            $count    = Seo::fetchKeywordsCount($this->applicationObject()->identifier, $this->seoParams["speciality"]);

            $this->pushResult("list_keywords", true);
            $this->pushResult("speciality", $this->seoParams["speciality"]);
            // keyword list
            $this->pushResult("rows", $keywords);
            // random keyword for description
            $shuffle = $keywords;
            shuffle($shuffle);
            $randKeys = array_rand($shuffle, 3);
            $randKeywords = array();
            foreach($randKeys as $rand)
            {
                $randKeywords[] = $shuffle[$rand]["keyword"];
            }
            $this->pushResult("randKeywords", $randKeywords);

            $this->pushResult("count", $count);
            $this->pushResult("page", 1);

            // Keyword list (no speciality)
            if(!SolrSafeOperatorHelper::applicationHasSeoSpeciality($this->applicationObject()->identifier))
            {
                $this->pushResult("seoTitle", ezpI18n::tr("seo/keyword-list-no-spe", "HEADLINE", null, array(
                    "%application"  => $this->applicationLocalized()->headline,
                    "%speciality"   => $this->seoParams["speciality"]
                )));
            }
            // Keyword list (by speciality)
            else
            {
                $this->pushResult("seoTitle", ezpI18n::tr("seo/keyword-list-spe", "HEADLINE", null, array(
                    "%application"  => $this->applicationLocalized()->headline,
                    "%speciality"   => $this->seoParams["speciality"]
                )));
            }
        }
        // Article list (by keyword)
        else
        {
            $this->pushResult("keyword", $this->seoParams["keyword"]);
            $this->pushResult("keywordEncode", urlencode($this->seoParams["keyword"]));
            $this->pushResult("seoTitle", ezpI18n::tr("seo/article-list", "HEADLINE", null, array(
                "%application"  => $this->applicationLocalized()->headline,
                "%keyword"  => $this->seoParams["keyword"]
            )));
        }

        return true;
    }
示例#23
0
 public static function setSeo($data)
 {
     self::$title = isset($data['title']) ? $data['title'] : self::$title;
     self::$description = isset($data['description']) ? $data['description'] : self::$description;
     self::$keywords = isset($data['keywords']) ? $data['keywords'] : self::$keywords;
 }
示例#24
0
文件: seo.php 项目: jfhs/amato-seo
    foreach ($data['items'] as $item) {
        ?>
                <h4><?php 
        echo $item->title();
        ?>
</h4>
                <?php 
        foreach (array('title' => 'text', 'keywords' => 'textarea', 'meta' => 'textarea') as $v => $type) {
            ?>
                    <label ><h5><?php 
            echo ucfirst($v);
            ?>
</h5></label>
                    <div>
					<?php 
            echo View::factory('control/editors/' . $type, array('item' => Seo::get($item), 'name' => 'groups[' . $group . '][' . $item->pk() . '][' . $v . ']', 'field' => $v));
            ?>
                    </div>
                <?php 
        }
        ?>
                <hr>
            <?php 
    }
    ?>
        </div>
        <?php 
    $first = false;
}
?>
    <div class="control-group">
示例#25
0
 public function actionRefresh()
 {
     $request = Yii::app()->getRequest();
     $sid = trim($request->getParam("sid"));
     if ($sid) {
         try {
             //获取url
             $site = new Site();
             $row = $site->find('sid=:sid', array(':sid' => $sid));
             $domain = new Domain();
             $row = $domain->find('id=:id', array(':id' => $row['dmid']));
             $url = 'www.' . $row['name'];
             //获取seo信息
             $seo = new Seotool($url);
             $info['alexa'] = (int) $seo->getAlexaRank();
             $info['google'] = (int) $seo->getIndexedGoogle();
             $info['baidu'] = (int) $seo->getIndexedBaidu();
             $info['pr'] = (int) $seo->getPagerank();
             $info['sid'] = $sid;
             //更新数据
             $res = new Seo();
             $row = $res->find('sid=:sid', array(':sid' => $sid));
             if ($row) {
                 $res = new Seo();
                 $res->_pk = $row['id'];
                 $res->_attributes = $info;
                 $res->setIsNewRecord(false);
                 $res->update();
             } else {
                 $res = new Seo();
                 $res->_attributes = $info;
                 $res->insert();
             }
             $this->redirect(array('list'));
         } catch (CDbException $e) {
             throw CDbException($e);
         }
     }
 }
示例#26
0
 public function saveseo()
 {
     $seoid = Input::get('seoid');
     $seo = Seo::find($seoid);
     $seo->updateFromInput();
     $seo->save();
     return Redirect::to('backend/seo')->withMessage($this->notifyView(Lang::get('laracms::messages.seo_edited'), 'success'));
 }
示例#27
0
 public function autosetSeoData($pageName, $params = array())
 {
     array_unshift($params, $pageName);
     $pageId = implode('_', $params);
     $seo = Seo::model()->findByAttributes(array('page_identifier' => $pageId));
     if (!$seo) {
         return;
     }
     $this->pageTitle = $seo->page_title;
     $this->setMetaDescription($seo->meta_description);
     $this->setMetaKeywords($seo->meta_keyword);
 }
示例#28
0
 public function getProductSeo($seo)
 {
     return App::getURLAdress() . Seo::getSeo('productcart') . '/' . $seo;
 }
示例#29
0
 public function staticcontent($id)
 {
     $sql = "SELECT\n\t\t\t\tCONCAT(:seo,'/',CC.idcontentcategory) AS link,\n\t\t\t\tCCT.name AS title\n\t\t\t\tFROM contentcategory CC\n\t\t\t\tLEFT JOIN contentcategorytranslation CCT ON CCT.contentcategoryid = CC.idcontentcategory AND CCT.languageid = :languageid\n\t\t\t\tWHERE CC.idcontentcategory = :id OR CC.idcontentcategory = (SELECT contentcategoryid FROM contentcategory WHERE idcontentcategory = :id)";
     $stmt = Db::getInstance()->prepare($sql);
     $stmt->bindValue('seo', Seo::getSeo('staticcontent'));
     $stmt->bindValue('id', $id);
     $stmt->bindValue('languageid', Helper::getLanguageId());
     $stmt->execute();
     while ($rs = $stmt->fetch()) {
         $Data[] = array('link' => $rs['link'], 'title' => $rs['title']);
     }
     return $Data;
 }
 /**
  * Функция удаляет резервные копии, превысившие лимит
  *
  * @param int $dicval_id
  * @return bool
  */
 private function delete_backups($dicval_id = 0)
 {
     /**
      * Находим запись словаря для удаления ее бэкапов
      * Запись должна быть оригиналом, т.е. иметь version_of = NULL
      */
     $element = DicVal::where('id', $dicval_id)->with('dic', 'metas', 'allfields', 'seos', 'versions')->first();
     if (!isset($element) || !is_object($element) || $element->version_of != NULL) {
         return false;
     }
     #Helper::tad($element);
     $dic = $element->dic;
     $versions = Config::get('dic/' . $dic->slug . '.versions');
     $element_versions = $element->versions;
     $result = true;
     if (count($element_versions) > 0 && count($element_versions) >= $versions) {
         /**
          * Вычисляем ID записей, подлежащих удалению
          */
         $for_delete = $element_versions->lists('id');
         krsort($for_delete);
         $for_delete = array_slice($for_delete, 0, count($element_versions) - $versions);
         #Helper::dd($for_delete);
         if (count($for_delete)) {
             $result = false;
             /**
              * Открываем транзакцию
              */
             DB::transaction(function () use($element, $for_delete, $result) {
                 /**
                  * Удаляем старые резервные копии и их доп. поля, META и SEO-данные
                  */
                 DicFieldVal::whereIn('dicval_id', $for_delete)->delete();
                 DicValMeta::whereIn('dicval_id', $for_delete)->delete();
                 if (Allow::module('seo')) {
                     Seo::where('module', 'DicVal')->whereIn('unit_id', $for_delete)->delete();
                 }
                 $deleted = DicVal::where('version_of', $element->id)->whereIn('id', $for_delete)->delete();
                 #Helper::d($deleted);
                 #Helper::dd($for_delete);
                 if ($deleted) {
                     $result = true;
                 }
             });
         }
     }
     return $result;
 }