Скрыть объявление
ВАШИ ПРАВА ОГРАНИЧЕНЫ!

Зарегистрируйтесь на форуме, чтобы стать полноценным участником сообщества!

Вопрос? News_keyword

Тема в разделе "Вопросы- ответы", создана пользователем aminogli, 13 янв 2019.

13.01.19 в 15:55
15.01.19 в 15:26
21
1.132
0
  1. TopicStarter Overlay
    aminogli

    aminogli Зелёный

    Регистрация:
    13 янв 2019
    Сообщения:
    7
    Лучших ответов:
    0
    Рейтинги:
    +0 / 0 / -0

    if(is_array($custom_metatags['regex']) AND count($custom_metatags['regex'])) {
    foreach ($custom_metatags['regex'] as $key => $value) {
    if(preg_match($key, $r_uri)){
    if( $value['title'] ) $metatags['title'] = $value['title'];
    if( $value['description'] ) $metatags['description'] = $value['description'];
    if( $value['keywords'] ) $metatags['keywords'] = $value['keywords'];
    }
    }
    }

    if( $newsid ) {
    $metatags['keywords2'] = "{$metatags['title']} ";
    } else {
    $metatags['keywords2'] = $metatags['keywords'];
    }

    $metatags['title']=str_replace(array("{", "}", "[", "]"), "", $metatags['title']);
    $metatags['description']=str_replace(array("{", "}", "[", "]"), "", $metatags['description']);
    $metatags['keywords']=str_replace(array("{", "}", "[", "]"), "", $metatags['keywords']);
    $meta_keys = ( $dle_module == "showfull" ) ? "" : "<meta name=\"keywords\" content=\"{$metatags['keywords']}\" />";
    $metatags = <<<HTML
    <meta charset="{$config['charset']}">
    <title>{$metatags['title']}</title>
    <meta name="description" content="{$metatags['description']}">
    {$meta_keys}">{$disable_index}
    <meta name="generator" content="DataLife Engine (DataLife Engine (DLE) — система управления сайтом и контентом. Официальный сайт.)">
    <meta name="news_keywords" content="{$metatags['keywords2']}">
    {$s_meta}<link rel="search" type="application/opensearchdescription+xml" href="{$config['http_home_url']}engine/opensearch.php" title="{$config['home_title']}" />
    HTML;

    if ($canonical) {

    if (strpos($canonical, "//") === 0) $canonical = "https:".$canonical;
    elseif (strpos($canonical, "/") === 0) $canonical = "http://".$_SERVER['HTTP_HOST'].$canonical;

    $metatags .= <<<HTML

    HTML;

    if ($canonical) {

    if (strpos($canonical, "//") === 0) $canonical = "https:".$canonical;
    elseif (strpos($canonical, "/") === 0) $canonical = "http://".$_SERVER['HTTP_HOST'].$canonical;

    $metatags .= <<<HTML

    HTML;
     
  2. synlivcho

    PRO Users

    Регистрация:
    24 окт 2018
    Сообщения:
    749
    Лучших ответов:
    2
    Рейтинги:
    +99 / 30 / -0
    In post where it is you read how to make the keywords for version 10.6 - 11. You version is 13.0 maybe that the problem, my version also old. There are a lot of new things in your code, I think that does not output because syntaxes do not fail. One thing i see output on the keywords tag {$meta_keys}. That is all you did with keywords2 make same keys2, try to replace $metatags['keywords2'] to $metatags['keys2'] .
     
Яндекс.Метрика