<?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>Serge&#039;s Technology View &#187; menalto</title>
	<atom:link href="http://blog.dragonsoft.us/tag/menalto/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dragonsoft.us</link>
	<description>Talk about Technologies, Software Architecture and Management</description>
	<lastBuildDate>Tue, 31 Jan 2012 01:43:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to add key navigation to your web-site</title>
		<link>http://blog.dragonsoft.us/2010/04/08/how-to-add-key-navigation-to-your-web-site/</link>
		<comments>http://blog.dragonsoft.us/2010/04/08/how-to-add-key-navigation-to-your-web-site/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 05:41:46 +0000</pubDate>
		<dc:creator>Serguei Dosyukov</dc:creator>
				<category><![CDATA[Web-design]]></category>
		<category><![CDATA[Gallery 3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[keyboard navigation]]></category>
		<category><![CDATA[keydown]]></category>
		<category><![CDATA[keydown event]]></category>
		<category><![CDATA[menalto]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=1134</guid>
		<description><![CDATA[This is probably an old topic which still raises here and there. Day ago while waiting for delayed flight on United, I was doing some follow up on the discussion about my Theme for Gallery 3 and was asked if I &#8230; <a href="http://blog.dragonsoft.us/2010/04/08/how-to-add-key-navigation-to-your-web-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is probably an old topic which still raises here and there.</p>
<p>Day ago while waiting for delayed flight on United, I was doing some follow up on the discussion about <a href="http://gallery.menalto.com/node/91519">my Theme for Gallery 3</a> and was asked if I could add support for Keyboard navigation.</p>
<p>In general, it is easy topic, especially when jQuery is supported for the web-site.</p>
<p>An objective is to allow visitor use keyboard to navigate. In my case it is applied to Gallery pagination enabling use of Left/Right/Up keys to move between photos or album pages.</p>
<p>While being simple in implementation, it adds a convenience for the end user enabling keyboard navigation versus mouse clicks.</p>
<p>So let&#8217;s add it&#8230;</p>
<p>First, we need some &#8220;anchors&#8221; on the page to find dynamically what our keys would do when pressed.</p>
<p>In case of my theme, I have paginator control allowing user navigate first/prev/next/last or go level up in the gallery structure (small arrow buttons/links), but it could be anything.</p>
<p>If we are to be W3C-friendly, then &lt;link&gt; tag in the header is more appropriate, but I am not going to use it in the example below. So let&#8217;s assume we have 5 links as following</p>
<pre class="brush: xml; title: ; notranslate">&lt;a title=&quot;First (Ctrl+Left)&quot; id=&quot;g-navi-first&quot; href=&quot;/first.html&quot;&gt;First&lt;/a&gt;
&lt;a title=&quot;Prev (Left)&quot; id=&quot;g-navi-prev&quot; href=&quot;/prev.html&quot;&gt;Prev&lt;/a&gt;
&lt;a title=&quot;Parent (Ctrl+Up)&quot; id=&quot;g-navi-parent&quot; href=&quot;/parent.html&quot;&gt;Parent&lt;/a&gt;
&lt;a title=&quot;Next (Right)&quot; id=&quot;g-navi-next&quot; href=&quot;/next.html&quot;&gt;Next&lt;/a&gt;
&lt;a title=&quot;Last (Ctrl+Right)&quot; id=&quot;g-navi-last&quot; href=&quot;/last.html&quot;&gt;Last&lt;/a&gt;</pre>
<p>As you can see we have 5 different actions to take and we have selected key combinations we are going to use.<br />
Code above by itself, would only work with mouse click.<br />
What we need next is very small jQuery code to bring life into it and add desired keyboard sensitivity.<br />
<em>Please notice that it would override default arrow key based scroll support of the browser. So if you want to keep both then simply adjust code below to your liking.</em></p>
<p>There goes the code. Simply dump it into JS file and add reference in your page:</p>
<pre class="brush: jscript; title: ; notranslate">/**
*
* Copyright (c) 2010 Serguei Dosyukov, http://blog.dragonsoft.us
*
*/
$.fn.KbdNavigation = function() {
  $(this).bind(&quot;keydown&quot;, function(event) {
    var lnk = &quot;&quot;;
    var lnk_first, lnk_prev, lnk_parent, lnk_next, lnk_last;
    lnk_first  = $(&quot;#g-navi-first&quot;).attr(&quot;href&quot;);
    lnk_prev   = $(&quot;#g-navi-prev&quot;).attr(&quot;href&quot;);
    lnk_parent = $(&quot;#g-navi-parent&quot;).attr(&quot;href&quot;);
    lnk_next   = $(&quot;#g-navi-next&quot;).attr(&quot;href&quot;);
    lnk_last   = $(&quot;#g-navi-last&quot;).attr(&quot;href&quot;);
   
    switch(event.keyCode) {
      case 0x25: // Ctr+Left/Left
        if(event.ctrlKey) { lnk = lnk_first; } else { lnk = lnk_prev; }
        break; 
      case 0x26: // Ctrl+Up
        if(event.ctrlKey) { lnk = lnk_parent; }
        break;
      case 0x27: // Ctrl+Right/Right
        if(event.ctrlKey) { lnk = lnk_last; } else { lnk = lnk_next; }
        break; 
    }
   
    if(lnk) {
      window.location = lnk;
      return true;
    }
   
    return true;
  });
}
$(document).ready( function() {
  $(document).KbdNavigation({});
});</pre>
<hr/><span style="font-size: 7pt">Copyright &copy; 2012 <strong><a href="http://blog.dragonsoft.us">Serge&#039;s Technology View</a></strong>. This Feed is for personal non-commercial use only.</span>]]></content:encoded>
			<wfw:commentRss>http://blog.dragonsoft.us/2010/04/08/how-to-add-key-navigation-to-your-web-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP, MySQL and error &#8220;2006: MySQL server has gone away&#8221;</title>
		<link>http://blog.dragonsoft.us/2010/03/24/php-mysql-and-error-2006-mysql-server-has-gone-away/</link>
		<comments>http://blog.dragonsoft.us/2010/03/24/php-mysql-and-error-2006-mysql-server-has-gone-away/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 05:34:07 +0000</pubDate>
		<dc:creator>Serguei Dosyukov</dc:creator>
				<category><![CDATA[Web-design]]></category>
		<category><![CDATA[enable reconnect]]></category>
		<category><![CDATA[error 2006]]></category>
		<category><![CDATA[Gallery 3]]></category>
		<category><![CDATA[menalto]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[MySQL server has gone away]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=1129</guid>
		<description><![CDATA[As a hobby I like to do little photography. Same time I do not like to give my photos to someone else to host, so I have my gallery. It runs on Menalto&#8217;s Gallery 3 engine &#8211; nice, open source, &#8230; <a href="http://blog.dragonsoft.us/2010/03/24/php-mysql-and-error-2006-mysql-server-has-gone-away/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As a hobby I like to do little photography.</p>
<p>Same time I do not like to give my photos to someone else to host, so I have my gallery.</p>
<p>It runs on Menalto&#8217;s Gallery 3 engine &#8211; nice, open source, PHP based with MySQL back-end.</p>
<p>Not my primary programming language, but allows me to host and enhance my blog, keep my gallery and small web-site.</p>
<p>Last night, while bringing some old photos over from my backup gallery (G3 is still under development and I do not want to recreate gallery if anything to happen, and it did &#8211; I killed the setup&#8230;), I noticed that import process start to fail. Several attempts to recover did not give much of the progress and I went digging error logs.</p>
<div>
<p>Well,.. I learned something interesting. I am not a PHP programmer, at least it is not that I do for living, or not at this time&#8230; but even doing simple house work forces you learn things <img src='http://blog.dragonsoft.us/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
G3 runs on Kohana framework and there is a wrapper for DB access.</p>
<p>What happend was that some of the SQL requests began timing out</p>
<blockquote><p>Database_Exception [ 44 ]: #2006: MySQL server has gone away</p></blockquote>
<p>In case when queries are not optimal, one has to learn how to manage PHP&#8230; through php.ini&#8230;</p>
<p>MySQL timeout related errors are &#8220;fixed&#8221; by telling mysql to reconnect&#8230; and for that &#8220;tricks&#8221; are handy&#8230;<br />
From browsing, reading, browsing, filtering, &#8230; while waiting for G2 Import I have found a solution which lead me <a href="http://www.php.net/manual/en/ini.list.php" target="_blank">here</a>. One of interest is called <strong>mysqli.reconnect</strong>. Little magic - simply adding the following line in PHP.INI would tell MySQL reconnect.</p>
<blockquote><p>mysqli.reconnect=1</p></blockquote>
<p>It may be still slow, but at least connection would recover gracefully.</p>
<p>We can talk about code styles, code protection and error handling, but line above is a hidden gold on the end of the rainbow called PHP.</p>
</div>
<hr/><span style="font-size: 7pt">Copyright &copy; 2012 <strong><a href="http://blog.dragonsoft.us">Serge&#039;s Technology View</a></strong>. This Feed is for personal non-commercial use only.</span>]]></content:encoded>
			<wfw:commentRss>http://blog.dragonsoft.us/2010/03/24/php-mysql-and-error-2006-mysql-server-has-gone-away/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Menalto&#8217;s Gallery 2.3 has been released</title>
		<link>http://blog.dragonsoft.us/2008/10/26/menaltos-gallery-23-has-been-released/</link>
		<comments>http://blog.dragonsoft.us/2008/10/26/menaltos-gallery-23-has-been-released/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 19:20:43 +0000</pubDate>
		<dc:creator>Serguei Dosyukov</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web-design]]></category>
		<category><![CDATA[cooliris]]></category>
		<category><![CDATA[danny thorpe]]></category>
		<category><![CDATA[gallery 2]]></category>
		<category><![CDATA[menalto]]></category>
		<category><![CDATA[piclens]]></category>
		<guid isPermaLink="false">http://blog.dragonsoft.us/?p=537</guid>
		<description><![CDATA[If you ever visited my photo gallery, you  may noticed that it runs on Menalto&#8217;s Gallery 2 engine. With recent release of 2.3 version, I have updated my installation as well. Few bug fixes may not worth mentioning, but noticeable &#8230; <a href="http://blog.dragonsoft.us/2008/10/26/menaltos-gallery-23-has-been-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you ever visited <a href="http://gallery.dragonsoft.us/" target="_blank">my photo gallery</a>, you  may noticed that it runs on <a href="http://gallery.menalto.com/" target="_blank">Menalto&#8217;s Gallery 2</a> engine.</p>
<p>With recent release of 2.3 version, I have updated my installation as well.</p>
<p>Few bug fixes may not worth mentioning, but noticeable change is in slide show plug-in. Starting this version slide show uses <a href="http://www.cooliris.com/" target="_blank">Cooliris&#8217;s PicLens</a>. You can see a <a href="http://gallery.dragonsoft.us/main.php?g2_view=slideshow.Slideshow&amp;g2_itemId=344" target="_blank">sample here</a>.</p>
<p>Why would I want to mention it?</p>
<p>Aside from being nice piece of software, CoolIris was a place where Danny Thorpe was working for <a href="http://dannythorpe.com/about2/" target="_blank">some time</a>.</p>
<p>&#8220;Was&#8221; because Danny is back at Microsoft (see some notes in his blog above).</p>
<hr/><span style="font-size: 7pt">Copyright &copy; 2012 <strong><a href="http://blog.dragonsoft.us">Serge&#039;s Technology View</a></strong>. This Feed is for personal non-commercial use only.</span>]]></content:encoded>
			<wfw:commentRss>http://blog.dragonsoft.us/2008/10/26/menaltos-gallery-23-has-been-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

