Skip to content

Instantly share code, notes, and snippets.

View uzielweb's full-sized avatar

Uziel Almeida Oliveira uzielweb

View GitHub Profile
@uzielweb
uzielweb / 0_reuse_code.js
Created April 17, 2014 20:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@uzielweb
uzielweb / minicck_view.php
Last active March 31, 2016 21:00
Aqui está um pequeno override para exibir os dados armazenados usando o componente MiniCCK para Joomla (https://github.com/Arkadiy-Sedelnikov/MiniCCK)
// esse é um exemplo de como exibir o conteúdo do minicck de cada artigo na view blog
// faça um override da view blog de categoria copiando /components/com_content/views/category/blog_item.php para /teutemplate/html/com-content/category/blog_item.php
// depois insira o código abaixo diretamente mudando os campos que julgar necessário.
// também resolve colocando ---- require 'minicck_view.php'; ---- dentro do blog_item.php e inserindo este arquivo na mesma pasta .
<?php
defined('_JEXEC') or die;
$db = JFactory::getDbo();
$query = $db->getQuery(true);
//seleciona as colunas da tabela
@uzielweb
uzielweb / index.php
Last active May 29, 2016 19:50
Dynamic Width Joomla Positions in a Template
<?php
// THIS IS A BASIC MODIFICATION OF BLANK TEMPLATE TO SUPPORT AUTOMATIC, CUSTOM OR BOOTSTRAPPED DYNAMIC WIDTHS FOR MODULE POSITIONS
// WORKS IN ANY TEMPLATE :)
// SAY GOOD BYE TO FIXED WIDTH IN MODULE POSITIONS
defined('_JEXEC') or die;
include_once JPATH_THEMES . '/' . $this->template . '/logic.php';
@uzielweb
uzielweb / list_featured_images.php
Created May 30, 2016 19:56
This is a very usefull script to list all images in a Wordpress website and get it to Joomla Database
@uzielweb
uzielweb / base.php
Last active August 11, 2016 18:07
Change the default Logout button in JomSocial Toolbar in components/com_community/templates/jomsocial/layouts/toolbar/base.php line 441 With Joomsocial $logoutLink
<?php
//Change the default Logout button in JomSocial Toolbar in components/com_community/templates/jomsocial/layouts/toolbar/base.php line 441
//Delete the entire code bettween <a> and </a> in the lines 441 at 449
//Put the code bellow instead
?>
<form action="<?php echo JRoute::_('index.php', true); ?>" method="post" name="logoutForm">
<span style="cursor:pointer;" name="Submit" class="joms-js--logout" onclick="document.logoutForm.submit()">
<svg viewBox="0 0 16 16" class="joms-icon">
[Default Text]
FileNameExtensions=txt; text; wtx; log; asc; doc
Default Style=font:Helvetica; size:11; fore:#DDDDDD; back:#222222
Margins and Line Numbers=size:-3; fore:#AAAAAA; back:#444444
Matching Braces=size:+1; bold; fore:#FF0000
Matching Braces Error=size:+1; bold; fore:#000080
Control Characters (Font)=size:-1
Indentation Guide (Color)=fore:#A0A0A0
Selected Text (Colors)=back:#144AD8; eolfilled; alpha:95
Whitespace (Colors, Size 0-5)=fore:#FF4000
@uzielweb
uzielweb / notepad2-solarized.ini
Created August 16, 2016 05:14 — forked from gene-pavlovsky/notepad2-solarized.ini
Solarized Dark and Light color schemes for Notepad2-mod
[Default Text]
FileNameExtensions=txt; text; wtx; log; asc; doc; diz; nfo
Default Style=font:Consolas; size:11; fore:#93a1a1; back:#002b36
Margins and Line Numbers=size:-1; fore:#657b83; back:#073642
Matching Braces=size:+1; bold; fore:#dc322f; back:#073642
Matching Braces Error=size:+1; underline; fore:#dc322f; back:#073642
Control Characters (Font)=size:-1
Indentation Guide (Color)=fore:#073642
Selected Text (Colors)=eolfilled; fore:#eee8d5; back:#586e75
Whitespace (Colors, Size 0-5)=fore:#d33682
@uzielweb
uzielweb / gist:e2491197acf833f8a0747a342b80589c
Created August 16, 2016 05:22 — forked from xCONFLiCTiONx/Notepad2.ini
Notepad2.ini Visual Studio Dark Theme (Color Scheme Only)
[Custom Colors]
01=#000000
02=#0A246A
03=#3A6EA5
04=#52A5F8
05=#0D8206
06=#608020
07=#648000
08=#A46000
09=#54EDBF
@uzielweb
uzielweb / gallery.php
Created September 5, 2016 11:28
Gallery from any article based on custom category (can be used in any other categories for Joomla) --- put this override in /html/com_content/article in your template
@uzielweb
uzielweb / equal_heights_grouped.js
Last active September 15, 2016 00:45
This is a Script to autoresize grouped child DIVS in each parent divs to set the same heights
<script type="text/javascript">
jQuery(document).ready(function($){
/* Thanks to CSS Tricks for pointing out this bit of jQuery
http://css-tricks.com/equal-height-blocks-in-rows/
It's been modified into a function called at page load and then each time the page is resized. One large modification was to remove the set height before each new calculation. */
equalheight = function(container){