<?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>Ecommy - your ecommerce support for your online business &#187; Web development</title>
	<atom:link href="http://www.ecommy.com/c/web-development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ecommy.com</link>
	<description>the path to your business success</description>
	<lastBuildDate>Tue, 08 Nov 2011 18:11:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>debug which wordpress plugin is slower</title>
		<link>http://www.ecommy.com/web-development/debug-which-wordpress-plugin-is-slower</link>
		<comments>http://www.ecommy.com/web-development/debug-which-wordpress-plugin-is-slower#comments</comments>
		<pubDate>Sun, 21 Aug 2011 14:07:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=641</guid>
		<description><![CDATA[      
      Once I had a performance problem with wordpress website even if it run on a dedicated server. I suspected that the problem is one of the plugins but I had at least 50 installed . In order to see who&#8217;s the slowest I opened wp-includes/plugin.php and temprary changed the do_action function to something like this: [...]]]></description>
			<content:encoded><![CDATA[      
      <p>Once I had a performance problem with wordpress website even if it run on a dedicated server.</p>
<p>I suspected that the problem is one of the plugins but I had at least 50  installed <img src='http://www.ecommy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
In order to see who&#8217;s the slowest I opened wp-includes/plugin.php and temprary changed the do_action function to something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span class="kw2">function</span> do_action<span class="br0">&#40;</span><span class="re0">$tag</span><span class="sy0">,</span> <span class="re0">$arg</span> <span class="sy0">=</span> <span class="st_h">''</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
	<span class="kw2">global</span> <span class="re0">$wp_filter</span><span class="sy0">,</span> <span class="re0">$wp_actions</span><span class="sy0">,</span> <span class="re0">$merged_filters</span><span class="sy0">,</span> <span class="re0">$wp_current_filter</span><span class="sy0">;</span>
&nbsp;
	<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="sy0">!</span> <a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span><span class="re0">$wp_actions</span><span class="br0">&#41;</span> <span class="br0">&#41;</span>
		<span class="re0">$wp_actions</span> <span class="sy0">=</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
	<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="sy0">!</span> <a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span><span class="re0">$wp_actions</span><span class="br0">&#91;</span><span class="re0">$tag</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span>
		<span class="re0">$wp_actions</span><span class="br0">&#91;</span><span class="re0">$tag</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="nu0">1</span><span class="sy0">;</span>
	<span class="kw1">else</span>
		<span class="sy0">++</span><span class="re0">$wp_actions</span><span class="br0">&#91;</span><span class="re0">$tag</span><span class="br0">&#93;</span><span class="sy0">;</span>
&nbsp;
	<span class="re0">$wp_current_filter</span><span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="re0">$tag</span><span class="sy0">;</span>
&nbsp;
	<span class="co1">// Do 'all' actions first</span>
	<span class="kw1">if</span> <span class="br0">&#40;</span> <a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span><span class="re0">$wp_filter</span><span class="br0">&#91;</span><span class="st_h">'all'</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
		<span class="re0">$all_args</span> <span class="sy0">=</span> <a href="http://www.php.net/func_get_args"><span class="kw3">func_get_args</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
		_wp_call_all_hook<span class="br0">&#40;</span><span class="re0">$all_args</span><span class="br0">&#41;</span><span class="sy0">;</span>
	<span class="br0">&#125;</span>
&nbsp;
	<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="sy0">!</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span><span class="re0">$wp_filter</span><span class="br0">&#91;</span><span class="re0">$tag</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
		<a href="http://www.php.net/array_pop"><span class="kw3">array_pop</span></a><span class="br0">&#40;</span><span class="re0">$wp_current_filter</span><span class="br0">&#41;</span><span class="sy0">;</span>
		<span class="kw1">return</span><span class="sy0">;</span>
	<span class="br0">&#125;</span>
&nbsp;
	<span class="re0">$args</span> <span class="sy0">=</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
	<span class="kw1">if</span> <span class="br0">&#40;</span> <a href="http://www.php.net/is_array"><span class="kw3">is_array</span></a><span class="br0">&#40;</span><span class="re0">$arg</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> <span class="nu0">1</span> <span class="sy0">==</span> <a href="http://www.php.net/count"><span class="kw3">count</span></a><span class="br0">&#40;</span><span class="re0">$arg</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> <a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span><span class="re0">$arg</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="sy0">&amp;&amp;</span> <a href="http://www.php.net/is_object"><span class="kw3">is_object</span></a><span class="br0">&#40;</span><span class="re0">$arg</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="co1">// array(&amp;$this)</span>
		<span class="re0">$args</span><span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy0">=&amp;</span> <span class="re0">$arg</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="sy0">;</span>
	<span class="kw1">else</span>
		<span class="re0">$args</span><span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="re0">$arg</span><span class="sy0">;</span>
	<span class="kw1">for</span> <span class="br0">&#40;</span> <span class="re0">$a</span> <span class="sy0">=</span> <span class="nu0">2</span><span class="sy0">;</span> <span class="re0">$a</span> <span class="sy0">&lt;</span> <a href="http://www.php.net/func_num_args"><span class="kw3">func_num_args</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="re0">$a</span><span class="sy0">++</span> <span class="br0">&#41;</span>
		<span class="re0">$args</span><span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy0">=</span> <a href="http://www.php.net/func_get_arg"><span class="kw3">func_get_arg</span></a><span class="br0">&#40;</span><span class="re0">$a</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
	<span class="co1">// Sort</span>
	<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="sy0">!</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span> <span class="re0">$merged_filters</span><span class="br0">&#91;</span> <span class="re0">$tag</span> <span class="br0">&#93;</span> <span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
		<a href="http://www.php.net/ksort"><span class="kw3">ksort</span></a><span class="br0">&#40;</span><span class="re0">$wp_filter</span><span class="br0">&#91;</span><span class="re0">$tag</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span>
		<span class="re0">$merged_filters</span><span class="br0">&#91;</span> <span class="re0">$tag</span> <span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw4">true</span><span class="sy0">;</span>
	<span class="br0">&#125;</span>
&nbsp;
	<a href="http://www.php.net/reset"><span class="kw3">reset</span></a><span class="br0">&#40;</span> <span class="re0">$wp_filter</span><span class="br0">&#91;</span> <span class="re0">$tag</span> <span class="br0">&#93;</span> <span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
	<span class="kw1">do</span> <span class="br0">&#123;</span>
		<span class="kw1">foreach</span> <span class="br0">&#40;</span> <span class="br0">&#40;</span><a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#41;</span> <a href="http://www.php.net/current"><span class="kw3">current</span></a><span class="br0">&#40;</span><span class="re0">$wp_filter</span><span class="br0">&#91;</span><span class="re0">$tag</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="kw1">as</span> <span class="re0">$the_</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
			<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="sy0">!</span><a href="http://www.php.net/is_null"><span class="kw3">is_null</span></a><span class="br0">&#40;</span><span class="re0">$the_</span><span class="br0">&#91;</span><span class="st_h">'function'</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
                <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$tag</span><span class="sy0">==</span><span class="st_h">'init'</span><span class="br0">&#41;</span> <span class="re0">$time_start</span> <span class="sy0">=</span> <a href="http://www.php.net/microtime"><span class="kw3">microtime</span></a><span class="br0">&#40;</span><span class="kw4">true</span><span class="br0">&#41;</span><span class="sy0">;</span>
				<a href="http://www.php.net/call_user_func_array"><span class="kw3">call_user_func_array</span></a><span class="br0">&#40;</span><span class="re0">$the_</span><span class="br0">&#91;</span><span class="st_h">'function'</span><span class="br0">&#93;</span><span class="sy0">,</span> <a href="http://www.php.net/array_slice"><span class="kw3">array_slice</span></a><span class="br0">&#40;</span><span class="re0">$args</span><span class="sy0">,</span> <span class="nu0">0</span><span class="sy0">,</span> <span class="br0">&#40;</span>int<span class="br0">&#41;</span> <span class="re0">$the_</span><span class="br0">&#91;</span><span class="st_h">'accepted_args'</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
                <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$tag</span><span class="sy0">==</span><span class="st_h">'init'</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
                    <span class="re0">$time_end</span> <span class="sy0">=</span> <a href="http://www.php.net/microtime"><span class="kw3">microtime</span></a><span class="br0">&#40;</span><span class="kw4">true</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="re0">$time</span> <span class="sy0">=</span> <span class="re0">$time_end</span> <span class="sy0">-</span> <span class="re0">$time_start</span><span class="sy0">;</span>
                    <span class="kw1">echo</span> <a href="http://www.php.net/print_r"><span class="kw3">print_r</span></a><span class="br0">&#40;</span><span class="re0">$the_</span><span class="br0">&#91;</span><span class="st_h">'function'</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">' -----  &lt;b&gt;'</span><span class="sy0">.</span><span class="re0">$time</span><span class="sy0">.</span><span class="st0">&quot;&lt;/b&gt;&lt;br&gt;<span class="es1">\n</span>&quot;</span><span class="sy0">;</span>
                <span class="br0">&#125;</span>                
            <span class="br0">&#125;</span>
        <span class="br0">&#125;</span>
&nbsp;
	<span class="br0">&#125;</span> <span class="kw1">while</span> <span class="br0">&#40;</span> <a href="http://www.php.net/next"><span class="kw3">next</span></a><span class="br0">&#40;</span><span class="re0">$wp_filter</span><span class="br0">&#91;</span><span class="re0">$tag</span><span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="sy0">!==</span> <span class="kw4">false</span> <span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
	<a href="http://www.php.net/array_pop"><span class="kw3">array_pop</span></a><span class="br0">&#40;</span><span class="re0">$wp_current_filter</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre></div></div>

<p>after this you&#8217;ll be able to see what plugin is eating the most of your time (after each function call you&#8217;ll see execution time in bold)</p>
<p>It&#8217;s not a mature script just a quick snippet to have a starting point for someone  who runs into the same problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/debug-which-wordpress-plugin-is-slower/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS transparent border hack, easy</title>
		<link>http://www.ecommy.com/web-development/transparent-border-hack-easy</link>
		<comments>http://www.ecommy.com/web-development/transparent-border-hack-easy#comments</comments>
		<pubDate>Wed, 18 May 2011 16:22:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=614</guid>
		<description><![CDATA[      
      Recently I wanted to have different elements surrounded by transparent borders. For instance an ajax popup, similar with what facebook has, or a design element to look nicer. The solution is having another div that is inside the one you already have with an opacity applyed to it. The HTML: &#60;div class=&#34;normalDiv&#34;&#62; &#60;div class=&#34;transparentBorder&#34;&#62;&#38;nbsp;&#60;/div&#62; our [...]]]></description>
			<content:encoded><![CDATA[      
      <p>Recently I wanted to have different elements surrounded by transparent borders.<br />
For instance an ajax popup, similar with what facebook has, or a design element to look nicer.</p>
<p>The solution is having another div that is inside the one you already have with an opacity applyed to it.<br />
The HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html">&lt;div class=&quot;normalDiv&quot;&gt;
  &lt;div class=&quot;transparentBorder&quot;&gt;&amp;nbsp;&lt;/div&gt;
  our content here,
&lt;/div&gt;</pre></div></div>

<p>The CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css"><span class="re1">.transparentBorder</span><span class="br0">&#123;</span><span class="kw1">border</span><span class="sy0">:</span> <span class="re3">10px</span> <span class="kw2">solid</span> <span class="re0">#363636</span><span class="sy0">;</span>
    <span class="kw1">position</span><span class="sy0">:</span> <span class="kw2">absolute</span><span class="sy0">;</span> <span class="kw1">top</span><span class="sy0">:</span> <span class="re3">-10px</span><span class="sy0">;</span> <span class="kw1">left</span><span class="sy0">:</span> <span class="re3">-10px</span><span class="sy0">;</span> <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">100%</span><span class="sy0">;</span> <span class="kw1">width</span><span class="sy0">:</span> <span class="re3">100%</span><span class="sy0">;</span>
    opacity<span class="sy0">:</span> <span class="nu0">0.34</span><span class="sy0">;</span>filter<span class="sy0">:</span>alpha<span class="br0">&#40;</span>opacity<span class="sy0">=</span><span class="nu0">34</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="kw1">z-index</span><span class="sy0">:</span> -<span class="nu0">10</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
<span class="re1">.normalDiv</span> <span class="br0">&#123;</span><span class="kw1">position</span><span class="sy0">:</span> <span class="kw2">relative</span><span class="sy0">;</span> <span class="kw1">width</span><span class="sy0">:</span> <span class="re3">500px</span><span class="sy0">;</span> <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">300px</span><span class="sy0">;</span> <span class="kw1">text-align</span><span class="sy0">:</span> <span class="kw2">center</span><span class="sy0">;</span> <span class="kw1">font-size</span><span class="sy0">:</span> <span class="re3">13px</span><span class="sy0">;</span> <span class="kw1">color</span><span class="sy0">;</span> <span class="re0">#363636</span><span class="sy0">;</span><span class="br0">&#125;</span></pre></div></div>

<p>See the <a href="http://www.ecommy.com/demos/transparent-border.html" target="_blank">DEMO for transparent borders</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/transparent-border-hack-easy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>clear space after floating divs &#8211; includes opera fix</title>
		<link>http://www.ecommy.com/web-development/clear-space-after-floating-divs-includes-opera-fix</link>
		<comments>http://www.ecommy.com/web-development/clear-space-after-floating-divs-includes-opera-fix#comments</comments>
		<pubDate>Wed, 09 Feb 2011 21:40:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=581</guid>
		<description><![CDATA[      
      When writing html code to draw columns you usually use float elements contained inside a div container like here: &#60;div class=&#34;clearfix&#34; style=&#34;width: 100%;&#34;&#62; &#60;div style=&#34;width: 30%; float: left;&#34;&#62;left content&#60;/div&#62; &#60;div style=&#34;width: 60%; float: right;&#34;&#62;right content&#60;/div&#62; &#60;/div&#62; the problem occurs when bellow this code you want to have a footer for instance. To work in all [...]]]></description>
			<content:encoded><![CDATA[      
      <p>When writing html code to draw columns you usually use float elements contained inside a div container like here:</p>

<div class="wp_syntax"><div class="code"><pre class="css">&lt;div class<span class="sy0">=</span><span class="st0">&quot;clearfix&quot;</span> style<span class="sy0">=</span><span class="st0">&quot;width: 100%;&quot;</span><span class="sy0">&gt;</span>
&lt;div style<span class="sy0">=</span><span class="st0">&quot;width: 30%; float: left;&quot;</span><span class="sy0">&gt;</span>left content&lt;/div<span class="sy0">&gt;</span>
&lt;div style<span class="sy0">=</span><span class="st0">&quot;width: 60%; float: right;&quot;</span><span class="sy0">&gt;</span>right content&lt;/div<span class="sy0">&gt;</span>
&lt;/div<span class="sy0">&gt;</span></pre></div></div>

<p>the problem occurs when bellow this code you want to have a footer for instance. To work in all the browser most of front end developers will clear the space like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css">&lt;div style<span class="sy0">=</span><span class="st0">&quot;clear:both;font-size:1px;&quot;</span><span class="sy0">&gt;</span>&amp;nbsp<span class="sy0">;</span>&lt;/div<span class="sy0">&gt;</span></pre></div></div>

<p>a better solution is to just use css and don&#8217;t worry about additional ugly and useless html code <img src='http://www.ecommy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
just add the following code inside your stylesheet:</p>

<div class="wp_syntax"><div class="code"><pre class="css">&nbsp;
<span class="re1">.clearfix</span><span class="re2">:after </span><span class="br0">&#123;</span>
    <span class="kw1">content</span><span class="sy0">:</span> <span class="st0">'.'</span><span class="sy0">;</span>
    <span class="kw1">display</span><span class="sy0">:</span> <span class="kw2">block</span><span class="sy0">;</span>
    <span class="kw1">clear</span><span class="sy0">:</span> <span class="kw2">both</span><span class="sy0">;</span>
    <span class="kw1">visibility</span><span class="sy0">:</span> <span class="kw2">hidden</span><span class="sy0">;</span>
    <span class="kw1">line-height</span><span class="sy0">:</span> <span class="re3">0px</span><span class="sy0">;</span>
    <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">0px</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&nbsp;
&nbsp;
<span class="re1">.clearfix</span> <span class="br0">&#123;</span>
    <span class="kw1">display</span><span class="sy0">:</span> inline-<span class="kw2">block</span><span class="sy0">;</span> 
<span class="br0">&#125;</span>
&nbsp;
html<span class="br0">&#91;</span>xmlns<span class="br0">&#93;</span> <span class="re1">.clearfix</span> <span class="br0">&#123;</span>
    <span class="kw1">display</span><span class="sy0">:</span> <span class="kw2">block</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="sy0">*</span> html <span class="re1">.clearfix</span> <span class="br0">&#123;</span>
    <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">1%</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
<span class="re1">.clearfix</span> <span class="br0">&#123;</span> <span class="kw1">display</span><span class="sy0">:</span><span class="kw2">block</span><span class="sy0">;</span> <span class="br0">&#125;</span></pre></div></div>

<p>last line is for opera &#8211; don&#8217;t know why it doesn&#8217;t like this clearfix so I made it to like it <img src='http://www.ecommy.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/clear-space-after-floating-divs-includes-opera-fix/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing css outline from buttons and html elements</title>
		<link>http://www.ecommy.com/web-development/removing-css-outline-from-buttons-and-html-elements</link>
		<comments>http://www.ecommy.com/web-development/removing-css-outline-from-buttons-and-html-elements#comments</comments>
		<pubDate>Tue, 08 Feb 2011 10:53:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=577</guid>
		<description><![CDATA[      
      When designing, one of the first things I do is to define some very common elements with general features like no margin/padding for body. Similar with the body element I don&#8217;t like the outline that appears when clicking a button or a li element from a list. To do this I write something like this: [...]]]></description>
			<content:encoded><![CDATA[      
      <p>When designing, one of the first things I do is to define some very common elements with general features like no margin/padding for body.<br />
Similar with the body element I don&#8217;t like the outline that appears when clicking a button or a li element from a list.<br />
To do this I write something like this:</p>
<blockquote><p>
*{outline:none;}
</p></blockquote>
<p>however&#8230; on firefox the outline still appers on buttons and submit buttons. To fix this just add:</p>
<blockquote><p>
input::-moz-focus-inner, button::-moz-focus-inner { border: 0; }
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/removing-css-outline-from-buttons-and-html-elements/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract modified files from GIT</title>
		<link>http://www.ecommy.com/web-development/extract-modified-files-from-git</link>
		<comments>http://www.ecommy.com/web-development/extract-modified-files-from-git#comments</comments>
		<pubDate>Wed, 26 Jan 2011 18:41:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=572</guid>
		<description><![CDATA[      
      Recently I stumbled upon a great script for extracting modified files between two GIT commits. This is great for website deployments assuming on client side only ftp is accepted. #!/bin/bash BOLD=&#8221;\033[1m" _BOLD="\033[22m" RED="\033[31m" YELLOW="\033[33m" GREEN="\033[32m" RESET="\033[39m" range=$1 if [ -z "$range" ]; then echo -e &#8220;${BOLD}${RED}You must specify a &#8216;..&#8216; argument.${RESET}${_BOLD}&#8221; exit 1 fi if [...]]]></description>
			<content:encoded><![CDATA[      
      <p>Recently I stumbled upon a great script for extracting modified files between two GIT commits.<br />
This is great for website deployments assuming on client side only ftp is accepted.</p>
<blockquote><p>
#!/bin/bash</p>
<p>BOLD=&#8221;\033[1m"<br />
_BOLD="\033[22m"<br />
RED="\033[31m"<br />
YELLOW="\033[33m"<br />
GREEN="\033[32m"<br />
RESET="\033[39m"</p>
<p>range=$1<br />
if [ -z "$range" ]; then<br />
  echo -e &#8220;${BOLD}${RED}You must specify a &#8216;<since>..<until>&#8216; argument.${RESET}${_BOLD}&#8221;<br />
  exit 1<br />
fi</p>
<p>if [ -z "$2" ]; then<br />
  target=&#8221;$( pwd )/.deployments&#8221;<br />
else<br />
  target=$( echo &#8220;$2&#8243; | sed -e &#8216;s#/\+$##g&#8217; )<br />
fi</p>
<p>if [ -d "$target" ]; then<br />
  echo -ne &#8220;Do you wish to remove &#8216;$target&#8217; first? [Y/n] &#8221;<br />
  read prompt<br />
  if [ -z "$prompt" ] || [ "$prompt" == "Y" ] || [ "$prompt" == "y" ]; then<br />
    echo -e &#8221;  ${YELLOW}Purging &#8216;$target&#8217;&#8230;${RESET}&#8221;<br />
    if [ -d "$target" ]; then<br />
      rm -Rf &#8220;$target&#8221;<br />
    fi<br />
    echo -e &#8221;  ${GREEN}Done.${RESET}&#8221;<br />
  fi<br />
fi</p>
<p>mkdir -p &#8220;$target&#8221;</p>
<p>LOG=$( git whatchanged -m &#8211;oneline &#8220;$range&#8221; | awk &#8216;{<br />
  if ($1 ~ /^:/) {<br />
    print $5 &#8220;:&#8221; $6<br />
  }<br />
}&#8217; | tac )</p>
<p>length=$( echo &#8220;$LOG&#8221; | wc -l )<br />
manual=&#8221;</p>
<p>index=0<br />
for command in $LOG; do<br />
  operation=${command:0:1}<br />
  filepath=${command:2}<br />
  case $operation in<br />
    &#8220;A&#8221; | &#8220;M&#8221;)<br />
      if [ -f "$filepath" ]; then<br />
        destination=$( dirname &#8220;$target/$filepath&#8221; )<br />
        filename=$( basename &#8220;$filepath&#8221; )<br />
        mkdir -p &#8220;$destination&#8221;<br />
        cp -f &#8220;$filepath&#8221; &#8220;$target/$filepath&#8221;<br />
      fi<br />
    ;;<br />
    &#8220;D&#8221;)<br />
      manual=&#8221;$manual\n$filepath&#8221;<br />
    ;;<br />
    *)<br />
    echo -e &#8220;${BOLD}${RED}Unknown operation $operation on file $filepath.${RESET}${_BOLD}&#8221;<br />
    exit 4<br />
    ;;<br />
  esac<br />
  let &#8220;index++&#8221;<br />
  echo -ne &#8220;\r${YELLOW}Processing ${length} files&#8230;${RESET} $( echo &#8220;scale=2; ( $index / $length ) * 100.00&#8243; | bc )%&#8221;<br />
done<br />
echo</p>
<p>if [ ! -z "$manual" ]; then<br />
  echo $( echo -e &#8220;$manual&#8221; | sed -e &#8216;s/^\s\+//g&#8217; | sort -u ) > &#8220;$target/.delete&#8221;<br />
  echo -e &#8220;[WARN] Please manually delete the files listed in &#8216;${BOLD}.delete${_BOLD}&#8217;&#8221;<br />
fi</p>
<p>echo -e &#8220;${GREEN}Done.${RESET}&#8221;</p>
</blockquote>
<p>save it as git-extract and use it as:</p>
<blockquote><p>
git-extract from_old_commit_hash..to_new_commit_hash
</p></blockquote>
<p>All the credits go to: http://blog.angeloff.name/post/1490030701/extract-changed-files-from-git-and-prepare-a-deployment</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/extract-modified-files-from-git/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql IN function alternative when using mysql field</title>
		<link>http://www.ecommy.com/web-development/mysql-in-function-alternative-when-using-mysql-field</link>
		<comments>http://www.ecommy.com/web-development/mysql-in-function-alternative-when-using-mysql-field#comments</comments>
		<pubDate>Mon, 13 Dec 2010 14:27:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=565</guid>
		<description><![CDATA[      
      let&#8217;s assume you have a mysql field which is composed from comma separated values table name: products field name from table products: category_ids (the comma separated list of categories) let&#8217;s assume that we want to search all products for a certain category. the first idea will be to use the IN mysql function: (I will [...]]]></description>
			<content:encoded><![CDATA[      
      <p>let&#8217;s assume you have a mysql field which is composed from comma separated values</p>
<p>table name: products<br />
field name from table products: category_ids  (the comma separated list of categories)</p>
<p>let&#8217;s assume that we want to search all products for a certain category.   the first idea will be to use the IN mysql function: (I will note {$var} as an external variable)</p>
<p>SELECT * FROM products WHERE {$category_id} IN category_ids</p>
<p>however it won&#8217;t work so this statement should be used:<br />
SELECT * FROM products WHERE category_ids REGEXP &#8216;^{$category_id},|,{$category_id},|,{$category_id}$|^{$category_id}$&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/mysql-in-function-alternative-when-using-mysql-field/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento problems: General error: 1005</title>
		<link>http://www.ecommy.com/web-development/magento-problems-general-error-1005</link>
		<comments>http://www.ecommy.com/web-development/magento-problems-general-error-1005#comments</comments>
		<pubDate>Fri, 26 Nov 2010 03:06:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=562</guid>
		<description><![CDATA[      
      The exact error I kept getting was: exception &#8216;Zend_Db_Statement_Exception&#8217; with message &#8216;SQLSTATE[HY000]: General error: 1005 Can&#8217;t create table &#8216;xxx catalog_category_flat_store_1.frm&#8217; (errno: 150)&#8217; in xxx/lib/Zend/Db/Statement/Pdo.php:234 The solution is to execute the following statements inside phpMyAdmin: ALTER TABLE catalog_category_entity ENGINE=INNODB ALTER TABLE core_store ENGINE=INNODB Don&#8217;t forget the table prefixes if you have! If you get a similar [...]]]></description>
			<content:encoded><![CDATA[      
      <p>The exact error I kept getting was:<br />
exception &#8216;Zend_Db_Statement_Exception&#8217; with message &#8216;SQLSTATE[HY000]: General error: 1005 Can&#8217;t create table &#8216;xxx catalog_category_flat_store_1.frm&#8217; (errno: 150)&#8217; in xxx/lib/Zend/Db/Statement/Pdo.php:234</p>
<p>The solution is to execute the following statements inside phpMyAdmin:<br />
<code>ALTER TABLE catalog_category_entity ENGINE=INNODB<br />
ALTER TABLE core_store ENGINE=INNODB</code></p>
<p>Don&#8217;t forget the table prefixes if you have!</p>
<p>If you get a similar error but another table please note that this error is related to foreign indexes and occurs most offten when you move the magento database from a server to another.</p>
<p>I am taking the above example, the table <em>catalog_category_flat_store_1</em>. This table has 2 foreign keys one to <em>catalog_category_entity</em>  and the other .. you guessed: <em>core_store</em>.</p>
<p>that&#8217;s why I executed:<br />
<code>ALTER TABLE catalog_category_entity ENGINE=INNODB<br />
ALTER TABLE core_store ENGINE=INNODB</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/magento-problems-general-error-1005/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Management Open Source Software</title>
		<link>http://www.ecommy.com/different-thoughts/project-management-open-source-software</link>
		<comments>http://www.ecommy.com/different-thoughts/project-management-open-source-software#comments</comments>
		<pubDate>Thu, 22 Apr 2010 08:35:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Different Thoughts]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[project management]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=520</guid>
		<description><![CDATA[      
      There is almost an year since working with qdpm, http://qdpm.net/, which is a great tool for project management, however I wanted something more complete and if possible that had svn support for the projects. update: qdpm supports gantt charts from version 5.5 Here is what I found: 1. Clockingi.com, http://www.clockingit.com/  has nice graphical reports, gantt [...]]]></description>
			<content:encoded><![CDATA[      
      <p>There is almost an year since working with qdpm, http://qdpm.net/, which is a great tool for project management, however I wanted something more complete and if possible that had svn support for the projects.</p>
<p>update: qdpm supports gantt charts from version 5.5</p>
<p>Here is what I found:</p>
<p>1. Clockingi.com, http://www.clockingit.com/  has nice graphical reports, gantt charts and svn support</p>
<p>2. Codeni, http://www.codendi.com from XEROX, supports svn/cvs repository browsing and gantt charts, seems a complex and mature product</p>
<p>3. Collabtive, http://collabtive.o-dyn.de/, it&#8217;s a simple, lightweight project management too, useful for a very small team or a freelancer</p>
<p>4. project-open, http://www.project-open.org/</p>
<p>5. endeavour, http://endeavour-mgmt.sourceforge.net, you can check it&#8217;s features here: http://endeavour-mgmt.sourceforge.net/features1.html</p>
<p>6. Redmine, http://www.redmine.org/, gantt charts, integrations with SVN, CVS, Mercurial, etc.. written in Ruby on Rails</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/different-thoughts/project-management-open-source-software/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jquery Regex Validation</title>
		<link>http://www.ecommy.com/web-development/jquery-regex-validation</link>
		<comments>http://www.ecommy.com/web-development/jquery-regex-validation#comments</comments>
		<pubDate>Wed, 17 Feb 2010 11:08:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=512</guid>
		<description><![CDATA[      
      A quick post about validating anything you want using regex. I used it in a project that created forms on the fly, so validations like email, numbers and so on wasn&#8217;t so simple (I couldn&#8217;t do it by just adding the validation as a class: class=&#8221;email&#8221;) so first step is adding what we need before [...]]]></description>
			<content:encoded><![CDATA[      
      <p>A quick post about validating anything you want using regex. I used it in a project that created forms on the fly, so validations like email, numbers and so on wasn&#8217;t so simple (I couldn&#8217;t do it by just adding the validation as a class: class=&#8221;email&#8221;)</p>
<p>so first step is adding what we need before the &lt;/head&gt;:</p>
<pre id="line1">&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.validate.pack.js"&gt;</pre>
<p>now just after the above code we add our regex method:</p>
<pre><script type="text/javascript"><!--mce:0--></script>&lt;script type="text/javascript"&gt;
$.validator.addMethod(
 "regex",
 function(value, element, regexp) {
 var check = false;
 var re = new RegExp(regexp);
 return this.optional(element) || re.test(value);
 },
 "Please check your input"
);
&lt;/script&gt;</pre>
<p>and the final thing is ading the validation we need &#8211; you can use php to add them from the database for instance:</p>
<pre><script type="text/javascript"><!--mce:1--></script>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
$("#myFieldId").rules("add", {regex: "^(0|[1-9][0-9]*|[1-9][0-9]{0,2}(,[0-9]{3,3})*)$"});
})
&lt;/script&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/jquery-regex-validation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overlength date field error in prestashop</title>
		<link>http://www.ecommy.com/web-development/overlength-date-field-error-in-prestashop</link>
		<comments>http://www.ecommy.com/web-development/overlength-date-field-error-in-prestashop#comments</comments>
		<pubDate>Sat, 12 Dec 2009 14:40:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[prestashop]]></category>

		<guid isPermaLink="false">http://www.ecommy.com/?p=481</guid>
		<description><![CDATA[      
      Recently I got this error when trying to send emails in prestashop. An email was bouncing back and it contained the following message: This message has been rejected because it has an overlength date field which can be used to subvert Microsoft mail programs After a lot of headaches and a cofee I manage to [...]]]></description>
			<content:encoded><![CDATA[      
      <p>Recently I got this error when trying to send emails in prestashop.<br />
An email was bouncing back and it contained the following message:<br />
<code>This message has been rejected because it has<br />
an overlength date field which can be used<br />
to subvert Microsoft mail programs</code></p>
<p>After a lot of headaches and a cofee <img src='http://www.ecommy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I manage to detect what was wrong:<br />
Presta uses in the email class a variable $templateVars<br />
this was like:</p>
<blockquote><p>$templateVars = array(<br />
&#8216;{date_facturare}&#8217; =&gt;<br />
&#8216;Nume Firma: &#8216;.$invoice-&gt;company.&#8217;&lt;br&gt;&#8217;.<br />
&#8216;Cod fiscal: &#8216;.$invoice-&gt;tax_code.&#8217;&lt;br&gt;&#8217;.<br />
&#8216;Registrul Comertului: &#8216;.$invoice-&gt;reg_data.&#8217;&lt;br&gt;&#8217;.<br />
&#8216;IBAN: &#8216;.$customer-&gt;iban.&#8217;&lt;br&gt;&#8217;,<br />
&#8216;CNP: &#8216;.$invoice-&gt;cnp.&#8217;&lt;br&gt;&#8217;,<br />
&#8216;{firstname}&#8217; =&gt; $customer-&gt;firstname,<br />
&#8216;{lastname}&#8217; =&gt; $customer-&gt;lastname, &#8230;</p></blockquote>
<p>However the problem was because of a , instead of .<br />
<code>'IBAN: '.$customer-&gt;iban.'&lt;br&gt;',</code><br />
should have been:<br />
<code>'IBAN: '.$customer-&gt;iban.'&lt;br&gt;'.</code></p>
<p>Because of the wrong &#8220;,&#8221;, $templateVars[0] was taking a long value and apparently Swift Mailer was appending it to the header date of the email hence the error with the overlength date field.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ecommy.com/web-development/overlength-date-field-error-in-prestashop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.ecommy.com/c/web-development/feed ) in 0.45679 seconds, on Feb 6th, 2012 at 10:41 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 6th, 2012 at 11:41 am UTC -->
