<?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>ajaxray =&#62; Anis Ahmad&#039;s Tech Blog</title>
	<atom:link href="http://ajaxray.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxray.com/blog</link>
	<description>Exploring web technologies</description>
	<lastBuildDate>Mon, 17 Dec 2012 08:07:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Rounded thumb image with CSS 3</title>
		<link>http://ajaxray.com/blog/rounded-thumb-image-with-css-3</link>
		<comments>http://ajaxray.com/blog/rounded-thumb-image-with-css-3#comments</comments>
		<pubDate>Tue, 17 Jul 2012 09:02:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS 3]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[corner]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[rounded]]></category>

		<guid isPermaLink="false">http://ajaxray.com/blog/?p=262</guid>
		<description><![CDATA[In modern Mobile apps, RIA or fancy websites like to display thumb images with a little rounded corners. We can do it on web with very little effort using a little CSS3 technique. Just 3 simple 3 steps: Instead of (&#8230;)</p><p><a href="http://ajaxray.com/blog/rounded-thumb-image-with-css-3">Read the rest of this entry &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>In modern Mobile apps, RIA or fancy websites like to display thumb images with a little rounded corners. We can do it on web with very little effort using a little CSS3 technique.</p>
<p><img class="alignnone" title="Rounder corner images" src="http://www.stickermammoth.com/image/data/proimg/custom-rounded-corner-stickers.jpg" alt="Rounder corner images" width="480" height="318" /></p>
<p>Just 3 simple 3 steps:</p>
<ol>
<li>Instead of using <em>img, </em>use a placeholder like a or <em>span</em>. Make it <strong>display:block.</strong></li>
<li>Place the image as background image of this placeholder.</li>
<li>Set a border radius and a little shadow for the placeholder.</li>
</ol>
<h3>Sample CSS and HTML code:</h3>
<p><div id="gist3127894" class="gist">
      <div class="gist-file">
        <div class="gist-data gist-syntax">



  <div class="file-data">
    <table cellpadding="0" cellspacing="0" class="lines highlight">
      <tr>
        <td class="line-numbers">
          <span class="line-number" id="file-gistfile1-html-L1" rel="file-gistfile1-html-L1">1</span>
          <span class="line-number" id="file-gistfile1-html-L2" rel="file-gistfile1-html-L2">2</span>
          <span class="line-number" id="file-gistfile1-html-L3" rel="file-gistfile1-html-L3">3</span>
          <span class="line-number" id="file-gistfile1-html-L4" rel="file-gistfile1-html-L4">4</span>
          <span class="line-number" id="file-gistfile1-html-L5" rel="file-gistfile1-html-L5">5</span>
          <span class="line-number" id="file-gistfile1-html-L6" rel="file-gistfile1-html-L6">6</span>
          <span class="line-number" id="file-gistfile1-html-L7" rel="file-gistfile1-html-L7">7</span>
          <span class="line-number" id="file-gistfile1-html-L8" rel="file-gistfile1-html-L8">8</span>
          <span class="line-number" id="file-gistfile1-html-L9" rel="file-gistfile1-html-L9">9</span>
          <span class="line-number" id="file-gistfile1-html-L10" rel="file-gistfile1-html-L10">10</span>
          <span class="line-number" id="file-gistfile1-html-L11" rel="file-gistfile1-html-L11">11</span>
          <span class="line-number" id="file-gistfile1-html-L12" rel="file-gistfile1-html-L12">12</span>
          <span class="line-number" id="file-gistfile1-html-L13" rel="file-gistfile1-html-L13">13</span>
          <span class="line-number" id="file-gistfile1-html-L14" rel="file-gistfile1-html-L14">14</span>
          <span class="line-number" id="file-gistfile1-html-L15" rel="file-gistfile1-html-L15">15</span>
          <span class="line-number" id="file-gistfile1-html-L16" rel="file-gistfile1-html-L16">16</span>
          <span class="line-number" id="file-gistfile1-html-L17" rel="file-gistfile1-html-L17">17</span>
          <span class="line-number" id="file-gistfile1-html-L18" rel="file-gistfile1-html-L18">18</span>
        </td>
        <td class="line-data">
          <pre class="line-pre"><div class="line" id="file-gistfile1-html-LC1"><span class="nt">&lt;style </span><span class="na">type=</span><span class="s">&quot;text/css&quot;</span><span class="nt">&gt;</span></div><div class="line" id="file-gistfile1-html-LC2">	<span class="nt">a</span><span class="nc">.user-image</span> <span class="p">{</span></div><div class="line" id="file-gistfile1-html-LC3">		<span class="k">background</span><span class="o">:</span> <span class="k">transparent</span> <span class="k">no-repeat</span> <span class="k">top</span> <span class="k">left</span><span class="p">;</span></div><div class="line" id="file-gistfile1-html-LC4">		<span class="k">display</span><span class="o">:</span> <span class="k">block</span><span class="p">;</span></div><div class="line" id="file-gistfile1-html-LC5">		<span class="k">text-indent</span><span class="o">:</span> <span class="m">-999em</span><span class="p">;</span></div><div class="line" id="file-gistfile1-html-LC6">		<span class="k">width</span><span class="o">:</span> <span class="m">50px</span><span class="p">;</span></div><div class="line" id="file-gistfile1-html-LC7">		<span class="k">height</span><span class="o">:</span> <span class="m">50px</span><span class="p">;</span></div><div class="line" id="file-gistfile1-html-LC8">		<span class="k">border</span><span class="o">-</span><span class="n">radius</span><span class="o">:</span> <span class="m">5px</span><span class="p">;</span></div><div class="line" id="file-gistfile1-html-LC9">                <span class="n">box</span><span class="o">-</span><span class="n">shadow</span><span class="o">:</span> <span class="m">0px</span> <span class="m">0px</span> <span class="m">3px</span> <span class="m">#666</span><span class="p">;</span></div><div class="line" id="file-gistfile1-html-LC10">	<span class="p">}</span></div><div class="line" id="file-gistfile1-html-LC11"><span class="nt">&lt;/style&gt;</span></div><div class="line" id="file-gistfile1-html-LC12">&nbsp;</div><div class="line" id="file-gistfile1-html-LC13"><span class="nt">&lt;a</span> <span class="na">class=</span><span class="s">&quot;user-image&quot;</span> <span class="na">href=</span><span class="s">&quot;http://www.facebook.com/ajaxray&quot;</span> <span class="na">style=</span><span class="s">&quot;background-image: url(http://graph.facebook.com/667896332/picture)&quot;</span> <span class="na">title=</span><span class="s">&quot;Visit Anis&#39;s profile&quot;</span><span class="nt">&gt;</span>Anis Ahmad<span class="nt">&lt;/a&gt;</span></div><div class="line" id="file-gistfile1-html-LC14">&nbsp;</div><div class="line" id="file-gistfile1-html-LC15"><span class="c">&lt;!--</span></div><div class="line" id="file-gistfile1-html-LC16"><span class="c">Post: http://ajaxray.com/blog/rounded-thumb-image-with-css-3</span></div><div class="line" id="file-gistfile1-html-LC17"><span class="c">Demo: http://ajaxray.com/Examples/cropped-thumb.html</span></div><div class="line" id="file-gistfile1-html-LC18"><span class="c">--&gt;</span></div></pre>
        </td>
      </tr>
    </table>
  </div>

        </div>

        <div class="gist-meta">
          <a href="https://gist.github.com/ajaxray/3127894/raw/93ef647cfacfb6abb0886f2ff267ef2925741482/gistfile1.html" style="float:right">view raw</a>
          <a href="https://gist.github.com/ajaxray/3127894#file-gistfile1-html" style="float:right; margin-right:10px; color:#666;">gistfile1.html</a>
          <a href="https://gist.github.com/ajaxray/3127894">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
        </div>
      </div>
</div>
<br />
See code on <a href="https://gist.github.com/3127894" target="_blank">Gist</a>.</p>
<p><strong>You&#8217;re done!</strong> Check the <strong><a title="Example implementation" href="http://ajaxray.com/Examples/cropped-thumb.html" target="_blank">live demo</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/rounded-thumb-image-with-css-3/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kohana 3.x Log Viewer module</title>
		<link>http://ajaxray.com/blog/kohana-log-viewer-module</link>
		<comments>http://ajaxray.com/blog/kohana-log-viewer-module#comments</comments>
		<pubDate>Tue, 29 Nov 2011 21:06:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[kohana]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[log-viewer]]></category>
		<category><![CDATA[module]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=256</guid>
		<description><![CDATA[Kohana Logs are a good way of debugging and monitoring application flow. It has various types of log writers for storing and showing logs. But the most commonly used one is the File Writer. One painful thing with this file (&#8230;)</p><p><a href="http://ajaxray.com/blog/kohana-log-viewer-module">Read the rest of this entry &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p><a title="Kohana PHP Framework" href="http://kohanaframework.org/" target="_blank">Kohana</a> Logs are a good way of debugging and monitoring application flow. It has various types of log writers for storing and showing logs. But the most commonly used one is the <a title="Kohana Log Writer - File" href="http://kohanaframework.org/3.0/guide/api/Kohana_Log_File" target="_blank">File Writer</a>. One painful thing with this file logs is, downloading, reading and clearing when testing on a remote server.  To reduce this pain, I wrote a module to explore the log files on server with a beautiful interface. It may help many of you who are developing with Kohana.</p>
<p>You can get it from github &#8211;  <a href="https://github.com/ajaxray/Kohana-Log-Viewer">https://github.com/ajaxray/Kohana-Log-Viewer</a></p>
<p><a href="http://ajaxray.com/files/log_formatted.png"><img class="alignnone" title="Kohana Log Viewer" src="http://ajaxray.com/files/log_formatted.png" alt="Kohana Log Viewer screenshot" width="594" height="259" /></a></p>
<p><span id="more-256"></span></p>
<h3>Installation</h3>
<ol>
<li>Download this module and add the <strong>logviewer</strong> folder it to your <code>MODPATH</code></li>
<li>Enable it in the <code>bootstrap</code> file</li>
<li>Go to <em>http://your-app-root/logs</em></li>
<li>You are done!</li>
</ol>
<h3>How to use?</h3>
<p>It&#8217;s completely self explanatory. Here are some points for quick refs -</p>
<ul>
<li>All months are listed on top nav. e.g, <strong>2011/11</strong></li>
<li>Left sidebar has a list of available log files in selected month</li>
<li>If not specified, today&#8217;s (current month and day) log file will be displayed</li>
<li>If you want to see a fresh log for next call, just delete today&#8217;s file. Kohana will generate it and add</li>
<li>Formatted mode (default) may not extract all info correctly for displaying in rows. Use <strong>raw mode</strong> for those situations. <em>NEED IMPROVEMENT</em> here</li>
<li>You can use <strong>Level</strong> listbox for filtering by log levels</li>
</ul>
<h3>Notes</h3>
<ul>
<li><em>http://your-app-root/logs</em> should display the log reports interface. If it don&#8217;t, please check the routing in <code>modules/logviewer/init.php</code></li>
<li>If you change the folder name, change the paths in <code>modules/logviewer/views/logs/layout.php</code> accordingly</li>
<li>If you want to improve, please fork and participate</li>
<li>If you&#8217;ve a suggestion or found a bug, please let me know at &#8211; <strong>anisniit(at)gmail.com</strong></li>
<li>And the last thing is, BE CAREFUL ABOUT USING ON PRODUCTION!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/kohana-log-viewer-module/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The first Kohana book : Kohana 3.0 Beginner’s Guide</title>
		<link>http://ajaxray.com/blog/kohana-3-0-beginners-guide</link>
		<comments>http://ajaxray.com/blog/kohana-3-0-beginners-guide#comments</comments>
		<pubDate>Wed, 23 Nov 2011 16:50:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[book review]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[book-review]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=248</guid>
		<description><![CDATA[Packt has published the first book on Kohana "Kohana 3.0 Beginner’s Guide".Here is my view on this book.
The book discussed all major aspects of a generic MVC web application. With "how to do", it have good explanation of "how it works" about most of the things. As a target of step by step learning, it takes a sample web application that will allow users to create simple profiles, post messages for their friends, and manage their public page. Throughout the book, the reader will build this application by learning the Kohana way of MVC components, Routing, Helpers, Session handling, Modules, Database interaction, Templating etc. Also have details discussion of some important Modules and Helpers like HTML, URL, ORM, Auth, Validation etc.]]></description>
				<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 135px"><a href="http://link.packtpub.com/nkba5Y"><img title="Kohana 3.0 Beginner’s Guide" src="https://www.packtpub.com/sites/default/files/imagecache/productview/2404OS_jQuery%20Kohana%203.0%20Beginner's%20Guide.jpg" alt="Kohana 3.0 Beginner’s Guide Cover page" width="125" height="151" /></a><p class="wp-caption-text">Kohana 3.0 Beginner’s Guide</p></div>
<p><a href="http://codeigniter.com/" target="_blank">Codeigniter</a> was my first PHP framework. Though it works nicely for wide range of app types, slowly I felt uncomfortable in some points. For example, lack of OOP practices, untestable structure etc. (Sorry to say, unit-testing in codeigniter was a horror!) Later, among PHP frameworks, I worked a lot with <a href="http://framework.zend.com/" target="_blank">Zend Framework</a> and a little with <a href="http://www.symfony-project.org/" target="_blank">Symfony</a> . One day <a href="http://phpfour.com/" target="_blank">Emran Hasan</a> shared IBuildings<a href="http://techportal.ibuildings.com/2010/02/22/scaling-web-applications-with-hmvc/" target="_blank"> article about HMVC</a> which presented <a href="http://kohanaframework.org/" target="_blank">Kohana</a> as example HMVC framework. That was the starting, in a few days Kohana took the position of primary PHP framework for me. I built website, Enterprise application, Service layer for <a href="http://en.wikipedia.org/wiki/Service-oriented_architecture" target="_blank">SOA</a> and few more apps with Kohana comfortably.</p>
<p>But when framework newbies asks me with which one he should start, need to think twice before suggesting Kohana. The main reason is, it&#8217;s documentation was not as rich as Codeigniter or Zend Framework. And there was no book. BTW, <a href="http://kerkness.ca/kowiki/doku.php" target="_blank">Kohana unofficial wiki</a> is a BIG try to help in this issue. Besides, recently Packt has published the first book on Kohana &#8220;<a href="http://link.packtpub.com/nkba5Y" target="_blank">Kohana 3.0 Beginner’s Guide</a>&#8220;. Jason D. Straughan wrote this book for Kohana version 3.x. Few days ago, Snehman Kohli from <a href="https://www.packtpub.com/" target="_blank">Packtpub</a> has contacted me and requested for reviewing this book. As a fan of Kohana, I&#8217;ve happily accepted. So, here is my view on this book.</p>
<p><span id="more-248"></span></p>
<p>The book discussed all major aspects of a generic <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" target="_blank">MVC</a> web application. With &#8220;how to do&#8221;, it have good explanation of &#8220;how it works&#8221; about most of the things. As a target of step by step learning, it takes a sample web application that will allow users to create simple profiles, post messages for their friends, and manage their public page. Throughout the book, the reader will build this application by learning the Kohana way of MVC components, Routing, Helpers, Session handling, Modules, Database interaction, Templating etc. Also have details discussion of some important Modules and Helpers like HTML, URL, ORM, Auth, Validation etc.</p>
<p>Lets have an overview and see how topics are organized. In first chapter, as obvious, have discussion about installation and setting up the framework. It has discussed different ways of installation, downloading from web, github etc. But I think, it&#8217;s logical to start with the easiest way for beginners and put other alternatives in somewhere in Appendix.</p>
<p>When introducing MVC, some flowchart, graphics could help to explain the workflow more clearly. But the current introduction is somewhat Kohana specific, but good enough to start. Techniques of using simple view, template view, composite views, binding global view variables etc. are shown beautifully. The idea of starting with basic Controller and slowly moving to generalized application controller will help to understand practical <a href="http://en.wikipedia.org/wiki/Principles_of_OOP" target="_blank">OOP practices</a> along with how controllers works. Third chapter has enough example and explanation of Routing and Request object.</p>
<p>In Codeigniter, the helpers were all open functions. But Kohana boxed the in classes as static functions which seems more organized and logical for their purpose. This book talked about helpers generally and showed examples from URL, Date, Arr and some other helpers. Has a chapter for another great power of Kohana, easy and powerful Module system. Along with explaining how modules works, this book has separate chapters for Database, ORM and Auth modules. And I think yes, these modules deserves such focus.</p>
<p>In my view, Database and ORM could be discussed together in one chapter. Because of importance, Image and Message module also could be described with some example. Though Message module is used in showing Form errors, it deserves more space. The book explained common security issues and Kohana way of protecting them in deployment chapter. Some of those could be explained earlier in appropriate context. For example, SQL injection could be discussed in &#8220;Interacting with the Database&#8221; chapter.</p>
<p>Okey, now lets talk about some friendly complains. The form validation is discussed, and it&#8217;s good enough. But another good example of handling ajax submitted forms and their validation could make it complete. Though easy <a href="http://en.wikipedia.org/wiki/I18n" target="_blank">i18n</a> is a good feature of Kohana, it didn&#8217;t get any focus at all. When I was switching to Kohana as my promary PHP framework, one big inspiration was it&#8217;s testability. <a href="https://github.com/sebastianbergmann/phpunit/" target="_blank">PHPUnit</a> fits with Kohana beautifully through UnitTest module. But this book have no recommendation or inspiration for testing anywhere.</p>
<p>Before starting to learn something, many people like me, likes to see what most I can do from learning this thing. It can be a demo or some screenshot. Though the author ignored the presentation of sample app in screenshots, I think it&#8217;s also important. A beautiful interface could give more impression and inspiration to the learner.</p>
<p>In chapter 8, Error Handling and trouble shooting, examples are shown using <em>Kohana::debug</em>, <em>Kohana::debug_source</em>. You won&#8217;t find those methods in newer version of Kohana. Debugging related functions are moved to a new Helper named <em>Debug</em>. So you have to use <em>Debug::dump()</em>, <em>Debud::path()</em> etc. In profiling section, I was expecting some initial talk about manual profiling along with Kohana default benchmarks. There was some minor printing issues, but can be problematic for beginners. For example, in many places, single quots(&#8216;) changed to ‹ and › characters.</p>
<p>Overall, the book is well organized, focused and will be helpful on it&#8217;s purpose. I felt it&#8217;s capable to teach Kohana to a new guy, in a smooth way. Yes, there have some printing mistakes, old (because they are changed in new version) function use and some other minor issues, but seems ignorable to me.<strong> I&#8217;d recommend it for Kohana beginners</strong>. A little experience with CodeIgniter or other MVC framework can make the learning faster. But if you don&#8217;t have, don&#8217;t worry, just start from here.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/kohana-3-0-beginners-guide/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>jQuery and jQuery Mobile on JSCon 2011, Dhaka</title>
		<link>http://ajaxray.com/blog/jquery-and-jquery-mobile-on-jscon-2011-dhaka</link>
		<comments>http://ajaxray.com/blog/jquery-and-jquery-mobile-on-jscon-2011-dhaka#comments</comments>
		<pubDate>Tue, 20 Sep 2011 21:04:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Jquery]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=236</guid>
		<description><![CDATA[PHPXperts group  is one of the most active PHP community in Asia. They have arranged the first JavaScript Conference of Bangladesh on September 17, 2011 at AIUB Auditorium. It was a cool event with 250+ participants. Our (me and Mohammad (&#8230;)</p><p><a href="http://ajaxray.com/blog/jquery-and-jquery-mobile-on-jscon-2011-dhaka">Read the rest of this entry &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p><a title="PHPXperts" href="http://www.facebook.com/groups/pxperts/" target="_blank">PHPXperts</a> group  is one of the most active PHP community in Asia. They have arranged the <strong>first JavaScript Conference of Bangladesh</strong> on September 17, 2011 at <a title="American International University - Bangladesh (AIUB)" href="http://www.aiub.edu/" target="_blank">AIUB</a> Auditorium. It was a cool event with 250+ participants.</p>
<p>Our (me and Mohammad Zakir Hossain Raju) session was about <a title="jQuery - JavaScript Framework" href="http://jquery.com" target="_blank">jQuery</a> and <a title="jQuery Mobile" href="http://jquerymobile.com/" target="_blank">jQuery Mobile</a>. Here is the slide -</p>
<div id="__ss_9314861" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="jQuery &amp; jQuery Mobile" href="http://www.slideshare.net/thehungrycoder/jquery-jquery-mobile" target="_blank">jQuery &amp; jQuery Mobile</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/9314861" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="425" height="355"></iframe></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/thehungrycoder" target="_blank">Mohammad Raju</a> and <a title="Slides from Anis uddin Ahmad" href="http://www.slideshare.net/anisniit" target="_blank">Anis uddin Ahmad</a></div>
</div>
<p>BTW, <strong>SlideShare has featured </strong>this slide on homepage.</p>
<p><span id="more-236"></span></p>
<p>There was total 6 sessions in this half-day seminar. Here are the sessions(Sequentially)</p>
<ol>
<li>Turbo boost your web UI with Javascript</li>
<li>Take your JS skills to the next level with jQuery and jQuery Mobile</li>
<li>Building mobile apps using Phonegap</li>
<li>Javascript as a server side language</li>
<li>Game Development in Unity3D using JS</li>
<li>Building iOS and Android apps using Titanium</li>
</ol>
<div></div>
<p>You can see details about the event, sessions, speakers and get all slides from <a title="Facebook Event Page" href="http://www.facebook.com/event.php?eid=157831650963965" target="_blank">event page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/jquery-and-jquery-mobile-on-jscon-2011-dhaka/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#039;s do with Drupal &#8211; Simplified Admin Panel</title>
		<link>http://ajaxray.com/blog/how-to-drupal-simple-admin-panel</link>
		<comments>http://ajaxray.com/blog/how-to-drupal-simple-admin-panel#comments</comments>
		<pubDate>Fri, 10 Dec 2010 20:16:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[admin]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=226</guid>
		<description><![CDATA[As you (if you&#8217;v at least installed and explored Drupal) know, Drupal&#8216;s Admin panel is not comfortable for clients. It&#8217;s mostly developer centric and not similar to other common content managing panels. But, sometimes clients may need to manage some (&#8230;)</p><p><a href="http://ajaxray.com/blog/how-to-drupal-simple-admin-panel">Read the rest of this entry &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>As you (if you&#8217;v at least installed and explored Drupal) know, <a href="http://drupal.org/" target="_blank">Drupal</a>&#8216;s Admin panel is not comfortable for clients. It&#8217;s mostly developer centric and not similar to other common content managing panels. But, sometimes clients may need to manage some type of content. Recently I&#8217;ve faced this situation and made a simple, generic admin panel that only offers managing selective contents. Now I am going to tell you the how I&#8217;v done it. If you follow the steps,<strong> it should take hardly 30 minutes</strong>.</p>
<p><img class="alignnone" title="Manage properties panel" src="http://ajaxray.com/files/manage-properties.png" alt="" width="481" height="242" /></p>
<p><span id="more-226"></span></p>
<h3>Assumptions</h3>
<p>I&#8217;m assuming that &#8211; </p>
<ul>
<li>You have already worked with Drupal and understand it&#8217;s basic terminology.</li>
<li>You understand and can manage Roles, Permissions and Blocks.</li>
<li>You have worked (at least can work) with <a href="http://drupal.org/project/views" target="_blank">Views</a> module. </li>
</ul>
<h3>The Solution</h3>
<p>Suppose the <em>node-type</em> we will let the client manage (add/edit/delete) is &#8220;property&#8221;. Now, within few steps, we&#8217;ll build a <strong>Manage Property</strong> panel. We&#8217;ll use <em>Admin</em> and <em>Client</em> to mean the role of you and your client. Let&#8217;s start.</p>
<ol>
<li>Create a <em>view</em> using views module (type will be &#8220;node&#8221;) and name it &#8220;manage_properties&#8221;.</li>
<li>In <em>Filters</em> section, add <em>node-type = property</em>. Add additional filters if needed e.g. is_published, user etc.</li>
<li>You can add some <a target="_blank" href="http://yadadrop.com/drupal-video/drupal-views-exposed-filter-1">exposed filters</a> (e.g. node title, category etc.) so that the client can search/filter contents easily.</li>
<li>In <em>Fields</em> section, Add node title first. Then add 2-3 other fields that will help client to identify and find out property. e.g. property type, location etc. At last, add <em>Edit link</em> and <em>Delete link</em> fields. Change label of <em>Edit link</em> as &#8220;Actions&#8221;</li>
<li>In Basic setting of view, set <code>title = Manage Properties, Style = Table, Use pager = Yes, Distinct = Yes, Access = Role</code> (select client&#8217;s and admin&#8217;s role from Access options)</li>
<li>From <em>Style</em> options, place Edit and Delete links in Actions column together. Check <em>Sortable</em> checkbox for title and other appropriate columns.</li>
<li>You can sort results by <code>post_date, DESC</code> from <em>Sorting</em> section. </li>
<li>We&#8217;re almost done. Now add a <em>page</em> display of view and set the path of this display as &#8216;manage/properties&#8217;. If you want, you can add this page to menu as well.</li>
<li>Set the <em>Add Property</em> link In <em>Header</em> of page view. Style it (e.g. right aligned, bold etc.). </li>
<li>Save the view and check the output. Tune up for your clients use.</li>
</ol>
<p>Ok. Now the page is ready. Create similar panels for other content types that your client needs to manage.<br />
The next concern is, how the client will reach to these pages? There are two easy ways. Either create a <em>menu</em> and add these pages to that menu. Or Place a <em>block</em> on sidebar (or anywhere) containing the links of these pages. </p>
<h3>Checklist</h3>
<p>Please go through the following checklist when you think you&#8217;r done-</p>
<ul>
<li>This menu/links block (navigation for created manage pages) are visible and accessible by only Client and Admin role, not for the whole world. </li>
<li>All links (add/edit/delete) are working. After edit/delete, redirecting to this panel.</li>
<li>Client&#8217;s role has permission to edit/delete (at least edit/delete own contents) this node-type.</li>
</ul>
<p>More <strong>Let&#8217;s do with Drupal</strong> are coming up! keep checking.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/how-to-drupal-simple-admin-panel/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>phpXperts Seminar 2010 &#8211; the most exciting event of this year!</title>
		<link>http://ajaxray.com/blog/php-phpxperts-seminar-2010-bangladesh</link>
		<comments>http://ajaxray.com/blog/php-phpxperts-seminar-2010-bangladesh#comments</comments>
		<pubDate>Sun, 07 Nov 2010 05:38:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[phpXperts]]></category>
		<category><![CDATA[seminar]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=223</guid>
		<description><![CDATA[Yesterday, we had an excellent day at phpXperts seminar. We did 6.5 hour looong event with total 18 sessions. The participants were around 350 PHP lovers and many more from live webcast. At the end of day, it was a (&#8230;)</p><p><a href="http://ajaxray.com/blog/php-phpxperts-seminar-2010-bangladesh">Read the rest of this entry &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>Yesterday, we had an excellent day at <a href="http://www.phpxperts.net/">phpXperts</a> seminar. We did 6.5 hour looong  event with total 18 sessions. The participants were around 350 PHP lovers and many more from live webcast. At the end of day, it was a WOW event at phpXperts 2010!
</p>
<p>
This time, my topic was about &#8220;Caching Basics in PHP&#8221;. Here is the slide -</p>
<div style="width:425px" id="__ss_5688163"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/anisniit/caching-new" title="Caching basics in PHP">Caching basics in PHP</a></strong><object id="__sse5688163" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cachingnew-101106140532-phpapp02&#038;stripped_title=caching-new&#038;userName=anisniit" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse5688163" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cachingnew-101106140532-phpapp02&#038;stripped_title=caching-new&#038;userName=anisniit" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/anisniit">Anis Ahmad</a>.</div>
</div>
<p><span id="more-223"></span></p>
<p>
Here is the full list of topics. BTW, the sequence was reordered and some titles were a little changed at the final show.</p>
<ol>
<li>Professionalism, Inside out &#8211; <a href="http://omi.net.bd/" target="_blank">Omi Azad</a></li>
<li>Configure your production server by yourself &#8211; <a href="http://www.lavluda.com/" target="_blank">S.M. Ibrahim Lavlu</a></li>
<li>Web Application Development using MVC Framework (Kohana) &#8211; <a href="http://arafatbd.net" target="_blank">Arafat Rahman</a></li>
<li>HTML5 &#8211; <a href="http://hungrycoder.xenexbd.com/" target="_blank">Zakir Hossain Raju</a></li>
<li>JavaScript Wash &#8211; <a href="http://mahtonu.wordpress.com/" target="_blank">M A Hossain Tonu</a></li>
<li>Git: Stupid, Fast, and Distributed Content Tracker &#8211; <a href="http://www.mozammelhaque.com/" target="_blank">Mozammel Haque</a></li>
<li>Standard Coding, OOP Techniques and Code Reuse &#8211; <a href="http://www.raynux.com/" target="_blank">Rayhan Chowdhury</a></li>
<li>Running at Maximum HP without Tearing Apart &#8211; <a href="http://trivuz.com" target="_blank">MS Alam Trivuz</a></li>
<li>jQuery plugin development &#8211; <a href="http://www.jquerygeek.com/" target="_blank">Ziaul Haq</a></li>
<li>Desktop Apps With Web Technologies &#8211; <a href="http://masnun.com/" target="_blank">Abu Ashraf Masnun</a></li>
<li>Up and running with Doctrine 2 and Zend Framework 1.10 &#8211; <a href="http://dynamicguy.com/" target="_blank">Nurul Ferdous</a></li>
<li>Caching Basics in PHP &#8211; <a href="http://www.ajaxray.com/" target="_blank">Anis Uddin Ahmad</a></li>
<li>Even better debugging &#8211; <a href="http://www.usamurai.com/" target="_blank">Murshed Ahmmad Khan</a></li>
<li>CodeMan! with noSQL! &#8211; <a href="http://hasan.we4tech.com/" target="_blank">NHM Tanveer Hasan Khan</a></li>
<li>ACL in CodeIgniter &#8211; <a href="http://www.mizanurrahman.com" target="_blank">Mizanur Rahman</a></li>
<li>Facebook Graph API &#8211; <a href="http://saidur.wordpress.com/" target="_blank">Saidur Rahman Bijon</a></li>
<li>Developing better PHP projects &#8211; <a href="http://www.phpfour.com" target="_blank">Emran Hasan</a></li>
<li>Kickstarting your Startup &#8211; <a href="http://hasin.wordpress.com" target="_blank">Hasin Hayder</a></li>
</ol>
<p>Thanks to everybody who were attended, involved or watched the exciting event from webcast.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/php-phpxperts-seminar-2010-bangladesh/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setting up Database testing with Kohana UnitTest module</title>
		<link>http://ajaxray.com/blog/setting-up-database-testing-with-kohana-unittest-module</link>
		<comments>http://ajaxray.com/blog/setting-up-database-testing-with-kohana-unittest-module#comments</comments>
		<pubDate>Sun, 10 Oct 2010 19:13:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[kohana]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=210</guid>
		<description><![CDATA[Kohana Unittest module has made testing in Kohana v3 easy and fun. Lysender wrote a cool, straight forward post about how to set it up and running. I&#8217;ll just talk here about how I have set up database testing with (&#8230;)</p><p><a href="http://ajaxray.com/blog/setting-up-database-testing-with-kohana-unittest-module">Read the rest of this entry &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>Kohana <a href="http://github.com/kohana/unittest">Unittest module</a> has made testing in <a href="http://kohanaframework.org/">Kohana v3</a> easy and fun. Lysender wrote a <a href="http://blog.lysender.com/2010/08/kohana-unit-testing-finally/">cool, straight forward post</a> about how to set it up and running. I&#8217;ll just talk here about how I have set up database testing with Kohana Unittest for my personal use. Not saying &#8220;How to set up&#8221;. Because it&#8217;s obviously not the best way to do this.</p>
<p><img src="http://www.ajaxray.com/files/kohana_unittest.png" alt="Kohana Unittest" style="border-width: 2px" /></p>
<p>The important thing I need to ensure for testing database is, It&#8217;s in a <strong>known state</strong> before running a test. And, changes on database made by one test will not impact on another test. So, I&#8217;ll have a separate database for testing. Which will be loaded with a predefined dataset before running each test and will be truncated after test is done. Also, I have to be careful about that, my models are <strong>executing quires on test database</strong> in testing environment. Here is how I&#8217;ve done it? -</p>
<p><span id="more-210"></span></p>
<ul>
<li>Created a database with the same structure of project database. lets say it &#8220;project_test&#8221;. Add it&#8217;s configuration to database module as instance name &#8216;test&#8217;.</li>
<li>Created 2 files named <em>setup.sql</em> and <em>teardown.sql</em> in Kohana&#8217;s application/tests/data directory. Wrote this template in both of these files.
<p>[sql]<br />
START TRANSACTION;<br />
SET FOREIGN_KEY_CHECKS=0;</p>
<p>&#8211; My SQL here &#8211;</p>
<p>SET FOREIGN_KEY_CHECKS=1;<br />
COMMIT;<br />
[/sql]
</li>
<li>In <em>setup.sq</em>l, wrote the sql for inserting some logical, related data that will be used as my &#8220;known&#8221; data state. Yes, of course by exporting data project database and altering. And, in <em>teardown.sql</em>, wrote sql for truncating all tables. (Though the recommended way is using DbUnit Extension and loading dataset from XML.) </li>
<li>Added a function to <em>Kohana_Unittest_TestCase</em> class -<br />
[php]<br />
public function runSchema($schema)<br />
{<br />
    $testDb = Kohana::config(&#8216;database.test&#8217;);</p>
<p>    if(is_null($testDb)){<br />
        return false;<br />
    }</p>
<p>    $command = &quot;-u{$testDb['connection']['username']} -p{$testDb['connection']['password']} {$testDb['connection']['database']}&quot;;<br />
    $filePath = APPPATH . &#8216;tests/data/&#8217; . $schema;</p>
<p>    exec(&quot;mysql $command &lt; $filePath &quot;);<br />
}<br />
[/php]
</li>
<li>Now, I can load my dataset anytime in my testing and also can clear it. I am doing it in setUp() and tearDown().<br />
[php]<br />
	// In setUp()<br />
	$this-&gt;runSchema(&#8216;setup.sql&#8217;);</p>
<p>	// In teardown()<br />
	$this-&gt;runSchema(&#8216;teardown.sql&#8217;);<br />
[/php]
    </li>
</ul>
<p>Thats all, Now I can test using database manipulations. Please note 2 important things, -<br />
 	- When initializing models, I have to pass the db instance name &#8216;test&#8217;. This name can be set in phpunit config file and be used from that config.<br />
	- The <em>execute()</em> function is not using this db instance name for executing queries. I had to tell him again to use this instance name. So, all <em>execute()</em>s are now <em>execute($this->_db)</em>.
</p>
<p>OK. Now my Kohana v3 is ready for Database Testing.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/setting-up-database-testing-with-kohana-unittest-module/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Freelancing; an alternate career</title>
		<link>http://ajaxray.com/blog/freelancing-career</link>
		<comments>http://ajaxray.com/blog/freelancing-career#comments</comments>
		<pubDate>Sun, 03 Oct 2010 21:53:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[quick-link]]></category>
		<category><![CDATA[freelancing]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=204</guid>
		<description><![CDATA[Yesterday, I&#8217;ve talked about &#8220;Freelancing; an alternate career&#8221; at a seminar on &#8220;BUILDING TECH CAREER&#8221; at DUET, Gazipur, Dhaka. Here is the slide. This seminar was arranged by PHPXperts, the leading PHP community of Bangladesh Freelancing; an alternate career View (&#8230;)</p><p><a href="http://ajaxray.com/blog/freelancing-career">Read the rest of this entry &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>Yesterday, I&#8217;ve talked about &#8220;Freelancing; an alternate career&#8221; at a seminar on &#8220;<strong>BUILDING TECH CAREER</strong>&#8221; at DUET, Gazipur, Dhaka. <a target="_blank" href="http://slidesha.re/bYEcKg">Here is the slide.</a></p>
<p>This seminar was arranged by <a target="_blank" href="http://tech.groups.yahoo.com/group/phpexperts/">PHPXperts</a>, the leading PHP community of Bangladesh</p>
<div style="width:425px" id="__ss_5344496"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/anisniit/freelancing-an-alternate-career" title="Freelancing; an alternate career">Freelancing; an alternate career</a></strong><object id="__sse5344496" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=freelancing-101003003949-phpapp01&#038;stripped_title=freelancing-an-alternate-career&#038;userName=anisniit" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse5344496" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=freelancing-101003003949-phpapp01&#038;stripped_title=freelancing-an-alternate-career&#038;userName=anisniit" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/anisniit">Anis Ahmad</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/freelancing-career/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Extending Zend Form Element to create customized Phone number field</title>
		<link>http://ajaxray.com/blog/extending-zend-form-element-for-customized-phone-number</link>
		<comments>http://ajaxray.com/blog/extending-zend-form-element-for-customized-phone-number#comments</comments>
		<pubDate>Wed, 25 Aug 2010 08:32:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[zend-framework]]></category>
		<category><![CDATA[Zend_Form]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=196</guid>
		<description><![CDATA[It's Zend_Form_Element_Phone, a customized Zend Form Element for Phone Number. This will render 3 text fields for parts of phone number - country code, operator code and subscriber number. The values of these three fields jointly will be considered as the value. Optionally, a separator can be used between these fields. This separator can be ignored from/included in value]]></description>
				<content:encoded><![CDATA[<p>Generally, Phone numbers has different parts. Such as, country code, operator code and subscriber number etc. When taking Phone number as user input, we can worn users about phone number format by setting a hint/description and can validate using Regular Expression. But, for better usability, along with hints, some web applications provide separate (generally 3) text fields for different parts of phone number. Also, some of them keep a separator, &#8216;-&#8217; or &#8216;#&#8217; between this fields.</p>
</p>
<p>Now, if we try provide this feature in Zend Form, that&#8217;s possible. We can create three individual Zend_Form_Element_Text objects and join there value together to make the phone number. But, in this case, validating them together is a hassle. Again, placing them inline in the form and putting separators needs some Decorator magic. What if we can make it simply another Zend Form Element which renders three text box (optionally with separator)? And consider their value jointly and validate them together using ordinary Zend Validators? Lets try.</p>
<h3>What we are going to make?</h3>
<p>
Let&#8217;s visualize our Phone number field first and list what we want from it.<br />
<img src="/blog/wp-content/uploads/manual/phone.png" style="border-width: 3px" />
</p>
<ul>
<li>It&#8217;s Simple. It&#8217;s rendering, validation everything is like any other ordinary Zend From Elements. </li>
<li>It prints 3 text boxes for different parts of Phone number.</li>
<li>When we validate it or take it&#8217;s value, the input of these three boxes jointly will be considered as the value. </li>
<li>We can set a separator character to be printed between text boxes.</li>
<li>We can include/exclude this separators from value.</li>
</ul>
<p><span id="more-196"></span></p>
<h3>Assumptions</h3>
<p>Assuming that, you have used Zend_Form, Zend_From_Element_* and understand how the directory hierarchy, naming convention, Autoloading of Zend works. Also, in library directory, you keep a directory beside Zend for additional project based classes. We will refer it as Project directory and classes under it will be Project_&lt;dir-name&gt;_&lt;class&gt; etc.</p>
<h3>Let&#8217;s do it</h3>
<p>It&#8217;s already done <img src='http://ajaxray.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . So, please <a href="http://www.ajaxray.com/blog/downloads/Zend_Form_Element_Phone" target="_blank"><b>download</b></a> it first.</p>
<p>
<img src="/blog/wp-content/uploads/manual/Screenshot.png" align="right"  style="border-width: 1px" /><br />
Now I will go through the code and will tell you how it&#8217;s working. The form element class is created in &#8220;Project/Form/Element/Phone.php&#8221;. So our class name is <em>Project_Form_Element_Phone</em>. This class is extending <em>Zend_Form_Element_Xhtml</em> for getting common form element functionalities by default. Then, declared some public properties as below -</p>
<ul>
<li><strong>$codeLength</strong> : array. default lengths of phone number parts</li>
<li><strong>$ignoreSeperator</strong> : boolean. flag for ignoring/including separator characters in value</li>
<li><strong>$helper</strong> : Name of default form view helper to use for rendering</li>
</ul>
<p>In constructor, checking if <em>codeLength</em> and <em>ignoreSeperator</em> is set as attribute (using Zend_Form_Element::setAttrib). If not, adding them with attributes array with default values. Then calling parent&#8217;s constructor. Also, overwriting <em>isValid()</em> function for joining values of three parts. From where these 3 parts coming? Find the answer in view helper which rendering this filed.</p>
<p>Each Zend Form Element needs a view helper to be rendered with. Our view helper for <em>Project_Form_Element_Phone</em> is at &#8220;Project/View/Helper/FormPhone.php&#8221;. So, set the value of <em>Project_Form_Element_Phone::$helper</em> as &#8216;formPhone&#8217;. The secret is here, in <strong>formPhone()</strong> function. Here, I am printing three text fields named <strong>&lt;filed-name&gt;_country</strong>, <strong>&lt;filed-name&gt;_operator</strong> and <strong>&lt;filed-name&gt;</strong>. They will have additional class name phone_country, phone_operator and phone respectively so that we can style them from CSS. Also, the length of each part will be set as maxlength.</p>
<p><b>Check &#8216;Project/View/Helper/&#8217; has been added as <em>HelperPath</em> and &#8216;Project_&#8217; is added in <em>Autoloader Namespaces</em>.</b></p>
<p>BTW, if you still fetch problem in loading files or don&#8217;t want to use separate directory (referred as Project) for additional classes, you can put the Phone.php in &#8220;Zend/Form/Element&#8221; and FormPhone.php in &#8220;Zend/View/Helper&#8221; directory. Then change the class names.</p>
<h3>How to use?</h3>
<p>Seems everything is done. Let&#8217;s see an example how it will be used.</p>
<p>[php]</p>
<p>$primaryPhone = new Project_Form_Element_Phone(&#8216;primary_phone&#8217;);</p>
<p>$primaryPhone-&gt;setLabel(&#8216;Primary phone&#8217;)<br />
	  -&gt;setAttrib(&#8216;class&#8217; ,&#8217;some class&#8217; )<br />
	  -&gt;setAttrib(&#8216;separator&#8217; ,&#8217;#&#8217; )  // Separator between Phone number parts<br />
	  -&gt;setAttrib(&#8216;ignoreSeparator&#8217;, true)  // Ignore seperators from in field value<br />
	  -&gt;setDescription(&#8216;Phone number format: XXX # XXXX # XXXXXX&#8217;)<br />
	  -&gt;setValue(isset($data['primary_phone']) ? $data['primary_phone'] : &#8221;)<br />
	  -&gt;addValidator(&#8216;digits&#8217;);</p>
<p>$form-&gt;addElement($primaryPhone);</p>
<p>[/php]</p>
<p>So, is all our expectations in above list full-fulled?</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/extending-zend-form-element-for-customized-phone-number/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>jQuery LED Banner &#8211; fun with jQuery!</title>
		<link>http://ajaxray.com/blog/jquery-led-scrolling-banner-fun-plugin</link>
		<comments>http://ajaxray.com/blog/jquery-led-scrolling-banner-fun-plugin#comments</comments>
		<pubDate>Sat, 27 Feb 2010 19:56:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[banner]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[scrolling]]></category>

		<guid isPermaLink="false">http://www.ajaxray.com/blog/?p=183</guid>
		<description><![CDATA[While coming home, I&#8217;ve seen a super store showing their items on a big LED type banner. Where item names were scrolling using some lights on/off. It&#8217;s an everyday scenery, nothing special. But I&#8217;ve come to realize soon, in back of (&#8230;)</p><p><a href="http://ajaxray.com/blog/jquery-led-scrolling-banner-fun-plugin">Read the rest of this entry &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>While coming home, I&#8217;ve seen a super store showing their items on a big LED type banner. Where item names were scrolling using some lights on/off. It&#8217;s an everyday scenery, nothing special.</p>
<p>But  I&#8217;ve come to realize soon, in back of my head,  I am thinking how it can be made for web. And, LED banner has landed on earth within few hours using the wings of jQuery. <strong><a title="Click to see DEMO" href="http://www.ajaxray.com/Examples/led.html" target="_blank">Here is the fun</a>!</strong></p>
<p><a title="Click to see DEMO" href="http://www.ajaxray.com/Examples/led.html" target="_blank"><img class=" alignnone" title="jQuery LED Banner" src="http://www.ajaxray.com/Examples/led-banner.png" alt="jQuery LED Banner" width="378" height="79" /></a></p>
<p><span id="more-183"></span></p>
<p><strong>How it works?</strong></p>
<p>It&#8217;s pretty simple!</p>
<ol>
<li><em>createLights()</em> makes the board (the target div) empty and create lights (span elements) in it as row and column.</li>
<li>I have an array named &#8216;map&#8217; that stores which lights should on for a character in 3 dimensional format.</li>
<li>Using <em>getMap()</em> , I am creating an array of all columns for boards text.</li>
<li><em>draw()</em> is drawing (turning on required lights) the text.</li>
<li><em>scrollText()</em> make it moving. This funciton just take leftmost column and place after rightmost.</li>
<li>LED Banner is scrolling. Done.</li>
</ol>
<p>Let&#8217;s talk a bit more about map array. For eaxmple, take this line -</p>
<pre style="padding-left: 30px;">map[")"] = [[0,7],[1,6],[2,3,4,5]];</pre>
<p>Here, this element of map store information for printing &#8216;)&#8217;.<br />
it has 3 elements which means 3 columns will be used to print this.<br />
[0,7] is first column for this character where 0th and 7th light (from top) should keep on.</p>
<p>Later, if I can manage some more time, hope to make it as a jQuery plugin.<br />
However, if you are interested to make it as a plugin, go ahead!</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxray.com/blog/jquery-led-scrolling-banner-fun-plugin/feed</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
	</channel>
</rss>
