<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5997340547536921220</id><updated>2024-09-11T17:39:58.373-07:00</updated><category term="Blog"/><category term="CakePHP"/><category term="Editor"/><category term="Component"/><category term="jQuery"/><category term="Behavior"/><category term="Cake 2.x"/><category term="Console"/><category term="Plugin"/><category term="Windows"/><category term="Captcha"/><category term="MAC"/><category term="MySQL"/><category term="PDF"/><category term="PHPMyAdmin"/><category term="Ubuntu"/><category term="Xampp"/><title type='text'>CakePHP  reference collection</title><subtitle type='html'>This blog just to collect from other web for easy to my bookmark all reference about cakephp. Another thing I would like share to other cakephp followers.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-5514322777422406448</id><published>2015-03-01T03:12:00.001-08:00</published><updated>2015-03-01T03:12:06.993-08:00</updated><title type='text'>Dropdown Cakephp with Chained Selects Plugin for jQuery and Zepto</title><content type='html'>http://www.appelsiini.net/projects/chained&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Basic setup for Chained Selects Plugin&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1. First you must include jQuery and Chained in your code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;&lt;span style=&quot;color: #89bdff;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #89bdff;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: #89bdff;&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js&quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #89bdff;&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #89bdff;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #89bdff;&quot;&gt;script&lt;/span&gt; &lt;span style=&quot;color: #89bdff;&quot;&gt;src&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;jquery.chained.min.js&quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color: #89bdff;&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
2. Then lets assume you have the following &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;select&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;mark&quot;&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;mark&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;--&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;bmw&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;BMW&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;audi&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;Audi&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;select&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;select&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;series&quot;&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;series&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;--&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;series-3&quot;&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;bmw&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;3 series&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;series-5&quot;&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;bmw&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;5 series&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;series-6&quot;&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;bmw&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;6 series&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;a3&quot;&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;audi&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;A3&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;a4&quot;&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;audi&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;A4&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;a5&quot;&lt;/span&gt; &lt;span style=&quot;color: #e0c589;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;audi&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;A5&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;option&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #e0c589;&quot;&gt;&amp;lt;/&lt;span style=&quot;color: #e0c589;&quot;&gt;select&lt;/span&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
3. You can now chain the&lt;span style=&quot;color: red;&quot;&gt; &lt;code&gt;#series&lt;/code&gt;&lt;/span&gt; to &lt;span style=&quot;color: red;&quot;&gt;&lt;code&gt;#mark&lt;/code&gt;&lt;/span&gt;. There 
are two different ways to do it. Choose yourself if you prefer more 
english like or shorter version. I prefer the shorter version.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;$(&quot;&lt;span style=&quot;color: #8b98ab;&quot;&gt;#series&lt;/span&gt;&quot;)&lt;span style=&quot;color: #9b703f;&quot;&gt;.chained&lt;/span&gt;(&quot;&lt;span style=&quot;color: #8b98ab;&quot;&gt;#mark&lt;/span&gt;&quot;); &lt;span style=&quot;color: #aeaeae; font-style: italic;&quot;&gt;/* or $(&quot;#series&quot;).chainedTo(&quot;#mark&quot;); */&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Basic setup for Chained Selects Plugin in Cakephp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
1. Make find(&#39;all&#39;) in any function of controller for custome dropdown&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;&lt;span style=&quot;color: #3e87e3;&quot;&gt;$states&lt;/span&gt; = array();
&lt;span style=&quot;color: #3e87e3;&quot;&gt;$country&lt;/span&gt; = &lt;span style=&quot;color: #3e87e3;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;Application&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;Country&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;find(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;list&#39;&lt;/span&gt;);
&lt;span style=&quot;color: #3e87e3;&quot;&gt;$states_id&lt;/span&gt; = &lt;span style=&quot;color: #3e87e3;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;Application&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;States&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;find(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;all&#39;&lt;/span&gt;);

//Custome dropdown states
&lt;span style=&quot;color: #e28964;&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #3e87e3;&quot;&gt;$states_id&lt;/span&gt; &lt;span style=&quot;color: #e28964;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #3e87e3;&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt; =&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3e87e3;&quot;&gt;$value&lt;/span&gt;) {
            &lt;span style=&quot;color: #3e87e3;&quot;&gt;$states&lt;/span&gt;[&lt;span style=&quot;color: #3e87e3;&quot;&gt;$key&lt;/span&gt;] = array(
                &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt; =&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3e87e3;&quot;&gt;$value&lt;/span&gt;[&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;State&#39;&lt;/span&gt;][&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;name&#39;&lt;/span&gt;],
                &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;value&#39;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt; =&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3e87e3;&quot;&gt;$value&lt;/span&gt;[&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;State&#39;&lt;/span&gt;][&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;id&#39;&lt;/span&gt;],
                &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;class&#39;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt; =&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3e87e3;&quot;&gt;$value&lt;/span&gt;[&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;State&#39;&lt;/span&gt;][&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;id&#39;&lt;/span&gt;] //class like Chained &lt;span style=&quot;color: #dad085;&quot;&gt;format&lt;/span&gt;
}

&lt;span style=&quot;color: #3e87e3;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;set(compact(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;country&#39;&lt;/span&gt;, &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;states&#39;&lt;/span&gt;));
&lt;/pre&gt;
&lt;br /&gt;
2. Write Select Cakephp Helper From&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;echo &lt;span style=&quot;color: #3e87e3;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;Form&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;input(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;country_id&#39;&lt;/span&gt;, array(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;empty&#39;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;--Select--&#39;&lt;/span&gt;));            
echo &lt;span style=&quot;color: #3e87e3;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;Form&lt;span style=&quot;color: #e28964;&quot;&gt;-&amp;gt;&lt;/span&gt;input(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;state_id&#39;&lt;/span&gt;,  array(
     &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;type&#39;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt; =&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;select&#39;&lt;/span&gt;,&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;empty&#39;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;--Select--&#39;&lt;/span&gt;, &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;options&#39;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt; =&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3e87e3;&quot;&gt;$states&lt;/span&gt;)
);
&lt;/pre&gt;
&lt;br /&gt;
3. Write script on bottom of page
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span style=&quot;color: #9b859d;&quot;&gt;$&lt;/span&gt;(&lt;span style=&quot;color: #99cf50;&quot;&gt;function&lt;/span&gt; () {
      &lt;span style=&quot;color: #e28964;&quot;&gt;$&lt;/span&gt;(&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;#ApplicationCountryId&quot;&lt;/span&gt;).chained(&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;#ApplicationStateId&quot;&lt;/span&gt;); 
   });
&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;/script&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/5514322777422406448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2015/03/dropdown-cakephp-with-chained-selects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/5514322777422406448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/5514322777422406448'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2015/03/dropdown-cakephp-with-chained-selects.html' title='Dropdown Cakephp with Chained Selects Plugin for jQuery and Zepto'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-7717897640440640717</id><published>2014-08-14T03:38:00.001-07:00</published><updated>2014-08-14T03:40:39.016-07:00</updated><title type='text'>Cakephp code with Count(*) AS Total</title><content type='html'>1. Create table with name : `activities`&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: #e28964;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: #89bdff;&quot;&gt;IF&lt;/span&gt; NOT EXISTS &lt;span style=&quot;color: #65b042;&quot;&gt;`activities`&lt;/span&gt; (
  &lt;span style=&quot;color: #65b042;&quot;&gt;`id`&lt;/span&gt; &lt;span style=&quot;color: #99cf50;&quot;&gt;int&lt;/span&gt;(&lt;span style=&quot;color: #3387cc;&quot;&gt;11&lt;/span&gt;) &lt;span style=&quot;color: #e28964;&quot;&gt;NOT NULL&lt;/span&gt; AUTO_INCREMENT,
  &lt;span style=&quot;color: #65b042;&quot;&gt;`day`&lt;/span&gt; &lt;span style=&quot;color: #99cf50;&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color: #3387cc;&quot;&gt;50&lt;/span&gt;) &lt;span style=&quot;color: #e28964;&quot;&gt;NOT NULL&lt;/span&gt;,
  &lt;span style=&quot;color: #65b042;&quot;&gt;`date`&lt;/span&gt; &lt;span style=&quot;color: #99cf50;&quot;&gt;date&lt;/span&gt; &lt;span style=&quot;color: #e28964;&quot;&gt;NOT NULL&lt;/span&gt;,
  &lt;span style=&quot;color: #65b042;&quot;&gt;`week`&lt;/span&gt; &lt;span style=&quot;color: #99cf50;&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color: #3387cc;&quot;&gt;10&lt;/span&gt;) &lt;span style=&quot;color: #e28964;&quot;&gt;NOT NULL&lt;/span&gt;,
  &lt;span style=&quot;color: #65b042;&quot;&gt;`month`&lt;/span&gt; &lt;span style=&quot;color: #99cf50;&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color: #3387cc;&quot;&gt;10&lt;/span&gt;) &lt;span style=&quot;color: #e28964;&quot;&gt;NOT NULL&lt;/span&gt;,
  &lt;span style=&quot;color: #65b042;&quot;&gt;`year`&lt;/span&gt; &lt;span style=&quot;color: #99cf50;&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color: #3387cc;&quot;&gt;10&lt;/span&gt;) &lt;span style=&quot;color: #e28964;&quot;&gt;NOT NULL&lt;/span&gt;,
  &lt;span style=&quot;color: #65b042;&quot;&gt;`created`&lt;/span&gt; datetime &lt;span style=&quot;color: #e28964;&quot;&gt;NOT NULL&lt;/span&gt;,
  &lt;span style=&quot;color: #65b042;&quot;&gt;`modified`&lt;/span&gt; datetime &lt;span style=&quot;color: #e28964;&quot;&gt;NOT NULL&lt;/span&gt;,
  &lt;span style=&quot;color: #99cf50;&quot;&gt;PRIMARY KEY&lt;/span&gt; (&lt;span style=&quot;color: #65b042;&quot;&gt;`id`&lt;/span&gt;)
) ENGINE&lt;span style=&quot;color: #e28964;&quot;&gt;=&lt;/span&gt;MyISAM  DEFAULT CHARSET&lt;span style=&quot;color: #e28964;&quot;&gt;=&lt;/span&gt;latin1 AUTO_INCREMENT&lt;span style=&quot;color: #e28964;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #3387cc;&quot;&gt;4976&lt;/span&gt; ;&amp;nbsp;&lt;/pre&gt;

&lt;br /&gt;
2. Data Sample :&lt;a href=&quot;http://pastebin.com/3F41jEpU&quot; target=&quot;_blank&quot;&gt; http://pastebin.com/3F41jEpU&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
3. Create function &lt;i&gt;index &lt;/i&gt;in&amp;nbsp;ActivitiesController&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;text-decoration: underline;&quot;&gt;ActivitiesController&lt;/span&gt; extends &lt;span style=&quot;color: #3e87e3;&quot;&gt;AppController&lt;/span&gt; {

    &lt;span style=&quot;color: #e28964;&quot;&gt;public&lt;/span&gt; function index() {
        &lt;span style=&quot;color: #3e87e3;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #3e87e3;&quot;&gt;Activity&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;recursive &lt;span style=&quot;color: #e28964;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #3387cc;&quot;&gt;0&lt;/span&gt;;        
        &lt;span style=&quot;color: #3e87e3;&quot;&gt;$activities&lt;/span&gt; &lt;span style=&quot;color: #e28964;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #3e87e3;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #3e87e3;&quot;&gt;Activity&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;find(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;all&#39;&lt;/span&gt;, array(
            &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;fields&#39;&lt;/span&gt; =&amp;gt; array(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;Activity.year&#39;&lt;/span&gt;, &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;COUNT(*) AS total&#39;&lt;/span&gt;),
            &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;group&#39;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;year&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;order&#39;&lt;/span&gt; =&amp;gt; array(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;Activity.year&#39;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;DESC&#39;&lt;/span&gt;),           
        ));       
        &lt;span style=&quot;color: #3e87e3;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;set(compact(&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;activities&#39;&lt;/span&gt;));
    }

&lt;/pre&gt;
&lt;br /&gt;
4. Create view for index.ctp&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #000; color: #f8f8f8;&quot;&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;table cellpadding&lt;span style=&quot;color: #e28964;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;0&quot;&lt;/span&gt; cellspacing&lt;span style=&quot;color: #e28964;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #65b042;&quot;&gt;&quot;0&quot;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;   
        &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;tr&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;th&amp;gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3387cc;&quot;&gt;?p&lt;/span&gt;hp echo &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;Year&#39;&lt;/span&gt;; &lt;span style=&quot;color: #3387cc;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;amp;&lt;/span&gt;nbsp;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;/&lt;/span&gt;th&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;th&amp;gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3387cc;&quot;&gt;?p&lt;/span&gt;hp echo &lt;span style=&quot;color: #65b042;&quot;&gt;&#39;Total&#39;&lt;/span&gt;; &lt;span style=&quot;color: #3387cc;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;amp;&lt;/span&gt;nbsp;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;/&lt;/span&gt;th&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;              
        &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;/&lt;/span&gt;tr&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3387cc;&quot;&gt;?p&lt;/span&gt;hp foreach (&lt;span style=&quot;color: #3e87e3;&quot;&gt;$activities&lt;/span&gt; as &lt;span style=&quot;color: #3e87e3;&quot;&gt;$activity&lt;/span&gt;): &lt;span style=&quot;color: #3387cc;&quot;&gt;?&amp;gt;&lt;/span&gt;
            &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;tr&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;td&amp;gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3387cc;&quot;&gt;?p&lt;/span&gt;hp echo h(&lt;span style=&quot;color: #3e87e3;&quot;&gt;$activity&lt;/span&gt;[&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;Activity&#39;&lt;/span&gt;][&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;year&#39;&lt;/span&gt;]); &lt;span style=&quot;color: #3387cc;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;amp;&lt;/span&gt;nbsp;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;/&lt;/span&gt;td&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;td&amp;gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3387cc;&quot;&gt;?p&lt;/span&gt;hp echo h(&lt;span style=&quot;color: #3e87e3;&quot;&gt;$activity&lt;/span&gt;[&lt;span style=&quot;color: #3387cc;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #65b042;&quot;&gt;&#39;total&#39;&lt;/span&gt;]); &lt;span style=&quot;color: #3387cc;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;amp;&lt;/span&gt;nbsp;&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;/&lt;/span&gt;td&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;              
            &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;/&lt;/span&gt;tr&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3387cc;&quot;&gt;?p&lt;/span&gt;hp endforeach; &lt;span style=&quot;color: #3387cc;&quot;&gt;?&amp;gt;&lt;/span&gt;
    &lt;span style=&quot;color: #e28964;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e28964;&quot;&gt;/&lt;/span&gt;table&lt;span style=&quot;color: #e28964;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUvXuy9TonIZkE75DH3AO-VNwH2Wiax7dJB1w0Zao_1KR6HDwKx_nDJQvkzaTpRb7GiY4tkZswQ-5-T9GB01XmXgt5tp5MaDJKD7JNZX87oiE05svlxAXB34sBCwdnJN4iwRS6vrmMs48/s1600/Screen+Shot+2014-08-14+at+6.37.25+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUvXuy9TonIZkE75DH3AO-VNwH2Wiax7dJB1w0Zao_1KR6HDwKx_nDJQvkzaTpRb7GiY4tkZswQ-5-T9GB01XmXgt5tp5MaDJKD7JNZX87oiE05svlxAXB34sBCwdnJN4iwRS6vrmMs48/s1600/Screen+Shot+2014-08-14+at+6.37.25+PM.png&quot; height=&quot;101&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/7717897640440640717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2014/08/cakephp-code-with-count-as-total.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/7717897640440640717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/7717897640440640717'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2014/08/cakephp-code-with-count-as-total.html' title='Cakephp code with Count(*) AS Total'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUvXuy9TonIZkE75DH3AO-VNwH2Wiax7dJB1w0Zao_1KR6HDwKx_nDJQvkzaTpRb7GiY4tkZswQ-5-T9GB01XmXgt5tp5MaDJKD7JNZX87oiE05svlxAXB34sBCwdnJN4iwRS6vrmMs48/s72-c/Screen+Shot+2014-08-14+at+6.37.25+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-218448174344203323</id><published>2013-09-22T06:54:00.001-07:00</published><updated>2013-09-22T07:01:12.865-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Behavior"/><category scheme="http://www.blogger.com/atom/ns#" term="Cake 2.x"/><title type='text'>Generate lft and rght values for a cakephp 2.0 tree</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIcHXR8hSvrqPxoiE2FOQNRUgAJCF-vtNt37ohCxNWmRYsszNQuK9UkkXtaLUbSgP8L1hy5WP8f84im1ROKCBBSITzAKgpx3AXxk6Mi3Tgn-9hj1auIuRPmnG8D8qvIIckCfu1upw3g8o/s1600/Screen+Shot+2013-09-22+at+9.39.58+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIcHXR8hSvrqPxoiE2FOQNRUgAJCF-vtNt37ohCxNWmRYsszNQuK9UkkXtaLUbSgP8L1hy5WP8f84im1ROKCBBSITzAKgpx3AXxk6Mi3Tgn-9hj1auIuRPmnG8D8qvIIckCfu1upw3g8o/s1600/Screen+Shot+2013-09-22+at+9.39.58+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
If you are using the Tree Behavior sometimes the lft and rght columns get out of sync, especially if you are adding and deleting records during development. Add the following method to your app/app_controller.php your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  public function recover_tree() {  
2:      $modelClass = $this-&amp;gt;modelClass;  
3:      $recovery = $this-&amp;gt;$modelClass-&amp;gt;recover();  
4:      if ($recovery) {  
5:        $this-&amp;gt;Session-&amp;gt;setFlash(__($modelClass . &#39; reordered.&#39;), &#39;flash/success&#39;);  
6:        $this-&amp;gt;redirect(array(&#39;action&#39; =&amp;gt; &#39;index&#39;));  
7:      } else {  
8:        $this-&amp;gt;Session-&amp;gt;setFlash(__(&#39;Error recovering &#39; . $modelClass . &#39; tree&#39;), &#39;flash/error&#39;);  
9:      }  
10:      exit;  
11:    }  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
These methods/actions are meant to be called manually as you feel needed.&lt;br /&gt;
Examle : http://localhost/projects/categories/recover_tree&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitbYASaC2T9S2_ihccAxenKcrOAWmI_wyyW2uTF1dcr_bf4m3h6gbXec_o_A1YiqG4BCZisLGL6YWTDBKfxYM1cFrHUJfbMgOZ2_RC1aNqBaxKDYb2_hhI_BUCd2m8KtPUyBWdiXaqnF0/s1600/Screen+Shot+2013-09-22+at+9.59.35+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitbYASaC2T9S2_ihccAxenKcrOAWmI_wyyW2uTF1dcr_bf4m3h6gbXec_o_A1YiqG4BCZisLGL6YWTDBKfxYM1cFrHUJfbMgOZ2_RC1aNqBaxKDYb2_hhI_BUCd2m8KtPUyBWdiXaqnF0/s1600/Screen+Shot+2013-09-22+at+9.59.35+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/218448174344203323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/09/generate-lft-and-rght-values-for.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/218448174344203323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/218448174344203323'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/09/generate-lft-and-rght-values-for.html' title='Generate lft and rght values for a cakephp 2.0 tree'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIcHXR8hSvrqPxoiE2FOQNRUgAJCF-vtNt37ohCxNWmRYsszNQuK9UkkXtaLUbSgP8L1hy5WP8f84im1ROKCBBSITzAKgpx3AXxk6Mi3Tgn-9hj1auIuRPmnG8D8qvIIckCfu1upw3g8o/s72-c/Screen+Shot+2013-09-22+at+9.39.58+PM.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-7005955701835001396</id><published>2013-08-31T18:54:00.000-07:00</published><updated>2013-08-31T18:54:10.451-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cake 2.x"/><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><title type='text'>Advanced CakePHP 2.x installation tutorial</title><content type='html'>In some situation you might want to develop many application CakePHP with share the same&amp;nbsp; Cake Libraries on your server filesystem. &lt;br /&gt;
&lt;br /&gt;
In this tutorial I will try to show how to put your Cake libraries in shared location and share them with your apps in Linux or Windows.&lt;br /&gt;
&lt;br /&gt;
1. Download the latest CakePHP 2.x, unzip it upload to share location.&lt;br /&gt;
In my tutorial I will be replacing the Cake libraries in&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;Linux: &lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;/usr/share/cakephp2 &lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;Windows: &lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;C:/cakephp2 &lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Upload the APP folder and its content to your www/homepage root. You do not need to upload anything else. &lt;br /&gt;
&lt;br /&gt;
3. Edit /app/webroot/index.php&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;Find:&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;define(&#39;CAKE_CORE_INCLUDE_PATH&#39;, ROOT . DS . &#39;lib&#39;);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;Replace with:&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;&lt;code class=&quot;plain plain&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;&lt;code class=&quot;plain plain&quot;&gt;#Linux&amp;nbsp; &lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;&lt;code class=&quot;plain plain&quot;&gt;define(&#39;CAKE_CORE_INCLUDE_PATH&#39;, DS.&#39;usr&#39;.DS.&#39;share&#39;.DS.&#39;cakephp2&#39;.DS.&#39;lib&#39;);&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;&lt;code class=&quot;plain plain&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;&lt;code class=&quot;plain plain&quot;&gt;#Windows&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;plain plain&quot;&gt;define(&#39;CAKE_CORE_INCLUDE_PATH&#39;,&#39;C:&#39;.DS.&#39;cakephp2&#39;.DS.&#39;lib&#39;);&lt;/code&gt;&lt;/div&gt;
&lt;code class=&quot;plain plain&quot;&gt;&lt;code class=&quot;plain plain&quot;&gt;&amp;nbsp;&lt;/code&gt; &lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
And in all your other apps on the same server, edit the /app/webroot/index.php file and do the same. Rename app folder to your own project name.&amp;nbsp; Your CakePHP libraries are now shared, and can be utilized from all apps.&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/7005955701835001396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/08/advanced-cakephp-2x-installation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/7005955701835001396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/7005955701835001396'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/08/advanced-cakephp-2x-installation.html' title='Advanced CakePHP 2.x installation tutorial'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-579600350686358907</id><published>2013-08-31T08:28:00.000-07:00</published><updated>2013-11-09T18:59:10.401-08:00</updated><title type='text'>Twitter Bootstrap Typeahead with your CakePHP 1.3</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
In this post will explain how to integrate Twitter Bootstrap Typeahead with your CakePHP 1.3 application.&lt;br /&gt;
Make sure you have include jQuery, Bootstrap CSS and Bootstrap Javascript files in your CakePHP application. You can simply do it inside your default.ctp file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example, we will create action index(), typeahead_search() in users_controller.php. We also create view for index.ctp and users_typeahead.ctp.&lt;br /&gt;
&lt;br /&gt;
In this tutorial I’ll use Users controller. I’ll start by creating index() action, here is the code :&lt;br /&gt;


&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;php&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;k&quot;&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; public function index() {  
   //some code  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;php&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;p&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
And here is the view :&lt;br /&gt;


&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  &amp;lt;div class=&quot;row&quot;&amp;gt;  
2:    &amp;lt;div class=&quot;span12&quot;&amp;gt;  
3:    &amp;lt;!-- Typeahead --&amp;gt;  
4:    &amp;lt;div class=&quot;pull-right&quot;&amp;gt;  
5:      &amp;lt;input type=&quot;text&quot; data-provide=&quot;typeahead&quot; id=&quot;user-typeahead&quot;&amp;gt;  
6:    &amp;lt;/div&amp;gt;  
7:  //other code  
8:  &amp;lt;/div&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The next step is to create Javascript object in your layout file. So add this code snippet in your default.ctp file :&lt;br /&gt;


&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;  
2:    var site_url=&#39;&amp;lt;?php echo $this-&amp;gt;base; ?&amp;gt;&#39;;  
3:  &amp;lt;/script&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;   &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
This snippet of code will create Javascript object which contains the root URL path of CakePHP.

&lt;br /&gt;
After we have the Javascript object variable, let’s continue by 
creating the Javascript code. Inside your application Javascript file 
add these code :&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  $(&#39;#user-typeahead&#39;).typeahead({  
2:   source: function (query, process) {  
3:    return $.ajax({  
4:     url: site_url + &#39;users/typeahead_search&#39;,  
5:     type: &#39;get&#39;,  
6:     data: {q: query},  
7:     dataType: &#39;json&#39;,  
8:     success: function (json) {  
9:      return process(json);  
10:     }  
11:    });  
12:   }  
13:  });  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
In this code, we initialize the typeahead library and create AJAX 
request to the typeahead_search action. In the next step, we will create
 typeahead_search action that will handle AJAX request and return JSON 
result. Back to our users controller, create the typeahead action which 
will contain this code :&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&lt;/code&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;1:  class UsersController extends AppController {  
2:  var $components = array(&#39;RequestHandler&#39;);  
3:  public function typeahead_search() {  
4:    if($this-&amp;gt;RequestHandler-&amp;gt;isAjax())  
5:    $this-&amp;gt;RequestHandler-&amp;gt;respondAs(&#39;json&#39;);  
6:    // get the search term from URL  
7:    $term = $this-&amp;gt;request-&amp;gt;query[&#39;q&#39;];  
8:    $users = $this-&amp;gt;User-&amp;gt;find(&#39;all&#39;,array(  
9:      &#39;conditions&#39; =&amp;gt; array(  
10:        &#39;User.username LIKE&#39; =&amp;gt; &#39;%&#39;.$this-&amp;gt;params[&#39;url&#39;][&#39;q&#39;].&#39;%&#39;  
11:      )  
12:    ));  
13:    // Format the result for select2  
14:    $result = array();  
15:    foreach($users as $key =&amp;gt; $user) {  
16:      array_push($result, $user[&#39;User&#39;][&#39;username&#39;]);  
17:    }  
18:    $users = $result;  
19:    echo json_encode($users);  
20:  }  
21:  }  
&lt;/code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;code&gt;
&lt;/code&gt;&lt;code class=&quot;php&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
This action will receive the request, search the database for relevant result and return it on JSON format.&lt;br /&gt;
&lt;br /&gt;
Ref Site : http://www.rudylee.com/cbunny2/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/579600350686358907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/08/twitter-bootstrap-typeahead-with-your.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/579600350686358907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/579600350686358907'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/08/twitter-bootstrap-typeahead-with-your.html' title='Twitter Bootstrap Typeahead with your CakePHP 1.3'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-6228450544574721566</id><published>2013-06-16T05:24:00.004-07:00</published><updated>2013-11-09T19:00:27.781-08:00</updated><title type='text'>Pagination With Twitter Bootstrap and CakePHP</title><content type='html'>Pagination element for CakePHP like twitter bootstrap&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkiXGK3w7LzEQic5XWdf7kztslwVYrLIFIbfKOdFTwxIY2C5U-FTUO4H06tx7UbBAHw1dzpLQ_jMttKyLkYuPVjcE7JDr1nHQWAps9ypWj3OqwxGdMK_JQCV3DsblOjbx3RURiQiL4mz0/s1600/Screen+Shot+2013-06-16+at+8.10.10+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;45&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkiXGK3w7LzEQic5XWdf7kztslwVYrLIFIbfKOdFTwxIY2C5U-FTUO4H06tx7UbBAHw1dzpLQ_jMttKyLkYuPVjcE7JDr1nHQWAps9ypWj3OqwxGdMK_JQCV3DsblOjbx3RURiQiL4mz0/s320/Screen+Shot+2013-06-16+at+8.10.10+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;div class=&quot;pagination&quot;&amp;gt;  
  &amp;lt;ul&amp;gt;  
   &amp;lt;?php  
   echo ($this-&amp;gt;Paginator-&amp;gt;current() &amp;gt; 3) ? $this-&amp;gt;Paginator-&amp;gt;first(&#39;first &#39;, array(&#39;tag&#39; =&amp;gt; &#39;li&#39;)) : &#39;&#39;;  
   echo ($this-&amp;gt;Paginator-&amp;gt;hasPrev()) ? $this-&amp;gt;Paginator-&amp;gt;prev(__(&#39;prev &#39;, true),  
      array(&#39;tag&#39; =&amp;gt; &#39;li&#39;, &#39;id&#39; =&amp;gt; &#39;prev&#39; . rand(2, 9000)), null, array(&#39;escape&#39; =&amp;gt; false)) : &#39;&#39;;  
   echo $this-&amp;gt;Paginator-&amp;gt;numbers(array(&#39;modulus&#39; =&amp;gt; 7, &#39;separator&#39; =&amp;gt; &#39; &#39;, &#39;tag&#39; =&amp;gt; &#39;li&#39;));  
   echo ($this-&amp;gt;Paginator-&amp;gt;hasNext()) ? $this-&amp;gt;Paginator-&amp;gt;next(__(&#39; next&#39;, true),  
     array(&#39;tag&#39; =&amp;gt; &#39;li&#39;), null, array(&#39;escape&#39; =&amp;gt; false)) : &#39;&#39;;  
   echo ((int) $this-&amp;gt;Paginator-&amp;gt;counter(array(&#39;format&#39; =&amp;gt; &#39;%pages%&#39;)) &amp;gt; 10) ?  
     $this-&amp;gt;Paginator-&amp;gt;last(&#39;last&#39;, array(&#39;tag&#39; =&amp;gt; &#39;li&#39;)) : &#39;&#39;;  
   echo $this-&amp;gt;Js-&amp;gt;writeBuffer();  
   ?&amp;gt;  
  &amp;lt;/ul&amp;gt;  
  &amp;lt;/div&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/6228450544574721566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/06/pagination-with-twitter-bootstrap-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/6228450544574721566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/6228450544574721566'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/06/pagination-with-twitter-bootstrap-and.html' title='Pagination With Twitter Bootstrap and CakePHP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkiXGK3w7LzEQic5XWdf7kztslwVYrLIFIbfKOdFTwxIY2C5U-FTUO4H06tx7UbBAHw1dzpLQ_jMttKyLkYuPVjcE7JDr1nHQWAps9ypWj3OqwxGdMK_JQCV3DsblOjbx3RURiQiL4mz0/s72-c/Screen+Shot+2013-06-16+at+8.10.10+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-4977877441458949722</id><published>2013-05-16T05:06:00.000-07:00</published><updated>2013-11-09T19:03:47.041-08:00</updated><title type='text'>Using CakePHP FormHelper with Bootstrap Forms</title><content type='html'>CakePHP&#39;s FormHelper helpt to generate forms when making CakePHP applications. As one might assume, this includes generating input elements, like example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;form action=&quot;&quot;&amp;gt;  
 &amp;lt;fieldset&amp;gt;  
 &amp;lt;div class=&quot;control-group required error&quot;&amp;gt;  
   &amp;lt;label for=&quot;Fieldname&quot; class=&quot;control-label&quot;&amp;gt;Fieldname&amp;lt;/label&amp;gt;  
   &amp;lt;div class=&quot;controls&quot;&amp;gt;  
     &amp;lt;input name=&quot;data[Fieldname]&quot; class=&quot;form-error&quot; maxlength=&quot;255&quot; type=&quot;text&quot; value=&quot;&quot; id=&quot;Fieldname&quot;/&amp;gt;  
     &amp;lt;span class=&quot;help-inline&quot;&amp;gt;Error message&amp;lt;/span&amp;gt;  
   &amp;lt;/div&amp;gt;  
 &amp;lt;/div&amp;gt;  
 &amp;lt;/fieldset&amp;gt;  
 &amp;lt;/form&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
The CakePHP code is:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht_cZxpKXvnDCgi7yxnVMuTKNCCH3yJRfq4jBQjsZRKIee6E6rqA0FQ1kUUieCN8Q0th1kT7vYEMx1v-2GWHe4qUjuOw_m1fOTcdXRC4zYnL-OaqMsNbNt-65PwDIirp08bNm67fyHmGAU/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;?php echo $this-&amp;gt;Form-&amp;gt;create(&#39;ModelName&#39;, array(  
   &#39;class&#39; =&amp;gt; &#39;form-horizontal&#39;,  
   &#39;inputDefaults&#39; =&amp;gt; array(  
     &#39;format&#39; =&amp;gt; array(&#39;before&#39;, &#39;label&#39;, &#39;between&#39;, &#39;input&#39;, &#39;error&#39;, &#39;after&#39;),  
     &#39;div&#39; =&amp;gt; array(&#39;class&#39; =&amp;gt; &#39;control-group&#39;),  
     &#39;label&#39; =&amp;gt; array(&#39;class&#39; =&amp;gt; &#39;control-label&#39;),  
     &#39;between&#39; =&amp;gt; &#39;&amp;lt;div class=&quot;controls&quot;&amp;gt;&#39;,  
     &#39;after&#39; =&amp;gt; &#39;&amp;lt;/div&amp;gt;&#39;,  
     &#39;error&#39; =&amp;gt; array(&#39;attributes&#39; =&amp;gt; array(&#39;wrap&#39; =&amp;gt; &#39;span&#39;, &#39;class&#39; =&amp;gt; &#39;help-inline&#39;)),  
   )));?&amp;gt;  
 &amp;lt;fieldset&amp;gt;  
 &amp;lt;?php echo $this-&amp;gt;Form-&amp;gt;input(&#39;Fieldname1&#39;, array(  
   &#39;label&#39; =&amp;gt; array(&#39;class&#39; =&amp;gt; &#39;control-label&#39;,&#39;text&#39;=&amp;gt;&#39;HERE YOU LABEL TEXT&#39;)  
   )); ?&amp;gt;  
 &amp;lt;?php echo $this-&amp;gt;Form-&amp;gt;input(&#39;Fieldname2&#39;, array(  
   &#39;label&#39; =&amp;gt; array(&#39;class&#39; =&amp;gt; &#39;control-label&#39;,&#39;text&#39;=&amp;gt;&#39;HERE YOU LABEL TEXT&#39;)  
   )); ?&amp;gt;  
 &amp;lt;/fieldset&amp;gt;   
 &amp;lt;?php echo $this-&amp;gt;Form-&amp;gt;end();?&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/4977877441458949722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/06/using-cakephp-formhelper-with-bootstrap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/4977877441458949722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/4977877441458949722'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/06/using-cakephp-formhelper-with-bootstrap.html' title='Using CakePHP FormHelper with Bootstrap Forms'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-2939732217544197794</id><published>2013-05-04T06:47:00.002-07:00</published><updated>2013-05-10T00:15:06.782-07:00</updated><title type='text'>Bootstrap Typeahead CakePHP 2.0</title><content type='html'>Integrate Twitter Bootstrap Typeahead with your CakePHP 2.0 application.&lt;br /&gt;
&lt;b&gt;You need:&lt;/b&gt;&lt;br /&gt;
- Cakephp 2.x &lt;br /&gt;
- Jquery&lt;br /&gt;
- Twitter bootstrap&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;First the form:&lt;/b&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;&lt;/code&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;&lt;your code=&quot;&quot; here=&quot;&quot;&gt;&lt;/your&gt;&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;input data-provide=&quot;typeahead&quot; id=&quot;user-typeahead&quot; type=&quot;text&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Setting your url base&lt;/b&gt;&lt;br /&gt;
Put it into default.ctp before &amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; //get url base app&lt;br /&gt;&amp;nbsp; var site_url=&#39;&amp;lt;?php echo $this-&amp;gt;base; ?&amp;gt;&#39;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/script&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The Jquery:&lt;/b&gt;&lt;br /&gt;
Put it into bottom in view&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$( document ).ready( function(){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&#39;#user-typeahead&#39;).typeahead({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; source: function (query, process) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $.ajax({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: site_url+&#39;/users/typeahead_search&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type: &#39;get&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data: {q: query},&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataType: &#39;json&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; success: function (json) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return process(json);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;});&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UsersController&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public function typeahead_search() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $this-&amp;gt;autoRender = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $this-&amp;gt;RequestHandler-&amp;gt;respondAs(&#39;json&#39;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get the search term from URL&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $term = $this-&amp;gt;request-&amp;gt;query[&#39;q&#39;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $users = $this-&amp;gt;User-&amp;gt;find(&#39;all&#39;, array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;conditions&#39; =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;User.username LIKE&#39; =&amp;gt; &#39;%&#39; . $term . &#39;%&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ));&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Format the result for input&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $result = array();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($users as $key =&amp;gt; $user) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array_push($result, $user[&#39;User&#39;][&#39;username&#39;]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $users = $result;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo json_encode($users);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This action will receive the request, search the database for relevant result and return it on JSON format.</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/2939732217544197794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/05/bootstrap-typeahead-cakephp-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/2939732217544197794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/2939732217544197794'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/05/bootstrap-typeahead-cakephp-20.html' title='Bootstrap Typeahead CakePHP 2.0'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-3879762894235446846</id><published>2013-02-14T18:16:00.002-08:00</published><updated>2013-02-14T18:16:42.158-08:00</updated><title type='text'>Upload single image or file using Cakephp 1.3</title><content type='html'>This tutorial for upload image or file using Cakephp 1.3.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Step 1 : Create table name &#39;uploads&#39;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;command&quot;&gt;CREATE TABLE `uploads` (
 `id` CHAR(36) NOT NULL PRIMARY KEY,
 `title` VARCHAR(45) NOT NULL,
 `description` TEXT,
 `filename` VARCHAR(255) NOT NULL,
 `filesize` INT(11) UNSIGNED NOT NULL DEFAULT 0,
 `filemime` VARCHAR(45) NOT NULL DEFAULT &#39;text/plain&#39;,
 `created` DATETIME,
 `modified` DATETIME
);&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Step &lt;span style=&quot;font-size: large;&quot;&gt;2&lt;/span&gt; : Create view for &#39;uploads&#39;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;path : /views/uploads/add.ctp&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;command&quot;&gt;&amp;lt;?php echo $this-&amp;gt;Form-&amp;gt;create(‘Upload’, array(‘type’ =&amp;gt; ‘file’));?&amp;gt;
  &amp;lt;fieldset&amp;gt;
     &amp;lt;legend&amp;gt;&amp;lt;?php __(‘Add Upload’); ?&amp;gt;&amp;lt;/legend&amp;gt;
  &amp;lt;?php
  echo $this-&amp;gt;Form-&amp;gt;input(‘title’);
  echo $this-&amp;gt;Form-&amp;gt;input(‘description’);
  echo $this-&amp;gt;Form-&amp;gt;input(‘file’, array(‘type’ =&amp;gt; ‘file’));
  ?&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;?php echo $this-&amp;gt;Form-&amp;gt;end(__(‘Submit’, true));?&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Step &lt;span style=&quot;font-size: large;&quot;&gt;3&lt;/span&gt; : Create controller &#39;uploads_controller&#39;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;path : /controllers/uploads_controller.php&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;b&gt;Step 3.1 :&lt;/b&gt; create function add()&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;&quot;&gt;function add() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;&quot;&gt;&amp;nbsp; if (!empty($this-&amp;gt;data)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; $this-&amp;gt;Upload-&amp;gt;create();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if ($this-&amp;gt;uploadFile() &amp;amp;&amp;amp; $this-&amp;gt;Upload-&amp;gt;save($this-&amp;gt;data))&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;&quot;&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $this-&amp;gt;Session-&amp;gt;setFlash(__(&#39;The upload has been saved&#39;, true));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $this-&amp;gt;redirect(array(&#39;action&#39; =&amp;gt; &#39;index&#39;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $this-&amp;gt;Session-&amp;gt;setFlash(__(&#39;The upload could not be saved. Please, try again.&#39;, true));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;b&gt;Step 3.2 :&lt;/b&gt;&lt;/b&gt;&lt;/span&gt;create function uploadFile()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;b&gt;path : /webroot/uploads&lt;/b&gt;&lt;/i&gt; &lt;/b&gt;&lt;br /&gt;
make sure create folder &#39;upload&#39; in webroot and permission access to this folder&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;command&quot;&gt;function uploadFile() {
  $file = $this-&amp;gt;data[‘Upload’][‘file’];
  if ($file[‘error’] === UPLOAD_ERR_OK) {
    $id = String::uuid();
    if (move_uploaded_file($file[‘tmp_name’], APP.’webroot/uploads’.DS.$id)) {
      $this-&amp;gt;data[‘Upload’][‘id’] = $id;
      $this-&amp;gt;data[‘Upload’][‘filename’] = $file[‘name’];
      $this-&amp;gt;data[‘Upload’][‘filesize’] = $file[‘size’];
      $this-&amp;gt;data[‘Upload’][‘filemime’] = $file[‘type’];
      return true;
    }
  }
  return false;
}&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Step &lt;span style=&quot;font-size: large;&quot;&gt;4&lt;/span&gt; : Creat&lt;span style=&quot;font-size: large;&quot;&gt;e view and function for&lt;/span&gt; download &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;i. create view index.ctp &lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;path : /views/uploads/index.ctp&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;command&quot;&gt;&amp;lt;h2&amp;gt;&amp;lt;?php __(&#39;Upload&#39;); ?&amp;gt;&amp;lt;/h2&amp;gt;
&amp;lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&amp;gt;
    &amp;lt;tr&amp;gt;
        &amp;lt;th&amp;gt;&amp;lt;?php __(&#39;id&#39;); ?&amp;gt;&amp;lt;/th&amp;gt;
        &amp;lt;th&amp;gt;&amp;lt;?php __(&#39;title&#39;); ?&amp;gt;&amp;lt;/th&amp;gt;
        &amp;lt;th&amp;gt;&amp;lt;?php __(&#39;download&#39;); ?&amp;gt;&amp;lt;/th&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;?php foreach ($uploads as $upload): ?&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td&amp;gt;&amp;lt;?php echo $upload[&#39;Upload&#39;][&#39;id&#39;]; ?&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;&amp;lt;?php echo $upload[&#39;Upload&#39;][&#39;title&#39;]; ?&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;
            &amp;lt;td&amp;gt;
                &amp;lt;?php
                echo $this-&amp;gt;Html-&amp;gt;link(__(&#39;Download&#39;, true), array(
                    &#39;action&#39; =&amp;gt; &#39;download&#39;, $upload[&#39;Upload&#39;][&#39;id&#39;]));
                ?&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
    &amp;lt;?php endforeach; ?&amp;gt;
&amp;lt;/table&amp;gt;&lt;/pre&gt;
&lt;pre class=&quot;command&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;b&gt;ii. create function download in &lt;/b&gt;&lt;b&gt;&lt;b&gt;uploads_controller.php&lt;/b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;command&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;command&quot;&gt;function download($id = null) {
        if (!$id) {
            $this-&amp;gt;Session-&amp;gt;setFlash(__(&#39;Invalid id for upload&#39;, true));
            $this-&amp;gt;redirect(array(&#39;action&#39; =&amp;gt; &#39;index&#39;));
        }
        $upload = $this-&amp;gt;Upload-&amp;gt;find(&#39;first&#39;, array(
            &#39;conditions&#39; =&amp;gt; array(
                &#39;Upload.id&#39; =&amp;gt; $id,
            )
                ));
        if (!$upload) {
            $this-&amp;gt;Session-&amp;gt;setFlash(__(&#39;Invalid id for upload&#39;, true));
            $this-&amp;gt;redirect(array(&#39;action&#39; =&amp;gt; &#39;index&#39;));
        }
        $this-&amp;gt;view = &#39;media&#39;;
        $filename = $upload[&#39;Upload&#39;][&#39;filename&#39;];
        $this-&amp;gt;set(array(
            &#39;id&#39; =&amp;gt; $upload[&#39;Upload&#39;][&#39;id&#39;],
            &#39;name&#39; =&amp;gt; substr($filename, 0, strrpos($filename, &#39;.&#39;)),
            &#39;extension&#39; =&amp;gt; substr(strrchr($filename, &#39;.&#39;), 1),
            &#39;path&#39; =&amp;gt; APP . &#39;webroot/uploads&#39; . DS,
            &#39;download&#39; =&amp;gt; true,
        ));
    }&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Extra&lt;/span&gt; : &lt;span style=&quot;font-size: large;&quot;&gt;Show image in view.ctp&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;path : /views/uploads/view.ctp&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$id = $upload[&#39;Upload&#39;][&#39;id&#39;];&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;echo &#39;&amp;lt;img src=&quot;&#39;.$this-&amp;gt;Html-&amp;gt;url(array(&#39;controller&#39; =&amp;gt; &#39;uploads&#39;,&#39;action&#39; =&amp;gt; &#39;download&#39;,$id)).&#39;&quot;/&amp;gt;&#39;;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt; &lt;/span&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/3879762894235446846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/02/upload-single-image-or-file-using.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/3879762894235446846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/3879762894235446846'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2013/02/upload-single-image-or-file-using.html' title='Upload single image or file using Cakephp 1.3'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-3143701083618082575</id><published>2012-10-10T07:07:00.000-07:00</published><updated>2012-10-10T07:08:17.200-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><title type='text'>Create autoComplete Method Ajax in Cakephp</title><content type='html'>&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;i&gt;ref: &lt;a href=&quot;http://book.cakephp.org/1.3/en/view/1358/AJAX&quot;&gt;http://book.cakephp.org/1.3/en/view/1358/AJAX&lt;/a&gt;&lt;/i&gt;&lt;/b&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;1.&amp;nbsp; You&#39;ll need to include the Ajax and Javascript helpers in your controller:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: purple; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;class PostsController extends AppController {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var $name = &#39;Posts&#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var $helpers = array(&#39;Html&#39;,&#39;Ajax&#39;,&#39;Javascript&#39;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var $components = array( &#39;RequestHandler&#39; );&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;2. Once you have the javascript in your controller, you can use javascript helper link() method to include Prototype and Scriptaculous in view/layout/default.ctp&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: purple; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;echo $html-&amp;gt;script(&#39;prototype&#39;);&lt;br /&gt;echo $html-&amp;gt;script(&#39;scriptaculous&#39;);&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Download &lt;a href=&quot;http://prototypejs.org/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Prototype&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;- save it in /webroot/js/prototype.js&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Download &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://script.aculo.us/downloads&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Scriptaculous&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;- save all it in /webroot/js/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;3. You need to set up a controller action  that fetches and 
organizes the data you&#39;ll need for your list, based on user  input: &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: purple; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#/app/controllers/posts_controller.php&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function autoComplete() {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//Partial strings will come from the autocomplete field as&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//$this-&amp;gt;data[&#39;Post&#39;][&#39;title&#39;] &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$this-&amp;gt;set(&#39;posts&#39;, $this-&amp;gt;Post-&amp;gt;find(&#39;all&#39;, array(&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;conditions&#39; =&amp;gt; array(&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;Post.title LIKE&#39; =&amp;gt; $this-&amp;gt;data[&#39;Post&#39;][&#39;title&#39;].&#39;%&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;),&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;fields&#39; =&amp;gt; array(&#39;title&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;)));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$this-&amp;gt;layout = &#39;ajax&#39;;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;4. Create &lt;code&gt;app/views/posts/auto_complete.ctp&lt;/code&gt; that uses that data and creates an unordered list:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;?php foreach($posts as $post): ?&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;&amp;lt;?php echo $post[&#39;Post&#39;][&#39;title&#39;]; ?&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;?php endforeach; ?&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;5.&amp;nbsp; Finally, utilize autoComplete() in a view to  create your auto-completing form field:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;?php echo $this-&amp;gt;Form-&amp;gt;create(&#39;Post&#39;, array(&#39;url&#39; =&amp;gt; &#39;/posts/index&#39;)); ?&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fieldset&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;legend&amp;gt;&amp;lt;?php __(&#39;Search Post&#39;); ?&amp;gt;&amp;lt;/legend&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php echo $ajax-&amp;gt;autoComplete(&#39;Post.title&#39;, &#39;/posts/autoComplete&#39;)?&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fieldset&amp;gt;&lt;br /&gt;&amp;lt;?php echo $this-&amp;gt;Form-&amp;gt;end(__(&#39;Find!!!&#39;, true));?&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Once you&#39;ve got the autoComplete() call working  correctly, use CSS to 
style the auto-complete suggestion box. You might end up  using 
something similar to the following:&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;plain&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;div.auto_complete    {
     position         :absolute;
     width            :250px;
     background-color :white;
     border           :1px solid #888;
     margin           :0px;
     padding          :0px;
} 
li.selected    { background-color: #ffb; }&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/3143701083618082575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2012/10/create-autocomplete-method-ajax-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/3143701083618082575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/3143701083618082575'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2012/10/create-autocomplete-method-ajax-in.html' title='Create autoComplete Method Ajax in Cakephp'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-9044264991282868791</id><published>2012-09-16T03:08:00.001-07:00</published><updated>2012-09-16T03:09:16.566-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><title type='text'>Setting up Twitter Bootstrap with CakePHP</title><content type='html'>&lt;h1&gt;
Bootstrap&lt;/h1&gt;
Sleek, intuitive, and powerful front-end framework for faster and easier web development.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Step 1: Download CakePHP and Twitter Bootstrap&lt;/h3&gt;
To get CakePHP, go to &lt;a href=&quot;http://cakephp.org/&quot; target=&quot;_blank&quot; title=&quot;CakePHP &quot;&gt;CakePHP.org&lt;/a&gt; an download the latest release and head over to the &lt;a href=&quot;http://http//twitter.github.com/bootstrap/&quot; target=&quot;_blank&quot; title=&quot;Bootsrap, by Twitter&quot;&gt;Bootstrap&lt;/a&gt; site to get it.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Step 2: Copy the Bootstrap files to CakePHP setup&lt;/h3&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot;&gt;
&lt;u&gt;&lt;b&gt;&lt;i&gt;Bootstrap css,img,javascript source to copy            &lt;/i&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgehU4xNlPp8CzBSHXl1Jp-uRi3jyVwxQBO9ntdkY4FXJlKhUShmzb_pXTsOg0agDoVgqRm0Slr5wA_Lg975Jlzn4AwIxcJWIdYGVPETIbY_RdXu_zsuiWqHNNp56UdqGVMLkCiainyGxs/s1600/Screen+shot+2012-09-16+at+5.59.39+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgehU4xNlPp8CzBSHXl1Jp-uRi3jyVwxQBO9ntdkY4FXJlKhUShmzb_pXTsOg0agDoVgqRm0Slr5wA_Lg975Jlzn4AwIxcJWIdYGVPETIbY_RdXu_zsuiWqHNNp56UdqGVMLkCiainyGxs/s1600/Screen+shot+2012-09-16+at+5.59.39+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;wp-caption-text&quot;&gt;
&lt;u&gt;&lt;i&gt;&lt;b&gt;Cake source css,img,js Directory&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5x0l7ITYZ7gzg2g9SkhRf6NS0F7vsMKri8XqGNWsNaqgToU_q6HYFNl3tJA2dKVCkkPxzG8S2ZRMifgeqFSumAN3OCbKIRCydKPd5wcm2fted118UXBFp3lgWzwsm0TRJGNKmHT8DMrM/s1600/Screen+shot+2012-09-16+at+6.00.18+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5x0l7ITYZ7gzg2g9SkhRf6NS0F7vsMKri8XqGNWsNaqgToU_q6HYFNl3tJA2dKVCkkPxzG8S2ZRMifgeqFSumAN3OCbKIRCydKPd5wcm2fted118UXBFp3lgWzwsm0TRJGNKmHT8DMrM/s1600/Screen+shot+2012-09-16+at+6.00.18+PM.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Step 3. Setup the CakePHP default template&lt;/h3&gt;
In the CakePHP source, go into the Views-&amp;gt;Layouts directory and open up the default.ctp.&lt;br /&gt;
&lt;br /&gt;
Replace this code&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre style=&quot;font-size: .7em;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang=&quot;en&quot;&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;?php echo $this-&amp;gt;Html-&amp;gt;charset(); ?&amp;gt;
  &amp;lt;title&amp;gt;&amp;lt;?php echo $title_for_layout; ?&amp;gt;&amp;lt;/title&amp;gt;
  &amp;lt;!--&amp;nbsp; meta info --&amp;gt;
  &amp;lt;?php
    echo $this-&amp;gt;Html-&amp;gt;meta(array(&quot;name&quot;=&amp;gt;&quot;viewport&quot;,
      &quot;content&quot;=&amp;gt;&quot;width=device-width,  initial-scale=1.0&quot;));
    echo $this-&amp;gt;Html-&amp;gt;meta(array(&quot;name&quot;=&amp;gt;&quot;description&quot;,
      &quot;content&quot;=&amp;gt;&quot;this is the description&quot;));
    echo $this-&amp;gt;Html-&amp;gt;meta(array(&quot;name&quot;=&amp;gt;&quot;author&quot;,
      &quot;content&quot;=&amp;gt;&quot;TheHappyDeveloper.com - @happyDeveloper&quot;))
  ?&amp;gt;

  &amp;lt;!-- Le HTML5 shim, for IE6-8 support of HTML elements --&amp;gt;
  &amp;lt;!--[if lt IE 9]&amp;gt;
  &amp;lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;![endif]--&amp;gt;

  &amp;lt;!-- styles --&amp;gt;
  &amp;lt;?php
    echo $this-&amp;gt;Html-&amp;gt;css(&#39;bootstrap&#39;);
    echo $this-&amp;gt;Html-&amp;gt;css(&#39;bootstrap-responsive&#39;);
    echo $this-&amp;gt;Html-&amp;gt;css(&#39;docs&#39;);
    echo $this-&amp;gt;Html-&amp;gt;css(&#39;prettify&#39;);
    
    echo $javascript-&amp;gt;link(array(
            &#39;jquery.js&#39;,
            &#39;prettify.js&#39;,
            &#39;bootstrap.js&#39;,
          
        ));
  ?&amp;gt;
  &amp;lt;!-- icons --&amp;gt;
  &amp;lt;?php
    echo&amp;nbsp; $this-&amp;gt;Html-&amp;gt;meta(&#39;icon&#39;,$this-&amp;gt;webroot.&#39;img/favicon.ico&#39;);
    echo $this-&amp;gt;Html-&amp;gt;meta(array(&#39;rel&#39; =&amp;gt; &#39;apple-touch-icon&#39;,
      &#39;href&#39;=&amp;gt;$this-&amp;gt;webroot.&#39;img/apple-touch-icon.png&#39;));
    echo $this-&amp;gt;Html-&amp;gt;meta(array(&#39;rel&#39; =&amp;gt; &#39;apple-touch-icon&#39;,
      &#39;href&#39;=&amp;gt;$this-&amp;gt;webroot.&#39;img/apple-touch-icon.png&#39;,&amp;nbsp; &#39;sizes&#39;=&amp;gt;&#39;72x72&#39;));
    echo $this-&amp;gt;Html-&amp;gt;meta(array(&#39;rel&#39; =&amp;gt; &#39;apple-touch-icon&#39;,
      &#39;href&#39;=&amp;gt;$this-&amp;gt;webroot.&#39;img/apple-touch-icon.png&#39;,&amp;nbsp; &#39;sizes&#39;=&amp;gt;&#39;114x114&#39;));
  ?&amp;gt;
  &amp;lt;!-- page specific scripts --&amp;gt;
    &amp;lt;?php echo $scripts_for_layout; ?&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body data-spy=&quot;scroll&quot; data-target=&quot;.subnav&quot; data-offset=&quot;50&quot;&amp;gt;
  &amp;lt;div id=&quot;container&quot;&amp;gt;
  &amp;lt;!-- Navbar ============================================= --&amp;gt;
  &amp;lt;div class=&quot;navbar navbar-fixed-top&quot;&amp;gt;
    &amp;lt;div class=&quot;navbar-inner&quot;&amp;gt;
      &amp;lt;div class=&quot;container&quot;&amp;gt;
        &amp;lt;a class=&quot;btn btn-navbar&quot; data-toggle=&quot;collapse&quot;
          data-target=&quot;.nav-collapse&quot;&amp;gt;
          &amp;lt;span class=&quot;icon-bar&quot;&amp;gt;&amp;lt;/span&amp;gt;
          &amp;lt;span class=&quot;icon-bar&quot;&amp;gt;&amp;lt;/span&amp;gt;
          &amp;lt;span class=&quot;icon-bar&quot;&amp;gt;&amp;lt;/span&amp;gt;
        &amp;lt;/a&amp;gt;
        &amp;lt;a class=&quot;brand&quot; href=&quot;./index.html&quot;&amp;gt;Bootstrap&amp;lt;/a&amp;gt;
        &amp;lt;div class=&quot;nav-collapse&quot;&amp;gt;
          &amp;lt;ul class=&quot;nav&quot;&amp;gt;
            &amp;lt;li class=&quot;active&quot;&amp;gt;
              &amp;lt;a href=&quot;&amp;lt;?php echo $this-&amp;gt;webroot;?&amp;gt;&quot;&amp;gt;Home&amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
            &amp;lt;li class=&quot;&quot;&amp;gt;
              &amp;lt;a href=&quot;./base-css.html&quot;&amp;gt;Base CSS&amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
            &amp;lt;li class=&quot;&quot;&amp;gt;
              &amp;lt;a href=&quot;./components.html&quot;&amp;gt;Components&amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
            &amp;lt;li class=&quot;&quot;&amp;gt;
              &amp;lt;a href=&quot;./javascript.html&quot;&amp;gt;Javascript plugins&amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
            &amp;lt;li class=&quot;&quot;&amp;gt;
              &amp;lt;a href=&quot;./less.html&quot;&amp;gt;Using LESS&amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
            &amp;lt;li class=&quot;divider-vertical&quot;&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li class=&quot;&quot;&amp;gt;
              &amp;lt;a href=&quot;./download.html&quot;&amp;gt;Customize&amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
            &amp;lt;li class=&quot;&quot;&amp;gt;
              &amp;lt;a href=&quot;./examples.html&quot;&amp;gt;Examples&amp;lt;/a&amp;gt;
            &amp;lt;/li&amp;gt;
          &amp;lt;/ul&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;div id=&quot;row&quot;&amp;gt;
    &amp;lt;?php echo $this-&amp;gt;Session-&amp;gt;flash(); ?&amp;gt;
    &amp;lt;?php echo $content_for_layout; ?&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;?php echo $this-&amp;gt;element(&#39;sql_dump&#39;); ?&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/9044264991282868791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2012/09/setting-up-twitter-bootstrap-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/9044264991282868791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/9044264991282868791'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2012/09/setting-up-twitter-bootstrap-with.html' title='Setting up Twitter Bootstrap with CakePHP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgehU4xNlPp8CzBSHXl1Jp-uRi3jyVwxQBO9ntdkY4FXJlKhUShmzb_pXTsOg0agDoVgqRm0Slr5wA_Lg975Jlzn4AwIxcJWIdYGVPETIbY_RdXu_zsuiWqHNNp56UdqGVMLkCiainyGxs/s72-c/Screen+shot+2012-09-16+at+5.59.39+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-4971874519018961499</id><published>2012-08-14T05:56:00.000-07:00</published><updated>2012-08-14T05:56:08.822-07:00</updated><title type='text'>Changing File Permissions</title><content type='html'>On computer filesystems, different files and directories have &lt;strong&gt;permissions&lt;/strong&gt; that specify who and what can read, write, modify and access them.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span class=&quot;mw-headline&quot;&gt;Permission Modes&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6capLk4FL6tv4n-YErvtyIDQ6uRzvKaJjUSXuX5ggYNP_Sieag3qM_0t_42ZXgZKVh259KgUVlJLctfPWEfeaEsBplB6ZkPTFt8R3jhdxFrLTSUtlz-okdc6yOTtBp_zFuLwnYDBZURI/s1600/Screen+shot+2012-08-14+at+8.52.50+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;84&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6capLk4FL6tv4n-YErvtyIDQ6uRzvKaJjUSXuX5ggYNP_Sieag3qM_0t_42ZXgZKVh259KgUVlJLctfPWEfeaEsBplB6ZkPTFt8R3jhdxFrLTSUtlz-okdc6yOTtBp_zFuLwnYDBZURI/s320/Screen+shot+2012-08-14+at+8.52.50+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
The permission mode is computed by adding up the following values for
 the user, the file group, and for everyone else.  The diagram shows 
how.
&lt;br /&gt;

&lt;ul&gt;
&lt;li&gt; &lt;b&gt;R&lt;/b&gt;ead    4  - Allowed to read files
&lt;/li&gt;
&lt;li&gt; &lt;b&gt;W&lt;/b&gt;rite   2  - Allowed to write/modify files
&lt;/li&gt;
&lt;li&gt;  e&lt;b&gt;X&lt;/b&gt;ecute1  - Read/write/delete/modify/directory&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi11ue6cRcMo1Rly09-Gv9hzk7kVMsfU09fL7IiRdJVxctDz4lY-fBy2nE6E6mnk5zNRiQN815e4kGvzAgMSZ81A99pOV5IXvW4yxBEkQFQhn80Rkq9ZmyeElNpJi5cBaPte5Kj5VUnREI/s1600/Screen+shot+2012-08-14+at+8.55.09+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;86&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi11ue6cRcMo1Rly09-Gv9hzk7kVMsfU09fL7IiRdJVxctDz4lY-fBy2nE6E6mnk5zNRiQN815e4kGvzAgMSZ81A99pOV5IXvW4yxBEkQFQhn80Rkq9ZmyeElNpJi5cBaPte5Kj5VUnREI/s320/Screen+shot+2012-08-14+at+8.55.09+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
 &lt;span class=&quot;mw-headline&quot;&gt; Example Permission Modes &lt;/span&gt;&lt;/h3&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr align=&quot;center&quot; bgcolor=&quot;#eee&quot; style=&quot;margin: 0 auto; width: 99%;&quot;&gt;
&lt;th&gt; &lt;b&gt;Mode&lt;/b&gt; &lt;/th&gt;&lt;th&gt; &lt;b&gt;Str Perms&lt;/b&gt; &lt;/th&gt;&lt;th&gt; &lt;b&gt;Explanation&lt;/b&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0477&lt;/b&gt; &lt;/td&gt;&lt;td&gt;-r--rwxrwx&lt;/td&gt;&lt;td&gt; owner has read only (4), other and group has rwx (7)
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0677&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -rw-rwxrwx&lt;/td&gt;&lt;td&gt;owner has rw only(6), other and group has rwx (7)
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0444&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -r--r--r--&lt;/td&gt;&lt;td&gt;all have read only (4)
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0666&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -rw-rw-rw-&lt;/td&gt;&lt;td&gt;all have rw only (6)
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0400&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -r--------&lt;/td&gt;&lt;td&gt;owner has read only(4), group and others have no permission(0)
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0600&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -rw-------&lt;/td&gt;&lt;td&gt;owner has rw only, group and others have no permission
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0470&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -r--rwx---&lt;/td&gt;&lt;td&gt;owner has read only, group has rwx, others have no permission
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0407&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -r-----rwx&lt;/td&gt;&lt;td&gt;owner has read only, other has rwx, group has no permission
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0670&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -rw-rwx---&lt;/td&gt;&lt;td&gt;owner has rw only, group has rwx, others have no permission
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;b&gt;0607&lt;/b&gt; &lt;/td&gt;&lt;td&gt; -rw----rwx&lt;/td&gt;&lt;td&gt;owner has rw only, group has no permission and others have rwx
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;
&lt;span class=&quot;mw-headline&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/4971874519018961499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2012/08/changing-file-permissions.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/4971874519018961499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/4971874519018961499'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2012/08/changing-file-permissions.html' title='Changing File Permissions'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6capLk4FL6tv4n-YErvtyIDQ6uRzvKaJjUSXuX5ggYNP_Sieag3qM_0t_42ZXgZKVh259KgUVlJLctfPWEfeaEsBplB6ZkPTFt8R3jhdxFrLTSUtlz-okdc6yOTtBp_zFuLwnYDBZURI/s72-c/Screen+shot+2012-08-14+at+8.52.50+PM.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-8273726507205772855</id><published>2011-12-23T20:40:00.000-08:00</published><updated>2011-12-23T20:40:04.940-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Captcha"/><title type='text'>Captcha component with Securimage</title><content type='html'>Securimage is an open-source free PHP CAPTCHA script for generating  complex images and CAPTCHA codes to protect forms from spam and abuse.  It can be easily added into existing forms on your website to provide  protection from spam bots. It can run on most any webserver as long as  you have PHP installed, and GD support within PHP. Securimage does  everything from generate complicated CAPTCHA images to making sure the  code the user entered was correct.&lt;br /&gt;
&lt;br /&gt;
Read More at this &lt;a href=&quot;http://bakery.cakephp.org/articles/debuggeddesigns/2009/03/09/captcha-component-with-securimage&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://cdn1.1stwebdesigner.com/wp-content/uploads/2010/06/recaptcha.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;168&quot; src=&quot;http://cdn1.1stwebdesigner.com/wp-content/uploads/2010/06/recaptcha.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/8273726507205772855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/12/captcha-component-with-securimage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/8273726507205772855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/8273726507205772855'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/12/captcha-component-with-securimage.html' title='Captcha component with Securimage'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-1269156332624990106</id><published>2011-12-13T20:44:00.000-08:00</published><updated>2011-12-23T20:44:31.834-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><title type='text'>Transparent DatePicker with jquery</title><content type='html'>We will create an extended Helper FormHelper, without Difficulty to add a calendar date picker style in jquery (&lt;a href=&quot;http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/&quot;&gt;http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Read more article from this &lt;a href=&quot;http://bakery.cakephp.org/articles/agusti/2010/02/02/transparent-datepicker-with-jquery&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/1269156332624990106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/12/transparent-datepicker-with-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/1269156332624990106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/1269156332624990106'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/12/transparent-datepicker-with-jquery.html' title='Transparent DatePicker with jquery'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-4815067222705494685</id><published>2011-10-23T04:15:00.000-07:00</published><updated>2011-10-23T04:15:15.018-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Editor"/><title type='text'>CakePHP support in NetBeans</title><content type='html'>NetBeans is a very powerful development environment for many languages  including PHP. With the release of its latest version, NetBeans  announced full support for symfony PHP framework. NetBeans can also  support many other PHP frameworks and libraries although it is not  officially supported by NetBeans. This support needs some effort to  enable some tools specially auto-complete, or intellisense, which saves a  lot of time for developers.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.tiplite.com/cakephp-support-in-netbeans/&quot;&gt;http://www.tiplite.com/cakephp-support-in-netbeans/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/4815067222705494685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/10/cakephp-support-in-netbeans.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/4815067222705494685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/4815067222705494685'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/10/cakephp-support-in-netbeans.html' title='CakePHP support in NetBeans'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-7375624694949378490</id><published>2011-10-23T04:13:00.001-07:00</published><updated>2011-10-23T04:13:17.207-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Editor"/><title type='text'>Using CakePHP with Aptana</title><content type='html'>&lt;ul&gt;&lt;li&gt;From the Window menu, select Preferences…, and then choose General &amp;gt; Editors &amp;gt; File Associations.&lt;/li&gt;
&lt;li&gt;Add the appropriate file type.&lt;/li&gt;
&lt;li&gt;Next to the File Types list, click the Add button.&lt;/li&gt;
&lt;li&gt;In the New File Type pop-up window, type the appropriate file extension (e.g. “&lt;em&gt;.ctp” or “&lt;/em&gt;.thtml”).&lt;/li&gt;
&lt;li&gt;Click OK to add the New File Type to the List.&lt;/li&gt;
&lt;li&gt;Associate the new file type with Aptana.&lt;/li&gt;
&lt;li&gt;On the File Types list, select the file type that you just added.&lt;/li&gt;
&lt;li&gt;Next to the Editor Associations list, click the Add button.&lt;/li&gt;
&lt;li&gt;On the Editor Selection pop-up window, select the editor that you want to associate with your file type.&lt;/li&gt;
&lt;li&gt;Click OK to add the editor.&lt;/li&gt;
&lt;li&gt;The new is now associated with the  specified file type.&lt;/li&gt;
&lt;li&gt;Click OK to apply your changes and  close the Preferences window.&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/7375624694949378490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/10/using-cakephp-with-aptana.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/7375624694949378490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/7375624694949378490'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/10/using-cakephp-with-aptana.html' title='Using CakePHP with Aptana'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-2707806567070758072</id><published>2011-10-23T04:12:00.003-07:00</published><updated>2011-10-23T04:12:51.530-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Editor"/><title type='text'>CakePHP and Dreamweaver</title><content type='html'>&lt;ul&gt;&lt;li&gt;Go to your Dreamweaver installation folder (let’s assume this is C:\Program Files\Adobe\Adobe Dreamweaver CS3)&lt;/li&gt;
&lt;li&gt;Open the configuration folder&lt;/li&gt;
&lt;li&gt;Edit   extensions.txt and modify the first line so THTML and CTP are present   (comma seperated. It should look something like this:   ,MASTER,THTML,CTP:All Documents&lt;/li&gt;
&lt;li&gt;Edit the PHP files line in the same way. It should look like this: PHP,PHP3,PHP4,PHP5,TPL,THTML,CTP:PHP Files&lt;/li&gt;
&lt;li&gt;Now browse to the DocumentTypes folder and open MMDocumentTypes.xml.&lt;/li&gt;
&lt;li&gt;Do   a ctrl-f search for “winfileextension” and modify the line to look  like  this: winfileextension=”php,php3,php4,php5,thtml,ctp”&lt;/li&gt;
&lt;li&gt;Do the same for “macfileextension”: macfileextension=”php,php3,php4,php5,thtml,ctp”&lt;/li&gt;
&lt;li&gt;Now   go to your “Document and Settings” folder (found under your username   e.g. “C:\Documents and Settings\Your User Name\Application   Data\Adobe\Dreamweaver 9\Configuration”&lt;/li&gt;
&lt;li&gt;Edit “Extensions.txt” and add the same lines you added to the other extensions file.&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/2707806567070758072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/10/cakephp-and-dreamweaver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/2707806567070758072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/2707806567070758072'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/10/cakephp-and-dreamweaver.html' title='CakePHP and Dreamweaver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-438659707236647674</id><published>2011-10-23T04:12:00.001-07:00</published><updated>2011-10-23T04:12:21.177-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Editor"/><title type='text'>CakePHP and Eclipse</title><content type='html'>To set up your version of Eclipse to read either file type, follow these steps:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Go to Window &amp;gt; Preferences &amp;gt; General &amp;gt; Content types&lt;/li&gt;
&lt;li&gt;In the content types window navigate the tree to text &amp;gt; PHP content type&lt;/li&gt;
&lt;li&gt;Click add&lt;/li&gt;
&lt;li&gt;Enter *.ctp or *.thtml depending on what version of CakePHP you use. It might be best to add both – just in case.&lt;/li&gt;
&lt;li&gt;Now navigate to Editors &amp;gt; File Associations&lt;/li&gt;
&lt;li&gt;Enter *.ctp or *.thtml depending on what version of CakePHP you use.&lt;/li&gt;
&lt;li&gt;Under “Associated Editors:”, select the PHP Editor and click Default.&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/438659707236647674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/10/cakephp-and-eclipse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/438659707236647674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/438659707236647674'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/10/cakephp-and-eclipse.html' title='CakePHP and Eclipse'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-5553162016404642868</id><published>2011-07-12T04:42:00.000-07:00</published><updated>2011-07-12T04:44:39.667-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Plugin"/><title type='text'>7 Best Shopping Cart Plugins For CakePhp</title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;1. VaM Cart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   Easy Installation.&lt;br /&gt;   SEO – Search Engine Optimization.&lt;br /&gt;   Unlimited Categories, Products.&lt;br /&gt;   CakePHP, MVC, Smarty.&lt;br /&gt;   Multi Language, Multi Currency.&lt;br /&gt;   Templatable.&lt;br /&gt;   Open Source.&lt;br /&gt;   Automatic Image Resize.&lt;br /&gt;   Product Reviews.&lt;br /&gt;   Coupons…&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;2. ShoppingCart plugin for CakePHP (techno-geek Shopping Cart)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Authors: Dean Sofer (ProLoser), Jesse Adams (techno-geek)&lt;br /&gt;&lt;br /&gt;CakePHP plugin that handles the management of order data in the session. Useful for shopping cart CakePHP applications. Will be used in the Mocha Shopping Cart project brought to you by DualTech Services, inc.&lt;br /&gt;3. cakecart&lt;br /&gt;&lt;br /&gt;CakeCart is a shopping cart built on-top of the cakePHP framework. Currently in the pre-pre-alpha stage. Its purpose will be to allow anybody familiar with the cakePHP framework to customize and easily launch an e-commerce website. Currently has authorize.net support and later scheduled to add in paypal and google checkout support.&lt;br /&gt;&lt;br /&gt;To install: Import db.sql into desired database.&lt;br /&gt;Change app/config/database.php&lt;br /&gt;Configure app/config/cart.php&lt;br /&gt;Configure authorize.net at app/config/authorize.php&lt;br /&gt;Access admin in /admin url and use username: demo@demo.com and password: demo&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;4. bakesale Shopping cart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Made with the MVC Web framework CakePHP. Uses the jQuery JavaScript library, both for effects and AJAX.&lt;br /&gt;&lt;br /&gt;Using the Plug-ins, the end-developer can simply add new functionality to BakeSale.&lt;br /&gt;&lt;br /&gt;The application follows Web standards, using semantic XHTML markup with CSS-based layout.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;5. CakePHP-Cart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is an attempt to become the defacto solution for shopping cart implementation in CakePHP. Not to say this in of itself will be the best shopping cart around, but in fact give developers the resource to build their own custom shopping cart Application to their own specifications.&lt;br /&gt;&lt;br /&gt;Hopefully future versions of the brother development app, ‘Mocha’ will use future releases of this plugin as a part of it’s core. For now this is a 1-stop plugin that provides you all the resources you need to build a cart and nothing more, allowing you to extrapolate from that point forwards.&lt;br /&gt;6.  flashub.com&lt;br /&gt;&lt;br /&gt;[This Project is POSTPONED] e-junkie clone but more features provided to independent software and php script vendors. E-junkie is a shopping cart for downloadable goods. Built using cakephp.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;7. kaching-php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Kaching is a shopping cart framework built as a CakePHP plugin. It is a platform developers can use create customized onlines stores.&lt;br /&gt;&lt;br /&gt;Kaching came from a frustration of trying to use pre-built shopping cart systems that were hard to customized and locked you into doing it their way. They didn’t seem to understand that not all online stores fit into the same mold.&lt;br /&gt;&lt;br /&gt;CakePHP was chosen to be the framework to build on, because frankly we think it’s pretty awesome.&lt;br /&gt;&lt;br /&gt;Kaching is not for everyone. It is strictly for developer who want to build a online store and maintain full control of it. Kaching comes with a sample store, as a starting point and examples on how to use it. Then the rest it up to you.&lt;br /&gt;&lt;br /&gt;From reading of the CakePHP groups, it is quite evident that there are lots of people trying to implement a online store using CakePHP. Kaching hopes that it can fill a gap where people don’t have to keep on starting from scratch when building their online store.</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/5553162016404642868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/7-best-shopping-cart-plugins-for.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/5553162016404642868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/5553162016404642868'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/7-best-shopping-cart-plugins-for.html' title='7 Best Shopping Cart Plugins For CakePhp'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-3167429777387641833</id><published>2011-07-11T07:44:00.000-07:00</published><updated>2011-07-11T07:45:19.784-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PDF"/><title type='text'>Introduction to CakePHP for newbies</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://www.davidgoldingdesign.com/blog/&quot;&gt;David Golding&lt;/a&gt;  has started to write an introductory book for CakePHP with the title  “The newbie’s introduction to CakePHP”. As the title indicates, the book  is aimed at newbies and so it covers the first steps with CakePHP. It  is not completed yet, but I think it will become a great addition to the  &lt;a href=&quot;http://manual.cakephp.org/&quot;&gt;manual&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;You can download a preview of the book as a PDF from David Golding’s website: &lt;a target=_blank href=&quot;http://www.davidgoldingdesign.com/newbie-cakephp.pdf&quot;&gt;http://www.davidgoldingdesign.com/newbie-cakephp.pdf&lt;/a&gt;.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/3167429777387641833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/introduction-to-cakephp-for-newbies.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/3167429777387641833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/3167429777387641833'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/introduction-to-cakephp-for-newbies.html' title='Introduction to CakePHP for newbies'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-8026318794913918110</id><published>2011-07-11T07:42:00.000-07:00</published><updated>2011-07-11T07:44:35.579-07:00</updated><title type='text'>An Introduction to CakePHP</title><content type='html'>&lt;div  style=&quot;text-align: center; font-family:arial;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-size:180%;&quot; &gt;An Introduction&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;font-size:180%;&quot; &gt;to CakePHP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Dennis S. Hennen - dennis@28studios.com&lt;/span&gt;&lt;br /&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://files.meetup.com/120829/20080325-cakephp.pdf&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;PDF FILE&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/8026318794913918110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/introduction-to-cakephp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/8026318794913918110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/8026318794913918110'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/introduction-to-cakephp.html' title='An Introduction to CakePHP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-5245565195935087949</id><published>2011-07-11T07:33:00.002-07:00</published><updated>2011-07-11T07:37:30.564-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="PHPMyAdmin"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>How To Secure PHPMyAdmin and MySQL in Windows XAMPP Server</title><content type='html'>&lt;iframe src=&quot;http://www.youtube.com/embed/o13eVqt_BdA&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;349&quot; width=&quot;425&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;Visit &lt;a href=&quot;http://www.myownserver.info/&quot; target=&quot;_blank&quot; title=&quot;http://www.myownserver.info&quot; rel=&quot;nofollow&quot; dir=&quot;ltr&quot; class=&quot;yt-uix-redirect-link&quot;&gt;http://www.myownserver.info&lt;/a&gt; for more information and for high-quality videos.&lt;br /&gt;This  tutorial shows a few ways to make your phpmyadmin and MySQL database  server more secure on a Windows XAMPP web server.  These same methods  can be used on Linux and other Apache servers, but the directories will  be different.&lt;br /&gt;I explain how to use the Allow from directive, htaccess  and htpasswd files, and the importance of using strong passwords for  your phpMyAdmin access.</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/5245565195935087949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/how-to-secure-phpmyadmin-and-mysql-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/5245565195935087949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/5245565195935087949'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/how-to-secure-phpmyadmin-and-mysql-in.html' title='How To Secure PHPMyAdmin and MySQL in Windows XAMPP Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/o13eVqt_BdA/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-4651830828927410471</id><published>2011-07-11T07:33:00.001-07:00</published><updated>2011-07-11T07:33:48.273-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Tutorial: Ubuntu 10.04 - Eclipse (PHP) + CakePHP</title><content type='html'>&lt;iframe src=&quot;http://www.youtube.com/embed/Yhg9d1qCB48&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;349&quot; width=&quot;425&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;Heute möchte ich euch zeigen, wie ihr unter Ubuntu Eclipse (IDE)  installiert und dort das PHP Development Tool (PDT) nachinstalliert.  Weiter erklär ich euch, wie ihr in den Cake Template Dateien (*.ctp) die   PHP / HTML Syntax Highlighting aktiviert.</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/4651830828927410471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/tutorial-ubuntu-1004-eclipse-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/4651830828927410471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/4651830828927410471'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/tutorial-ubuntu-1004-eclipse-php.html' title='Tutorial: Ubuntu 10.04 - Eclipse (PHP) + CakePHP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/Yhg9d1qCB48/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-797073235107427178</id><published>2011-07-11T07:31:00.000-07:00</published><updated>2011-07-11T07:32:08.805-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CakePHP"/><title type='text'>CakePHP 1.3 **Shared Hosting** Server Set Up &amp; Configuration</title><content type='html'>&lt;iframe src=&quot;http://www.youtube.com/embed/4GobWo1rIkE&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;349&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;In this tutorial, I cover the very basics of getting your CakePHP web  site up and running on a shared hosting server account such as: GoDaddy,  HostGator, etc...</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/797073235107427178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/cakephp-13-shared-hosting-server-set-up.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/797073235107427178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/797073235107427178'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/cakephp-13-shared-hosting-server-set-up.html' title='CakePHP 1.3 **Shared Hosting** Server Set Up &amp; Configuration'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/4GobWo1rIkE/default.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5997340547536921220.post-3347930309335764596</id><published>2011-07-11T07:27:00.000-07:00</published><updated>2011-07-11T07:27:28.121-07:00</updated><title type='text'>CakePHP TV - Setting Up the CakePHP Console on Windows produced by gwoo</title><content type='html'>&lt;a href=&quot;http://tv.cakephp.org/video/gwoo/2010/12/24/setting_up_the_cakephp_console_on_windows&quot;&gt;CakePHP TV - Setting Up the CakePHP Console on Windows produced by gwoo&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://mzm-cakephp.blogspot.com/feeds/3347930309335764596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/cakephp-tv-setting-up-cakephp-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/3347930309335764596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5997340547536921220/posts/default/3347930309335764596'/><link rel='alternate' type='text/html' href='http://mzm-cakephp.blogspot.com/2011/07/cakephp-tv-setting-up-cakephp-console.html' title='CakePHP TV - Setting Up the CakePHP Console on Windows produced by gwoo'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03809325048548692907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>