Skip to content

Instantly share code, notes, and snippets.

View CB9TOIIIA's full-sized avatar
💭
Make JBZoo Great Again ^_^

Eugene Kopylov CB9TOIIIA

💭
Make JBZoo Great Again ^_^
View GitHub Profile
@CB9TOIIIA
CB9TOIIIA / J3.6.4 - user.php
Created October 27, 2016 20:36
J3.6.4 - user.php
<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
@CB9TOIIIA
CB9TOIIIA / HTTPS Joomla!
Created October 28, 2016 20:58
HTTPS Joomla!
RewriteCond %{HTTP:SSL} !1
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://domain.ru/ [R=301,L]
@CB9TOIIIA
CB9TOIIIA / Get month DB articles SQL
Created October 29, 2016 17:52
Get month DB articles SQL
SELECT alias FROM ****_zoo_item WHERE created BETWEEN '2016-10-01 00:00:00' and '2016-10-29 23:59:59';
@CB9TOIIIA
CB9TOIIIA / affix простое меню
Created October 30, 2016 14:38
affix простое меню
function MobileDetect() {
var UA = navigator.userAgent.toLowerCase();
return (/android|webos|iris|bolt|mobile|iphone|ipad|ipod|iemobile|blackberry|windows phone|opera mobi|opera mini/i.test(UA)) ? true : false;
}
jQuery(document).ready(function($) {
if (!MobileDetect()) {
var header = $("#header .main-menu");
$(window).scroll(function() {
var scroll = $(window).scrollTop();
$documentbody = JResponse::getBody();
$documentbody = str_replace ("</body>", $code." </body>", $documentbody);
JResponse::setBody($documentbody);
$jinput = JFactory::getApplication()->input;
return $jinput->server->get('REMOTE_ADDR', '', '');
$session = JFactory::getSession();
$session->set('_smsc_request_id_last', $id);
$id=$session->get('_smsc_request_id_last', false);
$user = JFactory::getUser();
$user->phone;
@CB9TOIIIA
CB9TOIIIA / ⚡ AMP Joomla! by Lullabot
Last active November 8, 2016 08:54
⚡ AMP Joomla! by Lullabot
<?php
defined('_JEXEC') or die;
//need: https://github.com/Lullabot/amp-library
require_once '/amp/vendor/autoload.php';
use Lullabot\AMP\AMP;
use Lullabot\AMP\Validate\Scope;
<?php $checkamp = $_SERVER['REQUEST_URI']; ?>
@CB9TOIIIA
CB9TOIIIA / Выгрузка 1С на FTP
Created November 10, 2016 09:15
Выгрузка 1С на FTP
Попытка
Лог("Начата выгрузка на ftp");
ИмяFTPСервера = "имя сервера";
ПортFTPСоединения = "21";
ПользовательFTPСоединения = "логин для подключения к ftp";
ПарольFTPСоединения = "пароль для подключения к ftp";
ПассивноеFTPСоединение = Ложь;
Соединение = Новый FTPСоединение(ИмяFTPСервера, ПортFTPСоединения,ПользовательFTPСоединения,ПарольFTPСоединения, ,ПассивноеFTPСоединение);
НайденныеФайлы = НайтиФайлы("D:\1C\SITEOBMEN\1cbitrix\", "*.*", Истина); //папка с которой все будет копировать на ftp