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
<?php echo $cck->renderField('email'); ?> //exemplo de campo para por o email | |
<?php echo $cck->renderField('enviar'); ?> | |
// obs o ID css de do campo email é #email | |
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; | |
?> | |
<?php echo $cck->renderField('link'); ?> //exemplo de campo para por o link | |
<?php echo $cck->renderField('campo2'); ?> //quando usuário clicar no campo2 JS vai avisar se estiver errado o link. |
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 | |
$menu = &JSite::getMenu(); if ($menu->getActive() != $menu->getDefault()) // verifica se é a página inicial { ?> | |
<?php | |
$currentMenuId = JSite::getMenu()->getActive()->id ; | |
if ($currentMenuId != "119") // verifica se a página pertence ao Item de menu 119 { ?> | |
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 | |
/** | |
* Acessa a API do migre.me e gera uma URL encurtada | |
* @param $url URL a ser encurtada | |
* @return String URL encurtada ou informações do erro | |
*/ | |
function gera_url_encurtada($url){ | |
$url = urlencode($url); |
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 | |
$urlabsoluta = JURI::current(); //pega a URL do artigo current (ao vivo) | |
$url = 'https://www.googleapis.com/urlshortener/v1/url'; | |
$data['longUrl'] = "$urlabsoluta"; | |
$data['key'] = 'Sua KEY'; //Sua Key dada pelo Google! | |
$data = json_encode($data); | |
$curl = curl_init($url); |
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); | |
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
onkeyup="this.value=this.value.replace(/[' '.,_,-,:,;,),(,=,+,*,¨,-]/g,'')" |
OlderNewer