<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">

    <title type="text">CodeIgniter Wiki</title>
    <subtitle type="text">CodeIgniter Wiki</subtitle>
    <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/" />
    <link rel="self" type="application/atom+xml" href="http://codeigniter.com/wiki/Special:Recentchanges_Atom" />
    <updated>2008-09-05T15:39:45Z</updated>
    <rights>Copyright (c) 2007, forums@codeigniter.com</rights>
    <generator uri="http://www.pmachine.com/" version="1.6.3">ExpressionEngine</generator>
    <id>tag:codeigniter.com,2008:09:05:wiki</id>


    <entry>
      <title>Modular Extensions &#45; HMVC</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/" />
      <id>tag:codeigniter.com,2008:wiki:Modular Extensions &#45; HMVC/1068.7685</id>
      <published>2008-09-05T15:39:45Z</published>
      <updated>2008-09-05T15:39:45Z</updated>
      <author>
            <name>sophistry</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p><a href="http://codeigniter.com/wiki/Category:Extensions/" title="Category:Extensions">Category:Extensions</a> | <a href="http://codeigniter.com/wiki/Category:Extensions::HMVC/" title="Category:Extensions::HMVC">Category:Extensions -&gt; HMVC</a> | <a href="http://codeigniter.com/wiki/Category:Module/" title="Category:Module">Category:Module</a>
<br />
</p><h3>Modular Extensions - HMVC</h3><p>
Modular Extensions makes CodeIgniter modular. Modules are groups of independent CI components (typically, model, controller, view arranged in one application sub-directory) that can be dropped into CodeIgniter applications. HMVC stands for Hierarchical Model View Controller, which is a fancy way of saying nested modules!
<br />
 
<br />
Module Controllers can be used as normal Controllers or HMVC Controllers and they can be used to help you build view partials.
</p>
<h3>Modular Extensions installation</h3><p>
 1) Start with a clean CI install.
<br />
 2) Set $config[&#8217;base_url&#8217;] correctly for your installation.
<br />
 3) Access the URL domain/subdir/index.php/welcome =&gt; shows Welcome to CodeIgniter
<br />
 4) Drop Modular Extensions libraries into application/libraries and application/helpers directories as specified.
<br />
 5) Access the URL domain/subdir/index.php/welcome =&gt; shows Welcome to CodeIgniter 
<br />
 6) Create module directory structure application/modules/welcome/controllers.
<br />
 7) Move controller application/controllers/welcome.php to application/modules/welcome/controllers/welcome.php.
<br />
 8) Access the URL domain/subdir/index.php/welcome =&gt; shows Welcome to CodeIgniter
<br />
 9) Create directory application/modules/welcome/views.
<br />
10) Move view application/views/welcome_message.php to application/modules/welcome/views/welcome_message.php
<br />
11) Access the URL domain/subdir/index.php/welcome =&gt; shows Welcome to CodeIgniter 
</p>
<p>
You now have a running Modular Extensions installation.
</p>
<p>
<b>Installation Guide Hints:</b>
<br />
-Steps 1-3 tell you how to get a standard CI install working - if you have a clean/tested CI install, skip to step 4.
<br />
-Steps 4-5 show that normal CI still works after installing ME - it shouldn&#8217;t interfere with the normal CI setup.
<br />
-Steps 6-8 show ME working alongside CI - controller moved to the ME &#8220;welcome&#8221; module, the view file remains in the CI application/views directory - ME can find module resources in several places, including the application directory.
<br />
-Steps 9-11 show ME working with both controller and view in &#8220;welcome&#8221; module - there should be no files in the application/controllers or application/views directories.
</p>
<h3>FAQ</h3>
<p>
<b>Q. What are modules, why should I use them? </b>
</p>
<p>
A. <a href="http://en.wikipedia.org/wiki/Module">http://en.wikipedia.org/wiki/Module</a> 
</p>
<p>
<b>Q. What is Modular HMVC, why should I use it? </b>
</p>
<p>
A. Modular HMVC = Multiple MVC triads 
</p>
<p>
This is most useful when you need to load a view and its data within a view. Think about adding a shopping cart to a page. The shopping cart needs its own controller which may call a model to get cart data. Then the controller needs to load the data into a view. So instead of the main controller handling the page and the shopping cart, the shopping cart MVC can be loaded directly in the page. The main controller doesn’t need to know about it, and is totally isolated from it. 
</p>
<p>
In CI we can’t call more than 1 controller per request. Therefore, to achieve HMVC, we have to simulate controllers. It can be done with libraries, or with this “Modular Extensions HMVC” contribution. 
</p>
<p>
The differences between using a library and a “Modular HMVC” HMVC class is: 
<br />
1) No need to get and use the CI instance within an HMVC class 
<br />
2) HMVC classes are stored in a modules directory as opposed to the libraries directory. 
</p>
<p>
<b>Q. Is Modular Extensions HMVC the same as Matchbox? </b>
</p>
<p>
A. Yes and No. Like Matchbox, ME makes modules &#8220;portable&#8221; to other installations. For example, if you make a nice self-contained model-controller-view set of files you can bring that MVC into another project by copying just one folder - everything is in one place instead of spread around model, view and controller folders.
</p>
<p>
ME is different from Matchbox because you can nest those modules. So, from another controller, you can get some of the nice output from the original, tidy MVC set without calling a controller via URI (i.e., another http call using file_get_contents&#40;&#41; or curl). You can get controller output without having to go out through the http interface again.
</p>
<p>
Modular HMVC means modular MVC triads. Matchbox and Modular Extensions allows related controllers, models, libraries, views, etc. to be grouped together in module directories and used like a mini application. But, ME goes one step further and allows those modules to &#8220;talk&#8221; to each other.
</p>
<p>
<span style="color:red;"><b>Note:</b></span>
<br />
You can find more FAQ at the wiki page <a href="http://codeigniter.com/wiki/Modular_Extensions_-_FAQ/" title="Modular_Extensions_-_FAQ">Modular Extensions - FAQ</a>
</p>
<h3>Features:</h3>
<p>
All controllers can contain an $autoload class variable, which holds an array of items to load prior to running the constructor. This can be used instead of module/config/autoload.php, however using the file takes precedence over the class variable. 
<br />
 
<br />
Modules::run() output is buffered, so any data returned or output directly from the controller is caught and returned to the caller. In particular, $this-&gt;load-&gt;view() can be used as you would in a normal controller, without the need for return. 
<br />
 
<br />
Controllers can be loaded as class variables of other controllers using $this-&gt;load-&gt;module(’module/controller’); or simply 
<br />
$this-&gt;load-&gt;module(’module’); if the controller name matches the module name. 
<br />
 
<br />
Any loaded module controller can then be used like a library, ie: $this-&gt;module_controller-&gt;do_stuff(), but it has access to its own models and libraries independently from the caller. 
<br />
 
<br />
Module controllers can have independent methods, located in a module/methods directory, these methods act as libraries extending their parent controller and have access to the parent controller features. 
<br />
 
<br />
Loading a method is achieved from a module controller by using $this-&gt;load-&gt;method(’method’); or from a view by using modules:run(), if the method name is not defined in the controller then the method subclass will be loaded and its own index() method will be called, however if the controller actually has the method, it will be called as normal. 
<br />
 
<br />
Controllers also have a instance() method that can be used instead of get_instance() in libraries and helpers etc. 
<br />
ie: $ci = controller::instance(); 
<br />
 
<br />
Of course all module controllers are accessible from the URL via module/controller/method or simply module/method if the module and controller names match. 
<br />
 
<br />
However if you add the _remap() method to your controllers you can prevent unwanted access to them and redirect or flag an error as you like. 
<br />
 
<br />
</p><h3>Download</h3><p>
Download new version 4.2: <a href="http://codeigniter.com/wiki/File:modular_extensions_4206.zip/" title="File:modular_extensions_4206.zip" class="noArticle">File:modular extensions 4206.zip</a>
<br />
 
<br />
<b>Note: Version 4.2 is not backward compatible with version 4.0</b>
<br />
 
<br />
</p><h3>View Partials</h3><p>
Your modules output will be buffered by the modules::run() function and the explicit return used in earlier versions is no longer required.
<br />
 
<br />
Using a Module as a view partial from within a view is as easy as writing:
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">modules</span><span style="color: #007700">::</span><span style="color: #0000BB">run</span><span style="color: #007700">(</span><span style="color: #DD0000">'module'</span><span style="color: #007700">, </span><span style="color: #0000BB">$data</span><span style="color: #007700">, </span><span style="color: #DD0000">'method'</span><span style="color: #007700">) </span><span style="color: #0000BB">?&gt;</span>
</code></div><p> 
<br />
The $data and &#8216;method&#8217; above are optional. The default method is index.
<br />
 
<br />
</p><h3>Tips and Tricks:</h3><p>
<b>Using language files</b>
<br />
<span style="color:red;">application/modules/home/language/home_lang.php</span>
<br />
Put this in your controller-file:
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">language</span><span style="color: #007700">(</span><span style="color: #DD0000">'home'</span><span style="color: #007700">);</span>
</code></div><p>
</p>
<p>
On your view-file:
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">lang</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">line</span><span style="color: #007700">(</span><span style="color: #DD0000">'name'</span><span style="color: #007700">);</span><span style="color: #0000BB">?&gt;</span>
</code></div><p>
</p>
<p>
If you want to specify the language of the language-file you are going to use, you can alter the first line in something like:
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">language</span><span style="color: #007700">(</span><span style="color: #DD0000">'home'</span><span style="color: #007700">,</span><span style="color: #DD0000">'english'</span><span style="color: #007700">);</span>
</code></div><p>
</p>
<p>
<b>Using debug</b>
<br />
The debug_helper has two debug methods you might like to look at.
<br />
 
<br />
debug($any_object); will display the $any_object and list its loaded libraries, using $this will display the current module.
<br />
 
<br />
debug_in($any_object) or debug_in($any_array) will do a full dump on the subject.
<br />
 
<br />
<span style="color:red;"><b>NOTE:</b></span> 
<br />
If you debug_in() the CodeIgniter Core ($CI), you will get a page full of recursive arrays. This is not an issue because most of the recursions are only references back into $CI core objects.
<br />
 
<br />
</p><h3>Issues</h3><p>
Do not use the <b>MY_Controller</b> extension in your application/libraries directory. This will cause CodeIgniter to bypass loading Modular Extensions and modules will not function. If you need to run methods in a base controller define them in another module controller and use the controller autoload functionality.
<br />
 
<br />
MY_ prefixed resources are not loaded by ME when they are inside the module directory (e.g., MY_directory_helper.php is not loaded when it is in the modulename/helpers directory). This is because ME doesn’t check for MY_ extensions in modules. To get new functionality using helpers, plugins, models, etc&#8230; either make a new named file and load that resource or put your MY_ prefixed resource up in the requisite application directory (helpers for a MY_ helper, libraries for a MY_ library, etc...).
</p>
<p>
<span style="color:red;"><b>NOTE:</b></span>
<br />
Do you get notices or error-messages? You might want to have a look at the wiki page 
<br />
<a href="http://codeigniter.com/wiki/Modular_Extensions_-_Notices_and_errors/" title="Modular_Extensions_-_Notices_and_errors">Modular Extensions - Notices and errors</a> as well.
</p>
<p>
<a href="http://codeigniter.com/wiki/Category:Contributions::Libraries::Miscallenous/" title="Category:Contributions::Libraries::Miscallenous">Category:Contributions -&gt; Libraries -&gt; Miscallenous</a>
</p>
      ]]></content>
    </entry>

    <entry>
      <title>Language Translation</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/Language_Translation/" />
      <id>tag:codeigniter.com,2008:wiki:Language Translation/471.7681</id>
      <published>2008-09-04T13:00:33Z</published>
      <updated>2008-09-04T13:00:33Z</updated>
      <author>
            <name>Dark Preacher</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p><a href="http://codeigniter.com/wiki/Category:Core::Language_Files/" title="Category:Core::Language_Files">Category:Core -&gt; Language Files</a>
</p>
<h3>User Guide Translations</h3><p>
<strong>Spanish</strong> User Guide (1.6.3) in both PDF and HTML - <a href="http://www.conocimientovirtual.edu.co/descargas.html">http://www.conocimientovirtual.edu.co/descargas.html</a>
<br />
<strong>Chinese</strong> User Guide (1.6.3) in HTML(Wiki) - <a href="http://codeigniter.org.cn/user_guide">http://codeigniter.org.cn/user_guide</a>
</p>
<h3>Language Packs</h3>
<p>
For changes between different versions see: <a href="http://codeigniter.com/wiki/Language_Changes/" title="Language_Changes">Language Changes</a>
</p>
<h4>[1.6.0 - 1.6.3]</h4><p>
- BRAZILIAN / PORTUGUESE  (UTF-8)<a href="http://www.iboletim.com.br/download/ci-pt-br-utf-8.zip">Português Brasil</a> (translation: Matheus Bombonato, utf-8 encoding: Marcelo Oliveira)
</p>
<p>
- BRAZILIAN / PORTUGUESE <a href="http://rapidshare.com/files/100611516/ci_pt-br_1.6.1.zip.html">Português Brasil</a> (Matheus Bombonato)
</p>
<p>
- CROATIAN <a href="http://php.com.hr/download/codeigniter_croatian.zip">Hrvatski 1.6.2</a> (Zoran Vucinic)
</p>
<p>
- CZECH (UTF8), <a href="http://codeigniter.com/wiki/File:czech.zip/" title="File:czech.zip" class="noArticle">version 1.6.2</a> (bretik)
</p>
<p>
- GALICIAN <a href="http://www.derekallard.com/img/post_resources/galician1_6_1.zip">http://www.derekallard.com/img/post_resources/galician1_6_1.zip</a>
</p>
<p>
- FRENCH <a href="http://metalking.net/CI_1.6.3_french_metalking.zip">CI_1.6.3_french_metalking.zip</a> (metalking - html accents)
</p>
<p>
- FRENCH <a href="http://tomcode.com/inside/codeigniter/zips/1.6.3_french_tomcode.zip">1.6.3_french_tomcode.zip</a> (tomcode)
</p>
<p>
- FRENCH <a href="http://tomcode.com/inside/codeigniter/zips/1.6.2_french_tomcode.zip">1.6.2_french_tomcode.zip</a> (tomcode)
</p>
<p>
- FRENCH <a href="http://tomcode.com/inside/codeigniter/zips/1.6.1_french_tomcode.zip">1.6.1_french_tomcode.zip</a> (tomcode)
</p>
<p>
- GERMAN <a href="http://tomcode.com/inside/codeigniter/zips/1.6.3_german_tomcode.zip">1.6.3_german_tomcode.zip</a> (tomcode)
</p>
<p>
- GERMAN <a href="http://tomcode.com/inside/codeigniter/zips/1.6.2_german_tomcode.zip">1.6.2_german_tomcode.zip</a> (tomcode)
</p>
<p>
- GERMAN <a href="http://tomcode.com/inside/codeigniter/zips/1.6.1_german_tomcode.zip">1.6.1_german_tomcode.zip</a> (tomcode)
</p>
<p>
- HUNGARIAN <a href="http://codeigniter.com/wiki/File:hungarian163.zip/" title="File:hungarian163.zip" class="noArticle">File:hungarian163.zip</a> (Thoer), (1.6.3)
</p>
<p>
- ITALIAN <a href="http://www.rollcage.it/external/codeigniter/italian_1.6.zip">http://www.rollcage.it/external/codeigniter/italian_1.6.zip</a> (gyo)
</p>
<p>
- PERSIAN <a href="http://www.kishmate.com/CodeIgniter/language/1.6.3_persian.zip">http://www.kishmate.com/CodeIgniter/language/1.6.3_persian.zip</a> (Borzoo Mossavari)
</p>
<p>
- PERSIAN <a href="http://www.kishmate.com/CodeIgniter/language/1.6.2_persian.zip">http://www.kishmate.com/CodeIgniter/language/1.6.2_persian.zip</a> (Borzoo Mossavari)
</p>
<p>
- RUSSIAN <a href="http://rmcreative.ru/files/translations/ci_russian_163.zip">http://rmcreative.ru/files/translations/ci_russian_163.zip</a> (Alexei Shulga / Alexander &#8216;Sam Dark&#8217; Makarov)
</p>
<p>
- SPANISH <a href="http://www.4shared.com/file/57477180/a1c0f41f/163_spanish.html"> Version 1.6.3</a> (Miguel Herrero)
</p>
<p>
- SPANISH <a href="http://www.derekallard.com/img/post_resources/spanish_1_6_1.zip">http://www.derekallard.com/img/post_resources/spanish_1_6_1.zip</a> (ReynierPM, fdog)
</p>
<p>
- SWEDISH <a href="http://www.derekallard.com/blog/post/swedish-language-pack-for-codeigniter-16/">http://www.derekallard.com/blog/post/swedish-language-pack-for-codeigniter-16/</a> (Mikael Johansson)
</p>
<p>
- TURKISH <a href="http://codeigniter.com/wiki/File:turkish_163_utf8.zip/" title="File:turkish_163_utf8.zip" class="noArticle">File:turkish 163 utf8.zip</a> (Fatih BAZMAN / fatigue (1.6.3)), (Note: UTF8 Encoded)
</p>
<p>
</p><h4>[1.5.1 - 1.5.4]</h4><p>
- BULGARIAN <a href="http://www.derekallard.com/img/post_resources/bulgarian.zip">http://www.derekallard.com/img/post_resources/bulgarian.zip</a>
</p>
<p>
- CHINESE <a href="http://www.esnips.com/doc/20161941-c4b4-4460-bd8e-a5fed8a623ef/chinese-1.5.4.rar">chinese for 1.5.4</a> (by speedu)
</p>
<p>
- DANISH <a href="http://www.filepanda.com/get/yldxxzk0/">Danish language pack (1.5.4)</a> (daath, Zacharias)
<br />
<a href="http://mirror.ordo.dk/codeigniter.com/danish_1.5.x.zip">http://mirror.ordo.dk/codeigniter.com/danish_1.5.x.zip</a> (daath, Zacharias)
</p>
<p>
- DUTCH <a href="http://www.nmwebservices.nl/blog/2007/01/07/dutch-translation-of-code-igniter/">Updated Dutch translations</a>
<br />
WARNING! The php-files all end with an empty code after the &#8216;?&gt;&#8217; They could give a &#8216;header already sent&#8217; error.
</p>
<p>
- FRENCH <a href="http://codeigniter.nouvelle-aire.net/">http://codeigniter.nouvelle-aire.net/</a> (mEga)
<br />
<a href="http://metalking.net/ci_v1.5_lang_french.zip">french translation (all new - accents fixed)</a> (metalking.net)
<br />
<a href="http://tomcode.com/inside/codeigniter/zips/ci_v1.5_lang_french_corr.zip">ci_v1.5_lang_french_corr.zip</a> (tomcode), (Note: fixed one left accent in db_lang.php of metalking&#8217;s version)
</p>
<p>
- GALICIAN <a href="http://www.derekallard.com/img/post_resources/galician1_5_3.zip">http://www.derekallard.com/img/post_resources/galician1_5_3.zip</a>
</p>
<p>
- GERMAN <a href="http://codeigniter.com/wiki/File:ci_GermanTranslations_1.5.4.zip/" title="File:ci_GermanTranslations_1.5.4.zip" class="noArticle">File:ci GermanTranslations 1.5.4.zip</a> (UnrealMinds), (Note: umlauts as html entities)
<br />
<a href="http://codeigniter.com/wiki/File:codeigniter_language_german.zip/" title="File:codeigniter_language_german.zip" class="noArticle">File:codeigniter language german.zip</a> (ArtemisX), (Note: umlauts as html entities)
<br />
<a href="http://www.berndmatzner.de/codeigniter/ci_lang_german_1.5.1.zip">http://www.berndmatzner.de/codeigniter/ci_lang_german_1.5.1.zip</a> (bmatzner), (Note: including Sentry language file)
</p>
<p>
- ITALIAN <a href="http://www.rollcage.it/external/codeigniter/italian_1.5.zip">http://www.rollcage.it/external/codeigniter/italian_1.5.zip</a> (gyo)
</p>
<p>
- JAPANESE <a href="http://www.cilab.info/data/japanese_translations1.5.zip">http://www.cilab.info/data/japanese_translations1.5.zip</a>
<br />
Japanese version user guide is also available at: <a href="http://userguide.cilab.info/">http://userguide.cilab.info/</a>
</p>
<p>
- ROMANIAN <a href="http://www.derekallard.com/img/post_resources/romanian.zip">http://www.derekallard.com/img/post_resources/romanian.zip</a> (Marius Visan)
</p>
<p>
- SPANISH <a href="http://www.derekallard.com/img/post_resources/spanish_1.5.x.zip">http://www.derekallard.com/img/post_resources/spanish_1.5.x.zip</a> (ReynierPM)
<br />
<a href="http://www.tractores.co.cr/spanish_1.6.x.zip">http://www.tractores.co.cr/spanish_1.6.x.zip</a>
</p>
<p>
- TURKISH <a href="http://codeigniter.com/wiki/File:turkish_153_utf8.zip/" title="File:turkish_153_utf8.zip" class="noArticle">File:turkish 153 utf8.zip</a> (M.Musa Ülker - musaulker), (Note: UTF8 Encoded)
<br />
<a href="http://codeigniter.com/wiki/File:turkish_153_windows1254.zip/" title="File:turkish_153_windows1254.zip" class="noArticle">File:turkish 153 windows1254.zip</a> (M.Musa Ülker - musaulker), (Note: Windows-1254 Encoded)
<br />
</p><h4>[1.4.1]</h4><p>
- FRENCH <a href="http://codeigniter.nouvelle-aire.net/">http://codeigniter.nouvelle-aire.net/</a> (mEga)
</p>
<p>
- SPANISH <a href="http://www.derekallard.com/img/post_resources/spanish_1.4.x.zip">http://www.derekallard.com/img/post_resources/spanish_1.4.x.zip</a> (ReynierPM)
</p>
<h4>[1.3.3]</h4><p>
- CHINESE <a href="http://my.opera.com/yarco/homes/blog/chinese.tar.gz">http://my.opera.com/yarco/homes/blog/chinese.tar.gz</a> (by yarco)
</p>
<p>
- GERMAN <a href="http://tomcode.com/inside/codeigniter/zips/ci_german_translations_1.3.3_v1.zip">http://tomcode.com/inside/codeigniter/zips/ci_german_translations_1.3.3_v1.zip</a> (tomcode)
</p>
<p>
- POLISH <a href="http://prdownloads.sourceforge.net/rkcmf/polish_code_igniter.zip?download">http://prdownloads.sourceforge.net/rkcmf/polish_code_igniter.zip?download</a> (riklaunim, groadin)
</p>
<p>
- SPANISH <a href="http://www.semjanelas.net/codeigniter/ci_spanish_1.3.3.zip">http://www.semjanelas.net/codeigniter/ci_spanish_1.3.3.zip</a> (ReynierPM)
</p>
<h4>[1.3]</h4><p>
- ITALIAN <a href="http://www.rollcage.it/external/codeigniter/italian_1.3.zip">http://www.rollcage.it/external/codeigniter/italian_1.3.zip</a> (gyo)
</p>
      ]]></content>
    </entry>

    <entry>
      <title>Applications Using Code Igniter</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/Applications_Using_Code_Igniter/" />
      <id>tag:codeigniter.com,2008:wiki:Applications Using Code Igniter/450.7680</id>
      <published>2008-09-04T10:01:36Z</published>
      <updated>2008-09-04T10:01:36Z</updated>
      <author>
            <name>DyaGa</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p><a href="http://codeigniter.com/wiki/Category:Applications/" title="Category:Applications">Category:Applications</a>
</p>
<h3>Projects using CodeIgniter (source code available)</h3>
<p>
<b><a href="http://www.bambooinvoice.org/">BambooInvoice</a></b>
</p>
<p>
<b><a href="http://www.Iheartrant.com/">Rant</a></b> = <a href="http://www.Iheartrant.com/">Wiki</a> : <a href="http://codeigniter.com/forums/viewthread/47731/P0/">Forum</a>
</p>
<p>
<b><a href="http://www.4webby.com/freakauth/">FreakAuth</a></b>
<br />
CI drop-in authentification system.
</p>
<p>
<b><a href="http://classroombookings.com/">Classroombookings</a></b>
<br />
Room booking system for schools.
</p>
<p>
<b><a href="http://myfina.ridinglinux.org/">MyFina</a></b>
<br />
Web-based personal financial management system.
</p>
<p>
<b><a href="http://68kb.com">68 Knowledge Base</a></b>
<br />
68KB is a knowledge base script.&nbsp; It was built with the site owner in mind and to be as simple to work with as possible.
</p>
<p>
<b><a href="http://www.assembla.com/wiki/show/linkster">Linkster, PHP Link Directory</a></b>
<br />
Growing out of a need for simple categorical organization, Linkster aims to be the simple solution. Specifically built for link directories, such as a collection of your business partners. <a href="http://demo.codeigniterdirectory.com/">Demo available here</a>. 
</p>
<p>
<b><a href="http://max-3000.com/">MaxSite CMS</a></b>
<br />
WordPress-like blog CMS. In heavy development. Documentation is in Russian only for now.
<br />
<b><a href="http://code.google.com/p/planet-ci/">Planet CI</a></b>
<br />
Planet CI is a Feed/RSS agregator reader using PHP. Its similar to <a href="http://www.planetplanet.org/">planetplanet</a> but its on perl langguage. Planet CI using codeigniter and simple pie. you can se the demo at <a href="http://planet.ilkom.org/">planet.ilkom.org</a>.
</p>
<h3>Projects using Code Igniter</h3>
<p>
<b><a href="http://blogfrog.pl/">BlogFrog</a></b> blog aggegate service
</p>
<p>
<b><a href="https://www.mindzinger.com/">MindZinger</a></b> is mainly a question-answer site for students and tutors. Also it has a section that is pretty similar to hotornot.com, and a forum (based on phpbb2), etc. Registration is free. All created on top of a plain code igniter installation by <a href="http://www.pengekcs.com">www.pengekcs.com</a> - you can reach me on yahoo at pengekcs [at] yahoo [dot] com
</p>
<p>
<b><a href="http://www.bambooinvoice.org/">BambooInvoice</a></b> is free open-source invoicing software intended for small businesses and independent contractors. <i>code is available</i> Also see this <a href="http://www.codeigniter.com/forums/viewthread/705/">forum thread</a>.
</p>
<p>
<b><a href="http://www.motortopia.com/">Motortopia</a></b>. A motor enthusiast social networking site focused on peoples passion for motor vehicles. Site features Web 2.0 interface, cross-browser compatability, degradability, accessability and web standards compliance.
</p>
<p>
<b><a href="http://www.todlaciebie.pl/">ToDlaCiebie.pl</a></b> - website built entirely with CI, collects best gift ideas from Polish e-shops (&#8217;to dla ciebie&#8217; means &#8216;this is for you&#8217;).
</p>
<p>
<b><a href="http://www.nuherbs.com/">Nuherbs.com</a></b> - Chinese herbs and medicine site built in CI. Has product ordering and full account access.
</p>
<p>
<b><a href="http://peterbaker.net/">PeterBaker.net</a></b> - Portfolio for the photographer, built in CI and using jquery for some effects.
</p>
<p>
<b><a href="http://www.snowshoeconditions.com/">Snowshoe Conditions</a></b> - A site for people to check back-country snow conditions before heading out for the day, everything is user-submitted.
</p>
<p>
<b><a href="http://www.creatieve-cursussen.nl">Creatieve-Cursussen.nl</a></b> - Dutch website listing creative courses. Also uses Jquery and a google maps api class.
</p>
<p>
<b><a href="http://britcaster.com">BritCaster.com</a></b> - An aggregator and hub for podcasts - UK focused. Generates aggregated RSS feeds for serialised content and a unique custom keyword RSS creator (FeedMe!).
</p>
<p>
<b><a href="http://www.sign-up-sheet.com">Sign-Up-Sheet</a></b> - Super simple web based sign-up-sheet program.
</p>
<p>
<b><a href="http://www.badgetracker.com">BadgeTracker</a></b> - A web app, built using CI, that handles activity registration and camp management for summer camps.
</p>
<p>
<b><a href="http://classroombookings.com/">Classroombookings</a></b>. An open-source easy to use web-based room booking system for schools.
</p>
<p>
<b><a href="http://www.zoekipedia.nl/">Zoekipedia</a></b>. Dutch Wikipedia searchengine. build in CI 1.5.2 Project from Auke Jongbloed and under constant development.
</p>
<p>
<b><a href="http://www.webacana.com.br/">Webacana</a></b>. Brazilian movie rental service (like Netflix). build in CI 1.5.1 Project from Jesse Jr and under constant development too.
</p>
<p>
<b><a href="http://www.morechevrolet.com/">More Chevrolet</a></b>. Auto dealer site build completely with Code Igniter, with full administrative and CMS.
</p>
<p>
<b><a href="http://www.reggaeplanet.pl/">Reggae Planet</a></b>, <b><a href="http://www.metaltown.pl/">Metal Town</a></b>, <b><a href="http://www.punkspace.pl/">Punk Space</a></b>. Polish e-shops for reggae, metal and punk music fans.
</p>
<p>
<b><a href="http://www.gayticketshop.nl/">Gayticketshop.nl</a></b> - Dutch webshop for ordering tickets for (gay) parties and events. Built and maintained in latest CI version.
</p>
<p>
<b><a href="http://www.solid.lt/">Solid.lt</a></b>. Lithuanian hosting provider.
</p>
<p>
<b><a href="http://www.webhostninja.com/">WebHostNinja.com</a></b>. Price and feature comparison for web hosting.
</p>
<p>
<b><a href="http://d.sumy.ua/mng/">Music News Generator</a></b> - lets you generate music release news code (BB-Code, XHTML code and any other) for blogs, forums etc. using data recieved from <a href="http://www.discogs.com/">Discogs</a> and <a href="http://www.last.fm/">Last.fm</a> music community sites.
</p>
<h3>Work-in-progress projects using Code Igniter</h3><p>
<b><a href="http://cornnery.kelio.org/">morel cornnery</a></b>. a project Meeting site based on CI  1.5.4 from dakar senegal  .
<br />
<b><a href="http://franchisebean.com/">Franchise Bean</a></b>. An online resource for franchise companies that allows to set up profiles and generate leads.
</p>
<p>
<b><a href="http://www.digital-design.it/">Digital Design</a></b> a website built on CI 1.4.1, jquery js/ajax library and some google api flavour. Still under construction. They plan to release the source when they are done.
</p>
<p>
<b><a href="http://www.interlinkairlines.com/">Interlink Airlines</a></b> Still under construction, due for release soon. Complete rewrite of Airline booking system + admin facility + major features upgrade.
</p>
<p>
<b><a href="http://www.granitiworld.com/">GranitiWorld</a></b> - Just a personal site about Graniti, Italy.
</p>
<p>
<b><a href="http://www.lovetech.net/">Lovetech</a></b>  - Personal website. Started Dec 06. Heading for commerical cms. Or for charity. Or both. Still practicing, Finland.
</p>
<p>
<b><a href="http://3m2.net/sl/vouge/"> SLVouge </a> </b> - Web Site for an already active Second Life Fashion Magazine. Not yet finished and still in development.
</p>
<p>
<b><a href="http://www.overfood.com/"> overfood.com </a> </b> - The site currently features a restaurant search of the Chefmoz database with restaurants mapped using Google Maps. The search uses xajax for an autocomplete when searching by city. It also uses the mootools accordion effect to switch between search types. 
</p>
<p>
<b><a href="http://www.mobilu.lt/">Mobilu.lt</a></b>. Lithuanian site. It&#8217;s cell phones classifieds system. Built on CI 1.5.3. Uses a little bit of XAJAX library.
</p>
<p>
<b><a href="http://www.dwi.web.id/">Blog System</a></b>. An Indonesian CMS Blog, will release the source when it have done.
</p>
<h3>Websites using Code Igniter</h3>
<p>
<b><a href="http://www.operamage.com">Prodotti Tipici</a></b> - Vendita online di prodotti tipici | Italian special alimentar products e-Commerce
</p>
<p>
<b><a href="http://bestpartyever.com">Party Ideas and Party Planning</a></b> - at bestpartyever.com - CI,1.6.1
</p>
<p>
<b><a href="http://www.rsciranjang.com">Rumah Sakit Ciranjang</a></b> - Ciranjang Hospital Website. Based on CI 1.6
</p>
<p>
<b><a href="http://www.diksphoto.com">Dik&#8217;s Photography</a></b> - Indonesian Photographer Website. Based on CI 1.5
</p>
<p>
<b><a href="http://www.spiceit.co.uk/">SpicY Web+Design</a></b> - Website based on CI 1.5
</p>
<p>
<b><a href="http://www.networkartisan.co.uk/">Network Artisan</a></b> - UK catering supplier based on CI 1.5.
</p>
<p>
<b><a href="http://www.422south.com/">422 South</a></b> - VFX House website based on CI 1.5
</p>
<p>
<b><a href="http://www.michel-ange.fr/">Michel-Ange Kuntz - Photo blog</a></b> - Built using CI 1.5. Back-office : &#8220;Partikule CMS&#8221; based on CI 1.5.
</p>
<p>
<b><a href="http://www.wissamjoubran.com/">Wissam Joubran website</a></b> - Wissam Joubran luthier web site. Front-end based on Code Igniter. Back-office : &#8220;Partikule CMS&#8221; based on Code Igniter.
</p>
<p>
<b><a href="http://www.sheybal.waw.pl/">Aleksandra Sheybal &amp; Family</a></b> - first version of private family website (it&#8217;s still growing with features - if it&#8217;s too small - please remove it from list ;-))
</p>
<p>
<b><a href="http://www.tomwelshbuilder.com/">Thomas Welsh Builders, LLC</a></b> Built using CI 1.5, has property management backend and more - 100% CI!
</p>
<p>
<b><a href="http://c7.se/">c7 mobile blog</a></b> - Personal moblog, updated to Code Igniter over one evening.
</p>
<p>
<b><a href="http://browniethecow.org/">BrownieTheCow.org</a></b> - School testing activist web site. All Code Igniter (front and backend) and a bit of jQuery.
<br />
<b><a href="http://wissahickon.patrails.org/">Wissahickon Restoration Volunteers</a></b> - Environmental group / member-supported, volunteer-driven nonprofit. All CI.
<br />
<b><a href="http://www.theclientele.co.uk/">www.theclientele.co.uk</a></b> - web site for the band &#8216;the clientele&#8217; (merge records). 
</p>
<p>
<b><a href="http://pipasforthepeople.com/">pipasforthepeople.com</a></b> - band web site. tour dates, blog stuff and the rest of the site all done with CI.
</p>
<p>
<b><a href="http://www.pixelsandcode.net/">Pixels and Code, LLC</a></b> - Forward-thinking web design and development
</p>
<p>
<b><a href="http://www.systematix.co.uk/">Systematix Computer Training</a></b> - UK commercial training website rewritten in CI 1.5.1
</p>
<p>
<b><a href="http://www.jomm.nl/">Jongbloed MultiMedia</a></b>. Home of Dutch Freelance webdeveloper Auke Jongbloed. Front and back-end build in CI 1.5.2 using mootools for effects.
</p>
<p>
<b><a href="http://www.club-3d.com/">Club 3D </a></b>. Graphics and Multimedia card company. Front and back-end build in CI 1.5.2 extended with Xajax library.
</p>
<p>
<b><a href="http://www.monpatelin.fr/">MonPatelin.fr</a></b>. French website of local classifieds.
</p>
<p>
<b><a href="http://rmcreative.ru/">RMCreative</a></b>. Sam Dark&#8217;s custom blog written from scratch with CI.
</p>
<p>
<b><a href="http://www.lirikita.com/">Lirikita</a></b>. Lyric and  video download written from scratch with CI.
</p>
<p>
<b><a href="http://www.scholl.com.pl/">Scholl</a></b>. Shoes and foot care company - polish version written from scratch with CI.
</p>
      ]]></content>
    </entry>

    <entry>
      <title>Professional CodeIgniter</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/Professional_CodeIgniter/" />
      <id>tag:codeigniter.com,2008:wiki:Professional CodeIgniter/1427.7679</id>
      <published>2008-09-04T09:14:11Z</published>
      <updated>2008-09-04T09:14:11Z</updated>
      <author>
            <name>maesk</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p><a href="http://codeigniter.com/wiki/Category:Books/" title="Category:Books">Category:Books</a>
</p>
<p>
<img src="http://media.wiley.com/product_data/coverImage/52/04702824/0470282452.jpg"  alt='0470282452.jpg' />
</p>
<h3>Overview</h3><p>
Title: Professional CodeIgniter
<br />
Author: Thomas Myer
<br />
336 pages (paperback)
<br />
Publisher: Wrox (July 28, 2008)
<br />
Language: English
<br />
ISBN-10: 0470282452
<br />
ISBN-13: 978-0470282458
</p>
<p>
<a href="http://www.wrox.com/WileyCDA/WroxTitle/Professional-CodeIgniter.productCd-0470282452.html">Description of book and excerpts on Publisher&#8217;s Website</a>
</p>
<h3>Reviews on external Websites</h3><p>
<a href="http://www.amazon.com/Professional-CodeIgniter-Thomas-Myer/dp/0470282452">Amazon</a>
</p>
      ]]></content>
    </entry>

    <entry>
      <title>CodeIgniter for Rapid PHP Application Development</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/CodeIgniter_for_Rapid_PHP_Application_Development/" />
      <id>tag:codeigniter.com,2008:wiki:CodeIgniter for Rapid PHP Application Development/1425.7678</id>
      <published>2008-09-04T09:00:56Z</published>
      <updated>2008-09-04T09:00:56Z</updated>
      <author>
            <name>maesk</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p><a href="http://codeigniter.com/wiki/Category:Books/" title="Category:Books">Category:Books</a> 
</p>
<p>
<img src="http://ecx.images-amazon.com/images/I/41zihepYf2L._SL500_AA240_.jpg"  alt='41zihepYf2L._SL500_AA240_.jpg' />
</p>
<h3>Overview</h3><p>
Title: CodeIgniter for Rapid PHP Application Development
<br />
Author: David Upton
<br />
220 pages (Paperback)
<br />
Publisher: Packt Publishing (July 23, 2007)
<br />
Language: English
<br />
ISBN-10: 1847191746
<br />
ISBN-13: 978-1847191748
</p>
<p>
<a href="http://www.packtpub.com/codeigniter-php-application-development-mvc/book">http://www.packtpub.com/codeigniter-php-application-development-mvc/book</a>
</p>
<h3>Reviews on other Sites</h3><p>
<a href="http://www.amazon.de/Codeigniter-Rapid-PHP-Application-Development/dp/1847191746/ref=sr_1_2?ie=UTF8&amp;s=books-intl-de&amp;qid=1220517670&amp;sr=8-2">Amazon</a>
<br />
<a href="http://www.phpclasses.org/reviews/id/1847191746.html">PHPClasses</a>
<br />
<a href="http://www.derekallard.com/blog/post/review-codeigniter-for-rapid-php-application-development/">Derek Allard&#8217;s Blog</a>
</p>
<h3>Reviews by CodeIgniter Community Memmbers</h3><p>
(Post your review here...)
</p>
      ]]></content>
    </entry>

    <entry>
      <title>Category:Books</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/Category:Books/" />
      <id>tag:codeigniter.com,2008:wiki:Category:Books/1426.7676</id>
      <published>2008-09-04T08:51:13Z</published>
      <updated>2008-09-04T08:51:13Z</updated>
      <author>
            <name>maesk</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <h2>Books on CodeIgniter</h2><p>
Create a page for each book and post your reviews to the according page.
</p>
      ]]></content>
    </entry>

    <entry>
      <title>Modular Extensions &#45; FAQ</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/Modular_Extensions_-_FAQ/" />
      <id>tag:codeigniter.com,2008:wiki:Modular Extensions &#45; FAQ/1327.7668</id>
      <published>2008-09-02T18:15:50Z</published>
      <updated>2008-09-02T18:15:50Z</updated>
      <author>
            <name>tdktank59</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p><a href="http://codeigniter.com/wiki/Category:Library::HMVC/" title="Category:Library::HMVC">Category:Library -&gt; HMVC</a> 
</p>
<p>
<b>Q: What does the abbreviation ME stand for?</b>
<br />
<b>A:</b> In forum threads and the wiki ME is used as a abbreviation for Modular Extensions. 
</p>
<p>
<b>Q: How can I load a module from within a view?</b>
<br />
<b>A:</b> Put the following line in your view file
</p>
<p>
</p><div class="codeblock"><code>
<span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">modules</span><span style="color: #007700">::</span><span style="color: #0000BB">run</span><span style="color: #007700">(</span><span style="color: #DD0000">'MODULE'</span><span style="color: #007700">, </span><span style="color: #0000BB">$data</span><span style="color: #007700">, </span><span style="color: #DD0000">'METHOD'</span><span style="color: #007700">) </span><span style="color: #0000BB">?&gt;</span>
</code></div><p>
</p>
<p>
Explanation:
<br />
MODULE = The name of the module you want to use (required). Example: &#8216;blog&#8217;
<br />
$DATA  = The data which will be available in the method. This can be either a string or an array. (optional)
<br />
METHOD = The controller-&gt;method you want to use. The default method is index. (optional). Example: &#8216;blog_read&#8217;
</p>
<p>
You may return a value as the output of a module controller or you can output a view or simply use echo, because the output is buffered and returned it can be used as needed. 
</p>
<p>
Example:
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">Blog </span><span style="color: #007700">extends </span><span style="color: #0000BB">Controller &#123;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">function </span><span style="color: #0000BB">blog</span><span style="color: #007700">()<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent</span><span style="color: #007700">::</span><span style="color: #0000BB">Controller</span><span style="color: #007700">();&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">function </span><span style="color: #0000BB">blog_read</span><span style="color: #007700">(</span><span style="color: #0000BB">$id</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$data&#91;</span><span style="color: #DD0000">'title'</span><span style="color: #0000BB">&#93; </span><span style="color: #007700">= </span><span style="color: #DD0000">'Title '</span><span style="color: #007700">. </span><span style="color: #0000BB">$id</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">view</span><span style="color: #007700">(</span><span style="color: #DD0000">'blog_read'</span><span style="color: #007700">,</span><span style="color: #0000BB">$data</span><span style="color: #007700">);&nbsp;&nbsp;</span><span style="color: #FF8000">//return is NOT required for views.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return </span><span style="color: #0000BB">$some_data</span><span style="color: #007700">;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//return CAN be used if needed.<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&#125;</span>
</code></div><p>
</p>
<p>
<b>Q: How can I load a model in a controller of a module?</b>
<br />
<b>A:</b> Take the following code as an example:
</p>
<p>
</p><div class="codeblock"><code>
// Loading a model<br /></span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">model</span><span style="color: #007700">(</span><span style="color: #DD0000">'mymodelname'</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">// Using a model<br /></span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">mymodelname</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">function</span><span style="color: #007700">();</span>
</code></div><p>
</p>
<p>
mymodelname = The name of the model you want to load.
<br />
function = The function of the model you want to use.
<br />
The model can be stored in the application folder (system/application/models/mymodelname.php) or in the models folder of a module (system/application/modules/mymodule/models/mymodelname.php)
</p>
<h3>The following is general information and not related to Modular Extensions</h3>
<p>
<b>Q: How can I make a difference between the front-end and the back-end (admin) of my web application?</b>
<br />
<b>A:</b> There are more roads leading to Rome. One of your opportunities is to make two applications. But before you do this, you might want to split the application part and the system part of CodeIgniter as described at the wikipage <a href="http://codeigniter.com/wiki/Better_Server_Setup_for_CI/" title="Better_Server_Setup_for_CI">Better Server Setup for CI</a> first. In the coming step-by-step plan I will however reference to CodeIgniter as it comes out of the box.
</p>
<p>
1) Go to your &#8216;system&#8217; directory.
<br />
2) Copy the directory &#8216;application&#8217;, but paste it into the same directory. In Microsoft Windows Explorer your mapstructure will become like:
<br />
</p><div class="codeblock"><code>
<span style="color: #007700">- </span><span style="color: #0000BB">CodeIngiter_1_6_3<br />&nbsp;&nbsp;</span><span style="color: #007700">- </span><span style="color: #0000BB">system &#40;dir&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">- </span><span style="color: #0000BB">application </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">cache </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">codeigniter </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">database </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">fonts </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">helpers </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">language </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">libraries </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">logs </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">plugins </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">scaffolding </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;- </span><span style="color: #0000BB">copy of application </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;- </span><span style="color: #0000BB">user_guide </span><span style="color: #007700">(</span><span style="color: #0000BB">dir</span><span style="color: #007700">)<br />&nbsp;&nbsp;- </span><span style="color: #0000BB">index</span><span style="color: #007700">.</span><span style="color: #0000BB">php</span>
</code></div><p>
3) Rename the directory &#8216;copy of application&#8217; and call it backend. 
<br />
4) Rename the directory &#8216;application&#8217; and call it frontend.
<br />
5) Create a new folder in the CodeIgniter_1_6_3 directory. For example: &#8216;myadmin&#8217;.
<br />
6) Copy the index.php file into &#8216;myadmin&#8217;.
<br />
7) Open CodeIngiter_1_6_3/index.php to change the application_folder variable (line 44) and give it the name of your frontend. In this example: $application_folder = &#8220;frontend&#8221;;
<br />
8) Open CodeIngiter_1_6_3/myadin/index.php to change the system_folder variable (line 26) and update the system folder location. In this example: $system_folder = &#8220;../system&#8221;;
<br />
9) Open CodeIngiter_1_6_3/myadin/index.php to change the application_folder variable (line 44) and give it the name of your backend. In this example: $application_folder = &#8220;backend&#8221;;
</p>
      ]]></content>
    </entry>

    <entry>
      <title>Display helper</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/Display_helper/" />
      <id>tag:codeigniter.com,2008:wiki:Display helper/1379.7667</id>
      <published>2008-08-30T09:41:17Z</published>
      <updated>2008-08-30T09:41:17Z</updated>
      <author>
            <name>Zacharias Knudsen</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p><b>Introduction</b>
</p>
<p>
I noticed my view files get confusing because of all the little checks that have to be made when displaying values. For example
<br />
</p><div class="codeblock"><code>
// data<br /></span><span style="color: #007700">array(<br />&nbsp;&nbsp;&nbsp;array(</span><span style="color: #DD0000">'start_date'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">'2008-01-01'</span><span style="color: #007700">,</span><span style="color: #DD0000">'total'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">'10'</span><span style="color: #007700">),<br />&nbsp;&nbsp;&nbsp;array(</span><span style="color: #DD0000">'start_date'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">'0000-00-00'</span><span style="color: #007700">,</span><span style="color: #DD0000">'total'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">'0'</span><span style="color: #007700">)<br />);<br /></span><span style="color: #FF8000">// view<br /></span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">foreach(</span><span style="color: #0000BB">$rows </span><span style="color: #007700">as </span><span style="color: #0000BB">$row</span><span style="color: #007700">): </span><span style="color: #0000BB">?&gt;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">if(</span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'start_date'</span><span style="color: #0000BB">&#93; </span><span style="color: #007700">!= </span><span style="color: #DD0000">'0000-00-00'</span><span style="color: #007700">) echo </span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'start_date'</span><span style="color: #0000BB">&#93; ?&gt;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">if(</span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'total'</span><span style="color: #0000BB">&#93; </span><span style="color: #007700">!= </span><span style="color: #DD0000">'0'</span><span style="color: #007700">) echo </span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'start_date'</span><span style="color: #0000BB">&#93; ?&gt;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">endforeach </span><span style="color: #0000BB">?&gt;</span>
</code></div><p>
This is why i created the display helper.
</p>
<p>
<b>Code</b> 
<br />
The code is split up in two parts. There are constants and there is the display_helper.php file
</p>
<p>
The constants are added to the config/constants.php files and make it easier for you to change the default value where ever you used it.
<br />
</p><div class="codeblock"><code>
/*<br />| -----------------------------------------------------------------------<br />| Defaults<br />| -----------------------------------------------------------------------<br />*/<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'DEFAULT_DATETIME'</span><span style="color: #007700">,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'0000-00-00 00:00:00'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'DEFAULT_DATETIME_NO_SEC'</span><span style="color: #007700">,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'0000-00-00 00:00'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'DEFAULT_DATE'</span><span style="color: #007700">,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'0000-00-00'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'DEFAULT_TIME'</span><span style="color: #007700">,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'00:00:00'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'DEFAULT_NUMBER'</span><span style="color: #007700">,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'0'</span><span style="color: #007700">);</span>
</code></div><p>
Add as many constants as you need.
</p>
<p>
The display_helper.php file contains the functions used in the view file
<br />
</p><div class="codeblock"><code>
/* <br />| ----------------------------<br />| show value if it's not the same as the default value<br />| ----------------------------<br />*/<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">display</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">,</span><span style="color: #0000BB">$default</span><span style="color: #007700">,</span><span style="color: #0000BB">$replacement </span><span style="color: #007700">= </span><span style="color: #0000BB">NULL</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return (</span><span style="color: #0000BB">$value </span><span style="color: #007700">== </span><span style="color: #0000BB">$default</span><span style="color: #007700">)?(( ! </span><span style="color: #0000BB">is_null</span><span style="color: #007700">(</span><span style="color: #0000BB">$replacement</span><span style="color: #007700">))?</span><span style="color: #0000BB">$replacement</span><span style="color: #007700">:</span><span style="color: #DD0000">''</span><span style="color: #007700">):</span><span style="color: #0000BB">$value</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#125;<br /></span><span style="color: #FF8000">/* <br />| ----------------------------<br />| check if value is (not) the same as the default value<br />| ----------------------------<br />*/<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">is_default</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">,</span><span style="color: #0000BB">$default</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return (</span><span style="color: #0000BB">$value </span><span style="color: #007700">== </span><span style="color: #0000BB">$default</span><span style="color: #007700">)?</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">:</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#125;<br /></span><span style="color: #FF8000">/* <br />| ----------------------------<br />| show value or a formatted string with the value in it when the value exists<br />| ----------------------------<br />*/<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">display_isset</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">,</span><span style="color: #0000BB">$str</span><span style="color: #007700">=</span><span style="color: #DD0000">''</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if( ! isset(</span><span style="color: #0000BB">$value</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return </span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">$str </span><span style="color: #007700">!= </span><span style="color: #DD0000">''</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return </span><span style="color: #0000BB">sprintf</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">,</span><span style="color: #0000BB">$value</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return </span><span style="color: #0000BB">$value</span><span style="color: #007700">; <br /></span><span style="color: #0000BB">&#125;</span>
</code></div><p>
It are only a few functions but they make view files a lot easier to read.
</p>
<p>
<b>Usage</b>
<br />
The example view code with the helper is
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&lt;?php </span><span style="color: #007700">foreach(</span><span style="color: #0000BB">$rows </span><span style="color: #007700">as </span><span style="color: #0000BB">$row</span><span style="color: #007700">): </span><span style="color: #0000BB">?&gt;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">display</span><span style="color: #007700">(</span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'start_date'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">,</span><span style="color: #DD0000">'0000-00-00'</span><span style="color: #007700">) </span><span style="color: #0000BB">?&gt;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">display</span><span style="color: #007700">(</span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'total'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">,</span><span style="color: #DD0000">'0'</span><span style="color: #007700">) </span><span style="color: #0000BB">?&gt;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">endforeach </span><span style="color: #0000BB">?&gt;<br /></span><span style="color: #FF8000">// or with the constants<br /></span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">foreach(</span><span style="color: #0000BB">$rows </span><span style="color: #007700">as </span><span style="color: #0000BB">$row</span><span style="color: #007700">): </span><span style="color: #0000BB">?&gt;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">display</span><span style="color: #007700">(</span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'start_date'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">,</span><span style="color: #0000BB">DEFAULT_DATE</span><span style="color: #007700">) </span><span style="color: #0000BB">?&gt;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">display</span><span style="color: #007700">(</span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'total'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">,</span><span style="color: #0000BB">DEFAULT_NUMBER</span><span style="color: #007700">) </span><span style="color: #0000BB">?&gt;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&lt;?php </span><span style="color: #007700">endforeach </span><span style="color: #0000BB">?&gt;</span>
</code></div><p>
</p>
<p>
An example of the display_isset function
<br />
</p><div class="codeblock"><code>
// without helper<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">p&lt;?php </span><span style="color: #007700">if(isset(</span><span style="color: #0000BB">$class</span><span style="color: #007700">)): </span><span style="color: #DD0000">' class="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$class</span><span style="color: #007700">.</span><span style="color: #DD0000">'"'</span><span style="color: #007700">; endif </span><span style="color: #0000BB">?&gt;</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">hello world</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;<br /></span><span style="color: #FF8000">// with helper<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">p&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000BB">display_isset</span><span style="color: #007700">(</span><span style="color: #0000BB">$class</span><span style="color: #007700">,</span><span style="color: #DD0000">' class="%s"'</span><span style="color: #007700">) </span><span style="color: #0000BB">?&gt;</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">hello world</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;</span>
</code></div><p>
</p>
<p>
<b>Updates</b>
<br />
29-08-2008 : added replacement parameter to display function. Usage ;
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">display</span><span style="color: #007700">(</span><span style="color: #0000BB">$row&#91;</span><span style="color: #DD0000">'start_date'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">,</span><span style="color: #0000BB">DEFAULT_DATE</span><span style="color: #007700">,</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">))</span>
</code></div><p>
</p>
<p>
<a href="http://codeigniter.com/wiki/Category:Contributions::Helpers::Miscallenous/" title="Category:Contributions::Helpers::Miscallenous">Category:Contributions -&gt; Helpers -&gt; Miscallenous</a>
</p>
      ]]></content>
    </entry>

    <entry>
      <title>IgnitedRecord with HMVC</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/IgnitedRecord_with_HMVC/" />
      <id>tag:codeigniter.com,2008:wiki:IgnitedRecord with HMVC/1423.7661</id>
      <published>2008-08-29T11:54:17Z</published>
      <updated>2008-08-29T11:54:17Z</updated>
      <author>
            <name>m4rw3r</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>To use <a href="http://codeigniter.com/wiki/IgnitedRecord/" title="IgnitedRecord">IgnitedRecord</a> with <a href="http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/" title="Modular_Extensions_-_HMVC">Modular Extensions - HMVC</a> you have to make two modifications to the Controller.php file and you cannot use the factory methods of IgnitedRecord (you must use model files).
</p>
<p>
The changes below is to version 5 of ME.
</p>
<p>
Add this method to the Controller class (which resides in libraries/Controller.php):
<br />
</p><div class="codeblock"><code>
/**<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* Loads the IgnitedRecord class and the Model class, also acts as a wrapper for Loader::model().<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* This enables an other way to instantiate IgnitedRecord's child classes:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @code<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* $this-&gt;load-&gt;ORM();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* $this-&gt;load-&gt;model('a_child_class');<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* // or as a wrapper for model()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* $this-&gt;load-&gt;ORM('a_child_class','pages');<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @endcode<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param $model The model name of the model to load, if false ORM() will not load any derived classes (models)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param $name The name parameter is passed to the model() function, determining if the property name should differ from the default<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @param $db_conn The database connection passed to the model() function<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">function </span><span style="color: #0000BB">ORM</span><span style="color: #007700">(</span><span style="color: #0000BB">$model </span><span style="color: #007700">= </span><span style="color: #0000BB">false</span><span style="color: #007700">, </span><span style="color: #0000BB">$name </span><span style="color: #007700">= </span><span style="color: #0000BB">FALSE</span><span style="color: #007700">, </span><span style="color: #0000BB">$db_conn </span><span style="color: #007700">= </span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">class_exists</span><span style="color: #007700">(</span><span style="color: #DD0000">'IgnitedRecord'</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">// change this line if the IgnitedRecord file is stored elsewhere<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">require_once(</span><span style="color: #0000BB">APPPATH</span><span style="color: #007700">.</span><span style="color: #DD0000">'models/ignitedrecord/ignitedrecord.php'</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">$model </span><span style="color: #007700">!= </span><span style="color: #0000BB">false</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">model</span><span style="color: #007700">(</span><span style="color: #0000BB">$model</span><span style="color: #007700">,</span><span style="color: #0000BB">$name</span><span style="color: #007700">,</span><span style="color: #0000BB">$db_conn</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#125;</span>
</code></div><p>
</p>
<p>
In the model() method of the Controller class, you have to add this, right before the return statement:
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">$CI </span><span style="color: #007700">=&amp; </span><span style="color: #0000BB">get_instance</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if( ! isset(</span><span style="color: #0000BB">$CI</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">$_alias</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$CI</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">$_alias </span><span style="color: #007700">= </span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">$_alias</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;</span>
</code></div><p>
The code below assigns the models correctly, so IgnitedRecord can find them.
</p>
      ]]></content>
    </entry>

    <entry>
      <title>Language Article Blueprint</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/wiki/Language_Article_Blueprint/" />
      <id>tag:codeigniter.com,2008:wiki:Language Article Blueprint/1404.7650</id>
      <published>2008-08-28T19:22:17Z</published>
      <updated>2008-08-28T19:22:17Z</updated>
      <author>
            <name>Zacharias Knudsen</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>In order to maintain consistency you are encouraged to follow these instructions when creating or adding to a language article.
</p>
<h3>Uploading</h3><p>
When linking to your files, you should provide a title for the link simply stating the version for which the translation has been done in the format &#8220;Version x.x.x&#8221; (without the quotes). After the link, you can optionally state the name of the translator in the format &#8220;translated by author&#8221; (without the quotes, and with your name instead of &#8220;author").
</p>
<p>
Now, you can either <a href="http://codeigniter.com/wiki/Special:Uploads/" title="Special:Uploads" class="noArticle">upload your archive right here on the wiki</a>, in which case you are going to use the following code
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&#91;File</span><span style="color: #007700">:</span><span style="color: #0000BB">file</span><span style="color: #007700">.</span><span style="color: #0000BB">zip</span><span style="color: #007700">|</span><span style="color: #0000BB">Version x</span><span style="color: #007700">.</span><span style="color: #0000BB">x</span><span style="color: #007700">.</span><span style="color: #0000BB">x&#93; translated by author</span>
</code></div><p>
</p>
<p>
Alternatively, if you&#8217;ve uploaded the file somewhere else, do like this
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&#91;url</span><span style="color: #007700">=</span><span style="color: #0000BB">http</span><span style="color: #007700">:</span><span style="color: #FF8000">//example.com/file.zip&#93;Version x.x.x&#91;/url&#93; translated by author</span>
</code></div><p>
</p>
<h3>The Article</h3><p>
Most of the time, what people will be looking for is CodeIgniter language packs and thus we should position those at the top.
</p>
<p>
Some nationalities might be in the fortunate situation of having the user guide translated into their language, so this should be the second set of links.
</p>
<p>
At the bottom of the article, the category should be placed. That way, other users can see the article when viewing the language contributions category.
</p>
<p>
When the article is done, it the markup should look somewhat like this
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&#91;b&#93;CodeIgniter language packs&#91;</span><span style="color: #007700">/</span><span style="color: #0000BB">b&#93;<br />&#91;quote&#93;<br />&#91;File</span><span style="color: #007700">:</span><span style="color: #0000BB">file</span><span style="color: #007700">.</span><span style="color: #0000BB">zip</span><span style="color: #007700">|</span><span style="color: #0000BB">Version x</span><span style="color: #007700">.</span><span style="color: #0000BB">x</span><span style="color: #007700">.</span><span style="color: #0000BB">x&#93; translated by author<br />&#91;File</span><span style="color: #007700">:</span><span style="color: #0000BB">file</span><span style="color: #007700">.</span><span style="color: #0000BB">zip</span><span style="color: #007700">|</span><span style="color: #0000BB">Version x</span><span style="color: #007700">.</span><span style="color: #0000BB">x</span><span style="color: #007700">.</span><span style="color: #0000BB">x&#93; translated by author<br />&#91;</span><span style="color: #007700">/</span><span style="color: #0000BB">quote&#93;<br /><br />&#91;b&#93;User Guide translations&#91;</span><span style="color: #007700">/</span><span style="color: #0000BB">b&#93;<br />&#91;quote&#93;<br />None available</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">&#91;</span><span style="color: #007700">/</span><span style="color: #0000BB">quote&#93;<br /><br />&#91;&#91;Category</span><span style="color: #007700">:</span><span style="color: #0000BB">Contributions</span><span style="color: #007700">::</span><span style="color: #0000BB">Languages&#93;&#93;</span>
</code></div><p>
</p>
<p>
<a href="http://codeigniter.com/wiki/Category:Wiki::Blueprints/" title="Category:Wiki::Blueprints">Category:Wiki -&gt; Blueprints</a>
</p>
      ]]></content>
    </entry>


</feed>