Тег Noindex для DLE 9.6 by HatcHeeS

  


Если на вашем сайте, публикуют контент, который вы не хотите видеть в индексации бота, тогда вы можете запретить индексацию по странице в дле 9.6.


Установка:

1. Открыть engine/modules/bbcodes.php

Найти:
Code
<div class="editor_button" onclick="tag_video()"><img title="$lang[bb_t_video]" src="{THEME}/bbcodes/mp.gif" width="23" height="25" border="0" alt="" /></div>


Ниже добавить:
Code
<div id="b_noindex" class="editor_button" onclick="simpletag('noindex')"><img title="$lang[bb_t_noindex]" src="{THEME}/bbcodes/noindex.png" width="23" height="25" border="0" alt="" /></div>


Найти:
Code
<div id="b_i" class="editor_button" onclick="simpletag('i')"><img title="$lang[bb_t_i]" src="{THEME}/bbcodes/i.gif" width="23" height="25" border="0" alt="" /></div>


Ниже добавить:
Code
<div id="b_noindex" class="editor_button" onclick="simpletag('noindex')"><img title="$lang[bb_t_noindex]" src="{THEME}/bbcodes/noindex.png" width="23" height="25" border="0" alt="" /></div>


2. Открыть engine/classes/parse.class.php

Найти:
Code
$txt = str_replace( "<s>", "[s]", str_replace( "</s>", "[/s]", $txt ) );


Добавить ниже:
Code
$txt = str_replace( "<noindex>", "[noindex]", str_replace( "</noindex>", "[/noindex]", $txt ) );


Найти:
Code
$count_start = substr_count ($source, "[b]");
  $count_end = substr_count ($source, "[/b]");

  if ($count_start AND $count_start == $count_end) $source = str_ireplace( "[b]", "<b>", str_ireplace( "[/b]", "</b>", $source ) );


Добавить ниже:
Code
$count_start = substr_count ($source, "[noindex]");
  $count_end = substr_count ($source, "[/noindex]");

  if ($count_start AND $count_start == $count_end) $source = str_ireplace( "[noindex]", "<noindex>", str_ireplace( "[/noindex]", "</noindex>", $source ) );


2. Открыть engine/inc/include/insert.tag.php

Найти:
Code
<div class="editor_button" onclick="tag_email()"><img title="$lang[bb_t_m]" src="engine/skins/bbcodes/images/email.gif" width="23" height="25" border="0"></div>
<div class="editor_button"><img src="engine/skins/bbcodes/images/brkspace.gif" width="5" height="25" border="0"></div>


Добавить ниже:
Code
<div class="editor_button" onclick="simpletag('noindex')" id="b_noindex" ><img title="$lang[bb_t_noindex]" src="engine/skins/bbcodes/images/noindex.png" width="23" height="25" border="0"></div>


Также добавите в engine/language/ website.lng и adminpanel.lng:
Code
'bb_t_noindex' => "Запретить индексацию элемента",


Картинка noindex.png:



Тег Noindex для DLE 9.6 by HatcHeeS - Хаки для dle - Каталог файлов - Все для uCoz, DLE, Joomla, скрипты для uCoz

Категория: Хаки для dle Просмотров: 914