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
&dateSource=`editedon` &dateFormat=`%d.%m.%Y` | |
<div class="news"> | |
[+date+] | [+longtitle+] | |
<p>[+introtext+]</p> | |
</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
[!convertDate? &MyDate=`[*createdon*]`!] | |
<?php | |
$MyDate= (isset($MyDate)) ? $MyDate: $modx -> documentObject['MyDate']; | |
$type= (isset($type)) ? $type: $modx -> documentObject['type']; | |
$monthes = array('','января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря'); | |
$day = date("j" ,$MyDate); | |
$month = $monthes[date("n",$MyDate)]; | |
$year = date("Y",$MyDate); | |
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
id = [*parent*] // в документе MODx | |
[*id:parent=`pagetitle`*] // в документе MODx | |
[*parent:parent=`id`*] // в документе MODx | |
[*parent:parent=`id`:parent=`pagetitle`*] // в документе MODx |
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
/**********Как обрезать длину строки?******************/ | |
[!truncate? &text=[*pagetitle*] &len=200!] // в документе MODx | |
<?php | |
$lenf = $len; | |
$order = array("\r\n", "\n", "\r"); | |
$replace = '<br />'; | |
$what = str_replace($order, $replace, $text); | |
if (strlen($what) > $lenf) { |
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
/***********************Как вывести количество документов в папке?*********************/ | |
[[ChildCounter? &docid=`406` &depth=`2` &tpl=`15` &published=`0` &isfolder=`0`]] | |
&dicId - ID сканируемой папки | |
&depth - глубина сканирования | |
&isfolder - Если 1 - вернёт количество папок, если 0 - количество документов НЕ папок. Значения 0 или 1. По умолчанию 0. | |
&published - Если 0 - вернёт количество неопубликованных документов, если 1 - количество опубликованных документов. Значения 0 или 1. По умолчанию 1. | |
&tpl - если указан, то возвращает количество документов с шаблоном id которого равен &tpl |
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
/***********************создаем в админке вкладку (с помощью чанка mm_rules) *********************/ | |
mm_createTab('Название вкладки', 'alias вкладки', '', 'id шаблона', '', ''); | |
mm_moveFieldsToTab('alias TV', 'alias вкладки', '', 'id шаблона'); |
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
/**************************************** Условия *********************************/ | |
[+phx:if=`[[Level]]`:is=`4`:then=` | |
<section class="">[[Wayfinder? &startId=`[*id:parent=`id`*]` &level=`1` &outerTpl=`cat_outerTpl` &rowTpl=`cat_rowTpl`]]</section> | |
`+] | |
[+phx:if=`[[UltimateParent? &topLevel=`1`]]`:is=`269`:then=`<a class="item__button" href="[~343~]" title=""><span>Find a store?</span></a>`+] | |
[+phx:if=`[[UltimateParent? &topLevel=`1`]]`:isnot=`419`:and:isnot=`269`:then=`<a class="item__button" href="[~5~]" title=""><span>Где заказать?</span></a>`+] |
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
NotiferNewUser | |
Системные события OnWebSaveUser | |
Уведомление администратора о новой регистрации на сайте. | |
/** | |
* NotiferNewUser | |
* |
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
/*** | |
number - исходное число | |
decimals - количество знаков после разделителя | |
dec_point - символ разделителя | |
thousands_sep - разделитель тысячных | |
***/ | |
function number_format(number, decimals, dec_point, thousands_sep) { | |
number = (number + '').replace(/[^0-9+\-Ee.]/g, ''); | |
var n = !isFinite(+number) ? 0 : +number, | |
prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), |
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
User-agent: * | |
Disallow: /assets/cache/ | |
Disallow: /assets/docs/ | |
Disallow: /assets/export/ | |
Disallow: /assets/import/ | |
Disallow: /assets/modules/ | |
Disallow: /assets/plugins/ | |
Disallow: /assets/snippets/ | |
Disallow: /install/ | |
Disallow: /manager/ |