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
#!/bin/bash | |
# MySQL root password | |
ROOTPASS="password" | |
TIMEZONE="Europe/Moscow" | |
MYSQLPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
SFTPPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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
#!/bin/bash | |
echo "Enter username" | |
read USERNAME | |
############## | |
echo "Updating MODx" | |
cd /var/www/$USERNAME/www/ |
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 | |
// convert http://webi.ru/webi_articles/big_xml.html to class | |
class webi_xml | |
{ | |
var $webi_depth; // счетчик, для отслеживания глубины вложенности | |
var $this->webi_tag_open; // будет содержать массив открытых в данный момент тегов | |
var $this->webi_data_temp; // этот массив будет содержать данные одного тега |
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 'OnManagerPageInit': | |
$JS = <<<JS | |
<script type="text/javascript"> | |
Ext.onReady(function(){ | |
// Get a tree | |
var tree = Ext.getCmp('modx-resource-tree'); |
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 | |
// provider id => array of packages | |
$listPackagesToInstall = array( | |
1 => array( // standart modx provider | |
'sdStore' | |
, 'translit' | |
, 'SanitizeUpload' | |
, 'TinyMCE' | |
, 'FormIt' |
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 | |
$siteName = $modx->getOption('siteName', $scriptProperties, $modx->getOption('site_name')); // Имя сайта | |
$companyName = $modx->getOption('companyName', $scriptProperties, $modx->getOption('site_name')); // Компания | |
$bid = $modx->getOption('bid', $scriptProperties, 10); // Цена за клик | |
$siteUrl = $modx->makeUrl($modx->getOption('site_start'), '', '', 'full'); // Ссылка на главную страницу сайта | |
$descTpl = strip_tags($modx->getOption('descTpl', $scriptProperties, '[[+description]]')); // Шаблон для описания товара, без html | |
$paramCurrency = $modx->getOption('paramCurrency', $scriptProperties, 'RUR'); // Валюта | |
$paramDelivery = $modx->getOption('paramDelivery', $scriptProperties, true); // Доставка, по умолчанию - да. Можно указать имя параметра. | |
////////////////////////////////////////////////////////////////////////////// |
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(!class_exists('GridTVRender')) { | |
class GridTVRender extends modTemplateVarInputRender { | |
public function getTemplate() { | |
return $this->modx->getOption('core_path').'components/gridtv/tv/input/tpl/gridtv.tpl'; | |
} | |
public function process($value,array $params = array()) { | |
} | |
} | |
} |