Combustion Logo Concept
Got bored and thought it would be cool to create an inspirational brand-name design for my Combustion project.
read moreGot bored and thought it would be cool to create an inspirational brand-name design for my Combustion project.
read moreReading around the www for any existing medium-scale CodeIgniter based CMS and I came across one.
It was by Elliot Haughin and the topic was found here on his public blog. I was impressed by his willingness to get something out there for us avid CodeIgniter developers to use!
He called his project CodeIgnition at launch, and eventually became Blaze. However it seems he has taken it down. It started as a simple proof-of-concept project and by the first release candidate/beta, he stated on his blog it wasn’t exactly the way he felt it should be. Also CodeIgniter will most likely be bringing out a new version post-launch of EE 2.0 .
Well, I’ve decided to take the inspiration he had seem to have at the beginning of the project and create my own version of a CodeIgniter CMS dubbed “Combustion”.
It will be designed with the ideal in mind that fellow developers will use it for commissions, therefore easily change out the copyright tags to read the designer of the site. I won’t require anyone to keep my name or site on the visible copyright, just in the source. Something I’ve been looking for, for quite some time now is an easily implemented CMS that does the basics and can be expanded by a series of self-writ modules (or from a library of modules/controllers/libs from CI Wiki, lol).
I’ll keep everyone in the loop who is interested.
If anyone out there wants to start a collaborative project on this, get in contact with me! I’ll even take a back seat position if a project is already started.
read moreWell, the other day I was looking around in CodeIgniter’s User Guide, and noticed it utilized a simple dynamic language class.
Well, as great as that is… not everyone on the sites I’m using CodeIgniter on is a developer, or even has any knowledge/access to change these files.
So I go to thinking… and eureka! Make it so that if the file_system can’t find the text called, than look in a database table.
We’re going to have to create a table in order for the language to be thrown on to.
-- ---------------------------- -- Table structure for language -- ---------------------------- CREATE TABLE `language` ( `id` INT(10) NOT NULL auto_increment, `key` VARCHAR(255) collate utf8_unicode_ci NOT NULL, `language` VARCHAR(255) collate utf8_unicode_ci NOT NULL DEFAULT 'english', `set` VARCHAR(255) collate utf8_unicode_ci DEFAULT NULL, `text` longtext collate utf8_unicode_ci, PRIMARY KEY (`id`) ) ENGINE = MyISAM AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci CHECKSUM = 1 |
Feel free to tweak this how you see fit… though keep in mind you will have to change the object or array calls in the class to reflect it.
Now download and install this file into your ../application/libraries/ directory, and make sure that the MY_ on both the file name and the class is what your …/application/config/config.php :: subclass_prefix is set to. (MY_ is default)
Class MY_Language extends CI_Language { var $language = array(); var $is_loaded = array(); var $idiom; var $set; var $line; var $CI; function __construct() { parent::CI_Language(); } /** * Load a language file * * @access public * @param mixed the name of the language file to be loaded. Can be an array * @param string the language (english, etc.) * @return mixed */ function load($langfile = '', $idiom = '', $return = FALSE) { // Calling early before CI reformats them $this->set = $langfile; $this->idiom = $idiom; $langfile = str_replace(EXT, '', str_replace('_lang.', '', $langfile)).'_lang'.EXT; if (in_array($langfile, $this->is_loaded, TRUE)) { return; } if ($idiom == '') { $CI =& get_instance(); $deft_lang = $CI->config->item('language'); $idiom = ($deft_lang == '') ? 'english' : $deft_lang; $this->idiom = $idiom; } // Determine where the language file is and load it if (file_exists(APPPATH.'language/'.$idiom.'/'.$langfile)) { include(APPPATH.'language/'.$idiom.'/'.$langfile); } else { if (file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile)) { include(BASEPATH.'language/'.$idiom.'/'.$langfile); } else { $database_lang = $this->_get_from_db(); if ( ! empty( $database_lang ) ) { $lang = $database_lang; }else{ show_error('Unable to load the requested language file: language/'.$langfile); } } } if ( ! isset($lang)) { log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile); return; } if ($return == TRUE) { return $lang; } $this->is_loaded[] = $langfile; $this->language = array_merge($this->language, $lang); unset($lang); log_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile); return TRUE; } /** * Load a language from database * * @access private * @return array */ private function _get_from_db() { $CI =& get_instance(); $CI->db->select ('*'); $CI->db->from ('language'); $CI->db->where ('language', $this->idiom); $CI->db->where ('set', $this->set); $query = $CI->db->get()->result(); foreach ( $query as $row ) { $return[$row->key] = $row->text; } unset($CI, $query); return $return; } } |
Well… I’ve been part of a really cool community called the Titan Network since October of 2008. It’s a webring of great sites and services for the City Of Heroes players.
I was brought in to help SuckerPunch/Dan Cunha make his original script known as “SuckerPunch’s Online Planner” even better than it was before by bringing in a series of useful calculations that would normally only be found in an application.
Well… a few months pass and Titan founders Sean, Terry and Dan all go into “semi-retirement” and leave the network to TonyV, the founder of ParagonWiki.com, and myself.
With that said, let’s get to the point I’m posting this.
Current Titan Projects:
There is more, but it’s smaller stuff and just haven’t gotten around to it is all.
FUN!
read more