Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
work from home

Sergey Mochalov proweb

🏡
work from home
View GitHub Profile
@proweb
proweb / redirect-to-child.php
Created Dec 25, 2019 — forked from neverything/redirect-to-child.php
WordPress redirection page template to the first child page (menu_order) with WPML handling
View redirect-to-child.php
<?php
/**
* Template Name: Redirect to child page
* Description: Redirects to the top child page
*
* @package PUT YOUR THEME NAME HERE :D
*/
global $post;
@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 / 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 / post_format_icon.php
Created Feb 15, 2017 — forked from smutek/post_format_icon.php
Function for Post Format icons
View post_format_icon.php
<?php
/**
* Output Post Format icons
*
* Outputs an icon for each post format. Set up to use Fontawesome,
* but can be used with anything, or you can just use CSS.
*
* @return string
*/
function post_format_icon() {
@proweb
proweb / gist:6c6100434e67aaa64ced
Created Jan 2, 2016 — forked from johnbillion/hierarchy.php
WordPress Template Hierarchy (as of WordPress 4.4)
View gist:6c6100434e67aaa64ced
<?php
/* WordPress Template Hierarchy as of WordPress 4.4
is_404() ---------------------------------------------------------------------------------------------------> 404.php
is_search() ------------------------------------------------------------------------------------------------> search.php
is_front_page() --------------------------------------------------------------------------------------------> front-page.php
is_home() --------------------------------------------------------------------------------------------------> home.php
@proweb
proweb / default.vcl
Created Nov 4, 2015 — forked from fevangelou/default.vcl_PREFACE.md
The perfect Varnish configuration for Joomla (& other CMS based) websites
View default.vcl
#################################################################################
### The perfect Varnish configuration for Joomla (& other CMS based) websites ###
#################################################################################
# USE: Place the contents of this configuration inside the main
# Varnish configuration file, located in: /etc/varnish/default.vcl (root server access required - obviously)
# IMPORTANT: The following setup assumes a 2 minute cache time. You can safely increase
# this to 5 mins for less busier sites or drop it to 1 min or even 30s for high traffic sites.
@proweb
proweb / blank-template-snippets.txt
Created Apr 11, 2012 — forked from Bloggerschmidt/template-snippets.txt
Blank Template Snippets for Joomla! 2.5
View blank-template-snippets.txt
# index.php :: load the global joomla header
# between <head> and </head>
<jdoc:include type="head" />
# index.php :: output of the system messages
# between <body> and </body>
<jdoc:include type="message" />
# index.php :: article and component output
# between <body> and </body>
You can’t perform that action at this time.