Instantly share code, notes, and snippets.

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))
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"
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();
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){
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>
View getJson_com_jquery.js
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<title>JSON Sample</title>
<div id="resultado"></div>
<div id="resultado2"></div>
View manipularJson_comJquery.js
$.get( "http://seu site/", function( data ) {
data = typeof data == 'string' ? JSON.parse(data) : data;
data.forEach(function(elementoDaArray) {
var div = document.createElement('div');
View form_mainbody.php
/* arquivo mainbody.php */
/* templates/seb_one/positions/protocolo_acompanhamento/site/mainbody.php */
<script type="text/javascript">
var idnum = jQuery(this).val();