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 | |
/** | |
* Поместить в корень каталога, в котором необходимо произвести рекурсивный поиск. | |
* | |
* find_it.php?str=find_string | |
*/ | |
class FindIt | |
{ |
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 | |
/* | |
* Плагин для MODX Revolution, предназначен для переключения контекстов в зависимости от домена. | |
* Для работы плагина необходимо в каждом контексте-домене создать настройки: | |
* http_host - domain.ru | |
* site_name - Название сайта | |
* site_start - id ресурса, который является главной страницей | |
* site_url - http://domain.ru/ | |
*/ |
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 | |
$chunk = 'tpl.msdfcMsg'; | |
$discounts = array( | |
'100000' => '10%', | |
'150000' => '15%', | |
'200000' => '20%', | |
); | |
krsort($discounts); | |
reset($discounts); | |
$actionKey = 'msdfc_action'; |
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
{"packages":[{"name":"modx.com","service_url":"http:\/\/rest.modx.com\/extras\/","username":"","api_key":"","packages":{"babel":false,"collections":true,"console":true,"formit":true}},{"name":"MS","service_url":"https:\/\/modstore.pro\/extras\/","username":"","api_key":"","packages":{"ace":true,"ajaxform":true,"controlerrorlog":true,"dateago":true,"jevix":true,"minifyx":true,"minishop2":false,"ms2gallerybabelcopying":false,"phpthumbon":true,"pdotools":true,"theme.bootstrap":true,"tickets":false,"typomce":false,"videogallery":true,"ytranslit":true}},{"type":"transport","path":"\/root\/daemons\/py\/hostpanel_daemon\/script\/php\/packages\/","packages":{"ms2gallery":{"version":"1.5.3-pl","install":true},"msearch2":{"version":"1.5.5-pl","install":false}}}],"settings":{"ace":{"ace.soft_tabs":false,"ace.theme":"chrome","ace.word_wrap":true},"core":{"emailsender":"[email protected]","publish_default":true,"richtext_default":false,"cache_resource":false,"friendly_alias_translit":"russian","friendly_urls":true,"use_alias_p |
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 | |
// Подключаем | |
define('MODX_API_MODE', true); | |
$i=0; | |
$current_dir = dirname(__FILE__) .'/'; | |
$index_php = $current_dir .'index.php'; | |
while (!file_exists($index_php) && $i < 9) | |
{ | |
$current_dir = dirname(dirname($index_php)) .'/'; | |
$index_php = $current_dir .'index.php'; |
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 | |
/* | |
Скрипт надо запускать от юзера - владельца сайта, чтобы созданные файлы пакетов не принадлежали юзеру root | |
$ sudo -u USERNAME php /var/www/USERNAME/packages.php /var/www/USERNAME/www/ | |
Или от root, а после выставить владельца: | |
$ php /root/scripts/modx/packages.php /var/www/USERNAME/www/ && /var/www/USERNAME/chmod | |
Чтобы запустить из веба, просто положите скрипт в корень или куда-нибудь глубже и вызовите по HTTP | |
*/ |
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 | |
class videoThumb { | |
var $config; | |
function __construct($config = array()) { | |
$this->config = array_merge(array( | |
'imagesPath' => dirname(__FILE__) . '/images/' | |
,'imagesUrl' => '/images/' |