<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>iGiBlog</title>
	
	<link>http://www.igiblog.cz</link>
	<description>web development, web design and programming</description>
	<lastBuildDate>Wed, 04 Apr 2012 08:46:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/igiblog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="igiblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">igiblog</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Keep order of rows while using WHERE IN () – MySQL</title>
		<link>http://www.igiblog.cz/2012/04/keep-order-of-rows-while-using-where-in-mysql/</link>
		<comments>http://www.igiblog.cz/2012/04/keep-order-of-rows-while-using-where-in-mysql/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 08:44:47 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Tutorials & guides]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=224</guid>
		<description><![CDATA[I was just solving issue, where I needed to keep an order of items returned from the MySQL database listen in the WHERE IN clause. Original query: SELECT * FROM table WHERE id IN (1,5,8,73,5,4,88) This will return rows ordered &#8230; <a href="http://www.igiblog.cz/2012/04/keep-order-of-rows-while-using-where-in-mysql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was just solving issue, where I needed to keep an order of items returned from the MySQL database listen in the WHERE IN clause.<br />
Original query:</p>
<pre>SELECT * FROM table WHERE id IN (1,5,8,73,5,4,88)</pre>
<p>This will return rows ordered by its primary key (in my case column <strong>id</strong>). Here is updated query, which will keep order of items listed in WHERE IN clause:</p>
<pre>SELECT * FROM table WHERE id IN (1,5,8,73,5,4,88) ORDER BY (id,1,5,8,73,5,4,88)</pre>
<p>Please note first item in brackets behind ORDER BY &#8211; there should be set same column, which was used at WHERE IN clause.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2012/04/keep-order-of-rows-while-using-where-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get rid of scrollbars in Facebook canvas application</title>
		<link>http://www.igiblog.cz/2012/03/get-rid-of-scrollbars-in-facebook-canvas-application/</link>
		<comments>http://www.igiblog.cz/2012/03/get-rid-of-scrollbars-in-facebook-canvas-application/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 13:08:30 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=219</guid>
		<description><![CDATA[First of all, make sure, that you have correct settings in Your Facebook app setup. To check it, go to: https://developers.facebook.com/apps on the left side choose You app than on the top right click on &#8220;Edit App&#8221; button On the left &#8230; <a href="http://www.igiblog.cz/2012/03/get-rid-of-scrollbars-in-facebook-canvas-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>First of all, make sure, that you have correct settings in Your Facebook app setup. To check it, go to: <a title="Facebook developers - Applications" href="https://developers.facebook.com/apps" target="_blank">https://developers.facebook.com/apps</a></p>
<ol>
<li>on the left side choose You app</li>
<li>than on the top right click on &#8220;Edit App&#8221; button</li>
<li>On the left should be choosen: Settings -&gt; Basic</li>
<li>Go down into the section called: &#8220;Select how your app integrates with Facebook&#8221;</li>
<li>Find setup for Page Tab and check if you have set correct width of used app layout (mine was 520px)</li>
<li>Save changes, if anything changed</li>
<li>Than on the left choose Settings -&gt; Advanced</li>
<li>In the section &#8220;Canvas Settings&#8221; should be following setup for canvas height: <strong>fluid</strong></li>
</ol>
<div><span style="font-size: small;"><span style="line-height: 24px;"><strong><span id="more-219"></span></strong></span></span></div>
<p>If above described setup is ok, than we have to fix it in our application. It is simple, with two code snippets. Just add following before &lt;/body&gt; tag (If You are not using Facebook init script already):</p>
<pre>
&lt;script type=&quot;text/javascript&quot; src=&quot;http://connect.facebook.net/en_US/all.js&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[
	FB.init({
		appId : &#039;399179393429469&#039;,
		status : true, // check login status
		cookie : true, // enable cookies to allow the server to access the session
		xfbml : true // parse XFBML
	});
// ]]&gt;&lt;/script&gt;
</pre>
<p>And put this code just before closing tag </head>:</p>
<pre>
  &lt;script type=&quot;text/javascript&quot;&gt;
	window.fbAsyncInit = function() {
		FB.Canvas.setSize();
	}
	function sizeChangeCallback() {
		FB.Canvas.setSize();
	}
	&lt;/script&gt;
</pre>
<p>Now, If your page is coded correctly into desired width, You should not see scrollbars anymore in it.<br />
Hope it helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2012/03/get-rid-of-scrollbars-in-facebook-canvas-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How get Facebook profile ID (uid) when using vanity URL</title>
		<link>http://www.igiblog.cz/2012/02/how-get-facebook-profile-id-uid-when-using-vanity-url/</link>
		<comments>http://www.igiblog.cz/2012/02/how-get-facebook-profile-id-uid-when-using-vanity-url/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 09:36:51 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Social networking]]></category>
		<category><![CDATA[Tutorials & guides]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook apps]]></category>
		<category><![CDATA[facebook profile]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=215</guid>
		<description><![CDATA[When You are working with facebook apps, you do need sometimes to add administrators or moderators to Your application. If selected person is not in Your friend list, You cannot add him to the list using auto-suggest box. Thats the &#8230; <a href="http://www.igiblog.cz/2012/02/how-get-facebook-profile-id-uid-when-using-vanity-url/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When You are working with facebook apps, you do need sometimes to add administrators or moderators to Your application. If selected person is not in Your friend list, You cannot add him to the list using auto-suggest box. Thats the moment, when You will need to know user`s facebook profile id (uid). Real problem is coming when user is using Facebook vanity URL for his/her profile (like www.facebook.com/some.selected.vanity.url).<span id="more-215"></span></p>
<p>The easiest way, how to get his/her UID  is to load user`s facebook profile and right click his/her main profile image and select <strong>Inspect element </strong>in submenu. It will open Your Firebug or browser/DOM inspector (new Firefox or Chrome). In the inspector, You should see and URL of image. What I found out, is, that user`s facebook profile ID is second number in the photo name. Mine was like this: 157184_<strong>1317732574</strong>_574480779_n.jpg</p>
<p>If You are using Facebook timeline, You could check Facebook profile ID also from the bigger profile picture. In my case it was third number: 425232_3326820732162_<strong>1317732574</strong>_3347250_1064723857_n.jpg</p>
<p>The easiest way, how to check, if the number is correct is to add selected number behind this URL and load it in the broswer:</p>
<blockquote><p>https://www.facebook.com/profile.php?id=<strong>AddYourNumberHere</strong></p></blockquote>
<p>If You will want to add more moderators or admins into Your facebook app using these IDs, just find out all of them and insert them into text input separated with comma without spaces. Facebook will handle this numbers and it will add selected profiles into the list of moderators automatically (than just hit Save button at the bottom of the moderation setup dialog/page).</p>
<p>Hope it will help You <img src='http://www.igiblog.cz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2012/02/how-get-facebook-profile-id-uid-when-using-vanity-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate random birth date in MySQL table and get Age by select</title>
		<link>http://www.igiblog.cz/2011/07/generate-random-birth-date-in-mysql-table-and-get-age-by-select/</link>
		<comments>http://www.igiblog.cz/2011/07/generate-random-birth-date-in-mysql-table-and-get-age-by-select/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 12:51:54 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP & MySQL]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=204</guid>
		<description><![CDATA[Today I was solving generating of random data for testing and manipulation with the date of the birth. Here are two simple SQL queries solving both: Query for generate random date of birth in whole table UPDATE people SET date_of_birth=CONCAT_WS('-',(FLOOR( &#8230; <a href="http://www.igiblog.cz/2011/07/generate-random-birth-date-in-mysql-table-and-get-age-by-select/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I was solving generating of random data for testing and manipulation with the date of the birth.</p>
<p>Here are two simple SQL queries solving both:</p>
<p><strong>Query for generate random date of birth in whole table</strong></p>
<pre>UPDATE

people

SET

date_of_birth=CONCAT_WS('-',(FLOOR( 1900 + RAND( ) *100)),(FLOOR( 1 + RAND( ) *12 )),(FLOOR( 1 + RAND( ) *28 )))</pre>
<p><strong>Query for selecting date of birth and calculation of age in MySQL:</strong></p>
<p><strong></strong>
<pre>SELECT
date_of_birth,
DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(date_of_birth, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') &lt; DATE_FORMAT(date_of_birth, '00-%m-%d')) AS age
FROM people</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2011/07/generate-random-birth-date-in-mysql-table-and-get-age-by-select/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco VPN on Windows 7 64bit</title>
		<link>http://www.igiblog.cz/2011/06/cisco-vpn-on-windows-7-64bit/</link>
		<comments>http://www.igiblog.cz/2011/06/cisco-vpn-on-windows-7-64bit/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 15:09:46 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=201</guid>
		<description><![CDATA[I just got to project, which is hosted on server, where the developers has to connect via Cisco VPN to upload stuff or access SSH. Problem is, that Cisco is unable to create client, which would run with no troubles &#8230; <a href="http://www.igiblog.cz/2011/06/cisco-vpn-on-windows-7-64bit/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just got to project, which is hosted on server, where the developers has to connect via Cisco VPN to upload stuff or access SSH. Problem is, that <strong>Cisco is unable</strong> to create client, which would run with no troubles on <strong>Windows 7 64bit</strong>!!! Solution is quiet simple:<span id="more-201"></span></p>
<p>When You download and start installation of the client (mine was: vpnclient-winx64-msi-5.0.07.0290-k9.exe), You can start installation, but in one of the first steps will error occur:</p>
<blockquote><p><strong>installation ended prematurely because of an error</strong></p></blockquote>
<p>Fix which worked for me was following:</p>
<ol>
<li>Delete whole registry key (better do backup first, by right-click this key and select Export): <strong>HKEY_CURRENT_USER\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}</strong></li>
<li>Start commnad line as an administrator and type: <strong>regsvr32 c:\windows\syswow64\vbscript.dll</strong></li>
<li>Start installation again and it should work</li>
<li>Restart your machine after install when promted</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2011/06/cisco-vpn-on-windows-7-64bit/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Joomla: get category ID in template</title>
		<link>http://www.igiblog.cz/2011/05/joomla-get-category-id-in-template/</link>
		<comments>http://www.igiblog.cz/2011/05/joomla-get-category-id-in-template/#comments</comments>
		<pubDate>Mon, 16 May 2011 10:36:11 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=191</guid>
		<description><![CDATA[I just needed to specify special layout for the articles of selected categories. I was looking for some solution online, but none of them worked. Mostly you can find this: JRequest::getInt('catid'); or JRequest::getInt('catid', '', 'get'); Maybe they worked in some &#8230; <a href="http://www.igiblog.cz/2011/05/joomla-get-category-id-in-template/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just needed to specify special layout for the articles of selected categories. I was looking for some solution online, but none of them worked. Mostly you can find this:</p>
<pre>JRequest::getInt('catid');</pre>
<p>or</p>
<pre>JRequest::getInt('catid', '', 'get');</pre>
<p><span id="more-191"></span></p>
<p>Maybe they worked in some other version of Joomla, but only working code I found is this (little modified by me to return integer values):</p>
<pre>

function getCategory() {
$iId = JRequest::getVar('id',0);
$database = &amp;JFactory::getDBO();
if(JRequest::getVar('view', 0) == "section"){
return (int) JRequest::getVar( 'id', 0);
}else if(Jrequest::getVar( 'view', 0) == "category"){
$sql = "SELECT id FROM #__categories WHERE id = '$iId'";
$database-&gt;setQuery( $sql );
$row=$database-&gt;loadResult();
return (int) $row;
}else if(Jrequest::getVar('view', 0) == "article"){
$temp = explode(":",JRequest::getVar('id',0));
$sql = "SELECT catid FROM #__content WHERE id = ".$temp[0];
$database-&gt;setQuery( $sql );
$row=$database-&gt;loadResult();
return (int) $row;
}
}
$categoryId = getCategory();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2011/05/joomla-get-category-id-in-template/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Magento: Changing Tax class on all products</title>
		<link>http://www.igiblog.cz/2011/05/magento-changing-tax-class-on-all-products/</link>
		<comments>http://www.igiblog.cz/2011/05/magento-changing-tax-class-on-all-products/#comments</comments>
		<pubDate>Tue, 03 May 2011 23:14:27 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[tax]]></category>
		<category><![CDATA[tax-class]]></category>
		<category><![CDATA[tax_class_id]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=183</guid>
		<description><![CDATA[I was just asked to update tax classes on products in the catalogue. I found a easy and fast solution. Connect to your database and find the table called: yourStorePrefix_eav_attribute and find row containing name of attribute: tax_class_id (this may differ &#8230; <a href="http://www.igiblog.cz/2011/05/magento-changing-tax-class-on-all-products/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was just asked to update tax classes on products in the catalogue. I found a easy and fast solution.<span id="more-183"></span></p>
<p>Connect to your database and find the table called: yourStorePrefix_eav_attribute and find row containing name of attribute: tax_class_id <strong>(this may differ in some versions/installations of magento!) </strong>- mine had ID: <strong>81</strong></p>
<p>Now we have to find out what value is assigned to the prefered tax class, which we want assign to all products. You can find it out in the table called: yourStorePrefix_tax_class. Mine was: <strong>2</strong></p>
<p>Than go to you sql query editor and run the following command:</p>
<pre>UPDATE yourStorePrefix_catalog_product_entity_int SET value=2 WHERE attribute_id=81</pre>
<p><strong>P.S.: Do not forget to renew all cache and rebuild all catalogue indexes &#8211; otherwise this change will not work on frontend!</strong></p>
<p>That`s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2011/05/magento-changing-tax-class-on-all-products/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOLVED: Magento keeps logging out from administration</title>
		<link>http://www.igiblog.cz/2011/01/solved-magento-keeps-logging-out-from-administration/</link>
		<comments>http://www.igiblog.cz/2011/01/solved-magento-keeps-logging-out-from-administration/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 21:33:26 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[logging out]]></category>
		<category><![CDATA[logout]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=173</guid>
		<description><![CDATA[I just spent couple of hours by finding out, why is my Magento administration logging me out after moving my Magento store to new server. I found many hacks, modification and setup tips on the Google, but anything helped to &#8230; <a href="http://www.igiblog.cz/2011/01/solved-magento-keeps-logging-out-from-administration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just spent couple of hours by finding out, why is my Magento administration logging me out after moving my Magento store to new server. I found many hacks, modification and setup tips on the Google, but anything helped to me.<span id="more-173"></span>This caused also dysfunction of the part of the administration, like image upload or switching among different parts of the Magento administration. Solution in my case was quiet easy, but hard to find:</p>
<p>I am using Suhosin php extension and I had to change one of the config values from:</p>
<pre>suhosin.session.encrypt = On</pre>
<p>to:</p>
<pre>suhosin.session.encrypt = Off</pre>
<p>This solved my whole problem with sessions. Hope it helps to you too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2011/01/solved-magento-keeps-logging-out-from-administration/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>SOLVED: Firefox – list of opened tabs with thumbnails?</title>
		<link>http://www.igiblog.cz/2010/08/solved-firefox-list-of-opened-tabs-with-thumbnails/</link>
		<comments>http://www.igiblog.cz/2010/08/solved-firefox-list-of-opened-tabs-with-thumbnails/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 08:27:20 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[tabs]]></category>
		<category><![CDATA[thumbnails]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/?p=159</guid>
		<description><![CDATA[Previously I wrote about a hidden feature of Firefox, which I accidentally found while browsing some specific  web-pages (more here). Today I found a solution how to enable this feature for any case. It is so simple Just open new &#8230; <a href="http://www.igiblog.cz/2010/08/solved-firefox-list-of-opened-tabs-with-thumbnails/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Previously I wrote about a hidden feature of Firefox, which I accidentally found while browsing some specific  web-pages (<a href="http://www.igiblog.cz/2010/05/hidden-firefox-feature-list-of-opened-tabs-with-thumbnails/">more here</a>).</p>
<p>Today I found a solution how to enable this feature for any case. It is so simple <img src='http://www.igiblog.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-159"></span><br />
Just open new tab in your Firefox browser and type:</p>
<pre>
about:config
</pre>
<p>Than just confirm the dialog, that you will be careful on this page and you will get to the Firefox config page, where you can edit almost any Firefox feature.<br />
Find this value:</p>
<pre>
browser.ctrlTab.previews
</pre>
<p>and set it to <strong>true</strong><br />
That`s it! <img src='http://www.igiblog.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now you can close config window and your keyboard shortcuts: Ctrl+Tab &amp; Ctrl+Shift+Tab will get new dimension <img src='http://www.igiblog.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It works as follow:</p>
<ul>
<li>If You hit Ctrl+Tab quickly it will browse your tabs as default &#8211; immediately switch into last viewed tab</li>
<li>If You hold Ctrl and continuously click Tab button it shows you just small previews of tabs (I can see only 6 of them) &#8211; from this preview windows is also one of the options how to get to large tabs preview, where you can see all opened tabs at once &#8211; it can be done by activation button: &#8220;Show all XY tabs&#8221; (by navigating via Tab or by clicking button with mouse cursor)</li>
<li>Last option is to use shortcut Crtl+Shift+Tab &#8211; this will navigate you directly into iLayer with all opened tabs listed. At the moment when this large list will appear, you can also start typing name of the tab you are looking for and Fireox will filter them out for you.</li>
</ul>
<p style="text-align: center;"><a rel="lightbox" href="http://www.igiblog.cz/wp-content/uploads/tabs-thumbnails-firefox.jpg"><img class="aligncenter size-medium wp-image-135" title="tabs-thumbnails-firefox" src="http://www.igiblog.cz/wp-content/uploads/tabs-thumbnails-firefox-300x215.jpg" alt="Thumbnails of opened tabs in Firefox with search box" width="300" height="215" /></a></p>
<p>By this I also closed and issue in bugzilla (mentioned in previous article), because it is solved now. Enjoy! <img src='http://www.igiblog.cz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2010/08/solved-firefox-list-of-opened-tabs-with-thumbnails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps API &amp; PHP+MySQL – working with radius and distance</title>
		<link>http://www.igiblog.cz/2010/06/google-maps-api-phpmysql-working-with-radius-and-distance/</link>
		<comments>http://www.igiblog.cz/2010/06/google-maps-api-phpmysql-working-with-radius-and-distance/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 15:13:26 +0000</pubDate>
		<dc:creator>Lukáš Gavenda</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[Tutorials & guides]]></category>
		<category><![CDATA[gmaps]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.igiblog.cz/2010/06/google-maps-api-phpmysql-working-with-radius-and-distance-2/</guid>
		<description><![CDATA[I needed to find out how to work with Google Geo API in my last project and especially with calculating a radius and distance between two geo points. Another goal was to get a latitude and longtitude from the address &#8230; <a href="http://www.igiblog.cz/2010/06/google-maps-api-phpmysql-working-with-radius-and-distance/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I needed to find out how to work with Google Geo API in my last project and especially with calculating a radius and distance between two geo points. Another goal was to get a latitude and longtitude from the address typed in the register form (in the background). Finally it was quiet easy. Here is the solution:<span id="more-152"></span>First of all I had to collect geo data from the registering users, so that I could store their latitude and longitude from their address typed into the register form. As long as I had more fields presenting an address I had to merge data to one single string and send them to Google GEO API, which sends me a response with complete address including latitude and longitude and much more data than I expected. But I will get to this response later. Now I will show You how I collect data from the register form and send them to Google GEO API.</p>
<p>Lets say, that I have following form:</p>
<pre>
&lt;form action=&quot;#&quot; method=&quot;post&quot;&gt;
		&lt;input id=&quot;googleCity&quot; name=&quot;googleCity&quot; type=&quot;hidden&quot; /&gt;
		&lt;input id=&quot;googleDistinct&quot; name=&quot;googleDistinct&quot; type=&quot;hidden&quot; /&gt;
		&lt;input id=&quot;googleCountry&quot; name=&quot;googleCountry&quot; type=&quot;hidden&quot; /&gt;
		&lt;input id=&quot;googleCompleteAddress&quot; name=&quot;googleCompleteAddress&quot; type=&quot;hidden&quot; /&gt;
		&lt;input id=&quot;googleLatitude&quot; name=&quot;googleLatitude&quot; type=&quot;hidden&quot; /&gt;
		&lt;input id=&quot;googleLongtitude&quot; name=&quot;googleLongtitude&quot; type=&quot;hidden&quot; /&gt;
		&lt;input id=&quot;googleStatus&quot; name=&quot;googleStatus&quot; type=&quot;hidden&quot; /&gt;
&lt;!-- Some other fields like name etc. --&gt;
	&lt;label for=&quot;street&quot;&gt;
		&lt;input id=&quot;street&quot; name=&quot;street&quot; type=&quot;text&quot; /&gt;
	&lt;/label&gt;
	&lt;label for=&quot;city&quot;&gt;
		&lt;input id=&quot;city&quot; name=&quot;city&quot; type=&quot;text&quot; /&gt;
	&lt;/label&gt;
	&lt;label for=&quot;zip&quot;&gt;
		&lt;input id=&quot;zip&quot; name=&quot;zip&quot; type=&quot;text&quot; /&gt;
	&lt;/label&gt;
&lt;!-- Some other fields like email etc.--&gt;
		&lt;input type=&quot;submit&quot; value=&quot;Register&quot; /&gt;
&lt;/form&gt;
</pre>
<p>Now I have to parse typed values by user into the javascript code, which will immidiately send this string into Google Maps API. This part of code is fit for a jQuery library and You have to also include Google Maps API with Your API key which can be genarated on <a href="http://code.google.com/intl/cs/apis/maps/signup.html" title="Page where You can generate Your Google Maps API key for Your web application">Google Maps API Sign Up page</a>.<br />
Here is the basic code for loading all neccessary libraries:</p>
<pre>
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi?key=HereGoesYourGoogleMapsApiKeyGeneratedOnLinkAbove&quot;&gt;&lt;/script&gt;
            &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
                    google.load(&quot;maps&quot;, &quot;2.x&quot;);
                    google.load(&quot;jquery&quot;, &quot;1.4.2&quot;);
              &lt;/script&gt;
</pre>
<p>Now I will type some code, which will handle typed strings into the form and send them to Google Maps API. Here is the code:</p>
<pre>
    $(document).ready(function(){
      var geo = new GClientGeocoder();
//live function checks all the time fields street, city and zip for their blur action, at this moment it tries to get Geo data from Google - in regular way it should take max. 3 calls to Google
            $("input#street,input#city,input#zip").live("blur", function(){
//here is being built a variable including data from all address fields
                var address = $('input#frmregisterUserForm-ulice').val() + ', '+ $('input#frmregisterUserForm-cisloPopisne').val() + ', ' + $('input#frmregisterUserForm-mesto').val();
//let`s send complete address to Google and try to request data from API
                geo.getLocations(address, function (result){
                    statusCode = result.Status.code;
                    if (statusCode &#038;&#038; statusCode == '200') {
//status code 200 means, that response is OK and Google found the place I was looking for and it returns me all data I want - so I will store them into hidden fields inside form defined above
                        $("input#googleDistinct").val( result.Placemark[0].AddressDetails.Country.AdministrativeArea.AdministrativeAreaName );
                        $("input#googleCity").val( result.Placemark[0].AddressDetails.Country.AdministrativeArea.Locality.LocalityName );
                        $("input#googleCountry").val( result.Placemark[0].AddressDetails.Country.CountryName );
                        $("input#googleCompleteAddress").val( result.Placemark[0].address );
                        $("input#googleLongitude").val( geocode[0] );
                        $("input#googleLatitude").val( geocode[1] );
                        $("input#googleStatus").val( result.Status.code );
                    } else {
                        $("input#frmregisterUserForm-googleStatus").val( result.Status.code );
                    }
                });
            });
    });
</pre>
<p>As You can see, if You will provide to google just the partial address, Google Maps API will return to You complete address incl. distinct, country and much more information about this location incl. coordinates of that place &#8211; what we wanted the most.</p>
<pre>
_xdc_._0g7bwexyl &#038;&#038; _xdc_._0g7bwexyl( {
  "name": "Václavské náměstí, 1, Praha",
  "Status": {
    "code": 200,
    "request": "geocode"
  },
  "Placemark": [ {
    "id": "p1",
    "address": "Václavské náměstí 846/1, 110 00 Praha 1-Nové Město, Česká republika",
    "AddressDetails": {
   "Accuracy" : 8,
   "Country" : {
      "AdministrativeArea" : {
         "AdministrativeAreaName" : "Hlavní město Praha",
         "SubAdministrativeArea" : {
            "Locality" : {
               "DependentLocality" : {
                  "DependentLocalityName" : "Nové Město",
                  "PostalCode" : {
                     "PostalCodeNumber" : "110 00"
                  },
                  "Thoroughfare" : {
                     "ThoroughfareName" : "Václavské náměstí 846/1"
                  }
               },
               "LocalityName" : "Praha 1"
            },
            "SubAdministrativeAreaName" : "Praha"
         }
      },
      "CountryName" : "Česká republika",
      "CountryNameCode" : "CZ"
   }
},
    "ExtendedData": {
      "LatLonBox": {
        "north": 50.0873298,
        "south": 50.0810346,
        "east": 14.4271808,
        "west": 14.4208856
      }
    },
    "Point": {
      "coordinates": [ 14.4240332, 50.0841822, 0 ]
    }
  } ]
}
 )
</pre>
<p>Now I must store all these data into the database. I will not describe here some main procedure of how to insert some data into the <a href="http://www.mysql.org" title="MySQL database official website">MySQL database</a>. But I will describe how get closest places stored in the database from the defined coordinates.</p>
<p>I will describe this procedure in the next article <img src='http://www.igiblog.cz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.igiblog.cz/2010/06/google-maps-api-phpmysql-working-with-radius-and-distance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

