Skip to content

Instantly share code, notes, and snippets.

Uriel dos Santos Souza Uriel29

Block or report user

Report or block Uriel29

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Uriel29 / overridecomponente.php
Created Mar 2, 2019
Inserir módulos dentro de componentes do Joomla. Em override! Precisei por módulos dentro do blog.php do Joomla e dentro do content, tudo em override.
View overridecomponente.php
<?php echo JHtml::_('content.prepare', '{loadposition home-banner}'); ?>
<?php $document = &JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$position = 'home-banner';
$options = array('style' => 'raw');
echo $renderer->render($position, $options, null);
Uriel29 / app.js
Last active Feb 16, 2019
Instalar PWA com botão que aparece assim que o Service esta registrado e o beforeinstallprompt esta funcional! Deixei o botão como none:
View app.js
window.onload = function() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js').then(function() {
console.log('Service Worker Registered');
let deferredPrompt;
const addBtn = document.querySelector('#enable-banner-install');
window.addEventListener('beforeinstallprompt', (e) => {
Uriel29 / postupdate.php
Created Jan 27, 2019
coloque na raiz do administrador /admistrator/postupdate.php
View postupdate.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Define the application's minimum supported PHP version as a constant so it can be referenced within the application.
Uriel29 / php.ini
Created Jan 15, 2019
php.ini que modifica as diretivas na Locaweb e outros lugares
View php.ini
; About php.ini ;
; This file controls many aspects of PHP's behavior. In order for PHP to
; read it, it must be named 'php.ini'. PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory. The
View dded_items.php
1) gift/tmpl/added_items.php
Mudanca para aparecer o botão somente para um grupo de usuários
$user = JFactory::getUser();
$groups = JUserHelper::getUserGroups($user->id);
if(!in_array('64', $groups))
Uriel29 / listview.php
Last active Jan 20, 2017
listview no seblod que mostrasse apenas usuarios que pertencam um grupo especifico > criado por Marcio Garrido
View listview.php
Demanda :
Criar uma listview no seblod que mostrasse apenas usuarios que pertencam um grupo especifico de usuarios no joomla.
No meu sistema , eu precisava mostrar somente na list os usuarios em dia.Estes usuarios, quando em dia faziam parte do grupo chamado "Associacoes Adiplentes" cujo Group_id é 118. Toda vez que um usuario comecava a participar deste grupo, um novo registro na tabela user_usergroup_map_BDEL era atualizado.
Desta forma, criei um campo na tabela users chamado "em_dia" e fiz uma trigger na tabela user_usergroup_map que validava esta a inclusao de usuarios no grupo 118 e retornava esta validacao para a tabela users.
1) Alterar a tabela users criando a coluna "em_dia"
Uriel29 / Pegar dados gerais do Joomla e seblod.php
Created Nov 13, 2016
Código para pegar dados do usuário e de qualquer campo do Seblod. Código by Marcio Garrido
View Pegar dados gerais do Joomla e seblod.php
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id', 'name', 'cep', 'associacao_associado','cpf','cnpj','endereco','celular')));
$query->where($db->quoteName('id') . ' = '.$db->quote($user->id));
$query->order('id ASC');
$row = $db->loadRow();
Uriel29 / equal_heights_grouped.js
Created Sep 15, 2016 — forked from uzielweb/equal_heights_grouped.js
This is a Script to autoresize DIVS grouped to each parente div to set the same heights
View equal_heights_grouped.js
<script type="text/javascript">
/* Thanks to CSS Tricks for pointing out this bit of jQuery
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){
Uriel29 / app.js
Created Apr 14, 2016
XDK project Test Onesignal
View app.js
function onAppReady() {
if( navigator.splashscreen && navigator.splashscreen.hide ) { // Cordova API detected
navigator.splashscreen.hide() ;
// document.addEventListener("deviceready", onAppReady, false) ;
// document.addEventListener("onload", onAppReady, false) ;
View json_change.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<title>JSON Sample</title>
You can’t perform that action at this time.