This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) gift/tmpl/added_items.php | |
Mudanca para aparecer o botão somente para um grupo de usuários | |
<?php | |
$user = JFactory::getUser(); | |
$groups = JUserHelper::getUserGroups($user->id); | |
if(!in_array('64', $groups)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//deixar caixa alta em um campo do seblod. | |
//basta colar isso em Custom Attributes do seu campo. | |
onkeyup="javascript:this.value=this.value.toUpperCase();" | |
onkeyup="javascript:this.value=this.value.toLowerCase();" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
Codigo | |
1) Alterar a tabela users criando a coluna "em_dia" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$db = JFactory::getDbo(); | |
$query = $db->getQuery(true); | |
$query->select($db->quoteName(array('id', 'name', 'cep', 'associacao_associado','cpf','cnpj','endereco','celular'))); | |
$query->from($db->quoteName('vjboleto')); | |
$query->where($db->quoteName('id') . ' = '.$db->quote($user->id)); | |
$query->order('id ASC'); | |
$db->setQuery($query); | |
$row = $db->loadRow(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
###################################################################### | |
## The Master .htaccess - NginX adaptation | |
## | |
## Version 3.3 | |
## | |
## This file is designed to be the template NginX server configuration file | |
## for your Joomla! sites. You should go through all of its sections and | |
## modify it to match your site. Most notably, all instances of example.com | |
## and example\.com should be replaced with your real domain name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// No Direct Access | |
defined( '_JEXEC' ) or die; | |
// OBS isso é um override de um formulário do seblod e esta em um módulo de form logo abaixo do artigo> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Ver se campo tem conteúdo! | |
<?php if($cck->get('campo')->value) { ?> | |
// se o campo tiver algo faça. Aqui não mostra nada, mas pode ter qualquer coisa! | |
<?php } else { ?> | |
//Se não tiver nada faça. Neste caso mostrar um campo! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// No Direct Access | |
defined( '_JEXEC' ) or die; | |
?> | |
//chamando o JS que esta no google. | |
<script type="text/javascript" src="http://cidades-estados-js.googlecode.com/files/cidades-estados-1.2-utf8.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id_user = $cck->getValue('usuario');//recebe ID do usuário | |
// conexão com banco e consulta | |
$db = & JFactory::getDBO(); | |
$query = "SELECT username FROM #__users WHERE id = $id_user"; // verifica no banco | |
$db->setQuery($query); | |