Краткая информация о модуле (хаке)
              Автор:  D0Gmatist
            
            
        
            
            
              Версия DLE: 
              10.X
            
            
            
            
            
              Контакты: 
              Skype - D0Gmatist
            
            
        
            
          Хак позволяет автоматически создавать [Ключевые слова для облака тегов:] из ТИТЛЕ  и краткого содержания статьи
Установка
Открыть файл \engine\inc\include\functions.inc.php
В самый конец перед
Открыть файлы
\engine\inc\addnews.php
и
\engine\inc\addnews.php
Найти
      Установка
Открыть файл \engine\inc\include\functions.inc.php
В самый конец перед
?>дописать
function tagsInTitleShort( $x ) {
    $quotesT = array ("\x22", "\x60", "\t", "\n", "\r", ",", ".", "/", "¬", "#", ";", ":", "@", "~", "{", "}", "[", "]",  "{", "}", "=", "-", "+", ")", "(", "*", "^", "%", "$", "<", ">", "?", "!", '"');
    $x = preg_replace( "#\[hide\](.+?)\[/hide\]#is", "", $x );
    $x = preg_replace( "'\[attachment=(.*?)\]'si", "", $x );
    $x = preg_replace( "'\[page=(.*?)\](.*?)\[/page\]'si", "", $x );
    $x = preg_replace( "'\[url=(.*?)\](.*?)\[/url\]'si", "", $x );
    $x = str_replace( "{ PAGEBREAK }", "", $x ); // { PAGEBREAK } убрать пробелы
    $x = str_replace( " ", " ", $x );
    $x = str_replace( '<br />', ' ', $x );
    $x = strip_tags( $x );
    $x = preg_replace( "#&(.+?);#", "", $x );
    $vTiSh = trim( str_replace( $quotesT, " ", $x ) );
    $tTExpA = array_unique ( explode( " ", $vTiSh ) );
    shuffle($tTExpA);
    $iT = "";
    while (list(, $tTExpAx) = each($tTExpA)) {
        if ( preg_match( "/[a-zA-Zа-яА-Я0-9]{4}/", $tTExpAx ) ) $iT .= " " . $tTExpAx;
    }
    $tTExpB = explode( " ", trim( $iT ) );
    $mT = count( $tTExpB );
    if ( $mT > 10 ) $mT = 10;
    $mTD = $mT - 1;
    $resultTag = "";
    for ( $i = 0; $i < $mT; $i++ ) {
        if ( $mTD != $i ) $resultTag .= $tTExpB[$i] . ",";
        else  $resultTag .= $tTExpB[$i];
    }
    return $resultTag;
}где if ( $mT > 10 ) $mT =10; это число максимум теговОткрыть файлы
\engine\inc\addnews.php
и
\engine\inc\addnews.php
Найти
if( @preg_match( "/[\||\<|\>|\"|\!|\?|\$|\@|\/|\\\|\&\~\*\+]/", $_POST['tags'] ) ) $_POST['tags'] = "";НИЖЕ дописать
else $_POST['tags'] = @$db->safesql( htmlspecialchars( strip_tags( stripslashes( trim( $_POST['tags'] ) ) ), ENT_COMPAT, $config['charset'] ) );
// D0Gmatist
$_POST['tags'] = tagsInTitleShort( $title . " " . $short_story);
// D0Gmatist

 
				 
				 
				