// To load a css file for a component, from within the component
EEHtml::asset('style.css');
// To load a js file for a module
EEHtml::asset('slide.js', 'mod_menu');
// To load an image for a module
echo EEHtml::asset('search.png', 'mod_product_search');
This file contains hidden or 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 | |
/** | |
* Shortcode to go along with my Option Tree | |
* helper functions. See those here: | |
* https://gist.github.com/2627998 | |
* | |
* <samp>[theme_option name="home_text"]</samp> | |
* | |
* @param array Array of attributes passed from the shortcode. | |
* @return string|null |
This file contains hidden or 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 | |
/** | |
* @package Joomla.Plugin | |
* @subpackage System.Overrides | |
* | |
* @copyright Copyright (C) 2012 Don Gilbert. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE | |
*/ | |
define('OVERRIDES', dirname(__FILE__).'/overrides'); |
This file contains hidden or 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 | |
$sql = sprintf( "SELECT `Password`, `DealerID` | |
FROM `DLMAST` | |
WHERE `DealerID` = %d | |
AND LOWER(`Password`) = '%s'", | |
mysql_real_escape_string( $_POST['Username'] ), | |
mysql_real_escape_string( strtolower( $_POST['Password'] ) ) ); | |
$db->Execute( $sql, 'user_pass' ); |
This file contains hidden or 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 | |
$uri = parse_url($_SERVER['REQUEST_URI']); | |
$path = explode('/', $uri['path']); | |
define('IS_HOME', (empty($path[1]))); | |
define('IS_ADMIN', ($path[1] === 'admin')); | |
define('IS_NEWS', ($path[1] === 'news')); | |
define('IS_CONTACT', ($path[1] === 'contact')); |
This file contains hidden or 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 // File: index.php | |
const JPATH_BASE = __DIR__; | |
require_once JPATH_BASE . '/libraries/joomla/loader.php'; | |
Joomla\Loader::registerNamespace('Joomla', JPATH_BASE . '/libraries/joomla'); | |
Joomla\Application\Web::getInstance('\\Joomla\\Application\\Web')->execute(); |
This file contains hidden or 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 | |
return array( | |
'JAccess' => 'Joomla\\Access\\Access', | |
'JAccessRule' => 'Joomla\\Access\\Rule', | |
'JAccessRules' => 'Joomla\\Access\\Rules', | |
'JApplicationBase' => 'Joomla\\Application\\Base', | |
'JApplicationCli' => 'Joomla\\Application\\Cli', | |
'JApplicationDaemon' => 'Joomla\\Application\\Daemon', | |
'JRoute' => 'Joomla\\Application\\Route', |
This file contains hidden or 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
{ | |
"require": { | |
"joomla/platform": ">=13.2" | |
}, | |
"minimum-stability": "dev", | |
"require-dev": { | |
"phpunit/phpunit": "3.7.*" | |
}, | |
"config": { | |
"bin-dir": "bin", |
This file contains hidden or 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 | |
/** | |
* @version 1.0.0 | |
* @package com_stats | |
* @copyright Copyright (C) 2012. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
// No direct access. | |
defined('_JEXEC') or die; |