Skip to content

Instantly share code, notes, and snippets.

View ASDAFF's full-sized avatar
🏠
Working from home

ASDAFF ASDAFF

🏠
Working from home
View GitHub Profile
@ASDAFF
ASDAFF / MODx catalogFilter
Last active April 4, 2017 17:59
MODx catalogFilter
<?php
//Filter Fields Settings
$filter = array();
//Radio, Select & Text Fields Type
if($_GET['floor']) {
$filter[] = 'floor='.$_GET['floor'];
}
//Two Text Fields From To
@ASDAFF
ASDAFF / Пример вывода радиокнопок во фронтенд
Last active April 4, 2017 17:58
Пример вывода радиокнопок во фронтенд
<input name="floor" value="0" checked="" type="radio">
<input name="floor" value="1" type="radio">
<input name="floor" value="2" type="radio">
<input name="floor" value="3" type="radio">
@ASDAFF
ASDAFF / сниппет catalogFilter
Last active June 3, 2019 21:10
сниппет catalogFilter
[[!catalogFilter?
&tpl=`tplCatItem`
&limit=`3`
&parents=`5`
&fields=`image,area,floor,garage,price`]]
@ASDAFF
ASDAFF / Пример чанка tplCatItem
Last active April 4, 2017 17:56
Пример чанка tplCatItem
<div class="ajax-item">
<img src="[[+tv.image]]" alt="[[+pagetitle]]">
<h4>[[+pagetitle]]</h4>
<table>
<tr>
<td>Этаж</td>
<td>[[+tv.floor]]</td>
</tr>
[[+tv.area:isnot=``:then=`
<tr>
@ASDAFF
ASDAFF / Sort Fields
Last active April 4, 2017 15:17
Sort Fields
<!-- Sort Fields -->
<input name="sortby" value="pagetitle" type="hidden">
<input name="sortdir" value="asc" type="hidden">
<!-- Sort End -->
@ASDAFF
ASDAFF / hexagon-loader-pure-css.markdown
Created May 22, 2017 15:28
Hexagon Loader (Pure CSS)

Hexagon Loader (Pure CSS)

Decided to play around with Sass loops and see what kind of fun I could come up with. Just made a cool looking hexagon shaped loader. Don't forget to mess around with the SCSS settings!

A Pen by ASDAFF on CodePen.

License.

$('.order').click(function(){
var ide = $(this).parent().find('input:hidden').val();
$.ajax({
type: "POST",
data: 'action=ADD2BASKET&ajax_basket=Y&id='+ide,
url: '/',
success: function(data){
data = data.split('\'').join('\u0022');
var obj = JSON && JSON.parse(data) || $.parseJSON(data);
if (obj.STATUS == 'OK'){
@ASDAFF
ASDAFF / gist:6406cb9f52a7538b2666ed24376dcbcc
Created November 30, 2017 21:32 — forked from anonymous/gist:e54c8a2951d6e8c03f25db60646061de
Преобразование upd в модуль
<?php
//Полный путь к папке, в которой лежат "UPD" Последний слеш не нужен!
$dir = '/home/bitrix.dev/www/bitrix/your.upd.folder';
if ($handle = opendir($dir)) {
while (false !== ($entry = readdir($handle))) {
if($entry == "." || $entry == ".."){continue;}
$string = file_get_contents($dir."/".$entry);
@ASDAFF
ASDAFF / SublimeTextKey
Created March 12, 2018 13:04 — forked from Robbyzhaxx/SublimeTextKey
Sublime Text Licence Key
—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
@ASDAFF
ASDAFF / LICENCE SUBLIME TEXT
Created March 12, 2018 13:06 — forked from cprakashagr/LICENCE SUBLIME TEXT
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA