This file contains hidden or 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 | |
| /** @var $this JDocumentHTML */ | |
| defined( '_JEXEC' ) or die( 'Restricted access' ); | |
| // TODO: Ошибка генерации ссылки на "все новости" | |
| $doc = JFactory::getDocument(); | |
| $config = JFactory::getConfig(); | |
| $this->_generator = ''; | |
| $baseUrl = JUri::base(); | |
| $isHomePage = $baseUrl === JUri::current(); |
This file contains hidden or 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
| var observer = new MutationObserver(function(mutations) { | |
| mutations.forEach(function(mutationRecord) { | |
| // My Function | |
| }); | |
| }); | |
| var target = document.querySelector('.element'); | |
| observer.observe(target, { | |
| childList: true, | |
| subtree: true, |
This file contains hidden or 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
| http://habrahabr.ru/post/211538/ | |
| https://habrahabr.ru/sandbox/91471/ - tabs | |
| // Проверка на подключенный jQuery | |
| <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.min.js"><\/script>')</script> | |
| // Плавный скролл к верху | |
| $("a[href='#top']").click(function() { | |
| $("html, body").animate({ scrollTop: 0 }, "slow"); | |
| return false; | |
| }); | |
| // Плавный скрол к якорю. |
This file contains hidden or 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
| xdebug.default_enable = 1 | |
| xdebug.auto_trace = 0 | |
| xdebug.collect_includes = 1 | |
| ;xdebug.collect_params = 4 | |
| ;xdebug.collect_return = 1 | |
| ;xdebug.collect_assignments = 1 | |
| ;xdebug.collect_vars = 1 | |
| xdebug.dump.REQUEST = * | |
| xdebug.dump.SESSION = * | |
| xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD |
This file contains hidden or 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 | |
| function get_posts_from_category($idCat) { | |
| // параметры по умолчанию | |
| $args = array( | |
| 'numberposts' => -1, | |
| 'category' => $idCat, | |
| 'orderby' => 'date', | |
| 'order' => 'DESC', | |
| 'include' => array(), | |
| 'exclude' => array(), |
This file contains hidden or 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
| abstract class AJAX_Handler { | |
| function __construct($action_name) { | |
| $this->init_hooks($action_name); | |
| } | |
| public function init_hooks($action_name) { | |
| add_action('wp_ajax_'.$action_name , array($this,'callback')); | |
| add_action('wp_ajax_nopriv_'.$action_name, array($this,'callback_nopriv')); | |
| } |
This file contains hidden or 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
| $phone = '+7 (999) 999-99-99'; | |
| $pattern = '/^((\+?7|8)[ \-] ?)?((\(\d{3}\))|(\d{3}))?([ \-])?(\d{3}[\- ]?\d{2}[\- ]?\d{2})$/'; | |
| preg_match($pattern, $phone) |
This file contains hidden or 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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
This file contains hidden or 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
| <div class="counter"> | |
| <p class="number"> | |
| <span class="cminus position-count no-select">-</span> | |
| <span class="value">1</span> | |
| <span class="cplus position-count no-select">+</span> | |
| </p> | |
| <input type="number" min="1" value="1"> | |
| </div> |
This file contains hidden or 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 | |
| // no direct access | |
| defined('_JEXEC') or die('Restricted access'); | |
| // Модуль пустышка | |
| function modChrome_space($module, &$params, $attribs) { | |
| // $module - Параметры модуля | |
| // &$params - Параметры с вкладки "Доп параметры" | |
| // $attribs - (position, style) | |
| // |
OlderNewer