This file contains 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
<!-- create TV call "tags" with type "auto-tag" or similar from list of types and set to template. | |
Input tags into article through decimal(fo example article, blog, summer) and press SAVE. | |
Create template for search by tags and input code below:--> | |
[[!getResourcesTag? | |
&element=`pdoResources` | |
&elementClass=`modSnippet` | |
&grSnippet=`pdoPage` | |
&tpl=`postTpl` | |
&hideContainers=`1` |
This file contains 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 | |
$year = date("Y"); | |
if($year == $start) | |
{ return $year; | |
} else { | |
return ''.$start.' – '.$year.''; | |
} |
This file contains 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
<center> | |
Курс USD: [[!getCurRate?&cur_output=`rubinusd`]]<br> | |
Курс EUR: [[!getCurRate?&cur_output=`rubineur`]] | |
</center> |
This file contains 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 (isset($options) && $options) { | |
$width = $height = $options; | |
} | |
if (!isset($bg) || !$bg) { | |
$bg = '#fff'; | |
} | |
if (substr($input,0,1) == '/') $input = substr($input,1); | |
$path_info = pathinfo($input); | |
$cropedFile = 'assets/images/croped/'.$width.'/'; |
This file contains 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 ($modx->event->name == "OnDocFormSave") { | |
if ($resource->class_key != 'Ticket') return; | |
$introtext = $resource->get('introtext'); | |
$generateIntrotext = $resource->getIntroText($resource->get('content'), false); | |
if (empty($resource->getProperty('disable_jevix'))) { | |
$generateIntrotext = $resource->Jevix($generateIntrotext); | |
} | |
if ($introtext == $generateIntrotext) { | |
$resource->set('introtext', ''); |
This file contains 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
<div class="modal fade" id="successModal" tabindex="-1" role="dialog" aria-labelledby="successModalLabel"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<h4 class="modal-title" id="successModalLabel">Спасибо</h4> | |
</div> | |
<div class="modal-body"> | |
</div> |
This file contains 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
[[pdoResources? | |
&parents=`0` | |
&select=`{ | |
"modResource":"id, pagetitle", | |
"Children":"COUNT(Children.id) as count" | |
}` | |
&leftJoin=`{ | |
"Children":{"class":"modResource", "on":"modResource.id = Children.parent"} | |
}` | |
&sortby=`{"id":"ASC"}` |
This file contains 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 | |
switch ($modx->event->name) { | |
case 'OnWebPagePrerender': | |
$modx->resource->_output = str_replace('"index/', '"', $modx->resource->_output); | |
break; | |
case 'OnPageNotFound': | |
$uri = explode('?', $_SERVER['REQUEST_URI']); | |
if ($res = $modx->findResource('index' . $uri[0])) { | |
$modx->sendForward($res); | |
} |
This file contains 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
<div id="pdopage"> | |
<div class="rows"> | |
[[!pdoPage? | |
&parents=`0` | |
&level=`0` | |
&limit=`6` | |
&where=`{"modResource.parent:!=":0}` | |
&sortby=`{"p_menuindex":"ASC", "publishedon":"DESC"}` | |
&ajaxMode=`default` | |
&leftJoin=`{ |
This file contains 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
<div class="news-items" id="newsItems"> | |
[[!+news-nav]] | |
<div class="rows" style="overflow: hidden;"> | |
[[!pdoPage? | |
&parents=`18` | |
&tpl=`newItemTpl` | |
&showHidden=`1` | |
&includeTVs=`image` | |
&limit=`4` | |
&sortby=`{"publishedon":"ASC"}` |