Skip to content

Instantly share code, notes, and snippets.

Avatar

mnoskov

  • Russia, Perm
View GitHub Profile
@mnoskov
mnoskov / plugin.php
Created Apr 2, 2020
PageBuilder Content Replace
View plugin.php
$document = $modx->getDocument($id);
if ($document['template'] == 6) {
$content = $modx->runSnippet('PageBuilder', [
'docid' => $id,
'container' => 'page',
'placement' => 'tv',
'tv' => '11',
]);
@mnoskov
mnoskov / snippet.php
Created Jul 2, 2019
Bitrix24 integration
View snippet.php
//<?php
/**
* Bitrix24
*
* Интеграция с Битрикс24 - создание лидов
*
* @category snippet
* @version 0.1
* @internal @properties &url=URL;text; &user_id=Assigned user ID;text;
* @internal @installset sample
@mnoskov
mnoskov / UploadSeparator.plugin.php
Created Dec 18, 2018
Separate upload folders for each user group in Evolution CMS
View UploadSeparator.plugin.php
//<?php
/**
* UploadSeparator
*
* Separate upload folders for each user group
*
* @category plugin
* @version 0.1.0
* @author kassio
* @internal @properties &folders=Groups to folders relation;text;1==44w9mFQp||2==jG7h8-Mv &common_folder=Name of the common folder;text;common
@mnoskov
mnoskov / insales_sync.js
Last active Dec 7, 2018
VK Dynamic Retargeting INSALES
View insales_sync.js
// Просмотр товара:
// Добавить в шаблон "product.liquid" код
<script>
$(window).load(function() {
var prices = [<Список идентификаторов прайс-листов>];
for (var i = 0; i < prices.length; i++) {
VK.Retargeting.ProductEvent(prices[i], 'view_product', {
products: [
View gist:65b0a033b750558d4e89251d79f3116d
RewriteCond %{HTTP:X-HTTPS} !1
RewriteCond %{HTTP_HOST} ^(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTP_HOST} ^(.*)$
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^(.*)$
@mnoskov
mnoskov / .htaccess
Last active Mar 3, 2020
Запись всех POST-запросов к сайту
View .htaccess
php_value open_basedir "/path:/tmp"
php_value mail.add_x_header 1
php_value mail.log /path/mail.log
php_value auto_prepend_file /path/postlogger.php
You can’t perform that action at this time.