|
Ok!
|
|
|
Ok!
|
---|---|---|---|---|
128 | $current_time = strtotime("now"); $sunrise = strtotime("09:00"); $sunset = strtotime("21:00"); if ($current_time > $sunrise && $current_time < $sunset && date('w') > 0 && date('w') < 6) { ?><a href="https://wa.me/<?=(mob_detect())?"+":""?>74951233121" target="_blank" class="chat_social_item chat_social_wh"></a><? } else { ?><div style="display: none" id="wa_wi" data-info="<?=$current_time . ' ' . $sunrise . ' ' . $sunset?>">С 09:00 до 21:00</div><? } | whatsupp | 5600 | whatsupp widget |
127 | if (strlen($hip) > 120) { $pos = 160; $crop = $hip; if (strlen($crop) > 160) { $pos = strpos($hip, ".", 120) + 1; } $lip = substr($hip, 0, $pos); } | обрезать, по точке, crop name | 2360 | Обрезать описание до точки если оно длиннее 120 знаков |
126 | document.URL.split('/')[document.URL.split('/').length - 2] | url, js, last folder, последняя папка, яваскрипт | 120 | js найти последнюю папку в УРЛ |
125 | <img id='side-diag' src='/bitrix/templates/redesign/images/diagnostic2.jpg' srcset='/bitrix/templates/redesign/images/diagnostic1.jpg 2x' alt='Записаться на диагностику'/> | srcset | 300 | srcset |
124 | А я помню вот до сих пор. J3QQ4-H7H2V-2HCH4-M3HK8-6M8VW для меня прям как стих из молодости | виндоус код, windows code | 5600 | Вдруг пригодится |
123 | RewriteCond %{THE_REQUEST} ^GET./index.php [NC] RewriteRule (.*?)index.php/*(.*) /$1$2 [R=301,NE,L] | 0 | Если Битрикс сам не переводит с index.php на слеш, то пишут 2 такие строки. Но файл переиндексации ...reindex.php туда же попадает и выдает ошибку. Чтоб не выдавал, ставим GET./ (слеш, а не звездочку) | |
122 | $component = new CBitrixComponent(); $component->InitComponent('redesign:menu', 'mobile'); $component->initComponentTemplate(); $path = $component->__template->GetFolder(); | путь к компоненту, битрикс, bitrix | 120 | Путь к шаблону компонента в папке components |
121 | img.svg { clip-path: inset(0px 11px 0px 11px); } | clip-path | 3460 | Обрезка картинок |
120 | В файле bitrix/php_interface/dbconn.php нужно добавить строчку ini_set ("SMTP", "XXX.XXX.XXX.XXX"), где XXX.XXX.XXX.XXX - IP почтовика | smtp | 1670 | smtp |
119 | <?if("{PRICE_1}" > 0){?> <offer id="{ID}" type="vendor.model" available="<?=("{V_NALICHII_TEKST_53}">0)?"true":"false"?>"> <model><![CDATA[{NAZVANIE_2}]]></model> <url>https://posuda.lamaree.ru/catalog/full/{CAT_URL}/{ELEM_URL}/</url> <price><?=(float)"{PRICE_1}"?></price> <currencyId>RUR</currencyId> <categoryId>{CAT_ID}</categoryId> <delivery>true</delivery> <picture>https://posuda.lamaree.ru/images/products/big/{FOTO_DLYA_KATALOGA_13}</picture> <local_delivery_cost>350</local_delivery_cost> <typePrefix>{TITLE}</typePrefix> <description><![CDATA[{OPISANIE_22}]]></description> <vendor>La Maree</vendor> <param name="Артикул">{ARTIKUL_1}</param> <param name="Категория">{CAT_TITLE}</param> </offer> <?}?> | export, yml | 1345 | Экспорт yml |