DataLife Engine > Версия для печати > DLE Band Inform

[band]Bucovina[/band][band=Bucovina]Ваш текст[/band]

[band]Soko Friedhof, Cinderella Effect, 32Crash, Bucovina, Die Antwoord[/band]

добавляем выше:



находим:

$source = preg_replace( "#[(left|right|center)](.+?)[/1]#is", "2", $source );

добавляем ниже:

// ED BAND-INFORM V.1 
// http://e-div.com/blog/dle-band-inform.html
$count_start = substr_count ($source, "[band");
$count_end = substr_count ($source, "[/band]");
if ($count_start AND $count_start == $count_end) {
    $source = str_ireplace( "[band=]", "[band]", $source );
    $source = preg_replace( "#[band](.+?)[/band]#ie", "$this->build_band('1','')", $source );
    $source = preg_replace( "#[band=(.+?)](.+?)[/band]#ie", "$this->build_band('1','2')", $source );
}

далее, находим:

$txt = preg_replace( "#(.+?)#i", "[ol=1]n[*]", $txt );

добавляем ниже:

// ED BAND-INFORM V.1 
// http://e-div.com/blog/dle-band-inform.html
$txt = preg_replace( "#(.+?)>(.+?)#is", '[band]2[/band]', $txt );
$txt = preg_replace( "#(.+?)data-band="(.+?)">(.+?)#is", '[band=2]3[/band]', $txt );

далее, находим:

function clear_url($url) {

добавляем выше:

// ED BAND-INFORM V.1 
// http://e-div.com/blog/dle-band-inform.html
function build_band($band, $text = "") {

    if( $text != "" ) {
        $text = trim( $text );
        $text = stripslashes( $text );
        $text = str_replace( "&", "&", $text );
        $text = preg_replace( "/javascript:/i", "javascript: ", $text );
    }

    $bands = explode(",", $band);
    if( count( $bands ) AND $text == "" ) {
        $allbands = array();
        foreach( $bands as $band ){
            $band = trim( $band );
            $band = stripslashes( $band );
            $band = str_replace( "&", "&", $band );
            $band = preg_replace( "/javascript:/i", "javascript: ", $band );
            
            $allbands[] = "" . $band . "";
        }
        return implode(", ", $allbands);
        
    } else {
        $band = trim( $band );
        $band = stripslashes( $band );
        $band = str_replace( "&", "&", $band );
        $band = preg_replace( "/javascript:/i", "javascript: ", $band );
        
        if( $text != "" ) return "" . $text . "";
        else  return "" . $band . "";
    }
    
}

находим:

добавляем ниже:

Залить файлы из архива на сервер