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
Устанавливаем Docker | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' | |
sudo apt-get update | |
sudo apt-get install -y docker-engine | |
sudo usermod -aG docker $(whoami) | |
Перелогиниваемся. | |
----------------------------------------------------------------------------------- | |
Устанавливаем docker-compose: |
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
{set $properties['tpl'] = $_modx->getPlaceholder('template.tpl')} | |
{if empty($properties['tpl'])} | |
{set $properties['tpl'] = "default"} | |
{/if} | |
{include "file:templates/tpl/{$properties['tpl']}.tpl"} |
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 | |
//mgr events | |
if($modx->context->key == "mgr"){ | |
switch($modx->event->name){ | |
case "OnBeforeCacheUpdate": | |
if (!$obj = $modx->getObject('modSystemSetting', array('key' => 'site_file_version'))) { | |
$obj = $modx->newObject('modSystemSetting'); | |
$obj->fromArray(array( | |
'key' => 'site_file_version', | |
'xtype' => 'textfield', |
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
data_directory: _data/ | |
backup_directory: _backup/ | |
data: | |
contexts: | |
class: modContext | |
primary: key | |
context_settings: | |
class: modContextSetting | |
primary: | |
- context_key |
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 |
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
//Плагин | |
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
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
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
phpthumb_allow_src_above_docroot = 1; | |
core/model/phpthumb/phpthumb.class.php | |
var $config_allow_src_above_docroot = true; |
OlderNewer