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 | |
$output = array(); | |
$criteria = array( | |
'parent' => 10, //в данной строке число 10 нужно изменить на id родителя | |
'deleted' => false, | |
'published' => true, | |
); | |
echo $count = $modx->getCount('modResource', $criteria); |
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
[[!pdoResources? | |
&parents=`0` | |
&limit=`0` | |
&loadModels=`sitestatistics` | |
&tpl=`@INLINE [[+id]]. [[+pagetitle]] - [[+views]]` | |
&leftJoin=`{ | |
"Statistics": { | |
"class": "PageStatistics", | |
"on": "modResource.id = Statistics.rid" | |
} |
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: /manager/ | |
Disallow: /assets/components/ | |
Disallow: /core/ | |
Disallow: /mgr/ | |
Disallow: /connectors/ | |
Disallow: /index.php | |
Disallow: *? | |
Host: site.ru | |
Sitemap: site.ru/sitemap.xml |
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: /manager/ | |
Disallow: /assets/components/ | |
Disallow: /core/ | |
Disallow: /mgr/ | |
Disallow: /connectors/ | |
Disallow: /index.php | |
Disallow: /*? | |
User-agent: Baiduspider |
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 | |
//разбивка по столбцам при импорте и экспорте (content|tv|category) | |
$cf_config['content_row'] = array( | |
array('Контакты',array(25,'tv')), | |
array('Категория',array(4,'category')),//3 - ID шаблона категории | |
array('Метка',array(19,'tv')), | |
array('Титл',array('pagetitle','content')), | |
array('Заголовок',array('longtitle','content')), | |
array('Текст',array(32,'tv')), |
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
#!/bin/bash | |
ROOTPASS='password' | |
echo "Enter username to delete:" | |
read USERNAME | |
mysql -uroot --password=$ROOTPASS -e "DROP USER $USERNAME@localhost" | |
mysql -uroot --password=$ROOTPASS -e "DROP DATABASE $USERNAME" | |
rm -f /etc/nginx/sites-enabled/$USERNAME.conf |
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
#!/bin/bash | |
echo "Enter username" | |
read USERNAME | |
############## | |
echo "Updating MODx" | |
cd /var/www/$USERNAME/www/ |
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
#!/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` | |
PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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
#!/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` | |
PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |
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
[[*prib:subtract=`[[*netto]]`]] |
NewerOlder