<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stei{nerd}.com &#187; CodeIgniter</title>
	<atom:link href="http://steinerd.com/category/scripts/codeigniter/feed/" rel="self" type="application/rss+xml" />
	<link>http://steinerd.com</link>
	<description>Development, Ideas &#38; Thoughts of Anthony Steiner</description>
	<lastBuildDate>Mon, 21 Jun 2010 00:09:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Combustion Logo Concept</title>
		<link>http://steinerd.com/scripts/codeigniter/combustion-logo-concept/</link>
		<comments>http://steinerd.com/scripts/codeigniter/combustion-logo-concept/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 22:11:29 +0000</pubDate>
		<dc:creator>steiner</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Combustion]]></category>

		<guid isPermaLink="false">http://steinerd.com/?p=91</guid>
		<description><![CDATA[Got bored and thought it would be cool to create an inspirational brand-name design for my Combustion project.]]></description>
			<content:encoded><![CDATA[<p>Got bored and thought it would be cool to create an inspirational brand-name design for my Combustion project.</p>
]]></content:encoded>
			<wfw:commentRss>http://steinerd.com/scripts/codeigniter/combustion-logo-concept/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Combustion &#8211; A CodeIgniter CMS</title>
		<link>http://steinerd.com/scripts/codeigniter/codeigniter-combustion/</link>
		<comments>http://steinerd.com/scripts/codeigniter/codeigniter-combustion/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 04:29:16 +0000</pubDate>
		<dc:creator>steiner</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Combustion]]></category>
		<category><![CDATA[Elliot Haughin]]></category>
		<category><![CDATA[ExpressionEngine]]></category>

		<guid isPermaLink="false">http://steinerd.com/?p=82</guid>
		<description><![CDATA[Reading 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 [...]]]></description>
			<content:encoded><![CDATA[<p>Reading around the www for any existing medium-scale CodeIgniter based <abbr title="Content Management System">CMS</abbr> and I came across one.</p>
<p>It was by Elliot Haughin and the topic was found <a class="external" href="http://www.haughin.com/2008/02/19/blaze-a-codeigniter-cms/" target="_blank">here</a> on his public blog. I was impressed by his willingness to get something out there for us avid CodeIgniter developers to use!</p>
<p>He called his project <strong><em>CodeIgnition</em> </strong>at launch, and eventually became <strong><em>Blaze</em></strong>. 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&#8217;t exactly the way he felt it should be. Also CodeIgniter will most likely be bringing out a new version post-launch of <abbr title="ExpressionEngine">EE</abbr> 2.0<a class="external" title="Open Expression Engine Site in New Window" href="http://expressionengine.com/" target="_blank"> </a>.</p>
<p>Well, I&#8217;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 &#8220;Combustion&#8221;.</p>
<p>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&#8217;t require anyone to keep my name or site on the visible copyright, just in the source. Something I&#8217;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).</p>
<p>I&#8217;ll keep everyone in the loop who is interested.</p>
<p>If anyone out there wants to start a collaborative project on this, get in contact with me! I&#8217;ll even take a back seat position if a project is already started.</p>
]]></content:encoded>
			<wfw:commentRss>http://steinerd.com/scripts/codeigniter/codeigniter-combustion/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Language Class &#8211; Database</title>
		<link>http://steinerd.com/scripts/codeigniter/language-class-databased/</link>
		<comments>http://steinerd.com/scripts/codeigniter/language-class-databased/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 06:22:26 +0000</pubDate>
		<dc:creator>steiner</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false">http://steinerd.com/?p=51</guid>
		<description><![CDATA[Well, the other day I was looking around in CodeIgniter&#8217;s User Guide, and noticed it utilized a simple dynamic language class. Well, as great as that is&#8230; not everyone on the sites I&#8217;m using CodeIgniter on is a developer, or even has any knowledge/access to change these files. So I go to thinking&#8230; and eureka! [...]]]></description>
			<content:encoded><![CDATA[<p>Well, the other day I was looking around in <a href="http://codeigniter.com/user_guide" target="_blank">CodeIgniter&#8217;s User Guide</a>, and noticed it utilized a simple dynamic <a href="http://codeigniter.com/user_guide/libraries/language.html" target="_blank">language class</a>.</p>
<p>Well, as great as that is&#8230; not everyone on the sites I&#8217;m using CodeIgniter on is a developer, or even has any knowledge/access to change these files.</p>
<p>So I go to thinking&#8230; and eureka! Make it so that if the file_system can&#8217;t find the text called, than look in a database table.</p>
<hr /><strong>Step 1:</strong> <span style="text-decoration: underline;">Create the Table</span></p>
<p><br class="spacer_" /></p>
<p>We&#8217;re going to have to create a table in order for the language to be thrown on to.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p51code3'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p513"><td class="code" id="p51code3"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- ----------------------------</span>
<span style="color: #808080; font-style: italic;">-- Table structure for language</span>
<span style="color: #808080; font-style: italic;">-- ----------------------------</span>
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`language`</span>
<span style="color: #66cc66;">&#40;</span>
 <span style="color: #ff0000;">`id`</span> INT<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">auto_increment</span><span style="color: #66cc66;">,</span>
 <span style="color: #ff0000;">`key`</span> VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> collate utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
 <span style="color: #ff0000;">`language`</span> VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> collate utf8_unicode_ci <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'english'</span><span style="color: #66cc66;">,</span>
 <span style="color: #ff0000;">`set`</span> VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> collate utf8_unicode_ci <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
 <span style="color: #ff0000;">`text`</span> longtext collate utf8_unicode_ci<span style="color: #66cc66;">,</span>
 <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">`id`</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>
ENGINE <span style="color: #66cc66;">=</span> MyISAM <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> CHARSET <span style="color: #66cc66;">=</span> utf8 COLLATE <span style="color: #66cc66;">=</span> utf8_unicode_ci CHECKSUM <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span></pre></td></tr></table></div>

<p>Feel free to tweak this how you see fit&#8230; though keep in mind you will have to change the object or array calls in the class to reflect it.</p>
<p>Now download and install this file into your <em>../application/libraries/</em> directory, and make sure that the <em><strong>MY_</strong></em> on both the file name and the class is what your <em>&#8230;/application/config/config.php </em>::<em> subclass_prefix </em>is set to. (<em><strong>MY_</strong> </em>is default)</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p51code4'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p514"><td class="code" id="p51code4"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">Class</span> MY_Language <span style="color: #000000; font-weight: bold;">extends</span> CI_Language <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$language</span>	<span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$is_loaded</span>	<span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$idiom</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$set</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$line</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$CI</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		parent<span style="color: #339933;">::</span><span style="color: #004000;">CI_Language</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #009933; font-style: italic;">/**
	 * 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
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> load<span style="color: #009900;">&#40;</span><span style="color: #000088;">$langfile</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$idiom</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$return</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// Calling early before CI reformats them</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$langfile</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">idiom</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$idiom</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$langfile</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span>EXT<span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_lang.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$langfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'_lang'</span><span style="color: #339933;">.</span>EXT<span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$langfile</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_loaded</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$idiom</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$CI</span> <span style="color: #339933;">=&amp;</span> get_instance<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$deft_lang</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">config</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'language'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$idiom</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$deft_lang</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'english'</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$deft_lang</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">idiom</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$idiom</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #666666; font-style: italic;">// Determine where the language file is and load it</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span>APPPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'language/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$idiom</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$langfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>APPPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'language/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$idiom</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$langfile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">else</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span>BASEPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'language/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$idiom</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$langfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>BASEPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'language/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$idiom</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$langfile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #b1b100;">else</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$database_lang</span> <span style="color: #339933;">=</span>  <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_get_from_db<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$database_lang</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$lang</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$database_lang</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
					show_error<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Unable to load the requested language file: language/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$langfile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lang</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			log_message<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'error'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Language file contains no data: language/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$idiom</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$langfile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$return</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$lang</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_loaded</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$langfile</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">language</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">language</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lang</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lang</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		log_message<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'debug'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Language file loaded: language/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$idiom</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$langfile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #009933; font-style: italic;">/**
	 * Load a language from database
	 *
	 * @access	private
	 * @return	array
	 */</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _get_from_db<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$CI</span> <span style="color: #339933;">=&amp;</span> get_instance<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">select</span>   <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span>	 <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'language'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">where</span>	<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'language'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">idiom</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">where</span>	<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'set'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">result</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$query</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$return</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">key</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$CI</span><span style="color: #339933;">,</span> <span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$return</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://steinerd.com/scripts/codeigniter/language-class-databased/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
