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
// Просмотр товара: | |
// Добавить в шаблон "product.liquid" код | |
<script> | |
$(window).load(function() { | |
var prices = [<Список идентификаторов прайс-листов>]; | |
for (var i = 0; i < prices.length; i++) { | |
VK.Retargeting.ProductEvent(prices[i], 'view_product', { | |
products: [ |
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 | |
namespace Database\Seeders; | |
use EvolutionCMS\Models\{SiteTemplate, SiteTmplvarTemplate, SiteTmplvar}; | |
use Illuminate\Database\Seeder; | |
class CreateTVSeeder extends Seeder | |
{ | |
protected function getTemplateAliasesToAssign() |
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 | |
#%$ set -e # Прерывание работы скрипта в случае ошибки | |
REPOSITORY=https://github.com/<username>/<project> | |
BRANCH=master | |
WORK_PATH=/path/to/this/script | |
PROJECT_PATH=/path/to/project/base/path | |
TEMP_DIR_NAME=`date +%Y-%m-%d_%H:%M:%S` | |
PHP_BIN=/opt/php74/bin/php |
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
#redirect http to https | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteCond %{HTTP_HOST} ^(.*)$ | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
# without www all domains | |
RewriteCond %{HTTP_HOST} . | |
RewriteCond %{HTTP_HOST} !^domain\.ru$ [NC] | |
RewriteRule ^(.*)$ https://domain.ru/$1 [R=301,L] |
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 ($modx->event->name == 'OnDocFormSave') { | |
$document = $modx->getDocument($id); | |
if ($document['template'] == 6) { | |
$content = $modx->runSnippet('PageBuilder', [ | |
'docid' => $id, | |
'container' => 'page', | |
'placement' => 'tv', | |
'tv' => '11', |
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
!function() { | |
var wrap = document.querySelector('.tdb-autoload-wrap'), | |
base = location.href; | |
if (wrap) { | |
window.addEventListener('scroll', function(e) { | |
var wndTop = window.scrollY, | |
wndBottom = wndTop + window.innerHeight, | |
wndHeight = window.innerHeight, | |
currentArticle, |
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 | |
# basic script, before use need change logins,passwords in this script | |
# put this script in project folder and run: sh evo.sh | |
#variables | |
EVO_VERSION="3.x-dev" | |
INSTALL_TYPE=1 | |
DATABASE_TYPE="mysql" | |
DATABASE_SERVER="localhost" | |
DATABASE_NAME="DB" |
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 | |
class CFormCustomValidatorPhone | |
{ | |
public function GetDescription() | |
{ | |
return [ | |
'NAME' => 'custom_phone', // идентификатор | |
'DESCRIPTION' => 'Телефон', // наименование | |
'TYPES' => ['text'], // типы полей |
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 | |
return [ | |
'title' => 'Слайд', | |
'show_in_templates' => 1, | |
'container' => 'main_cycle', | |
'templates' => [ |
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('ZipArchive')) { | |
echo 'ZipArchive not available!'; | |
} | |
ini_set('memory_limit', -1); | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); |
NewerOlder