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

<channel>
	<title>blogfreakz.com &#187; CakePHP</title>
	<atom:link href="http://blogfreakz.com/category/cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogfreakz.com</link>
	<description>Web Development, Web Trends, open source resources</description>
	<lastBuildDate>Fri, 10 Feb 2012 05:40:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>2012 Web Development and Tech Forecasts</title>
		<link>http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/</link>
		<comments>http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 12:00:24 +0000</pubDate>
		<dc:creator>Carmela@Blogfreakz</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Design News]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Mobile development]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[happy new year]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=24002</guid>
		<description><![CDATA[AS we usher in 2012, the web development community has been coming up with several forecasts for the industry. Although most of this surrounds an influx of greater improvements in the technological frontier, it may also spell doom for some brands. The question is, how will these changes affect the entire tech landscape for users, [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><strong>AS</strong> we usher in 2012, the web development community has been coming up with several forecasts for the industry. Although most of this surrounds an influx of greater improvements in the technological frontier, it may also spell doom for some brands. The question is, how will these changes affect the entire tech landscape for users, developers, designers, and marketers?</p>
<p align="left">Let&#8217;s check out some of the latest online buzz:</p>
<li>IT enterprise vendors seek to <a href="http://www.zdnet.com/blog/projectfailures/predicting-2012-rapid-implementation-in-focus/15099">reduce failures</a> from the past year and use them as leverage for future improvements.</li>
<p></p>
<li>Mobile competition becomes steeper with <a href="http://gigaom.com/mobile/16-predictions-for-mobile-in-2012/">rapid developments</a> in functionality, though this may result in some popular mobile brands falling behind the race.</li>
<p></p>
<li>Dominant frameworks such as jQuery, Node.js, Socket.io, Fitvids, JavascriptMVC and SproutCore, as well as HTML5 will <a href="http://www.digitalsurgeons.com/blog/2012-digital-marketing-predictions/">take the lead</a> in the web development industry. Same goes for software as independent support for hardware.</li>
<p></p>
<li>Some tech editors predict exciting, if sometimes drastic changes in the industry, from the rise of OpenFlow to patent wars, to the resurrection of the music distribution business, all founded on a common theme: <a href="http://www.digitalsurgeons.com/blog/2012-digital-marketing-predictions/">consumerization</a>.</li>
<p></p>
<p align="left">Awesome, isn&#8217;t it? And if you&#8217;re still hankering for more juicy info on what&#8217;s in store for us this year, check out this list of <a href="http://www.htmlcut.com/blog/web-design-trends-2011-predictions-2012.html">web design trends</a> and <a href="http://www.pcworld.com/article/152683/15_hot_new_technologies_that_will_change_everything.html">15 hot technologies</a>, which are probably more than enough to last us the next 6 months.</p>
<p align="left">
<h2>And with that, we at Blogfreakz.Com wish you all a wonderful 2012!</h2>
</p>
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="jquery 2012">jquery 2012</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="2012 jquery">2012 jquery</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="2012 forecasts and trends for ecommerce">2012 forecasts and trends for ecommerce</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="socket io js jquery 2012">socket io js jquery 2012</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="news webdesign 2012">news webdesign 2012</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="jquery plugins 2012">jquery plugins 2012</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="jquery bubbles falls">jquery bubbles falls</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="jquery 2012 technologies">jquery 2012 technologies</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="jquery">jquery</a></li>
<li><a href="http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/" title="templates for singers jquery html5 free">templates for singers jquery html5 free</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/web-design/2012-web-development-and-tech-forecasts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Image Upload &amp; Crop in CakePHP</title>
		<link>http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/</link>
		<comments>http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 18:24:37 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=15249</guid>
		<description><![CDATA[Recently blogfreakz has featuring tutorial how to upload and crop mage with php, jquery and Image Area Select plugin. If you are using cakephp framework for your web developement, then this article is for you. Inspired by  webmotionuk article, klagoggle.myopenid.com is sharing tutorial how to implement upload and crop image in cakephp. Basicaly he was [...]]]></description>
			<content:encoded><![CDATA[<p>Recently blogfreakz has featuring tutorial <a title="http://blogfreakz.com/jquery/image-upload-crop-php-jquery" href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" target="_blank">how to upload and crop mage with php, jquery and Image Area Select plugin</a>. If you are using cakephp framework for your web developement, then this article is for you. Inspired by  <a title="http://blogfreakz.com/jquery/image-upload-crop-php-jquery" href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery" target="_blank">webmotionuk article</a>, klagoggle.myopenid.com is sharing tutorial how to implement upload and crop image in cakephp.<br />
<span id="more-15249"></span></p>
<p><a rel="nofollow" href="http://bakery.cakephp.org/articles/klagoggle_myopenid_com/2010/08/25/jquery-image-upload-crop"><img class="alignnone size-large wp-image-15381" title="image-crop" src="http://blogfreakz.com/wp-content/uploads/2011/01/image-crop1-600x274.jpg" alt="image crop1 600x274 jQuery Image Upload & Crop in CakePHP" width="600" height="274" /></a></p>
<p>Basicaly he was creating component <strong>JqImgcrop</strong> (jq_imgcrop.php) to perform upload and crop image, and helper called <strong>cropimage.php</strong>. This helper utilize mage Area Select plugin to render select and crop user interface.</p>
<p>To using this set of component and helper , you must add the component and the helper to your controller where you want to use the cropload.<br />
<code><br />
var $helpers = array(..., 'Cropimage')<br />
var $components = array(..., 'JqImgcrop');<br />
</code></p>
<p class="download"><strong>Source</strong> :  <a title="cakephp upload and crop image" rel="nofollow" href="http://bakery.cakephp.org/articles/klagoggle_myopenid_com/2010/08/25/jquery-image-upload-crop" target="_blank">http://bakery.cakephp.org/articles/klagoggle_myopenid_com/2010/08/25/jquery-image-upload-crop</a></p>
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="jquery image upload">jquery image upload</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="cakephp image crop">cakephp image crop</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="jquery image uploader">jquery image uploader</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="cakephp image upload">cakephp image upload</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="cakephp crop image">cakephp crop image</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="jquery mobile upload">jquery mobile upload</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="jquery image upload and crop">jquery image upload and crop</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="jquery mobile upload image">jquery mobile upload image</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="jquery crop cakephp">jquery crop cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/" title="jquery mobile image upload">jquery mobile image upload</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/cakephp/jquery-image-upload-crop-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upload &amp; Crop Image With PHP &amp; jQuery</title>
		<link>http://blogfreakz.com/jquery/image-upload-crop-php-jquery/</link>
		<comments>http://blogfreakz.com/jquery/image-upload-crop-php-jquery/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 18:23:09 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=15224</guid>
		<description><![CDATA[webmotionuk is sharing tutorial how to upload image and crop the image with php and jquery. This script allow us to upload of JPG, GIFs and PNG images. It use Image Area Select plugin by Michal Wojciechowski for selecting a rectangular area of an image. Basicaly, they are using form to uploading image. Once the [...]]]></description>
			<content:encoded><![CDATA[<p>webmotionuk is sharing tutorial<a title="upload and crop image" rel="nofollow" href="http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/" target="_blank"> how to upload image and crop the image with php and jquery</a>. This script allow us to upload of JPG, GIFs and PNG images. It use <a title="image area select plugin" rel="nofollow" href="http://odyniec.net/projects/imgareaselect/" target="_blank">Image Area Select plugin</a> by Michal Wojciechowski for selecting a rectangular area of an image.</p>
<p><span id="more-15224"></span><a rel="nofollow" href="http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop"><img class="alignnone size-large wp-image-15262" title="image-crop" src="http://blogfreakz.com/wp-content/uploads/2011/01/image-crop-600x274.jpg" alt="image crop 600x274 Upload & Crop Image With PHP & jQuery" width="600" height="274" /></a></p>
<p>Basicaly, they are using form to uploading image. Once the image has been uploaded and saved to folder, they are using the “Image Area Select” plugin to crop the image. It basically provides the coordinates to the server to handle the crop.</p>
<p>* x1, y1 = coordinates of the top left corner of the initial selection area<br />
* x2, y2 = coordinates of the bottom right corner of the initial selection area<br />
* width = crop selection width.</p>
<p class="download">Requirements: PHP 4 or Higher, PHP GD Library, <a href="http://jquery.com/" target="_blank">jQuery ver 1.2.3</a> or Higher, <a rel="nofollow" href="http://odyniec.net/projects/imgareaselect/" target="_blank">Image Area Select</a> plugin<br />
Demo: <a title="image upload crop " rel="nofollow" href="http://www.webmotionuk.co.uk/jquery/image_upload_crop.php" target="_blank">http://www.webmotionuk.co.uk/jquery/image_upload_crop.php</a></p>
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="jquery facebook image upload">jquery facebook image upload</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="jquery upload image">jquery upload image</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="jquery upload crop">jquery upload crop</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="jquery image upload crop">jquery image upload crop</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="jquery crop">jquery crop</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="image upload and crop jquery">image upload and crop jquery</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="upload crop php">upload crop php</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="php &#038; jquery image upload and crop">php &#038; jquery image upload and crop</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="jquery crop image">jquery crop image</a></li>
<li><a href="http://blogfreakz.com/jquery/image-upload-crop-php-jquery/" title="crop image jquery">crop image jquery</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/jquery/image-upload-crop-php-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CakePHP ACL Plugin</title>
		<link>http://blogfreakz.com/cakephp/cakephp-acl-plugin/</link>
		<comments>http://blogfreakz.com/cakephp/cakephp-acl-plugin/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 17:15:07 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=13969</guid>
		<description><![CDATA[The core of CakePHP contains a system to control access rights based on Access control list. This mechanism is very useful, but It&#8217;s  not very easy to dive in the first time you try to use it. Moreover, CakePHP doesn&#8217;t provide out of the box an interface to configure the rights managed through ACL. This [...]]]></description>
			<content:encoded><![CDATA[<p>The core of CakePHP contains a system to control access rights based on Access control list. This mechanism is very useful, but It&#8217;s  not very easy to dive in the first time you try to use it. Moreover, CakePHP doesn&#8217;t provide out of the box an interface to configure the rights managed through ACL. This plugin is such an interface allowing to manage permissions of your application&#8217;s users and roles. This plugin automaticaly detect any new controllers and/or actions.<br />
<span id="more-13969"></span></p>
<p><a rel="nofollow" href="http://www.alaxos.net/blaxos/pages/view/plugin_acl"><img class="alignnone size-full wp-image-13971" title="acl_plugin" src="http://blogfreakz.com/wp-content/uploads/2010/12/acl_plugin.jpg" alt="acl plugin CakePHP ACL Plugin" width="600" height="332" /></a></p>
<p>This ACl plugin allows you to manage the content of the aros, acos and aros_acos tables, used by the CakePHP ACL Component. Its interface is partially inspired by the one you can find in the Croogo CMS, and a part of the code comes from this tutorial of the CakePHP documentation. This plugin requiring CakePHP 1.3.x, table users and table role on your database.</p>
<p class="download"><strong>Requirements</strong>: CakePHP 1.3.x<br />
<strong>Demo</strong>: <a title="cakephp ACL " rel="nofollow" href="http://demo.alaxos.ch/admin/acl/aros/users" target="_blank">http://demo.alaxos.ch/admin/acl/aros/users</a><br />
<strong>License</strong>: Free License</p>
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="cakephp acl plugin">cakephp acl plugin</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="cakephp acl">cakephp acl</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="ACL cakephp">ACL cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="acl plugin cakephp">acl plugin cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="acl plugin">acl plugin</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="cakephp acl editor">cakephp acl editor</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="cakephp 1 3 ACL plugin">cakephp 1 3 ACL plugin</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="cakephp acl plugin 1 3">cakephp acl plugin 1 3</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="cakephp 1 3 acl">cakephp 1 3 acl</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-acl-plugin/" title="cakephp acl menu">cakephp acl menu</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/cakephp/cakephp-acl-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sluggable Behavior &#8211; Generate Unique Slug In CakePHP</title>
		<link>http://blogfreakz.com/cakephp/slug/</link>
		<comments>http://blogfreakz.com/cakephp/slug/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 18:30:42 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=13812</guid>
		<description><![CDATA[On the web, &#8220;slug&#8221; is a short text used in a URL to identify and describe a resource. Sluggable behavior is cakephp model behaviors that allow us to generate unique slug. Sluggable Behavior who created by eberfreitas  is a simpler version of Mariano Iglesias&#8217; Sluggable Behavior with a few add-ons. It&#8217;s basically the same thing [...]]]></description>
			<content:encoded><![CDATA[<p>On the web, &#8220;slug&#8221; is a short text used in a URL to identify and describe a resource. Sluggable behavior is <strong>cakephp model behaviors that allow us to generate unique slug</strong>. <a title="slugable behaviors" rel="nofollow" href="http://eberfreitas.virb.com/blog/text/12619608" target="_blank">Sluggable Behavior </a>who created by eberfreitas  is a simpler version of <a title="slugable behaviors" rel="nofollow" href="http://cake-syrup.sourceforge.net/ingredients/sluggable-behavior/" target="_blank">Mariano Iglesias&#8217; Sluggable Behavior</a> with a few add-ons. It&#8217;s basically the same thing but instead of implementing all the slug logic on the behavior, it just uses Cake&#8217;s Inflector::slug() method. With CakePHP 1.3, this method is really powerful and flexible.</p>
<p><span id="more-13812"></span></p>
<p><a rel="nofollow" href="http://eberfreitas.virb.com/blog/text/12619608"><img class="alignnone size-full wp-image-13825" title="slugify" src="http://blogfreakz.com/wp-content/uploads/2010/12/slugify.jpg" alt="slugify Sluggable Behavior   Generate Unique Slug In CakePHP" width="600" height="216" /></a></p>
<p>To use it, just place the <a title="slug" rel="nofollow" href="http://gist.github.com/338096" target="_blank">behavior file</a> on the proper place (/app/models/behaviors/)and call it on the model you want to &#8220;slugify&#8221;:</p>
<pre class="brush: plain;">
var $actsAs = array('Sluggable');
</pre>
<p>To use it, just place the behavior file on the proper place and call it on the model you want to &#8220;slugify&#8221;:  var $actsAs = array(&#8216;Sluggable&#8217;);  By default, this will automatically create slugs from a field named &#8220;title&#8221; and place it under a field named &#8220;slug&#8221;. If you want, you can customize everything. Checkout the configuration keys:</p>
<pre class="brush: plain;">
var $actsAs = array(
	'Sluggable' =&gt; array(
		'fields' =&gt; 'title',
		'scope' =&gt; false,
		'conditions' =&gt; false,
		'slugfield' =&gt; 'slug',
		'separator' =&gt; '-',
		'overwrite' =&gt; false,
		'length' =&gt; 256,
		'lower' =&gt; true
	)
);
</pre>
<p class="download"><strong>Source</strong>: <a rel="nofollow" href="http://eberfreitas.virb.com/blog/text/12619608" target="_blank">http://eberfreitas.virb.com/blog/text/12619608</a></p>
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="cakephp sluggable">cakephp sluggable</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="cakephp sluggable behavior">cakephp sluggable behavior</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="sluggable cakephp">sluggable cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="cakephp slug">cakephp slug</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="Sluggable Behavior cakephp">Sluggable Behavior cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="cakephp slug plugin">cakephp slug plugin</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="sluggable behavior">sluggable behavior</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="cakephp slugify">cakephp slugify</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="cakephp sluggable behaviour">cakephp sluggable behaviour</a></li>
<li><a href="http://blogfreakz.com/cakephp/slug/" title="cakephp 1 3 slug">cakephp 1 3 slug</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/cakephp/slug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CakePHP &#8211; jQuery Autocomplete Tutorial</title>
		<link>http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/</link>
		<comments>http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 17:19:14 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=12896</guid>
		<description><![CDATA[In this tutorial, i will show you how to implement jQuery UI’s autocomplete widget in cakephp. The script in this tutorial is copy paste from tutorialzine  article &#8220;A Simple Movie Search App w/ jQuery UI&#8221; . We are using a MySql database containing a users table.  When you start typing a user name  in the [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial, i will show you how to implement<strong> jQuery UI’s autocomplete widget in cakephp</strong>. The script in this tutorial is copy paste from tutorialzine  article &#8220;<a rel="nofollow" title="jquery autocomplete" href="http://tutorialzine.com/2010/08/simple-movie-search-app-jquery-ajax/" target="_blank">A Simple Movie Search App w/ jQuery U</a>I&#8221; . We are using a MySql database containing a users table.  When you start typing a user name  in the text box of the search form, an AJAX request is sent to controller.  The controller returns a JSON object with suitable user name.</p>
<p><span id="more-12896"></span><br />
This is what we’re going to create:</p>
<p><a rel="attachment wp-att-12935" href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/attachment/autocomplete-2/"><img class="alignnone size-full wp-image-12935" title="autocomplete" src="http://blogfreakz.com/wp-content/uploads/2010/11/autocomplete.jpg" alt="autocomplete CakePHP   jQuery Autocomplete Tutorial" width="600" height="300" /></a></p>
<div id="downloadDemo"><a title="cakephp autocomplete" href="http://blogfreakz.com/codecanyon/autocomplete/" target="_blank"><span class="download big">Demo</span></a></div>
<h3>MySQL Table</h3>
<pre class="brush: php;">
CREATE TABLE `users` (
 `id` int(10) unsigned NOT NULL auto_increment,
 `username` text,
 `profile_pictures` varchar(64) default NULL,
 `created` datetime default NULL,
 `modified` datetime default NULL,
 PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=latin1
</pre>
<h3>routes.php</h3>
<pre class="brush: php;">
&lt;?php
//file:app/config/routes.php
 Router::connect('/', array('controller' =&gt; 'users', 'action' =&gt; 'home'));
/**
 * ...and connect the rest of 'Pages' controller's urls.
 */
 Router::connect('/pages/*', array('controller' =&gt; 'pages', 'action' =&gt; 'display'));
?&gt;
</pre>
<p>On apps first load, we will redirect the apps to home action in users controller.</p>
<h3>default.ctp</h3>
<pre class="brush: php;">
&lt;?php
//file:app/view/layout/default.ctp
?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
	&lt;?php echo $this-&gt;Html-&gt;charset(); ?&gt;
	&lt;title&gt;
		&lt;?php __('CakePHP: the rapid development php framework:'); ?&gt;
		&lt;?php echo $title_for_layout; ?&gt;
	&lt;/title&gt;
	&lt;?php
		echo $this-&gt;Html-&gt;meta('icon');

		echo $this-&gt;Html-&gt;css('cake.generic');

		echo $scripts_for_layout;
	?&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;div id=&quot;container&quot;&gt;
		&lt;div id=&quot;header&quot;&gt;
			&lt;h1&gt;&lt;?php echo $this-&gt;Html-&gt;link(__('CakePHP: the rapid development php framework', true), 'http://cakephp.org'); ?&gt;&lt;/h1&gt;
		&lt;/div&gt;
		&lt;div id=&quot;content&quot;&gt;

			&lt;?php echo $this-&gt;Session-&gt;flash(); ?&gt;

			&lt;?php echo $content_for_layout; ?&gt;

		&lt;/div&gt;
		&lt;div id=&quot;footer&quot;&gt;
			&lt;?php echo $this-&gt;Html-&gt;link(
					$this-&gt;Html-&gt;image('cake.power.gif', array('alt'=&gt; __('CakePHP: the rapid development php framework', true), 'border' =&gt; '0')),
					'http://www.cakephp.org/',
					array('target' =&gt; '_blank', 'escape' =&gt; false)
				);
			?&gt;
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;?php echo $this-&gt;element('sql_dump'); ?&gt;
	&lt;?php echo $javascript-&gt;link('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');?&gt;
	&lt;?php echo $javascript-&gt;link('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js');?&gt;
	&lt;?php echo $javascript-&gt;link('application.js');?&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>In deafult.ctp we are are included jQuery, jQuery UI and our own script &#8220;application.js&#8221; (will create later).</p>
<h3>users_controller.php</h3>
<pre class="brush: php;">
&lt;?php
//file:app/controller/users_controller.php
&lt;?php
class UsersController extends AppController {

	var $name = 'Users';
	var $helpers = array('Ajax', 'Javascript');
	var $components = array('RequestHandler');

	function home(){
	}

	function search(){
		if ( $this-&gt;RequestHandler-&gt;isAjax() ) {
   			Configure::write ( 'debug', 0 );
   			$this-&gt;autoRender=false;
			$users=$this-&gt;User-&gt;find('all',array('conditions'=&gt;array('User.username LIKE'=&gt;'%'.$_GET['term'].'%')));
				$i=0;
				foreach($users as $user){
					$response[$i]['value']=$user['User']['username'];
					$response[$i]['label']=&quot;&lt;img class=\&quot;avatar\&quot; width=\&quot;24\&quot; height=\&quot;24\&quot; src=&quot;.$user['User']['profile_pictures'].&quot;/&gt;&lt;span class=\&quot;username\&quot;&gt;&quot;.$user['User']['username'].&quot;&lt;/span&gt;&quot;;
				$i++;
				}
			echo json_encode($response);
		}else{
			if (!empty($this-&gt;data)) {
				$this-&gt;set('users',$this-&gt;paginate(array('User.username LIKE'=&gt;'%'.$this-&gt;data['User']['username'].'%')));
			}
		}
	}

}
?&gt;
</pre>
<p>In users_controller.php we need to included ruquestHandler component. The Request Handler component is used in Cake to determine information about the incoming HTTP request. In this tutorial we will used to detect incoming ajax request. We have two action in users_controller home() and search. Home action is used to default page. Search action is action which we will call from our script.</p>
<h3>home.ctp</h3>
<pre class="brush: php;">
//file:app/views/users/home.ctp
&lt;div class=&quot;users form&quot;&gt;
	&lt;?php echo $this-&gt;Form-&gt;create('User',array('action'=&gt;'search'));?&gt;
	&lt;?php
		echo $this-&gt;Form-&gt;input('username',array('type'=&gt;'text','id'=&gt;'username','label'=&gt;'Search'));
	?&gt;
	&lt;?php echo $this-&gt;Form-&gt;end(__('Submit', true));?&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;http://blogfreakz.com/&quot;&gt;Read &amp; Download on Blogfreakz&lt;/a&gt;&lt;/p&gt;
</pre>
<h3>application.js</h3>
<pre class="brush: php;">
////file:app/webroot/js/application.js
$(document).ready(function(){
// Caching the movieName textbox:
var username = $('#username');

// Defining a placeholder text:
username.defaultText('Search for people');

// Using jQuery UI's autocomplete widget:
username.autocomplete({
minLength    : 1,
source        : 'users/search'
});

});

// A custom jQuery method for placeholder text:

$.fn.defaultText = function(value){

var element = this.eq(0);
element.data('defaultText',value);

element.focus(function(){
if(element.val() == value){
element.val('').removeClass('defaultText');
}
}).blur(function(){
if(element.val() == '' || element.val() == value){
element.addClass('defaultText').val(value);
}
});

return element.blur();
}
</pre>
<p>The search terms, that the user has entered into the search box, are available in <strong>$_GET['term']</strong>. Calling the <strong>search()</strong> method with these terms.The search method will return JSON object, here is sample response:</p>
<pre class="brush: php;">
[{&quot;value&quot;:&quot;Webmestre Jobillico&quot;,&quot;label&quot;:&quot;&lt;img class=\&quot;avatar\&quot; width=\&quot;24\&quot; height=\&quot;24\&quot; src=http:\/\/graph.facebook.com\/100001094382363\/picture\/&gt;&lt;span class=\&quot;username\&quot;&gt;Webmestre Jobillico&lt;\/span&gt;&quot;},{&quot;value&quot;:&quot;Web Panorama&quot;,&quot;label&quot;:&quot;&lt;img class=\&quot;avatar\&quot; width=\&quot;24\&quot; height=\&quot;24\&quot; src=http:\/\/graph.facebook.com\/100001449013053\/picture\/&gt;&lt;span class=\&quot;username\&quot;&gt;Web Panorama&lt;\/span&gt;&quot;},{&quot;value&quot;:&quot;Wynnia Savitrie&quot;,&quot;label&quot;:&quot;&lt;img class=\&quot;avatar\&quot; width=\&quot;24\&quot; height=\&quot;24\&quot; src=http:\/\/graph.facebook.com\/100000881073253\/picture\/&gt;&lt;span class=\&quot;username\&quot;&gt;Wynnia Savitrie&lt;\/span&gt;&quot;},{&quot;value&quot;:&quot;Marsie Wilbourn Holton&quot;,&quot;label&quot;:&quot;&lt;img class=\&quot;avatar\&quot; width=\&quot;24\&quot; height=\&quot;24\&quot; src=http:\/\/graph.facebook.com\/705486368\/picture\/&gt;&lt;span class=\&quot;username\&quot;&gt;Marsie Wilbourn Holton&lt;\/span&gt;&quot;}]
</pre>
<h3>autocomplete.css</h3>
<pre class="brush: php;">
/** //file:app/webroot/css/autocomplete.css **/
/** search container **/
.users{
	width:640px;
	margin:0 auto;
	min-height:225px;
}
#content p{
	width:640px;
	margin:0 auto;
	text-align:center;
}
#username{
	border:1px solid silver;
	padding:3px 10px;
	clear:none;
	width:460px;
}
.input{
	clear:none;
	float:left;
}
.submit{
	clear:none;
	float:right;
	padding:20px 0;
}

/* Styling the markup generated by the autocomplete jQuery UI widget */

ul.ui-autocomplete{
	width:250px;
	background-color:white;
	border:1px solid gray;
	margin-left:3px;
	margin-top:-4px;
	font-family:Helvetica, Arial,sans-serif;
}

ul.ui-autocomplete li{
	list-style:none;
	border-top:1px solid white;
	border-left:1px solid white;
	margin:0;
}

ul.ui-autocomplete li:first-child{
	border-top:none;
}

ul.ui-autocomplete li:last-child{
	border-bottom:none;
}

ul.ui-autocomplete li a{
	border:none !important;
	text-decoration:none !important;
	padding:2px;
	display:block;
	color:black;
}
ul.ui-autocomplete li img{
	margin-right:4px;
}
ul.ui-autocomplete li span{
}

#ui-active-menuitem{
	background-color:#efefef;
	cursor:pointer;
}
</pre>
<h3>Wrapping Up</h3>
<p>This tutorial showed how to implement autocomplete in cakephp. With jquery UI autocomplete widget, the creation of autocomplete become more easier. Cakephp has requesHandler component that we can used to determine the incoming request. Hope you find this tutorial is useful for you.<br />
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="cakephp autocomplete">cakephp autocomplete</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="cakePHP jquery autocomplete">cakePHP jquery autocomplete</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="cakephp jquery">cakephp jquery</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="jquery autocomplete cakephp">jquery autocomplete cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="autocomplete cakephp">autocomplete cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="cakephp autocomplete jquery">cakephp autocomplete jquery</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="cakephp 1 3 jquery autocomplete">cakephp 1 3 jquery autocomplete</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="jquery autocomplete tutorial">jquery autocomplete tutorial</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="jquery cakephp">jquery cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/" title="autocomplete jquery cakephp">autocomplete jquery cakephp</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/cakephp/cakephp-jquery-autocomplete-tutorial/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to Authenticate Users With Facebook Graph In CakePHP</title>
		<link>http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/</link>
		<comments>http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 06:26:50 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Popular]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=11946</guid>
		<description><![CDATA[Facebook Graph API,  drastically simplify the way developers read and write data to Facebook. It presents a simple, consistent view of the Facebook social graph, uniformly representing objects in the graph (e.g., people, photos, events, and pages) and the connections between them (e.g., friend relationships, shared content, and photo tags). Demo Download There is a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Facebook Graph API</strong>,  drastically simplify the way developers read and write data to Facebook. It presents a simple, consistent view of the Facebook social graph, uniformly representing objects in the graph (e.g., people, photos, events, and pages) and the connections between them (e.g., friend relationships, shared content, and photo tags).</p>
<p><span id="more-11946"></span><a rel="attachment wp-att-11969" href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/attachment/home-2/"><img class="alignnone size-full wp-image-11969" title="home" src="http://blogfreakz.com/wp-content/uploads/2010/11/home1.jpg" alt="home1 How to Authenticate Users With Facebook Graph In CakePHP" width="600" height="238" /></a></p>
<div id="downloadDemo"><a class="download big" title="Demo" href="http://blogfreakz.com/codecanyon/fboauth/" target="_blank">Demo</a> <a href="http://blogfreakz.com/wp-content/uploads/2010/11/fboauth.zip" target="_blank"><span class="download big">Download</span></a></div>
<p>There is a lot of tutorial out there that talking about how to authenticate user using Facebook Graph API. Today I will share with you simple tutorial how to authenticate user using Facebook Graph API in cakephp based on my experience.</p>
<h3>MySQL table.</h3>
<pre class="brush: php;">
CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `oauth_provider` varchar(10) default NULL,
  `oauth_uid` varchar(64) default NULL,
  `access_token` text,
  `username` text,
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`),
  KEY `oauth_uid` (`oauth_uid`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=latin1
</pre>
<p><strong>oauth_provider</strong> is from where user registered come from, for example facebook, twitter etc. <strong>oauth_uid</strong> is the user id given by oauth provider.</p>
<h3>Facebook App</h3>
<p><a href="http://developers.facebook.com/setup/">Register your application</a> to get an app ID and secret,  give it name and click agree, grab the <strong>API Key</strong> and <strong>Application Secret</strong>.</p>
<p><img class="aligncenter size-full wp-image-11950" title="create-facebook-app" src="http://blogfreakz.com/wp-content/uploads/2010/11/create-facebook-app.jpg" alt="create facebook app How to Authenticate Users With Facebook Graph In CakePHP" width="600" height="227" /></p>
<p>Go to website tab, fill Site URL with your application url, for axample http://localhost/fboauth?.</p>
<p><a rel="attachment wp-att-11981" href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/attachment/app-setting/"><img class="alignnone size-full wp-image-11981" title="app-setting" src="http://blogfreakz.com/wp-content/uploads/2010/11/app-setting.jpg" alt="app setting How to Authenticate Users With Facebook Graph In CakePHP" width="686" height="268" /></a></p>
<h3>CakePHP</h3>
<p>You need to downloade <a title="cakephp" href="http://cakephp.org/" target="_blank">CakePHP</a> Framework. The latest version when im writing this tutorial is 1.3.5 version. On core.php (/app/config/core.php) , change the value of &#8216;Security.salt&#8217; and &#8216;Security.cipherSeed&#8217;.</p>
<p>Rename <strong>database.default.php</strong> (/app/config/database.default.php)  to database.php, and set the database connection.</p>
<pre class="brush: php;">
class DATABASE_CONFIG {
var $default = array(
'driver' =&gt; 'mysql',
'persistent' =&gt; false,
'host' =&gt; '127.0.0.1',
'login' =&gt; 'root',
'password' =&gt; 'root',
'database' =&gt; 'fboauth',
'prefix' =&gt; '',
);
}
</pre>
<h3>Facebook Graph API</h3>
<p>Grab the New Facebook Graph API from <a title="Facebook Grap SDK" href="https://github.com/facebook/php-sdk/tree/master/src/" target="_blank">GitHub</a>. Copy the facebook.php to <strong>/app/vendor</strong>/.</p>
<h3>Baking</h3>
<p>Lets simplify the creation of model, view and controller using CakePHP Bake.</p>
<h3>Login, Callback, Logout, Home</h3>
<p>After baking, we have all  model, controller and view for our app, including for the admin. Then we continue with adding   login, callback, logout and home action on users_controller (/app/controller/users_controller.php).</p>
<pre class="brush: php;">
class UsersController extends AppController {
var $name = 'Users';
#once application loaded, we will redirect to this controller
function home(){
}
function login(){
}
function callback(){
}
function logout(){
}
}
</pre>
<h5>login</h5>
<p>On login action, first, we need to import facebook sdk.</p>
<pre class="brush: php;">
function login(){
//import facebook sdk
App::import('Vendor', 'facebook');
$facebook=new Facebook(array(
'appId'=&gt;'ad249ee9b242c34e0921636128cxxxxx',
'secret'=&gt;'12f1df2ddfe9e31085591b522ebxxxxx',
'cookie'=&gt;true
));

#generate facebook session
$session=$facebook-&gt;getSession();
# generate login url
     		$login_url = $facebook-&gt;getLoginUrl(array(
'next' =&gt; 'http://localhost/fboauth/users/callback',
));
#if session available
if(!empty($session)){
$this-&gt;Session-&gt;write('uid',$session['uid']);
$this-&gt;Session-&gt;write('username',$session['name']);
$this-&gt;redirect(array('controller'=&gt;'users','action'=&gt;'home'),null,true);
}else{
$this-&gt;redirect($login_url);
}
}
</pre>
<h5>callback</h5>
<p>Callback is the action we will call or the url we will redirect once  user authentication is success. The key is on &#8216;next&#8217; =&gt; &#8216;http://localhost/fboauth/users/callback&#8217;, in login action.</p>
<pre class="brush: php;">
function callback(){
App::import('Vendor', 'facebook');

$facebook=new Facebook(array(
'appId'=&gt;'ad249ee9b242c34e0921636128cxxxxx',
'secret'=&gt;'12f1df2ddfe9e31085591b522ebxxxx',
'cookie'=&gt;true
));
$session=$facebook-&gt;getSession();
if(!empty($session)){
try{
$user=json_decode(file_get_contents('https://graph.facebook.com/me?access_token='.$session['access_token']));
}catch(FacebookApiException $e){
error_log($e);
}
if(!empty($user)){
//check user on users table by oauth_uid
$user_id=$this-&gt;User-&gt;findByOauthUid($user-&gt;id);
//if empty/ ser not found then insert into table
if(empty($user_id)){
$this-&gt;data['User']['oauth_provider']='facebook';
$this-&gt;data['User']['oauth_uid']=$user-&gt;id;
$this-&gt;data['User']['access_token']=$session['access_token'];
$this-&gt;data['User']['username']=$user-&gt;name;
if($this-&gt;User-&gt;save($this-&gt;data)){
$this-&gt;Session-&gt;write('uid',$user-&gt;id);
$this-&gt;Session-&gt;write('access_token',$session['access_token']);
$this-&gt;Session-&gt;write('username',$user-&gt;name);
$this-&gt;Session-&gt;setFlash(__('Your profile has been saved', true));
$this-&gt;redirect(array('controller'=&gt;'users','action'=&gt;'home'));
}else{
$this-&gt;Session-&gt;setFlash(__('Sorry, we could not save your profile. Please, try again.', true));
$this-&gt;redirect(array('controller'=&gt;'users','action'=&gt;'home'),null,true);
}
}else{
$this-&gt;Session-&gt;write('uid',$user_id['User']['oauth_uid']);
$this-&gt;Session-&gt;write('acces_token',$user_id['User']['access_token']);
$this-&gt;Session-&gt;write('username',$user_id['User']['username']);
$this-&gt;redirect(array('controller'=&gt;'users','action'=&gt;'home'),null,true);
}
}
}else{
$this-&gt;Session-&gt;setFlash(__('Sorry, we could not authenticate you.', true));
$this-&gt;redirect(array('controller'=&gt;'fans','action'=&gt;'home'),null,true);
}
}
</pre>
<h5>Logout</h5>
<p>The logout action is pretty simple, just destroy all session.</p>
<pre class="brush: php;">
function logout(){
$this-&gt;Session-&gt;destroy();
$this-&gt;Session-&gt;setFlash('You have successfully logged out.');
$this-&gt;redirect(array('controller'=&gt;'users','action' =&gt; 'home'));
}
</pre>
<h5>home.ctp</h5>
<p>Once application loaded we will redirect page to home.ctp. You can set this configuration in routes.php.</p>
<pre class="brush: php;">
&lt;div class=&quot;users home&quot;&gt;
&lt;h2&gt;&lt;?php __('Users Home');?&gt;&lt;/h2&gt;
&lt;?php
$uid=$this-&gt;Session-&gt;read('uid');
if(!empty($uid)){
echo &quot;&lt;img src=\&quot;https://graph.facebook.com/$uid/picture\&quot;/&gt;&quot;;
echo &quot;&lt;h3&gt;Welcome &quot;.$this-&gt;Session-&gt;read('username').&quot;&lt;/h3&gt;&quot;;
echo &quot;&lt;/br&gt;&quot;;
echo &quot;&lt;/br&gt;&quot;;
echo $this-&gt;Html-&gt;link('Logout',array('controller'=&gt;'users','action'=&gt;'logout'));
echo &quot;&lt;/hr&gt;&quot;;
}else{
echo $this-&gt;Html-&gt;link('Login',array('controller'=&gt;'users','action'=&gt;'login'));
}
?&gt;
&lt;/div&gt;
</pre>
<h5>routes.php</h5>
<pre class="brush: php;">
Router::connect('/', array('controller' =&gt; 'users', 'action' =&gt; 'home'));
</pre>
<h3>Conclussion</h3>
<p>User Authentication using graph is pretty simple. Just make sure you set the right application setting. Once user authenticated and user data inserted into table, then you can playing arround with other <a title="Graph API" href="http://developers.facebook.com/docs/api" target="_blank">API call</a>. If your application need user email and application able to write on users wall, you can add extended permission by put additional extended permission on your login-url, ex:</p>
<pre class="brush: php;">
$login_url = $facebook-&gt;getLoginUrl(array(
'req_perms' =&gt; 'email,user_birthday,status_update,publish_stream',
'next' =&gt; 'http://localhost/fboauth/users/callback',
));
</pre>
<p>Because of the <a href="http://blogfreakz.com/codecanyon/fboauth" target="_blank">demo</a> file grab your access token, dont forget to delete your profile when you finish try the demo file by click <a href="http://blogfreakz.com/codecanyon/fboauth/users" target="_blank">here</a>.<br />
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="cakephp facebook login">cakephp facebook login</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="cakephp facebook sdk">cakephp facebook sdk</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="facebook login cakephp">facebook login cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="cakePHP facebook authentication">cakePHP facebook authentication</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="cakephp facebook graph api">cakephp facebook graph api</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="How to Authenticate Users With Facebook Connect">How to Authenticate Users With Facebook Connect</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="cakephp facebook">cakephp facebook</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="cakephp facebook oauth">cakephp facebook oauth</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="cakephp login with facebook">cakephp login with facebook</a></li>
<li><a href="http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/" title="cakephp auth facebook">cakephp auth facebook</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/cakephp/authenticate-users-with-facebook-graph-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Introducing FansBattle</title>
		<link>http://blogfreakz.com/cakephp/introducing-fansbattle/</link>
		<comments>http://blogfreakz.com/cakephp/introducing-fansbattle/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 19:17:54 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=11641</guid>
		<description><![CDATA[FansBattle is online application that allow us to battle our facebook fans page based on the number of the fans. The most facebook fans is the winner. To add your facebook fan page on FansBattle is very easy, you just need to input your facebook fan page url, that&#8217;s all, your fan page detail and [...]]]></description>
			<content:encoded><![CDATA[<p><a title="FansBattle" href="http://www.fansbattle.com" target="_blank">FansBattle</a> is online application that allow us to battle our facebook fans page based on the number of the fans. The most facebook fans is the winner. To add your facebook fan page on FansBattle is very easy, you just need  to input your facebook fan page url, that&#8217;s all, your fan page detail  and category will generated automatically.<br />
<span id="more-11641"></span><a href="http://www.fansbattle.com/"><img class="aligncenter size-full wp-image-11643" title="fansbattle" src="http://blogfreakz.com/wp-content/uploads/2010/10/fansbattle.jpg" alt="fansbattle Introducing FansBattle" width="600" height="427" /></a></p>
<p>The application writen in cakephp by using facebook graph api. The number of fans will updated periodicaly using cron job. I&#8217;ve spend more than 48 hour to create this application. I&#8217;ve been using CakePHP for some time, if you&#8217;ve been programming in PHP for a while and have yet to try a framework I would recommend this one.</p>
<p>Since this application is brand new, it has a lot of bug and security hole. If you have facebook fan page, you can submit <a title="FansBattle" href="http://www.fansbattle.com/" target="_blank">here</a>. I hope by submitting your fan page you will get more fans on your facebook fans page. If you find bug on this application ,please let me know. Any suggestion, question, feedback, greatly appreciated.<br />
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="cakephp plugin battle">cakephp plugin battle</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="fansbattle">fansbattle</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="as3 facebook graph post a feed on a fan page">as3 facebook graph post a feed on a fan page</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="mufti fans battle Facebook">mufti fans battle Facebook</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="graph API facebook fan page fans">graph API facebook fan page fans</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="fans battle#sclient=psy-ab">fans battle#sclient=psy-ab</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="facebook page battle">facebook page battle</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="Facebook fan page with flash">Facebook fan page with flash</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="facebook fan battle app">facebook fan battle app</a></li>
<li><a href="http://blogfreakz.com/cakephp/introducing-fansbattle/" title="cache:Y5V2iwOiRdgJ:blogfreakz com/jquery/phono-make-and-receive-phone-calls-in-browser/ free calls from browser">cache:Y5V2iwOiRdgJ:blogfreakz com/jquery/phono-make-and-receive-phone-calls-in-browser/ free calls from browser</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/cakephp/introducing-fansbattle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bulk Record Update In Cakephp</title>
		<link>http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/</link>
		<comments>http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 06:05:57 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=10749</guid>
		<description><![CDATA[In this tutorial I will demonstrate to you how to updating multiple record in cakephp. We are using cakephp 1.3.4 and jQuery 1.4. We&#8217;ll use jQuery to select the items which we will update. This behavior is similar as we see in gmail, where we can choose any items that we will update. To do [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I will demonstrate to you how to updating multiple record  in cakephp. We are using cakephp 1.3.4 and jQuery 1.4. We&#8217;ll use jQuery to select the items which we will update. This behavior is similar as we see in gmail, where we can choose any items that we will update. To do this we need is a list of records (I’m using contact) inside a form with check boxes on each row and one checkbox on table header to select all rows. At the bottom of the table there are two buttons that is to remove and to move selected items into the trash.</p>
<p><span id="more-10749"></span><a title="Demo" href="http://blogfreakz.com/codecanyon" target="_blank"></a></p>
<p><a href="http://blogfreakz.com/codecanyon/"><img class="aligncenter size-full wp-image-10767" title="bulkupdate" src="http://blogfreakz.com/wp-content/uploads/2010/10/bulkupdate.jpg" alt="bulkupdate Bulk Record Update In Cakephp" width="600" height="242" /></a></p>
<div id="downloadDemo">
<a class="demo big" title="Demo" href="http://blogfreakz.com/codecanyon" target="_blank">Demo</a> <a class="download big" title="Download" href="http://blogfreakz.com/wp-content/uploads/2010/10/bulkupdatecakephp.zip" target="_blank">Download</a>
</div>
<h3>The Database And Table</h3>
<p>First, we create new database and create contact table.</p>
<pre class="brush: php;">
CREATE DATABASE `cakephp`;
</pre>
<pre class="brush: php;">
CREATE TABLE `contacts` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(32) default NULL,
`email` varchar(32) default NULL,
`phone` varchar(16) default NULL,
`subject` varchar(128) default NULL,
`message` text,
`status` tinyint(1) default '1',
`created` datetime default NULL,
`modified` datetime default NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
</pre>
<p>We use the status column to mark the status of contacts, if &#8220;0&#8243; its means as trash items.</p>
<h3>The Model</h3>
<pre class="brush: php;">
/**file:app/models/contact.php*/
&lt;?php
class Contact extends AppModel {
var $name = 'Contact';
var $displayField = 'name';
var $validate = array(
'email' =&gt; array(
'email' =&gt; array(
'rule' =&gt; array('email'),
'message' =&gt; 'Please fill your correct email',
//'allowEmpty' =&gt; false,
//'required' =&gt; false,
//'last' =&gt; false, // Stop validation after this rule
//'on' =&gt; 'create', // Limit validation to 'create' or 'update' operations
),
),
);
}
?&gt;
</pre>
<p>In the model, we apply the email validation.</p>
<h3>The Controller</h3>
<pre class="brush: php;">

/**file:app/controllers/contacts_controller.php*/

&lt;?php
class ContactsController extends AppController {
var $name ='Contacts';
var $helpers = array('Javascript','Html','Form','Ajax','Time');

function index() {
$this-&gt;Contact-&gt;recursive = 0;
$this-&gt;set('contacts', $this-&gt;paginate());
}

function view($id = null) {
if (!$id) {
$this-&gt;Session-&gt;setFlash(__('Invalid contact', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
}
$this-&gt;set('contact', $this-&gt;Contact-&gt;read(null, $id));
}

function add() {
if (!empty($this-&gt;data)) {
$this-&gt;Contact-&gt;create();
if ($this-&gt;Contact-&gt;save($this-&gt;data)) {
$this-&gt;Session-&gt;setFlash(__('The contact has been saved', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
} else {
$this-&gt;Session-&gt;setFlash(__('The contact could not be saved. Please, try again.', true));
}
}
}

function edit($id = null) {
if (!$id &amp;&amp; empty($this-&gt;data)) {
$this-&gt;Session-&gt;setFlash(__('Invalid contact', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
}
if (!empty($this-&gt;data)) {
if ($this-&gt;Contact-&gt;save($this-&gt;data)) {
$this-&gt;Session-&gt;setFlash(__('The contact has been saved', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
} else {
$this-&gt;Session-&gt;setFlash(__('The contact could not be saved. Please, try again.', true));
}
}
if (empty($this-&gt;data)) {
$this-&gt;data = $this-&gt;Contact-&gt;read(null, $id);
}
}

function delete($id = null) {
if (!$id) {
$this-&gt;Session-&gt;setFlash(__('Invalid id for contact', true));
$this-&gt;redirect(array('action'=&gt;'index'));
}
if ($this-&gt;Contact-&gt;delete($id)) {
$this-&gt;Session-&gt;setFlash(__('Contact deleted', true));
$this-&gt;redirect(array('action'=&gt;'index'));
}
$this-&gt;Session-&gt;setFlash(__('Contact was not deleted', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
}
function admin_index() {
$this-&gt;Contact-&gt;recursive = 0;
$this-&gt;set('contacts', $this-&gt;paginate(array('Contact.status'=&gt;'1')));
}

function admin_view($id = null) {
if (!$id) {
$this-&gt;Session-&gt;setFlash(__('Invalid contact', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
}
$this-&gt;set('contact', $this-&gt;Contact-&gt;read(null, $id));
}

function admin_add() {
if (!empty($this-&gt;data)) {
$this-&gt;Contact-&gt;create();
if ($this-&gt;Contact-&gt;save($this-&gt;data)) {
$this-&gt;Session-&gt;setFlash(__('The contact has been saved', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
} else {
$this-&gt;Session-&gt;setFlash(__('The contact could not be saved. Please, try again.', true));
}
}
}

function admin_edit($id = null) {
if (!$id &amp;&amp; empty($this-&gt;data)) {
$this-&gt;Session-&gt;setFlash(__('Invalid contact', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
}
if (!empty($this-&gt;data)) {
if ($this-&gt;Contact-&gt;save($this-&gt;data)) {
$this-&gt;Session-&gt;setFlash(__('The contact has been saved', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
} else {
$this-&gt;Session-&gt;setFlash(__('The contact could not be saved. Please, try again.', true));
}
}
if (empty($this-&gt;data)) {
$this-&gt;data = $this-&gt;Contact-&gt;read(null, $id);
}
}

function admin_delete($id = null) {
if (!$id) {
$this-&gt;Session-&gt;setFlash(__('Invalid id for contact', true));
$this-&gt;redirect(array('action'=&gt;'index'));
}
if ($this-&gt;Contact-&gt;delete($id)) {
$this-&gt;Session-&gt;setFlash(__('Contact deleted', true));
$this-&gt;redirect(array('action'=&gt;'index'));
}
$this-&gt;Session-&gt;setFlash(__('Contact was not deleted', true));
$this-&gt;redirect(array('action' =&gt; 'index'));
}
function admin_process(){
$this-&gt;autoRender = false;
if(!empty($this-&gt;data)){
//debug($this-&gt;data);
foreach($this-&gt;data['Contact']['id'] as $id=&gt;$value){
if($value==1){
$ids[]=$id;
}
}
switch($this-&gt;data['Contact']['actions']){
case 0:
//Move to trash
if($this-&gt;Contact-&gt;updateAll(array('Contact.status'=&gt;0), array('Contact.id'=&gt;$ids))){
                    $this-&gt;Session-&gt;setFlash(__('Contact move to trash ', true));
                    $this-&gt;redirect(array('action'=&gt;'index'));
}
break;
case 1:
if($this-&gt;Contact-&gt;deleteAll(array('Contact.id'=&gt;$ids))){
$this-&gt;Session-&gt;setFlash(__('Contact deleted permanently', true));
                    $this-&gt;redirect(array('action'=&gt;'index'));
}
default:
//something went wrong!!
                    $this-&gt;Session-&gt;setFlash(__('Something went wrong, please try again.', true));
                    $this-&gt;redirect(array('action'=&gt;'index'));
}

}

}
}
?&gt;
</pre>
<p>In the admin index we will only display the data with status 1. In admin_process we checking what action we will do, if 0 (move to trash) that is to move data into the trash if 1, we will remove the data permanently.</p>
<p>The first thing our new function needs to do is create an array of ids That were the contactschecked, because CakePHP earnest add a hidden field for every check box.</p>
<h3>The View</h3>
<pre class="brush: php;">

/**file:app/views/contact/admin_index.pctp*/

&lt;div class=&quot;contacts index&quot;&gt;
&lt;h2&gt;&lt;?php __('Contacts');?&gt;&lt;/h2&gt;
&lt;?php echo $form-&gt;create('Contact',array('action'=&gt;'process'));?&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;th&gt;&lt;?php echo $form-&gt;checkbox('all'); ?&gt;&lt;/th&gt;
&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('name');?&gt;&lt;/th&gt;
&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('email');?&gt;&lt;/th&gt;
&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('phone');?&gt;&lt;/th&gt;
&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('subject');?&gt;&lt;/th&gt;
&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('message');?&gt;&lt;/th&gt;
&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('created');?&gt;&lt;/th&gt;
&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('modified');?&gt;&lt;/th&gt;
&lt;th class=&quot;actions&quot;&gt;&lt;?php __('Actions');?&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;?php
$i = 0;
foreach ($contacts as $contact):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class=&quot;altrow&quot;';
}
?&gt;
&lt;tr&lt;?php echo $class;?&gt;&gt;
&lt;td&gt;&lt;?php echo $form-&gt;checkbox('Contact.id.'.$contact['Contact']['id']); ?&gt;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $contact['Contact']['name']; ?&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $contact['Contact']['email']; ?&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $contact['Contact']['phone']; ?&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $contact['Contact']['subject']; ?&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;?php echo substr(0,100,$contact['Contact']['message']).&quot;..&quot;; ?&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $contact['Contact']['created']; ?&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;?php echo $contact['Contact']['modified']; ?&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class=&quot;actions&quot;&gt;
&lt;?php echo $this-&gt;Html-&gt;link(__('View', true), array('action' =&gt; 'view', $contact['Contact']['id'])); ?&gt;
&lt;?php echo $this-&gt;Html-&gt;link(__('Edit', true), array('action' =&gt; 'edit', $contact['Contact']['id'])); ?&gt;
&lt;?php echo $this-&gt;Html-&gt;link(__('Delete', true), array('action' =&gt; 'delete', $contact['Contact']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $contact['Contact']['id'])); ?&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php endforeach; ?&gt;
&lt;/table&gt;
&lt;?php
echo $this-&gt;Form-&gt;input('actions', array('options'=&gt;array('Trash','Delete')));
echo $form-&gt;end('Go');
?&gt;
&lt;p&gt;
&lt;?php
echo $this-&gt;Paginator-&gt;counter(array(
'format' =&gt; __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?&gt;	&lt;/p&gt;

&lt;div class=&quot;paging&quot;&gt;
&lt;?php echo $this-&gt;Paginator-&gt;prev('&lt;&lt; ' . __('previous', true), array(), null, array('class'=&gt;'disabled'));?&gt;
| 	&lt;?php echo $this-&gt;Paginator-&gt;numbers();?&gt;
 |
&lt;?php echo $this-&gt;Paginator-&gt;next(__('next', true) . ' &gt;&gt;', array(), null, array('class' =&gt; 'disabled'));?&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;actions&quot;&gt;
&lt;h3&gt;&lt;?php __('Actions'); ?&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__('New Contact', true), array('action' =&gt; 'add')); ?&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</pre>
<h3>The Javascript</h3>
<p>Include jQuery and functions.js that perform check/uncheck item  in your default view with the JavaScript helper.</p>
<pre class="brush: php;">

/**file:app/views/layout/default.ctp*/

&lt;?php
/**
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.cake.libs.view.templates.layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;?php echo $this-&gt;Html-&gt;charset(); ?&gt;
&lt;title&gt;
&lt;?php __('CakePHP: the rapid development php framework:'); ?&gt;
&lt;?php echo $title_for_layout; ?&gt;
&lt;/title&gt;
&lt;?php
echo $this-&gt;Html-&gt;meta('icon');
echo $this-&gt;Html-&gt;css('cake.generic');
echo $this-&gt;Html-&gt;script(array('https://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js','function'));
echo $scripts_for_layout;

?&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;container&quot;&gt;
&lt;div id=&quot;header&quot;&gt;
&lt;h1&gt;&lt;?php echo $this-&gt;Html-&gt;link(__('CakePHP: the rapid development php framework', true), 'http://cakephp.org'); ?&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;div id=&quot;content&quot;&gt;

&lt;?php echo $this-&gt;Session-&gt;flash(); ?&gt;

&lt;?php echo $content_for_layout; ?&gt;

&lt;/div&gt;
&lt;div id=&quot;footer&quot;&gt;
&lt;?php echo $this-&gt;Html-&gt;link(
$this-&gt;Html-&gt;image('cake.power.gif', array('alt'=&gt; __('CakePHP: the rapid development php framework', true), 'border' =&gt; '0')),
'http://www.cakephp.org/',
array('target' =&gt; '_blank', 'escape' =&gt; false)
);
?&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;?php echo $this-&gt;element('sql_dump'); ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Create a JavaScript file that performs the checked/unchecked check box.</p>
<pre class="brush: php;">

/**file:app/webroot/js/function.js*/

$(document).ready(function()
{
$(&quot;#ContactAll&quot;).click(function()
{
var checked_status = this.checked;
//alert(checked_status);
$('input[type=&quot;checkbox&quot;]').each(function()
{
this.checked = checked_status;
});
});
});
</pre>
<p>And that’s it! I hope you enjoyed this tutorial and find this article is useful for your cakephp project.<br />
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="cakephp update">cakephp update</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="cakephp ajax checkbox select all">cakephp ajax checkbox select all</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="cakephp bulk">cakephp bulk</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="jquery form add row for cakephp">jquery form add row for cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="cakephp update record">cakephp update record</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="cakephp checkbox multiple foreach last selected">cakephp checkbox multiple foreach last selected</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="cakephp bulk save">cakephp bulk save</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="cakephp update data">cakephp update data</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="update cakephp">update cakephp</a></li>
<li><a href="http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/" title="update in cakephp">update in cakephp</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/cakephp/bulk-record-update-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VaM Cart &#8211; Free CakePHP Based Shopping Cart</title>
		<link>http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/</link>
		<comments>http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 01:54:54 +0000</pubDate>
		<dc:creator>Mufti Ali</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[shoping cart]]></category>

		<guid isPermaLink="false">http://blogfreakz.com/?p=4036</guid>
		<description><![CDATA[Vam Cart is free shoping Cart built with CakepPHP framework.  It is easy to implement. To installing this shoping cart, just copy files to your server from VaM Cart archive &#8211; http://vamcart.googlecode.com/files/vamcart.zip and Open VaM Cart in browser &#8211; http://example/vamcart. If install script not started automatically, start installation manually &#8211; http://example/vamcart/install Features * Easy Installation. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Vam Cart</strong> is free <strong>shoping Cart built with CakepPHP </strong>framework.  It is easy to implement. To installing this shoping cart, just copy files to your server from VaM Cart archive &#8211; <a title="http://vamcart.googlecode.com/files/vamcart.zip" rel="nofollow" href="http://vamcart.googlecode.com/files/vamcart.zip">http://vamcart.googlecode.com/files/vamcart.zip</a> and Open VaM Cart in browser &#8211; <a title="http://example/vamcart" rel="nofollow" href="http://example/vamcart">http://example/vamcart</a>. If install script not started automatically, start installation manually &#8211; <a title="http://example/vamcart/install" rel="nofollow" href="http://example/vamcart/install">http://example/vamcart/install</a></p>
<p><span id="more-4036"></span><img class="alignnone size-large wp-image-4049" title="vam-chart" src="http://blogfreakz.com/wp-content/uploads/2010/03/vam-chart-600x412.png" alt="vam chart 600x412 VaM Cart   Free CakePHP Based Shopping Cart" width="600" height="412" /></p>
<h5>Features</h5>
<p>* Easy Installation.<br />
* CSS, JS minify and compress.<br />
* SEO &#8211; Search Engine Optimization.<br />
* Unlimited Categories, Products.<br />
* CakePHP, MVC, Smarty.<br />
* Multi Language, Multi Currency.<br />
* Templatable.<br />
* Open Source.<br />
* Automatic Image Resize.<br />
* Product Reviews.<br />
* Coupons&#8230;</p>
<p class="download"><strong>Requirements</strong>: PHP 5, MySQL 4.1<br />
<strong>Demo</strong> &#8211; <a href="http://vamcart.com/demo/" target="_blank">http://vamcart.com/demo/</a><br />
<strong>Admin</strong>: <a href="http://vamcart.com/demo/admin/" target="_blank">http://vamcart.com/demo/admin/</a> Login: admin, Password: password</p>
<h4>Incoming search terms for the article:</h4>
<ul>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="cakephp ecommerce">cakephp ecommerce</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="cakephp shopping cart">cakephp shopping cart</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="ecommerce cakephp">ecommerce cakephp</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="cakephp e-commerce">cakephp e-commerce</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="cake php ecommerce">cake php ecommerce</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="e-commerce cakephp">e-commerce cakephp</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="cakephp shopping cart tutorial">cakephp shopping cart tutorial</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="vamcart">vamcart</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="cakephp ecommerce tutorial">cakephp ecommerce tutorial</a></li>
<li><a href="http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/" title="cakephp shopping cart example">cakephp shopping cart example</a></li>
</ul>
<p><!-- SEO SearchTerms Tagging 2 Plugin --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogfreakz.com/ecommerce/vam-cart-free-cakephp-based-shopping-cart/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

