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

    <title type="text">CodeIgniter Forums</title>
    <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/" />
    <link rel="self" type="application/atom+xml" href="http://codeigniter.com/forums/atom/" />
    <updated>2008-10-13T08:45:49Z</updated>
    <rights>Copyright (c) 2008</rights>
    <generator uri="http://www.pmachine.com/" version="1.6.3">ExpressionEngine</generator>
    <id>tag:codeigniter.com,2008:10:15</id>


    <entry>
      <title>Most significant&#8230;</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/93717/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.93717</id>
      <published>2008-10-13T08:42:23Z</published>
      <updated>2008-10-13T08:45:49Z</updated>
      <author><name>wiredesignz</name></author>
      <content type="html">
      <![CDATA[
        <p>Feature requests come quite often. But I&#8217;m interested to see which features are the most requested.</p>

<p>And please do say why. (if you say PHP5, please tell us which are the PHP5 features that CI lacks)</p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>Logging  Class</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/88280/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.88280</id>
      <published>2008-08-15T02:44:43Z</published>
      <updated></updated>
      <author><name>Mortred</name></author>
      <content type="html">
      <![CDATA[
        <p>A logging class that would behave like PEAR&#8217;s Log Class..</p>

<p>I always log my functions like inserting, deleting and updating the database, changing user passwords, failed login attempts, etc.</p>

<p>I save them all in a text file.. so I think it would be nice if CI have this library&#8230;</p>

<p>Thanks!</p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>Text helper : word_wrap better documentation</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/93809/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.93809</id>
      <published>2008-10-14T04:25:43Z</published>
      <updated>2008-10-14T04:26:38Z</updated>
      <author><name>xwero</name></author>
      <content type="html">
      <![CDATA[
        <p>word_wrap()</p>

<p>Wraps text at the specified character count while maintaining complete words and urls and a word between &#123;unwrap&#125;&#123;/unwrap&#125; will not be wrapped. Example:<br />
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$string </span><span style="color: #007700">= </span><span style="color: #DD0000">"Here is a simple string of text that will help us demonstrate this function."</span><span style="color: #007700">;<br /><br />echo </span><span style="color: #0000BB">word_wrap</span><span style="color: #007700">(</span><span style="color: #0000BB">$string</span><span style="color: #007700">, </span><span style="color: #0000BB">25</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Would produce:<br /><br /></span><span style="color: #0000BB">Here is a simple string<br />of text that will help<br />us demonstrate this<br /></span><span style="color: #007700">function </span>
</span>
</code></div><p></p>

<p>_______________________________________________________________</p>

<p>It would be great to choose the break string because now the word wraps are only seen in the source code. This can be done by following code changes<br />
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">function </span><span style="color: #0000BB">word_wrap</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">$charlim </span><span style="color: #007700">= </span><span style="color: #DD0000">'76'</span><span style="color: #007700">,</span><span style="color: #0000BB">$break </span><span style="color: #007700">= </span><span style="color: #DD0000">'\n'</span><span style="color: #007700">)<br /></span><span style="color: #FF8000">// ...<br /></span><span style="color: #007700">if (</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$line</span><span style="color: #007700">) &lt;= </span><span style="color: #0000BB">$charlim</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;$output </span><span style="color: #007700">.= </span><span style="color: #0000BB">$line</span><span style="color: #007700">.</span><span style="color: #0000BB">$break</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$temp </span><span style="color: #007700">= </span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while((</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$line</span><span style="color: #007700">)) &gt; </span><span style="color: #0000BB">$charlim</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">// If the over-length word is a URL we won't wrap it<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if (</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"!\&#91;url.+\&#93;|://|wwww.!"</span><span style="color: #007700">, </span><span style="color: #0000BB">$line</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">break;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">// Trim the word down<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$temp </span><span style="color: #007700">.= </span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">$line</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">$charlim</span><span style="color: #007700">-</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$line </span><span style="color: #007700">= </span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">$line</span><span style="color: #007700">, </span><span style="color: #0000BB">$charlim</span><span style="color: #007700">-</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">// If $temp contains data it means we had to split up an over-length<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// word into smaller chunks so we'll add it back to our current line<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if (</span><span style="color: #0000BB">$temp </span><span style="color: #007700">!= </span><span style="color: #DD0000">''</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;$output </span><span style="color: #007700">.= </span><span style="color: #0000BB">$temp </span><span style="color: #007700">. </span><span style="color: #0000BB">$break </span><span style="color: #007700">. </span><span style="color: #0000BB">$line</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">else<br />&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;$output </span><span style="color: #007700">.= </span><span style="color: #0000BB">$line</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$output </span><span style="color: #007700">.= </span><span style="color: #0000BB">$break</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">// ... </span>
</span>
</code></div><p></p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>Breadcrumb</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/93588/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.93588</id>
      <published>2008-10-11T12:27:39Z</published>
      <updated>2008-10-11T12:30:16Z</updated>
      <author><name>JulianM</name></author>
      <content type="html">
      <![CDATA[
        <p>Hi. I&#8217;d like to post here my Breadcrumb&#8217;s helper function (version 0.1). It&#8217;s quite simple but helped me a lot on previous projects.</p>

<p>Basically, the helper function accepts a data array and an optional configuration array (actually only 2 parameters are used).</p>

<p>The data array has the breadcrumb elements.</p>

<p>The configuration accepts a <b>class</b> name and a <b>prefix</b> string in case you want to specify it before the breadcrumb.</p>

<p>I&#8217;ve decided to use my own helper function instead of the available menu libraries because I wanted to reduce overhead.</p>

<p></p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #FF8000">/**<br />* Create a breadcrumb based on a data array and given configuration.<br />*<br />* @author Julian Magnone &lt;julianmagnone@gmail.com&gt;<br />* @access&nbsp;&nbsp;&nbsp;public<br />* @param&nbsp;&nbsp;&nbsp;&nbsp;mixed&nbsp;&nbsp;&nbsp;data array<br />* @param&nbsp;&nbsp;&nbsp;&nbsp;mixed&nbsp;&nbsp;&nbsp;configuration array<br />* @return&nbsp;&nbsp;&nbsp;string<br />*/<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">breadcrumb</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">, </span><span style="color: #0000BB">$config </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;$class </span><span style="color: #007700">= (isset(</span><span style="color: #0000BB">$config&#91;</span><span style="color: #DD0000">'class'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">)? </span><span style="color: #0000BB">$config&#91;</span><span style="color: #DD0000">'class'</span><span style="color: #0000BB">&#93; </span><span style="color: #007700">: </span><span style="color: #DD0000">'bread' </span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$prefix </span><span style="color: #007700">= (isset(</span><span style="color: #0000BB">$config&#91;</span><span style="color: #DD0000">'prefix'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">)? </span><span style="color: #DD0000">'&lt;span class="prefix"&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">trim</span><span style="color: #007700">(</span><span style="color: #0000BB">$config&#91;</span><span style="color: #DD0000">'prefix'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">).</span><span style="color: #DD0000">'&lt;/span&gt;' </span><span style="color: #007700">: </span><span style="color: #DD0000">'' </span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">// If data is an array<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if (</span><span style="color: #0000BB">is_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">) &amp;&amp; </span><span style="color: #0000BB">count</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">)&gt;</span><span style="color: #0000BB">0</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;$html </span><span style="color: #007700">= </span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$html </span><span style="color: #007700">.= </span><span style="color: #DD0000">'&lt;div class="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$class</span><span style="color: #007700">.</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$html </span><span style="color: #007700">.= </span><span style="color: #0000BB">$prefix</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">// Iterate data array<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$count </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach( </span><span style="color: #0000BB">$data </span><span style="color: #007700">as </span><span style="color: #0000BB">$key </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$value </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">// check the first element<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$class </span><span style="color: #007700">= (</span><span style="color: #0000BB">$count </span><span style="color: #007700">== </span><span style="color: #0000BB">0 </span><span style="color: #007700">? </span><span style="color: #DD0000">'first' </span><span style="color: #007700">: </span><span style="color: #DD0000">''</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$class </span><span style="color: #007700">= (</span><span style="color: #0000BB">$count </span><span style="color: #007700">== </span><span style="color: #0000BB">count</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">)-</span><span style="color: #0000BB">1 </span><span style="color: #007700">? </span><span style="color: #DD0000">'last' </span><span style="color: #007700">: </span><span style="color: #0000BB">$class</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">// generate list item<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$html </span><span style="color: #007700">.= </span><span style="color: #DD0000">'&lt;ul&gt;&lt;li class="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$class</span><span style="color: #007700">.</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$html </span><span style="color: #007700">.= </span><span style="color: #0000BB">$value</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$count</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: #FF8000">// close opened tags<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">for(</span><span style="color: #0000BB">$i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;</span><span style="color: #0000BB">$i</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">$count</span><span style="color: #007700">;</span><span style="color: #0000BB">$i</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;$html </span><span style="color: #007700">.= </span><span style="color: #DD0000">'&lt;/li&gt;&lt;/ul&gt;'</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;$html </span><span style="color: #007700">.= </span><span style="color: #DD0000">'&lt;/div&gt;'</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125; </span><span style="color: #007700">else </span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$html </span><span style="color: #007700">= </span><span style="color: #DD0000">'&lt;div class="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$class</span><span style="color: #007700">.</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">$data</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/div&gt;'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">return </span><span style="color: #0000BB">$html</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#125; </span>
</span>
</code></div><p></p>

<p><br />
Then, you can use the function in your controller class or view file, specifying something like this:</p>

<p></p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$data </span><span style="color: #007700">= array();<br /></span><span style="color: #0000BB">$data&#91;&#93; </span><span style="color: #007700">= </span><span style="color: #0000BB">anchor</span><span style="color: #007700">(</span><span style="color: #DD0000">'index'</span><span style="color: #007700">, </span><span style="color: #DD0000">'Start'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$data&#91;&#93; </span><span style="color: #007700">= </span><span style="color: #0000BB">anchor</span><span style="color: #007700">(</span><span style="color: #DD0000">'index'</span><span style="color: #007700">, </span><span style="color: #DD0000">'Level1'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$data&#91;&#93; </span><span style="color: #007700">= </span><span style="color: #0000BB">anchor</span><span style="color: #007700">(</span><span style="color: #DD0000">'index'</span><span style="color: #007700">, </span><span style="color: #DD0000">'Level2'</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">breadcrumb</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">, array(</span><span style="color: #DD0000">'class' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'bread'</span><span style="color: #007700">, </span><span style="color: #DD0000">'prefix' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'You are here:'</span><span style="color: #007700">) ); </span>
</span>
</code></div><p></p>

<p>The generated code looks similar to the one specified in A List Apart [<a href="http://alistapart.com/stories/taminglists/">post</a>], that seems to use a meaningful markup (nested &lt;UL&gt; and &lt;LI&gt; tags to represent each level). That might optimize the resulted HTML for SEO purposes.</p>

<p>Good luck,</p>

<p>Julian Magnone</p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>anchor_popup() to accept parameters other than javacript (CODE INCLUDED)</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/93610/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.93610</id>
      <published>2008-10-11T17:46:31Z</published>
      <updated>2008-10-11T23:57:51Z</updated>
      <author><name>Genki1</name></author>
      <content type="html">
      <![CDATA[
        <p><b>SUGGESTION</b>:</p>

<p>Allow <b>anchor_popup()</b> to include parameters in addition to Javascript settings. For example, allow CLASS=&#8220;my_class&#8221; to be passed.</p>

<p><b>WHY?</b></p>

<p>The <b>anchor()</b> helper allows parameters to be passed, such as ID=&#8220;MY_ID&#8221;, however <b>anchor_popup()</b> is limited to accepting only Javascript settings. There are other settings for anchors that should be settable.</p>

<p><b>SOLUTIONS</b>:</p>

<p><b><i>Option 1</i></b>: Allow the existing, third paramater (i.e. the $attributes array) to contain non-Javascript settings. (I&#8217;m using this version.)<br />
&nbsp;  Example: <br />
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$attributes </span><span style="color: #007700">= array(</span><span style="color: #DD0000">'size' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">50</span><span style="color: #007700">, <br />&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">'class' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'my_class'<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">anchor_popup</span><span style="color: #007700">(</span><span style="color: #DD0000">'link'</span><span style="color: #007700">, </span><span style="color: #DD0000">'Title'</span><span style="color: #007700">, </span><span style="color: #0000BB">$attributes</span><span style="color: #007700">) </span>
</span>
</code></div><p></p>

<p><b><i>Get the function code for Option 1</i></b>:<br />
I&#8217;m using Option 1 and it works just fine&#8212;email me and I&#8217;ll send you the function!</p>

<p>(I tried to post it here but forum security removes some of the text. If you know how to post it here, including the javascript portions, please email me and I&#8217;ll try again.)</p>

<p><b><i>Option 2</i></b>: Add a new, fourth parameter to anchor_popup()<br />
&nbsp;  Example: <br />
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$attributes </span><span style="color: #007700">= array(</span><span style="color: #DD0000">'size' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">50</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$other_attributes </span><span style="color: #007700">= array(</span><span style="color: #DD0000">'class' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'my_class'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">anchor_popup</span><span style="color: #007700">(</span><span style="color: #DD0000">'link'</span><span style="color: #007700">, </span><span style="color: #DD0000">'Title'</span><span style="color: #007700">, </span><span style="color: #0000BB">$attributes</span><span style="color: #007700">, </span><span style="color: #0000BB">$other_attributes</span><span style="color: #007700">) </span>
</span>
</code></div><p></p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>Different controller classes</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/93584/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.93584</id>
      <published>2008-10-11T10:48:02Z</published>
      <updated>2008-10-11T10:50:58Z</updated>
      <author><name>Hannes Nevalainen</name></author>
      <content type="html">
      <![CDATA[
        <p>In my projects I find it really nice to extend the default controller class. This works really well if I put my subclasses in MY_Controller.php. I don&#8217;t like all my subclasses are parsed in every reqeust. It also breaks the &#8216;one-class-per-file&#8217; paradigm utilized by CI.</p>

<p>Maybe in next major release there could be a proper way to subclass controllers.</p>

<p>EDIT:<br />
Just come to think of a simple solution myself..<br />
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">include </span><span style="color: #DD0000">'./application/libraries/Auth_Controller.php'</span><span style="color: #007700">; </span><span style="color: #FF8000">//My workaround<br /><br /></span><span style="color: #007700">class </span><span style="color: #0000BB">Auth_Controller </span><span style="color: #007700">extends </span><span style="color: #0000BB">Controller&#123;<br />&nbsp;&nbsp;public Auth_Controller</span><span style="color: #007700">()</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;parent</span><span style="color: #007700">::</span><span style="color: #0000BB">Controller</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Authencication checking<br />&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&#125; </span>
</span>
</code></div><p></p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>Separation of Class namespaces</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/93545/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.93545</id>
      <published>2008-10-10T15:19:21Z</published>
      <updated>2008-10-10T15:20:49Z</updated>
      <author><name>Hannes Nevalainen</name></author>
      <content type="html">
      <![CDATA[
        <p>I think would me nice if all controller classes has a _controller.php suffix just to avoid namespace conflicts. Maybe some config option could be set to indicate if a suffix is used or not.</p>

<p>Models could be suffixed with  _model.php.</p>

<p>Helpers and plugins are already suffixed&#8230;</p>

<p></p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">http</span><span style="color: #007700">:</span><span style="color: #FF8000">//test.mydomain.com/users/show/23<br /><br />/* This url would call the method show (with arg 23) in Users_controller.php */<br /><br /></span><span style="color: #007700">class </span><span style="color: #0000BB">Users_controller </span><span style="color: #007700">extends </span><span style="color: #0000BB">Controller&#123;<br />&nbsp;&nbsp;</span><span style="color: #007700">function </span><span style="color: #0000BB">Users_controller</span><span style="color: #007700">()</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;parent</span><span style="color: #007700">::</span><span style="color: #0000BB">Controller</span><span style="color: #007700">();<br />&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;</span><span style="color: #007700">function </span><span style="color: #0000BB">show</span><span style="color: #007700">(</span><span style="color: #0000BB">$user_id </span><span style="color: #007700">= </span><span style="color: #0000BB">null</span><span style="color: #007700">)</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Omissions<br />&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&#125; </span>
</span>
</code></div><p></p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>Allow natural join through join($tablename)</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/90747/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.90747</id>
      <published>2008-09-11T08:10:51Z</published>
      <updated></updated>
      <author><name>roryokane</name></author>
      <content type="html">
      <![CDATA[
        <p>Currently, the only way to do natural join is to say<br />
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">select</span><span style="color: #007700">(</span><span style="color: #DD0000">'*'</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">from</span><span style="color: #007700">(</span><span style="color: #DD0000">'table1'</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">join</span><span style="color: #007700">(</span><span style="color: #DD0000">'table2'</span><span style="color: #007700">, </span><span style="color: #DD0000">'table1.someid = table2.someid'</span><span style="color: #007700">) </span>
</span>
</code></div><p><br />
. Sadly, natural join cannot simply be added as an option for join()&#8216;s third argument, because it would still require the second argument, which is irrelevant for natural join. I would like to be able to say just </p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">select</span><span style="color: #007700">(</span><span style="color: #DD0000">'*'</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">from</span><span style="color: #007700">(</span><span style="color: #DD0000">'table1'</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">join</span><span style="color: #007700">(</span><span style="color: #DD0000">'table2'</span><span style="color: #007700">) </span>
</span>
</code></div><p>, and since there is no second parameter, have CodeIgniter assume natural join.</p>

<p>Does this syntax look good for people? Looking at join() in DB_active_record.php, I think I see how to modify it to act like this. Do I just have to modify it, test it on my computer, and upload it to the Subversion repository, or is there more I have to do (like getting approval)?</p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>REST &amp;amp; SOAP Libraries</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/90124/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.90124</id>
      <published>2008-09-04T17:19:08Z</published>
      <updated>2008-09-04T17:19:26Z</updated>
      <author><name>shaunshull</name></author>
      <content type="html">
      <![CDATA[
        <p>Please add core libraries for REST and SOAP. I use the XML-RPC library all the time and love it, only problem I run into is when I try to integrate with other Web APIs they are almost always REST or SOAP.</p>
      ]]>
      </content>
    </entry>

    <entry>
      <title>Multiple DB Support &#45; Session Class Request (attached)</title>
      <link rel="alternate" type="text/html" href="http://codeigniter.com/forums/viewthread/89886/" />      
      <id>tag:codeigniter.com,2008:forums/viewthread/.89886</id>
      <published>2008-09-02T15:19:48Z</published>
      <updated>2008-09-02T19:32:48Z</updated>
      <author><name>Randy Casburn</name></author>
      <content type="html">
      <![CDATA[
        <p>@Rick &amp; Dereks&#8212;Please consider this change to the Session class as a supplement to the other improvements you&#8217;re making.&nbsp; Allow the Session data to be stored in a DB based upon an additional config item setting that identifies the database group that will receive the the session data. </p>

<p>New config entry: $config[&#8216;sess_database_group&#8217;] = &#8216;db_group&#8217;; </p>

<p>A simple change really to go along with the file changes attached.</p>

<p>RATIONALE:&nbsp; There are a couple of primary reasons and a dozen or so that don&#8217;t really matter. The two reasons that make the biggest difference:</p>

<p>1) Convention is that user credentials be stored independently of application data. The DB query stuff is hard coded in the session class so that it can only be stored in the &#8216;default&#8217; or user loaded DB if they specify the group at load time.&nbsp; The convention would have the authentication session stored with the user authentication data as an option for the developer at a minimum.</p>

<p>2) CI supports multiple DBs, so should the API at the core.</p>

<p>&#8212;&#8212;&#8212;</p>

<p>You&#8217;ll see the changes are quite simple.&nbsp; I&#8217;ve set them off with -&gt; at column 0 of the file so your syntax highter should have no trouble finding the changes <img src="http://ellislab.com/images/smileys/wink.gif" width="19" height="19" alt="wink" style="border:0;" />.&nbsp; Yes, I&#8217;ve pretty much had to extend the entire class to do this&#8230;time to move along.</p>

<p>Please let me know if you have any questions.</p>

<p>If you want to go forward, let me know and I&#8217;ll push this over to the bug reports.</p>

<p>Thanks for listening.</p>

<p>Randy</p>
      ]]>
      </content>
    </entry>


</feed>