This code allows you make preview-pictures for input without uploading this pictures on server. Detail info on english
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
.SomeClass{ | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
filter: gray; /* IE6-9 */ | |
-webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */ | |
-moz-filter: grayscale(100%); | |
-ms-filter: grayscale(100%); | |
-o-filter: grayscale(100%); | |
filter: grayscale(100%); | |
} |
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
a.disabled { | |
pointer-events: none; /* делаем ссылку некликабельной */ | |
cursor: default; /* устанавливаем курсор в виде стрелки */ | |
color: #999; /* цвет текста для нективной ссылки */ | |
} |
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
<? | |
foreach ($arResult["ITEMS"] as $key => $arItem){ | |
// EXACT | |
$arResult["ITEMS"][$key]["RESIZE_PICTURE"] = CFile::ResizeImageGet($arItem["PREVIEW_PICTURE"]["ID"], array('width'=>100, 'height'=>100), BX_RESIZE_IMAGE_EXACT, true); | |
// PROPORTIONAL | |
//$arResult["ITEMS"][$key]["RESIZE_PICTURE"] = CFile::ResizeImageGet($arItem["PREVIEW_PICTURE"]["ID"], array('width'=>100, 'height'=>100), BX_RESIZE_IMAGE_PROPORTIONAL, true); | |
} |
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
<!-- FAVICON --> | |
<link rel="icon" type="image/png" href="/favicon.png" /> | |
<!-- for apple main style--> | |
<!--link rel="apple-touch-icon" href="apple-touch-favicon.png"/--> | |
<!-- for apple precomposed--> | |
<link rel="apple-touch-icon-precomposed" href="/apple-touch-favicon.png"/> |
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 | |
echo 'Document root: '.$_SERVER['DOCUMENT_ROOT'].'<br>'; | |
echo 'Полный путь к скрипту и его имя: '.$_SERVER['SCRIPT_FILENAME'].'<br>'; | |
echo 'Имя скрипта: '.$_SERVER['SCRIPT_NAME']; | |
?> |
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
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} ^/index$ [OR] | |
RewriteCond %{REQUEST_URI} ^/index[.]+(\w+)$ | |
RewriteRule . / [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
// Initialize | |
$context = Bitrix\Main\Context::getCurrent(); | |
$server = $context->getServer(); | |
$server_array = $server->toArray(); | |
// Скармливаем URL. Установить GET-параметры | |
$server_array['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . $type . implode('&', $str); | |
$server->set($server_array); | |
$context->initialize(new Bitrix\Main\HttpRequest($server, array(), array(), array(), $_COOKIE), $context->getResponse(), $server); |
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
foreach (scandir(_FOLDER) as $xmlFile) { | |
if (!is_dir(_FOLDER . $xmlFile)) { | |
$xml = simplexml_load_file(_FOLDER . $xmlFile); | |
$array = json_decode(json_encode($xml), true); | |
} | |
} |
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
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) { | |
$video_id = $match[1]; | |
} |
OlderNewer