Модуль dle представляет собой скрипт парсера музыки для музыкальных порталов, парсит информацию о исполнителе с интернет-портала LAST fm. Проверял 9.6 dle
Примеры использования тега band:
[band]Bucovina[/band]
[band=Bucovina]Ваш текст[/band]
[band]Soko Friedhof, Cinderella Effect, 32Crash, Bucovina, Die Antwoord[/band]
Установка:
1 - В файле main.tpl (вашего шаблона):
добавляем выше"":
<!-- DLE Band Inform --><link media="screen" href="/templates/Default/edBandInform/edStyle.css" type="text/css" rel="stylesheet" /><script type="text/javascript" src="/templates/Default/edBandInform/jquery.qtip-1.0.0-rc3.min.js"></script>
2) В файле /engine/classes/parse.class.php:
находим:
$source = preg_replace( "#\[(left|right|center)\](.+?)\[/\\1\]#is", "<div style=\"text-align:\\1;\">\\2</div>", $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( "#<!--dle_ol_(.+?)-->(.+?)<!--/dle_ol-->#i", "[ol=1][*]", $txt );
добавляем ниже:
// ED BAND-INFORM V.1// http://e-div.com/blog/dle-band-inform.html$txt = preg_replace( "#<!--band_begin-->(.+?)>(.+?)</abbr><!--band_end-->#is", '[band]\\2[/band]', $txt );$txt = preg_replace( "#<!--band_t_begin-->(.+?)data-band=\"(.+?)\">(.+?)</abbr><!--band_t_end-->#is", '[band=\\2]\\3[/band]', $txt );
далее, находим:
function clear_url($url) {
добавляем выше:
// ED BAND-INFORM V.1// http://e-div.com/blog/dle-band-inform.htmlfunction build_band($band, $text = "") { if( $text != "" ) { $text = trim( $text ); $text = stripslashes( $text ); $text = str_replace( "&amp;", "&", $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( "&amp;", "&", $band ); $band = preg_replace( "/javascript:/i", "javascript: ", $band ); $allbands[] = "<!--band_begin--><abbr title=\"Информация о " . $band . "\" class=\"edBand\" data-band=\"" . $band . "\">" . $band . "</abbr><!--band_end-->"; } return implode(", ", $allbands); } else { $band = trim( $band ); $band = stripslashes( $band ); $band = str_replace( "&amp;", "&", $band ); $band = preg_replace( "/javascript:/i", "javascript: ", $band ); if( $text != "" ) return "<!--band_t_begin--><abbr title=\"Информация о " . $band . "\" class=\"edBand\" data-band=\"" . $band . "\">" . $text . "</abbr><!--band_t_end-->"; else return "<!--band_begin--><abbr title=\"Информация о " . $band . "\" class=\"edBand\" data-band=\"" . $band . "\">" . $band . "</abbr><!--band_end-->"; } }
3) В файлах:
/engine/modules/bbcode.php,
/engine/ajax/bbcode.php,
/engine/inc/include/inserttag.php:
находим:
<div class="editor_button" onclick="tag_typograf(); return false;"><img title="$lang[bb_t_t]" src="/templates/Default/bbcodes/typograf.gif" width="23" height="25" border="0" alt=""></div>
добавляем ниже:
<div id="b_band" class="editor_button" onclick="simpletag('band')"><img title="Вставка группы" src="engine/skins/bbcodes/images/band.gif" width="23" height="25" border="0" alt="" /></div>
DLE Модуль Band-Inform-v.1 парсер музыки для музыкальных порталов
«Автор:» Elegant Division
Страница модуля: e-div com
ED: Помогите написать нормальное описание модулю!) Заранее спасибо!
Порекомендуем модуль для dle скачать Band-Inform-v.1 парсер музыки для музыкальных порталов