- Все динамические картинки (те которые теоретически могут меняться через админку) делать с помошью тега
<img>
а не css-свойстваbackground-image
. Например, фотографии товаров, иконки разделов. - Верстать дивами, без таблиц. Таблицы использовать только в случае, если надо сверстать таблицу.
- Не писать стили на #id, только на .классы. Иногда можно привязываться на теги внутри классов, но не стоит злоупотреблять этим.
- Не использовать css спрайты. Все картинки класть по отдельным маленьким файлам.
- При вёртстке инлайновых элементов никогда не писать в коде пробелов, прописывать паддинги в стилях.
пример:
<span><b>или</b> <a href="#tab1">регистрация</a></span> <span> <b>или</b> <a href="#tab2">вход</a></span>
чтобы не было пробелов между тегами<span><b>или</b><a href="#tab1">регистрация</a></span><span><b>или</b><a href="#tab2">вход</a></span>
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
'assetManager' => [ | |
'class' => 'yii\web\AssetManager', | |
'bundles' => [ | |
'yii\web\JqueryAsset' => [ | |
// 'jsOptions' => ['position' => 1], | |
'js' => [ | |
YII_ENV_DEV ? 'jquery.js' : 'jquery.min.js' | |
] | |
], | |
'yii\bootstrap\BootstrapAsset' => [ |
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
'urlManager' => [ | |
'showScriptName' => false, | |
'enablePrettyUrl' => true, | |
'rules' => [ | |
'post/<id:\d+>' => 'post/view', | |
], | |
], |
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 | |
/** | |
* Debug function | |
* d($var); | |
*/ | |
function d($var,$caller=null) | |
{ | |
if (!isset($caller)){ | |
$caller = array_shift(debug_backtrace(1)); |
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
use yii\base\DynamicModel; |
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
server { | |
listen 80; | |
server_name bitrix; | |
server_name_in_redirect off; | |
access_log /var/log/nginx/access.log common; | |
index index.php; | |
error_page 500 502 503 504 /500.html; | |
error_page 404 = /404.php; | |
# установить дополнительные заголовки для определения адреса клиента в статистике сайта |
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
INSERT INTO oc_product_video (product_id, video) SELECT product_id, 'AzbPwjSpzFQ' video FROM oc_product WHERE model = 'EST86046'; |
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
\Bitrix\Main\EventManager::getInstance()->addEventHandler('sale', 'OnSaleAdminOrderList', 'OnSaleAdminOrderListHandler'); | |
function OnSaleAdminOrderListHandler(\Bitrix\Main\Event $event) | |
{ | |
$getListParams = $event->getParameters(); | |
if ($_REQUEST['by'] == 'USER_STATUS') { | |
$getListParams['order']['USER_GROUP.GROUP_ID'] = $_REQUEST['order']; | |
$getListParams['runtime']['USER_GROUP'] = array( | |
'data_type' => 'Bitrix\Main\UserGroupTable', | |
'reference' => array( |
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
-- | |
-- Created by: v1c77 | |
-- Created on: 2018/7/21 | |
-- | |
-- Copyright © 2018 v1c77, All Rights Reserved | |
-- | |
use AppleScript version "2.7" -- Yosemite (10.10) or later | |
use scripting additions |
OlderNewer