<?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>Hdeya team blog &#187; Quick Tip / Trick</title>
	<atom:link href="http://www.hdeya.com/blog/category/quick-tip-trick/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hdeya.com/blog</link>
	<description>We can make IT</description>
	<lastBuildDate>Sun, 28 Mar 2010 11:28:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sorting items on the fly (AJAX) using jQuery UI Sortable, PHP &amp; MySQL.</title>
		<link>http://www.hdeya.com/blog/2009/05/sorting-items-on-the-fly-ajax-using-jquery-ui-sortable-php-mysql/</link>
		<comments>http://www.hdeya.com/blog/2009/05/sorting-items-on-the-fly-ajax-using-jquery-ui-sortable-php-mysql/#comments</comments>
		<pubDate>Sun, 03 May 2009 17:50:32 +0000</pubDate>
		<dc:creator>Mahmoud M. Abdel-Fattah</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[PHP Tips]]></category>
		<category><![CDATA[Quick Tip / Trick]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.hdeya.com/blog/?p=162</guid>
		<description><![CDATA[While we were working on http://www.duettographics.com Administration control panel, they required the ability to sort their images in easy way, so after some googeling we find many separate tutorials for this. So, we decided to write one simple tutorial that can describe the whole thing.
In this tutorial, we&#8217;ll work on sorting menu items.
Requirements : <a [...]]]></description>
			<content:encoded><![CDATA[<p>While we were working on http://www.duettographics.com Administration control panel, they required the ability to sort their images in easy way, so after some googeling we find many separate tutorials for this. So, we decided to write one simple tutorial that can describe the whole thing.</p>
<p>In this tutorial, we&#8217;ll work on sorting menu items.</p>
<p>Requirements : <a href="http://jqueryui.com/download">sortable jQuery UI</a>, PHP &amp; MySQL server support.<span id="more-162"></span></p>
<ol>
<li>Create a new MySQL Database called `test_db` and a new table called `menu

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #990099; font-weight: bold;">IF <span style="color: #CC0099; font-weight: bold;">NOT</span> EXISTS</span> <span style="color: #008000;">`menu`</span> <span style="color: #FF00FF;">&#40;</span>
  <span style="color: #008000;">`id`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">auto_increment</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`title`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #008000;">`sort`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
  <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span>  <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`id`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span></pre></div></div>

</li>
<li>Create new php file called &#8220;menu_list.php&#8221;, this file will be our main file to sort the menu items .
<pre class="brush: php">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;Sorting Items on the fly using jQuery UI, PHP &amp; MySQL&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-ui-1.7.1.custom.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(
function() {
$(&quot;#sortme&quot;).sortable({
update : function () {
serial = $(&#039;#sortme&#039;).sortable(&#039;serialize&#039;);
$.ajax({
url: &quot;sort_menu.php&quot;,
type: &quot;post&quot;,
data: serial,
error: function(){
alert(&quot;theres an error with AJAX&quot;);
}
});
}
});
}
);
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Menu List&lt;/h1&gt;

&lt;ul id=&quot;sortme&quot;&gt;
&lt;?php
// Connecting to Database
mysql_connect($hostname, $user_name, $password) or die (&#039;Cant Connceto to MySQL&#039;);

// Selecting Database
mysql_select_db($db_name) or die (&#039;Cant select Database&#039;);

// Getting menu items from DB
$result = mysql_query(&quot;SELECT * FROM `menu` ORDER BY `sort` ASC&quot;) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
echo &#039;&lt;li id=&quot;menu_&#039; . $row[&#039;id&#039;] . &#039;&quot;&gt;&#039; . $row[&#039;title_en&#039;] . &quot;&lt;/li&gt;\n&quot;;
}
?&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</li>
<li>Create a new file for AJAX purpose to update sorting called &#8220;sort_menu.php&#8221;
<pre class="brush: php">
&lt;?php
// Connecting to Database
mysql_connect($hostname, $user_name, $password) or die (&#039;Cant Connceto to MySQL&#039;);

// Selecting Database
mysql_select_db($db_name) or die (&#039;Cant select Database&#039;);

$menu = $_POST[&#039;menu&#039;];
for ($i = 0; $i &lt; count($menu); $i++) {
mysql_query(&quot;UPDATE `menu` SET `sort`=&quot; . $i . &quot; WHERE `id`=&#039;&quot; . $menu[$i] . &quot;&#039;&quot;) or die(mysql_error());
}
?&gt;
</pre>
</li>
</ol>
<p>Finally, this should works fine with you, but If you faced any problem, leave ur comment !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hdeya.com/blog/2009/05/sorting-items-on-the-fly-ajax-using-jquery-ui-sortable-php-mysql/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Generates lightbox on the fly using jQuery</title>
		<link>http://www.hdeya.com/blog/2009/05/generates-lightbox-on-the-fly-using-jquery/</link>
		<comments>http://www.hdeya.com/blog/2009/05/generates-lightbox-on-the-fly-using-jquery/#comments</comments>
		<pubDate>Sat, 02 May 2009 15:22:03 +0000</pubDate>
		<dc:creator>Mahmoud M. Abdel-Fattah</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Quick Tip / Trick]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[on the fly]]></category>
		<category><![CDATA[thumbnails]]></category>

		<guid isPermaLink="false">http://www.hdeya.com/blog/?p=140</guid>
		<description><![CDATA[This method requires you to have  2 copies of each image, the original size &#38; thumbnail one. thumbnails MUST BE named as filename_thumb.jpg &#38; stored in /thumbs.  you must have the latest versions of <a href="code.google.com/p/jqueryjs/downloads/list">jQuery </a>&#38; <a href="http://leandrovieira.com/projects/jquery/lightbox/" target="_blank">jQuery Light Box Plugin</a>. 
then add the following javascript code to you &#60;head&#62;:

$&#40;document&#41;.ready&#40;function&#40;&#41;&#123;
    $&#40;&#34;img&#34;&#41;.each&#40;function&#40;&#41; &#123;
        var src_file = $&#40;this&#41;.attr&#40;&#34;src&#34;&#41;.split&#40;&#34;/&#34;&#41;;
        var src_file_name = src_file.pop&#40;&#41;;
        var patt1 = /_thumb.jpg/;
        var original_file_name = &#34;&#34;;
        if&#40;src_file_name.search&#40;patt1&#41; != -1&#41; &#123;
            original_file_name = src_file_name.replace&#40;/_thumb/gi, &#34;&#34;&#41;;
            $&#40;this&#41;.wrap&#40;&#34;&#38;lt;a href=\&#34;/uploads/&#34;+original_file_name+&#34;\&#34; rel=\&#34;lightbox\&#34;&#38;gt;&#38;lt;/a&#38;gt;&#34;&#41;;
        &#125;
    &#125;&#41;;
    $&#40;&#34;a[rel*=lightbox]&#34;&#41;.lightBox&#40;&#41;;
&#125;&#41;;

]]></description>
			<content:encoded><![CDATA[<p>This method requires you to have  2 copies of each image, the original size &amp; thumbnail one. thumbnails MUST BE named as <strong>filename_thumb.jpg</strong> &amp; stored in <strong>/thumbs</strong>.  you must have the latest versions of <a href="code.google.com/p/jqueryjs/downloads/list">jQuery </a>&amp; <a href="http://leandrovieira.com/projects/jquery/lightbox/" target="_blank">jQuery Light Box Plugin</a>. <span id="more-140"></span></p>
<p>then add the following javascript code to you &lt;head&gt;:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;img&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> src_file <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;src&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> src_file_name <span style="color: #339933;">=</span> src_file.<span style="color: #660066;">pop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> patt1 <span style="color: #339933;">=</span> <span style="color: #339933;">/</span>_thumb.<span style="color: #660066;">jpg</span><span style="color: #339933;">/;</span>
        <span style="color: #003366; font-weight: bold;">var</span> original_file_name <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>src_file_name.<span style="color: #660066;">search</span><span style="color: #009900;">&#40;</span>patt1<span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            original_file_name <span style="color: #339933;">=</span> src_file_name.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/_thumb/gi</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">wrap</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&amp;lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>/uploads/&quot;</span><span style="color: #339933;">+</span>original_file_name<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> rel=<span style="color: #000099; font-weight: bold;">\&quot;</span>lightbox<span style="color: #000099; font-weight: bold;">\&quot;</span>&amp;gt;&amp;lt;/a&amp;gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a[rel*=lightbox]&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">lightBox</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.hdeya.com/blog/2009/05/generates-lightbox-on-the-fly-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple jQuery Dropdowns</title>
		<link>http://www.hdeya.com/blog/2009/02/simple-jquery-dropdowns/</link>
		<comments>http://www.hdeya.com/blog/2009/02/simple-jquery-dropdowns/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 12:45:46 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Quick Tip / Trick]]></category>
		<category><![CDATA[interface]]></category>

		<guid isPermaLink="false">tag:google.com,2005:reader/item/0e27e3f3d721b99f</guid>
		<description><![CDATA[There are lots of dropdown menus already out there. I’m not really trying to reinvent the wheel here, but I wanted to try to do something slightly different by making them as dead simple as possible. Very stripped down code and minimal styling, yet ...]]></description>
			<content:encoded><![CDATA[<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/dropdownspic.jpg" alt="" width="503" height="298" /><span id="more-40"></span></p>
<p>There are lots of dropdown menus already out there. I’m not really trying to reinvent the wheel here, but I wanted to try to do something slightly different by making them as dead simple as possible. Very stripped down code and minimal styling, yet still have all the functionality typically needed. Here are the features:</p>
<ul>
<li>Cross-browser compatible (even IE 6)</li>
<li>Multi-level and retains “trail”</li>
<li>Very minimal styling (easy to adapt)</li>
<li>Very minimal JavaScript (short bit of jQuery)</li>
</ul>
<p><a href="http://css-tricks.com/examples/SimplejQueryDropdowns/">View Demo</a> <a href="http://css-tricks.com/examples/SimplejQueryDropdowns.zip">Download Files</a></p>
<p>I think it worked out pretty well. All my testing shows them working pretty well. Please let me know if you find any problems and we can try to address them. There was only really one CSS tweak needed for IE, which was to use inline-block on the submenu list items to prevent the weird spacing pseduo-line-break IE likes to do.</p>
<p>Each “level” is clearly marked in the CSS file, so it should be pretty easy to identify what is what and apply your own custom styling.</p>
<h3>hoverIntent</h3>
<p>The demo and download comes with two “versions”, one with <a href="http://plugins.jquery.com/project/hoverIntent">hoverIntent</a> and one without. I couldn’t decide which one I liked better so I just left both in. On one hand, hoverIntent is nice because it prevents the menus from opening if you just quickly mouse over them (like the mouse just happened to cross them but you clearly weren’t intending to use the menu at that time). On the other hand, it makes the menu feel a bit sluggish.</p>
<p><em><strong>ORIGINAL POST :</strong></em></p>
<p><a href="http://feedproxy.google.com/~r/CssTricks/~3/fVqY51k1GEQ/">http://feedproxy.google.com/~r/CssTricks/~3/fVqY51k1GEQ/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hdeya.com/blog/2009/02/simple-jquery-dropdowns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Common Sense SEO Checklist</title>
		<link>http://www.hdeya.com/blog/2009/02/common-sense-seo-checklist/</link>
		<comments>http://www.hdeya.com/blog/2009/02/common-sense-seo-checklist/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 12:45:26 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Quick Tip / Trick]]></category>

		<guid isPermaLink="false">tag:google.com,2005:reader/item/609e497495026148</guid>
		<description><![CDATA[DISCLAIMER: I don’t “really” know anything about SEO. What I do know is the folks at Google and other big search engines are just human beings like us who have created and constantly tweak the search algorithms. Their goal is to give us what we w...]]></description>
			<content:encoded><![CDATA[<p>DISCLAIMER: I don’t “really” know anything about SEO. What I do know is the folks at Google and other big search engines are just human beings like us who have created and constantly tweak the search algorithms. Their goal is to give us what we want when searching, the best possible websites relevant to what we are searching for. <span id="more-24"></span></p>
<p>So let’s set aside all the fancy technical stuff and just use some good ol’ common sense.</p>
<h3>1. Does this page have a good amount of honest information on it about the subject?</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/commonsense-information.png" alt="" width="570" height="100" /></p>
<p>This is, <strong>by far</strong>, the most important one by my standards. I deal with businesses all the time that want to rank higher in search engines but then don’t provide any content. If you want to be the #1 search result for “ergonomic loafers”, you better start working on a bunch of written content about ergonomic loafers. Good, honest content. Not bullsh*t marketing mumbo jumbo and not keyword-soup. You need research, what they are, why they are good, where you can buy them, every last bit of expert knowledge about ergonomic loafers you can squeeze.</p>
<h3>2. Is the information on this page well structured in the markup?</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/commonsense-markup.png" alt="" width="570" height="100" /></p>
<p>Let’s not get too technical here, but just focus on the common sense. When you “view source”, is the good content stuff right up near the top, or is it buried way down below a bunch of other non-related stuff? Are the important headers in &lt;h1&gt; tags? Is the title for the page something that makes sense?</p>
<h3>3. There aren’t any stupid cheap “tricks”</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/commonsense-notricks.png" alt="" width="570" height="100" /></p>
<p>Did your buddy tell you that you should put “paris hilton boobs” in white text on a white background at the bottom of the page so you could get people searching for that? Did you buy some service that promised to submit your sites to 3,253,313 search engines for ONLY $99.99! Did you put 500 keyword variations in your meta tags?</p>
<p>Don’t. Search engines are smarter than you. They are looking for dumb “tricks” like that and may even penalize you for them.</p>
<h3>4. Is the URL for this page clean and relevant?</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/commonsense-url.png" alt="" width="570" height="100" /></p>
<p>You are going to have a heck of an easier time ranking higher for “ergonomic loafers” if you own ergonomicloafers.com. If your page about them is at http://aligatorarmpits.com/2453/234bps.asp?stink=true &#8211; it’s going to be a lot harder. Common sense.</p>
<h3>5. If you were researching this subject, would you find this page helpful? Would YOU link to it?</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/commonsense-helpful.png" alt="" width="570" height="100" /></p>
<p>Take a step back, read the content, think about it. Put yourself in the mindset of a totally random visitor. Is this page useful? Did I learn something about the subject? If my mom emailed and wanted to know something about ergonomic loafers, would I send her this link or would I sent here somewhere better? If I was writing an article about ergonomic loafers, would I link to this?</p>
<h3>6. Is the website a reliable source of quality information?</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/commonsense-source.png" alt="" width="570" height="100" /></p>
<p>You might notice when googling, uhm, <strong>any major subject</strong>, Wikipedia articles tend to be around the top. Clearly Wikipedia has established them selves as a high quality source of information.</p>
<p>SEO compounds on itself. You will have an easier time ranking highly for a term if your site is an established and trustworthy source of information.</p>
<h3>But I did all this stuff and I still don’t rank highly?!?!</h3>
<p>Them is the knocks, kid. SEO doesn’t happen overnight. It takes a long time. Much of it is based on other sites that link back to your page, and you have no direct control over that. <strong>You just need to focus on what you do have control over</strong>, which is making your page as compelling as it can be and encourage those links.</p>
<p><em><strong>ORIGINAL POST :</strong></em></p>
<p><a title="http://feedproxy.google.com/~r/CssTricks/~3/71HJaswHnbc/" href="http://" target="_blank">http://feedproxy.google.com/~r/CssTricks/~3/71HJaswHnbc/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hdeya.com/blog/2009/02/common-sense-seo-checklist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
