Skip to content

Instantly share code, notes, and snippets.

View fititnt's full-sized avatar
💭
"The difficult we do immediately; the impossible takes a little longer"

Emerson Rocha fititnt

💭
"The difficult we do immediately; the impossible takes a little longer"
View GitHub Profile
@fititnt
fititnt / helloworld.php
Created January 20, 2012 21:12
Visão salvando em mais de uma tabela
<?php
// admin / controllers / helloworld.php
jimport('joomla.application.component.controllerform');
class HelloWorldControllerHelloWorld extends JControllerForm
{
//...
public function save($key = null, $urlVar = null) {
@fititnt
fititnt / userplugin.php
Created December 16, 2011 04:06
Exemplo de como obter variaveis depois do cadastro de um usuario
<?php
// Plugin do tipo user
// No direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.plugin.plugin');
class plgUserNomedoplugin extends JPlugin {
@fititnt
fititnt / CLI-and-browser-argv
Created September 11, 2011 21:08
Emulate PHP-CLI argv arguments on Browser
<?php
/* Snippet code to emulate argv on browser like on CLI
* Author: Emerson Rocha Luiz (http://fititnt.org) License: WTFPLv2
*/
if ( !isset($_SERVER['HTTP_USER_AGENT']) ) {
$arguments = $argv;
} else {
$arguments = array();
@fititnt
fititnt / build.xml
Created August 15, 2011 04:47
Joomla 1.6+ XML of Install Packages
<?xml version="1.0" encoding="UTF-8"?>
<project name="package_test_build" default="build">
<target name="clean">
<echo msg="Cleaning directories" />
<delete dir="packages" includeemptydirs="true" />
<delete file="pkg_everything.zip" />
</target>
<target name="build">
<echo msg="Building package" />