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
change laradock xdebug.ini | |
xdebug.remote_connect_back=1 | |
xdebug.remote_port=9000 | |
xdebug.idekey=PHPSTORM | |
xdebug.remote_autostart=1 | |
xdebug.remote_enable=1 | |
xdebug.cli_color=0 | |
xdebug.profiler_enable=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
this.value = sum(this.value); | |
function sum(str) { | |
str=str.trim().replace(/[^\d\.]+/gi,""); | |
var s=str.indexOf(".",str.indexOf(".")); | |
if(s>=0){ | |
str=str.substr(0,s+3); | |
var whole = str.substr(0,s); | |
var fractional = str.substr(s+1, s+3).replace(/[^\d]+/gi,""); | |
str = whole +'.'+ fractional; | |
} |
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 | |
switch ($modx->event->name) { | |
case 'OnFileManagerUpload': | |
$generator = $modx->newObject('modResource'); | |
$bases = $source->getBases($directory); | |
$fullPath = $bases['pathAbsolute'].ltrim($directory,'/'); | |
$directory = $source->fileHandler->make($fullPath); | |
foreach ($files as $file) { | |
$ext = @pathinfo($file['name'],PATHINFO_EXTENSION); | |
rename($directory->getPath().$file['name'], $directory->getPath() . |
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
Для переопределения параметров TinyMCE Rich Text Editor которые назначаются тегам нужно: | |
1. Создать файлик config.json в папке /assets/components/tinymcerte/js/mgr/extras/ | |
2. Прописать путь до этого файла в настройке tinymcerte.external_config | |
{assets_path}components/tinymcerte/js/mgr/extras/config.json | |
Например для замены align="left" и align="right" на соответствующие классы файл config.json должен содержать: | |
{ | |
"formats": { | |
"alignleft": { |
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
phpthumb_allow_src_above_docroot = 1; | |
core/model/phpthumb/phpthumb.class.php | |
var $config_allow_src_above_docroot = true; |
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
sudo apt-get update | |
sudo apt-get upgrade | |
Установка программ | |
sudo apt install apache2 mysql-server mysql-client vsftpd ssh mc git | |
Настройка php | |
Включаем php в виде модуля апачи: | |
sudo apt install php7.0 libapache2-mod-php7.0 | |
sudo a2enmod rewrite |
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
Plugin | |
____________________________ | |
<?php | |
if($modx->event->name != 'OnDocFormRender' || $resource->get('template')!= 1) return ''; | |
$modx->controller->addLastJavascript('/assets/components/myfields/js/mgr/resource/field.js'); | |
js | |
___________________________ | |
Ext.override(MODx.panel.Resource, { |
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
//Плагин | |
case "OnHandleRequest": | |
$alias = $_REQUEST['q']; | |
$exceptions = array('robots.txt', 'sitemap.xml'); | |
if (in_array($alias, $exceptions)) { | |
return; | |
} | |
/* Включить, если будут требовать сеошники | |
$pattern = array("«", "»", ";", "(", ")", "$", "№", ","); |
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
#---------CONFIGS----------# | |
config.core.php | |
config.inc.php | |
#---------CAHCE------------# | |
cache_image | |
.cache | |
.sass-cache | |
cache | |
!core/xpdo/cache/ |
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
User-agent: * | |
Disallow: / # Убрать эту строку на production | |
Disallow: /admin/ | |
Disallow: /assets/components/ | |
Disallow: /core/ | |
Disallow: /connect/ | |
Disallow: /index.php | |
Disallow: *? | |
Allow: .js | |
Allow: .css |
NewerOlder