Skip to content

Instantly share code, notes, and snippets.

View jlleblanc's full-sized avatar
📈
Investing

Joe LeBlanc jlleblanc

📈
Investing
View GitHub Profile
@jlleblanc
jlleblanc / gist:2024800
Created March 12, 2012 21:30
eval() is evil, but sometimes evil wins...
<?php
public function get_old_joomla_config()
{
if (!isset($this->old_config)) {
$path = JPath::clean($this->path);
$old_config = file_get_contents($path . '/configuration.php');
$old_config = JString::str_ireplace('JConfig', 'JConfigold', $old_config);
$old_config = JString::str_ireplace('<?php', '', $old_config);
function comma_format_number (value) {
value = value.replace(/,/g, '');
var lead = value.length % 3;
var lead_segment = value.substring(0, lead);
value = value.substring(lead, value.length);
value = value.match(/(\d{3})/g);
if (value != null && value.length > 0) {
<?php
defined( '_JEXEC' ) or die;
/**
* An helper class for generating dropdowns in Joomla.
*
* @package default
* @author Joseph LeBlanc
*/
class SmartDrops