Skip to content

Instantly share code, notes, and snippets.

:atom:
coding

Sergey Mochalov proweb

:atom:
coding
Block or report user

Report or block proweb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@proweb
proweb / params
Last active Mar 14, 2019 — forked from Vlasterx/Joomla fields
All field types for Joomla CMS
View params
<fieldset name="ADMIN_TEST">
<field name="access" type="accesslevel" label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" class="span12 small" />
<field name="cache_handler" type="cachehandler" default="" label="Cache Handler Field type" description="COM_CONFIG_FIELD_CACHE_HANDLER_DESC" filter="word" />
<field name="mycalendar" type="calendar" default="5-10-2008" label="Select a date" description="" format="%d-%m-%Y" />
<field name="captcha" type="plugins" folder="captcha" label="Captcha Selection field" description="COM_CONTACT_FIELD_CAPTCHA_DESC" default="" filter="cmd">
<option value="">JOPTION_USE_DEFAULT</option>
<option value="0">JOPTION_DO_NOT_USE</option>
</field>
<field name="mycategory" type="category" extension="com_content" label="Select a category" description="" />
<field name="show_title" type="checkbox" label="Show title" description="Show the title of the item" value="1" />
@proweb
proweb / index.html
Last active Jun 7, 2019
Как разместить две формы Битрикс 24 на сайте.
View index.html
<div id="my_container"></div> <!-- Form container -->
<!-- JS code from CRM Bitrix24 -->
<!-- Added "node" parametr -->
<script id="bx24_form_inline" data-skip-moving="true">
(function(w,d,u,b){w['Bitrix24FormObject']=b;w[b] = w[b] || function(){arguments[0].ref=u;
(w[b].forms=w[b].forms||[]).push(arguments[0])};
if(w[b]['forms']) return;
s=d.createElement('script');r=1*new Date();s.async=1;s.src=u+'?'+r;
h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);
})(window,document,'http://cp.silaev.bx/bitrix/js/crm/form_loader.js','b24form');
@proweb
proweb / post.php
Last active Aug 23, 2017
Core post types in Wordpress [wp-includes/post.php]
View post.php
<?php
/**
* Core Post API
*
* @package WordPress
* @subpackage Post
*/
//
// Post Type Registration
@proweb
proweb / template-functions.php
Last active Dec 16, 2018
Add class to post_class function wordpress (as last class)
View template-functions.php
<?php
add_filter( 'post_class', 'uikit_article_class' );
function my_article_class($classes) {
if (!is_admin()) {
$classes[] = 'my-class';
return $classes;
@proweb
proweb / gist:31f3c78ef08e4c86f1d10dbc6d352b21
Created May 19, 2017 — forked from dmitrymomot/gist:4654524
Получение в jquery get-параметра с url страницы
View gist:31f3c78ef08e4c86f1d10dbc6d352b21
// получаем URL параметры
// var allVars = $.getUrlVars();
// получаем значение параметра по его имени
// var byName = $.getUrlVar('name');
$.extend({
getUrlVars: function(){
var vars = [], hash;
@proweb
proweb / wp_color_poststatus.php
Created May 9, 2017
Add colors to admin posts status
View wp_color_poststatus.php
add_action('admin_footer','posts_status_color');
function posts_status_color() { ?>
<style>
.status-draft{background: #FCE3F2 !important;}
.status-pending{background: #87C5D6 !important;}
.status-publish{/* no background keep wp alternating colors */}
.status-future{background: #C6EBF5 !important;}
@proweb
proweb / d7_function.php
Created May 9, 2017
Drupal 7 - remove shortlink, rel=alternate and generator meta tag
View d7_function.php
function themename_html_head_alter(&$head_elements) {
foreach ($head_elements as $key => $element) {
if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'shortlink') {
unset($head_elements[$key]);
}
if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'alternate') {
unset($head_elements[$key]);
}
}
unset($head_elements['system_meta_generator']);
@proweb
proweb / equalheightslick.js
Created May 6, 2017
Slick carousel equal height slides
View equalheightslick.js
$(window).load(function() {
$('.slides').on('setPosition', function () {
$(this).find('.slick-slide').height('auto');
var slickTrack = $(this).find('.slick-track');
var slickTrackHeight = $(slickTrack).height();
$(this).find('.slick-slide').css('height', slickTrackHeight + 'px');
});
})
@proweb
proweb / slick_fix.css
Created May 6, 2017
Css fix for slick carousel in bootstrap 3 tab
View slick_fix.css
/* Based on https://github.com/kenwheeler/slick/issues/187#issuecomment-59123524 */
/* bootstrap hack: fix content width inside hidden tabs */
.tab-content > .tab-pane,
.pill-content > .pill-pane {
display: block; /* undo display:none */
height: 0; /* height:0 is also invisible */
overflow: hidden; /* no-overflow */
}
.tab-content > .active,
.pill-content > .active {
You can’t perform that action at this time.