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 // v1.0.2 | |
$date = date($options,!empty($input) ? $input : time()); | |
$months_arr = array( | |
'January' => array('Январь', 'января'), | |
'February' => array('Февраль', 'февраля'), | |
'March' => array('Март', 'марта'), | |
'April' => array('Апрель', 'апреля'), | |
'May' => array('Май', 'мая'), | |
'June' => array('Июнь', 'июня'), |
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 | |
// v.1.0.1 | |
class modSiteWebGetmenuProcessor extends modProcessor{ | |
public $classKey = 'modResource'; | |
protected $activeIDs = array(); // ID of active parents | |
public function initialize(){ |
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
alertify.set('notifier','position', 'top-right'); | |
let CONNECTOR_URL = '/assets/components/modxsite/connectors/connector.php'; | |
var isRequest = false; | |
$(document).on('click','[data-action] [type=submit]',function(e){ | |
e.preventDefault(); | |
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 | |
class modWebFormsIndexProcessor extends modProcessor{ | |
protected $config = array( | |
'uploadValidExts' => 'txt,jpg,png,doc,docx,xls,xlsx,pdf,rtf', | |
'uploadMaxSize' => 5242880, | |
'uploadFolder' => 'upload/', | |
); | |
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
Object.prototype.toPH = function () { | |
if (typeof this.ns === 'undefined') { | |
return; | |
} | |
// обходим свойства | |
for (let key in this.data) { | |
let prop = this.data[key]; | |
let _this = this; |
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 | |
// v.1.0.2 | |
// вывод тв полей из определенного раздела | |
$category = $modx->getOption('category', $scriptProperties, null); | |
$resourceId = $modx->getOption('resourceId', $scriptProperties, $modx->resource->id); | |
$limit = $modx->getOption('limit', $scriptProperties, 0); | |
$tvs = $modx->getOption('tvs', $scriptProperties, null); | |
$tpl = $modx->getOption('tpl', $scriptProperties, ''); |
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 | |
$values = $hook->getValues(); | |
if (empty($values['captcha'])) | |
{ | |
$hook->addError('captcha', 'Введите символы с картинки'); | |
return false; | |
} | |
// modCaptcha Extra required. http://modx.com/extras/package/modcaptcha |
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 | |
// v1.0.1 | |
$file = $modx->getOption('input', $scriptProperties, false); | |
$options = $modx->getOption('options', $scriptProperties, false); | |
if ($file) | |
{ | |
$full_path = MODX_BASE_PATH . '/' . ltrim($file, '/'); | |
list($key, $dop) = explode(':', $options); | |
switch ($key) |