Últimos artigos escritos por Emerson
JPATH e $_SERVER - Como obter o caminho
Caso queira descobrir de forma rápida qual variável quer usar para achar o caminho dos seus arquivos, pode incluír os códigos abaixo:
E obter algo semelhante a isto:

Simples :)
JHTML::_('behavior.modal',$selector, $arrayparams);
JHTML::_('behavior.modal', $selector, $arrayparams)
Calls javascript to display ligthboxes, popups with good visual appearance, to display images, external pages, or views of own component.
Defined in
/joomla/html/html/behavior.php ( line 117 )
Importing
JHTML::_('behavior.modal');
Note: This is the basic import. If someone more know the adicional params, please email me.
Examples
The code below illustrates how to call an external site to open in a lightbox
Code:Output :
JHTML::_('behavior.modal'); ?> Click me :DThis code is simple. Is near one simple < a > link with plus some javascript information like size that you can edit. The only requiriment is that you must call at any part of your document the JHTML::_('behavior.modal'), that will incluse on html head that all mootools javascript to run lightbox.
The code below illustrates how to receive data from a view called the lightbox - Good for complex popups
Description: On this example you will need make a new component or implement in your component. At the end of this page you will find one download link to one example component that is done with this logic.
Code for your the view that will receive the data. In this case com_wedmodal/views/wedmodals/tmpl/default.php. This will call the mooltools, and the specific javascript funtion ro receive two variables:On the same file, add this form com_wedmodal/views/wedmodals/tmpl/default.php:
Ok. Now you have the basic main page to receive the data. But as you see on heref of the link on last code, you will need call one task from the controller. Lets put code of the task mypopuptask on com_wedmodal/controllers/popup.php:
On last controller code, you will call one Model 'popup' that in this example no do not have some special code. Just add one empty model with the class WedmodalsModelPopup for do not have errors.
Also, on com_wedmodal/views/popup/view.html.php do not need any special code, just add like any other view.html.php
Finaly, we will set what will appear on com_wedmodal/views/popup/tmpl/default.php, the real content that you will see when click on link of this fist code of this example:
As you see, this is just one link with same amount of variables that we have to receive on com_wedmodal/views/wedmodals/tmpl/default.php. Is really important that you pay atention on all these steps, and also download the code with the working example for do not lose time.This is a simple example, but have sure that you can do thinks really interesting, like call one view with a long list of articles and when you click on article the link give back to the page the ID of that article.
The code below illustrates how to receive data from a funtion inside of view.html.php called the lightbox - Good for simple popups
Soon I will add here this tutorial, but anyway of can see the working code the file for download. Also, this example is not so diferent from method that call one entire view.Download example code
See also
Como recuperar senha de usuário ou super administrador no Joomla ( rápido )
Avançado: alterar senha direto no banco de dados
Devido em especial a um cache agressivo neste site, a funcionalidade de gerar o hash abaixo não está mais funcional e só esta mantida aqui por questões históricas.
Desde o Joomla 3.2, o algorítimo de geração de hash passou a ser baseado em BCrypt, ainda mais resistente a engenharia reversa por força bruta, logo, mesmo que MD5 e MD5+Hash funcionem, para sites Joomla 3.2+ mais novos é interessante usar senhas geradas nesse padrão. O artigo abaixo não foi atualizado
Abaixo, você pode inserir uma senha qualquer, e ver seu resultado em MD5 com Salt. Para quem não sabe, o desde a versão 1.0.12 não armazena as senhas apenas com hash MD5, mas sim com com um hash adicional. Isso quer dizer que, se para boa parte das senhas que são conversidas por mero MD5 é possível encontrar listas pré prontas, ao usar salt, torna impraticável criar uma lista com todas as principais possibilidades possíveis.
No caso do seu site, vá até o respectivo usuário na tabela #__users para Joomla 1.6+, e #__user para Joomla 1.5, e no campo password insira o que será informado no campo Resultado MD5+Salt.
Para a senha Troque-me_e_use_sua_senha insira no campo password da #__users o Salt+Hash abaixo
Motivação
Caso tenha interesse, você pode fazer o download desse modulo que converte o código na minha área de download ou mesmo acessar direto a versão no github do mod_showmd5salthash.
BUG Sh404SEF & Joomfish: erros ao voltar ao idioma original
Usando Joomla 1.5.11 + Sh404SEF + Joomfish 2.0.3, quando volta-se do idioma não original para o idioma original, um erro acontece e os menus desaparecem e no lugar aparece uma série de erros de PHPs. Existem algumas listas de discuções em fórums tanto do joomfish quando do sh404sef sobre isso [ referência http://www.joomfish.net/forum/viewtopic.php?f=38&t=1568#p7430 , http://extensions.siliana.com/forums/index.php?topic=11688.25 ].
Esse é um erro chato que estava me encomodando há algum tempo e, por acaso, descobri uma solução simples que funcionou.
No meu caso, bastou fazer o seguinte:
J!admin > Extensions > Plugin Manager > System - Jfrouter > "Save user language in a cookie: NO"
E funcionou sem problema, sem ser preciso alterar qualquer arquivo ou fazer qualquer macumba. Por via das dúvidas já deixo esse comentário no blog porque tenho a mania de passar por um mêsmo problema mais de uma vez e na hora de se lembrar como resolver não achar de onde peguei a solução.
Blog migrado para fititnt.org
Resolvi finalmente dar um rediret permanente do antigo host e domínio [http://www.fititnt.webdesign.eng.br] para o novo [http://www.fititnt.org] Um .htaccess na raiz do meu antigo domínio garante que o PR e os visitantes da página anterior sejam passados para esta. Alias, eu até o momento não me preocupei formalmente em melhorar a SEO do blog, mas, mesmo assim, apenas praticamente indicando como um dos links da minha assinatura no fórum oficial, eu consegui incríveis PR3 no meu antigo host. Nice?Eu ainda não fiz a migração completa para o joomla svn 1.6 mais atual. Ainda tenho que resolver umas pendengas, e me extressei. Vi que teria que passar algum tempo editando demais diretamente o banco de dados e eu, sinceramente, estou sem tempo para isso agora. Então vou me concentrar no conteúdo e deixar para daqui alguns dias a atualização.