Skip to content

Instantly share code, notes, and snippets.

View javigomez's full-sized avatar

Javier Gomez javigomez

View GitHub Profile
@javigomez
javigomez / gist:3931973
Created October 22, 2012 15:15 — forked from mbabker/gist:3211464
Creating a category via component postflight
// Get the database object
$db = JFactory::getDbo();
// JTableCategory is autoloaded in J! 3.0, so...
if (version_compare(JVERSION, '3.0', 'lt'))
{
JTable::addIncludePath(JPATH_PLATFORM . 'joomla/database/table');
}
// Initialize a new category