This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
/** | |
* Простой js-шаблонизатор | |
* @url https://github.com/krasimir/absurd/blob/master/lib/processors/html/helpers/TemplateEngine.js | |
* Пример работы: http://codepen.io/pafnuty/full/ogqpaV/ | |
* | |
* Установка шаблона: | |
* var template = | |
'<ul>' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.frameCacheVars !== undefined) { | |
BX.addCustomEvent("onFrameDataReceived", function (json) { | |
// go-go-go | |
}); | |
} | |
else { | |
BX.ready(function () { | |
// go-go-go | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
============================================================================= | |
BlockPro 3 - Модуль для вывода блоков с новостями на страницах сайта DLE (тестировался на 9.6-10.2) | |
============================================================================= | |
Автор модуля: ПафНутиЙ | |
URL: http://blockpro.ru/ | |
ICQ: 817233 | |
email: [email protected] | |
----------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.on('click', '.btn-quont', function () { | |
// MarkUp: | |
// <span class="btn-quont">-</span> | |
// <input class="quont-text" type="text" value="1"> | |
// <span class="btn-quont">+</span> | |
var $button = $(this), | |
$input = $button.parent().find('.quont-text'), | |
oldValue = $input.val(), | |
newVal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document) | |
.on('click', '[data-afs-id]', function () { | |
var $this = $(this), | |
$data = $this.data(); | |
$.ajax({ | |
url: dle_root + 'engine/ajax/full-story.php', | |
type: 'GET', | |
dataType: 'html', | |
data: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document) | |
.on('click', '[data-afs-id]', function () { | |
var $this = $(this), | |
$data = $this.data(); | |
$.ajax({ | |
url: dle_root + 'engine/ajax/full-story.php', | |
type: 'GET', | |
dataType: 'html', | |
data: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Каталог организаций города Чебоксары</title> | |
<style> | |
html, body, #YMapsID { | |
width: 100%; | |
height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Этот код можно поместить в шаблон статическй страницы или в main.tpl или раскидать коды по соответсвующим типам файлов --> | |
<style> | |
#allPlacemarks { | |
margin-bottom: 20px; | |
height: 500px; | |
margin-top: 20px; | |
} | |
#allPlacemarks.loading {position: relative;} | |
#allPlacemarks.loading:after { | |
content: " "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{* Пример работы с условиями вывода по категориям *} | |
{* Пробегаем по массиву с новостями *} | |
{foreach $list as $key => $el} | |
{* Превращаем категорию новости в массив *} | |
{set $catIds = $el.category|split} | |
{* 8 - ID категории, которую требуется проверить *} | |
{if 8 in list $catIds} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Этот код можно поместить в шаблон статическй страницы --> | |
<style> | |
#allPlacemarks.loading {position: relative;} | |
#allPlacemarks.loading:after { | |
content: " "; | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; |