Skip to content

Instantly share code, notes, and snippets.

@Elvinz
Elvinz / index.html
Created October 26, 2023 17:07
Simple Responsive Table in CSS
<table>
<caption>Statement Summary</caption>
<thead>
<tr>
<th scope="col">Account</th>
<th scope="col">Due Date</th>
<th scope="col">Amount</th>
<th scope="col">Period</th>
</tr>
</thead>
@Elvinz
Elvinz / breadcrumbs-functions.php
Created September 12, 2023 03:09 — forked from tinotriste/breadcrumbs-functions.php
Wordpress: Breadcrumbs function
<?php
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
@Elvinz
Elvinz / bitrix.php
Created January 23, 2023 14:26 — forked from morozVA/bitrix.php
bitrix Передать переменные в шаблон Битрикс
Глобальная переменная
Чтобы сделать переменную доступную из любого места кода, можно использовать файл bitrix/.settings.php.
return array (
// …
'contacts' =&gt; array(
'value' =&gt; array(
'phone' =&gt; '111111111',
'email' =&gt; 'example@know-online.com',
),
),
@Elvinz
Elvinz / 1txt.txt
Created November 13, 2022 08:06 — forked from EscApp2/1txt.txt
bitrix 18.5 16.5 16.0 sale.order.ajax объединить свойства и регион в свойствах / bitrix 18.0 sale.order.ajax перенести свойства в деливери
file order_ajax.js
1)
editActiveRegionBlock: function(activeNodeMode){
//add first string in function
var node = activeNodeMode ? this.regionBlockNode : this.regionHiddenBlockNode,
regionContent, regionNode, regionNodeCol;
regionContent = node.querySelector('.bx-soa-section-content');
if (!regionContent)
@Elvinz
Elvinz / MySQL.php
Created August 17, 2022 06:22 — forked from shak18/MySQL.php
Simple PHP MYSQLi Class
<?php
class MySQL {
private $link = null;
private $info = array(
'last_query' => null,
'num_rows' => null,
'insert_id' => null
);
private $connection_info = array();
@Elvinz
Elvinz / cURL_query.php
Created August 16, 2022 14:56 — forked from jordi-pascual/cURL_query.php
cURL_query
<?php
function curl_getQuery($url,$fields)
{
$fields_string = "";
foreach ($fields as $key => $value) {
$fields_string .= $key . '=' . $value . '&';
}
rtrim($fields_string, '&');
<?php //<~ don't add me in - code below goes into functions.php
add_shortcode( 'wpb_accordion_acf', 'wpb_accordion_acf' );
/**
* Accordion Repeater Field
*/
function wpb_accordion_acf() {
ob_start();
// *Repeater
@Elvinz
Elvinz / .htaccess
Created July 17, 2021 09:50 — forked from SergeyZaigraev/.htaccess
Битрикс. Кэширование браузера. client cache
# Включаем кэш в браузерах посетителей
<ifModule mod_headers.c>
# Все html и htm файлы будут храниться в кэше браузера один день
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
# Все css, javascript и текстовые файлы будут храниться в кэше браузера одну неделю
<FilesMatch "\.(js|css|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
@Elvinz
Elvinz / README.md
Created May 13, 2021 07:03 — forked from Isa3v/README.md
CSS inline body | Minification HTML (Bitrix)

CSS inline body | Minification HTML (Bitrix)

Выводим css стили в тело и сжимаем html в 1 строку, удаляем css комментарии

(исправляя относительные пути изображений)

Добавляем в init.php и радуемся (или нет) как гугл прибаляет 10-15 балов

@Elvinz
Elvinz / calculate-checkbox-value.html
Created April 30, 2021 20:32 — forked from kosh-jp/calculate-checkbox-value.html
jQuery/calculate-checkbox-value
<!DOCTYPE html>
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.3.1.slim.js"
integrity="sha256-fNXJFIlca05BIO2Y5zh1xrShK3ME+/lYZ0j+ChxX2DA="
crossorigin="anonymous"></script>
<script type="text/javascript" src="calculate-checkbox-value.js"></script>
</head>
<body>