Skip to content

Instantly share code, notes, and snippets.

View uzielweb's full-sized avatar

Uziel Almeida Oliveira uzielweb

View GitHub Profile
@uzielweb
uzielweb / .htaccess
Created March 9, 2021 15:12 — forked from drakakisgeo/.htaccess
Joomla .htaccess for extra security
###############################################################################
## The Master .htaccess
##
## Version 2.5 (proposed) - May 16th, 2011
##
## ----------
## This file is designed to be the template .htaccess file to put on your new
## sites, increasing your site's security and performance. It is not meant to
## be just dropped in your site, though. You should go through all of its
## sections and modify it to match your site. Most notably, all instances of
@uzielweb
uzielweb / JoomlaSnippets.php
Last active February 27, 2021 17:32
Joomal Snippets
<?php
//ENG: Load extra language | PORT: Carrega idioma extra
$lang = JFactory::getLanguage();
$extension = 'com_tags';
$base_dir = JPATH_SITE;
$language_tag = JFactory::getLanguage()->getTag();
$reload = true;
$lang->load($extension, $base_dir, $language_tag, $reload);
@uzielweb
uzielweb / vistoboot4.css
Created August 7, 2020 03:21
Custom Bootstrap 4 grid Example to avoid Bootstrap conflicts (vistoboot prefixed)
/*!
* Bootstrap Grid v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
html {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-overflow-style: scrollbar;
@uzielweb
uzielweb / spotlight.php
Created June 22, 2020 14:17
Spotlight para notícias usando o override do módulo Artigos Recentes para Joomla
<?php
/**
* @package Helix Ultimate Framework
* @author JoomShaper https://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2018 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
defined('_JEXEC') or die;
foreach ($list as $key=>$item){
$restante = count($list)-1;
@uzielweb
uzielweb / Youtube not playing sound on iPad Quick FIX.js
Created June 19, 2020 14:52
Youtube not playing sound on iPad Quick FIX
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
jQuery('.card-video').on('click', function(){
var iframes = jQuery('iframe');
for(iframe of iframes){
if (iframe.src.indexOf("youtube") >= 0){
var href = new URL(iframe.src);
href.searchParams.set('autoplay', 0);
href.searchParams.set('mute', 0);
iframe.src = href;
@uzielweb
uzielweb / default.php
Created May 5, 2020 08:47
Joomla Plugin Content Page Navigation override to show first founded image from next and previous articles
<?php
/**
* @package Joomla.Plugin
* @subpackage Content.pagenavigation
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
@uzielweb
uzielweb / from-bootstrap2-to-bootstrap4.css
Last active October 15, 2020 23:10
Classes "span" não costumam ser interpretadas por Bootstrap 3 e superiores, deixando tudo desalinhado e desproporcional ou "acavalado". Esse pequeno hack abaixo permite que, pelo CSS, essas divs com classes legadas do Bootstrap 2 possam ser mais bem adaptadas ao visual moderno do Bootstrap 4 que usa flex-box no css.
/*
Classes "span" não costumam ser interpretadas por Bootstrap 3 e superiores, deixando tudo desalinhado e desproporcional ou "acavalado".
Esse pequeno hack abaixo permite que, pelo CSS, essas divs com classes legadas do Bootstrap 2 possam ser mais bem adaptadas ao visual moderno do Bootstrap 4 que usa flex-box no css.
*/
/*
Classes "span" não costumam ser interpretadas por Bootstrap 3 e superiores, deixando tudo desalinhado e desproporcional ou "acavalado".
Esse pequeno hack abaixo permite que, pelo CSS, essas divs com classes legadas do Bootstrap 2 possam ser mais bem adaptadas ao visual moderno do Bootstrap 4 que usa flex-box no css.
@uzielweb
uzielweb / gist:ee5f1ce6965cd5f0615dfd6fb2fa6f20
Last active July 24, 2019 15:00
WEB WhatsApp 24/07/2019 Bug
/*! Copyright (c) 2019 WhatsApp Inc. All Rights Reserved. */ ! function(e) {
function i(n) {
if (r[n]) return r[n].exports;
var f = r[n] = {
i: n,
l: !1,
exports: {}
};
return e[n].call(f.exports, f, f.exports, i), f.l = !0, f.exports
}
@uzielweb
uzielweb / sources.list
Last active November 11, 2019 18:46 — forked from aristidesneto/source.list
Source List - Debian 9 Stretch
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib non-free
deb-src http://deb.debian.org/debian/ stable main contrib non-free
deb http://deb.debian.org/debian/ stable-updates main contrib non-free
deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free
@uzielweb
uzielweb / default_results.php
Last active February 2, 2018 19:20
An override for search results to show images in article results . put in /templates/your_template/html/com_search/search
<?php
/**
* @package Joomla.Site
* @subpackage com_search
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$db = JFactory::getDBO();