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 | |
/** | |
* Использование в макетах дизайна/врезках/компонентах: <?= buildMenu(); ?> | |
* Будет сформирован обычный маркированный список без классов, кроме классов с отображением состояния раздела у li. | |
* Внимательно читайте описание функций. Их необходимо разместить в файле /netcat/modules/default/function.inc.php | |
*/ | |
/** | |
* Функция для определения классов для указанного раздела | |
* @param int $given_sub - номер раздела |
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
// Javascript to enable link to tab | |
var url = document.location.toString(); | |
if (url.match('#')) { | |
$('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show'); | |
} | |
// Change hash for page-reload | |
$('.nav-tabs a').on('shown.bs.tab', function (e) { | |
window.location.hash = e.target.hash; | |
}) |
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 | |
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
// http://youtu.be/dQw4w9WgXcQ | |
// http://www.youtube.com/embed/dQw4w9WgXcQ | |
// http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
// http://www.youtube.com/?v=dQw4w9WgXcQ | |
// http://www.youtube.com/v/dQw4w9WgXcQ | |
// http://www.youtube.com/e/dQw4w9WgXcQ | |
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
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 | |
public function isBot() { | |
$bots = array( | |
'googlebot', | |
'adsbot-google', | |
'feedfetcher-google', | |
'yahoo', | |
'lycos', | |
'bloglines subscriber', | |
'dumbot', |