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
/** мета заголовок (title): | |
В function.php | |
------------------------------------- */ | |
/** мета заголовок (title): | |
- Первый параметр функции это разделитель, второй название блога (если не указать берется из Настроек). | |
- Для меток и категорий указывается в настройках в описании (в настройках, по аналогии с пунком 6 Platinum SEO Pack, см. выше) так: [title=Заголовок] | |
- Для страниц или постов, если вы хотите чтобы заголовок страницы отличался от заголовка поста, то создайте произвольное поле title и впишите туда свое название | |
------------------------------------- */ | |
function kama_meta_title ($sep=" | ",$bloginfo_name=''){ |
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
В файл function.php | |
//вывести первый тег em | |
function catch_that_em() { | |
global $post, $posts; | |
$first_em = ''; | |
ob_start(); | |
ob_end_clean(); | |
$output = preg_match_all('#<[\s]*em[\s]*>([^<]*)<[\s]*/em[\s]*>#i', $post->post_content, $matches); | |
$first_em = $matches [1] [0]; | |
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
$(function() { | |
//MODx pdoResources Ajax Filter | |
//Filter Settings | |
var fadeSpeed = 200, // Fade Animation Speed | |
ajaxCountSelector = '.ajax-count', // CSS Selector of Items Counter | |
ajaxContainerSelector = '.ajax-container', // CSS Selector of Ajax Container | |
ajaxItemSelector = '.ajax-item', // CSS Selector of Ajax Item | |
ajaxFormSelector = '.ajax-form', // CSS Selector of Ajax Filter Form | |
ajaxFormButtonStart = '.ajax-start', // CSS Selector of Button Start Filtering |
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 | |
//Filter Fields Settings | |
$filter = array(); | |
//Radio, Select & Text Fields Type | |
if($_GET['floor']) { | |
$filter[] = 'floor='.$_GET['floor']; | |
} | |
//Two Text Fields From To | |
if($_GET['area_from']) { | |
$filter[] = 'area>='.$_GET['area_from']; |
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
<script type="text/javascript"> | |
jQuery(document).ready(function ($) { | |
function contentHeight(){ | |
$('.b-content__bg').css('min-height', ($(window).height()-261)+'px'); | |
} | |
contentHeight(); | |
$(window).resize(function () { | |
contentHeight(); | |
}); | |
}); |
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 | |
$today = date("Y-n-j"); | |
$tv = $modx->resource->getTVValue('event_name'); | |
$ret = '{"publishedon:>=":"'.strtotime("$today 00:00:00").'"}'; | |
return $ret; | |
------------------------------------------------------------------ | |
[[!getResources? | |
&showHidden=`1` | |
&tpl=`item-doing` |
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 | |
$tvid = 1; // id ТВ с датой | |
$date = date('Y-m-d'); // Сегодня | |
$q = $modx->newQuery('modResource'); | |
$q->leftJoin('modTemplateVarResource', 'TV', 'modResource.id = TV.contentid AND TV.tmplvarid = '.$tvid); | |
$q->select('modResource.id'); | |
$q->where('DATE(TV.value) = "'.$date.'"'); | |
if ($q->prepare() && $q->stmt->execute()) { |
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 | |
if (preg_match("#\/[a-z]{2}#", $_SERVER['REQUEST_URI'], $matches)){ | |
$lankey = trim($matches[0], '/'); | |
}else{ | |
$lankey = 'ru'; | |
} | |
if($modx->context->get('key') != "mgr") { |
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 | |
$post_content = ''; | |
$parenttwo = 29; | |
$id = $modx->resource->id; | |
if ($parenttwo > $id) | |
{ | |
echo $post_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
<!-- Вызов сниппета--> | |
[[ifgetresources]] | |
<!-- Вызов сниппета--> | |
<?php | |
$post_content = ''; | |
$parent = $modx->resource->id; | |
switch($parent){ |
NewerOlder