Skip to content

Instantly share code, notes, and snippets.

View uzielweb's full-sized avatar

Uziel Almeida Oliveira uzielweb

View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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 / .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 / gist:1dca06d0586b24e87a7410dcfd03ce6f
Created May 18, 2021 05:50
Update Menu Types after Joomla Upgrade from 2.5 to 3
UPDATE `#__menu` SET `menutype` = 'main' WHERE `g4t1l_menu`.`menutype` = 'menu'
@uzielweb
uzielweb / bootstrap2-to-bootstrap5
Last active August 19, 2022 13:29
Bootstrap 2 to Bootstrap 5 workaround adapt
/*
Classes "span" não são 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.
*/
/*
Span classes are not interpreted by Bootstrap 3 and higher, leaving everything out of alignment and disproportionate or 'overturned'.
This little hack below allows, through CSS, these divs with legacy Bootstrap 2 classes to be better adapted to the modern look of Bootstrap 4 that uses flex-box in css.
@uzielweb
uzielweb / span-to-col-helixultimate.js
Created September 18, 2021 07:57
Change span to col-md- classes in Helix Ultimate
// add class row to sp-column when children has any part of class with span in the classname
jQuery(document).ready(function ($) {
$('.sp-column').each(function () {
// get the children class names with span in the classname
var childrenClasses = $(this).children().map(function () { return this.className; }).get().join(' ');
// if children has any part of class with span in the classname
if (childrenClasses.indexOf('span') > -1) { $(this).addClass('row'); }
// change parte of classname with span to col-md-
$(this).children().each(function () {
var className = $(this).attr('class');