<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2170691811164207225</atom:id><lastBuildDate>Wed, 06 Nov 2024 02:51:04 +0000</lastBuildDate><category>Programming</category><title>My little programming diary</title><description>coding, tutorials, thoughts</description><link>http://nasko7.blogspot.com/</link><managingEditor>noreply@blogger.com (Nasko)</managingEditor><generator>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-3119645709345066927</guid><pubDate>Sat, 24 Mar 2012 21:43:00 +0000</pubDate><atom:updated>2012-03-25T22:55:39.071+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>How to install vQmod on OpenCart?</title><description>&lt;span style=&quot;background-color: white; font-family: arial, sans-serif; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;What is vQmod?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 16px;&quot;&gt;&quot;&lt;a href=&quot;http://code.google.com/p/vqmod/&quot; target=&quot;_blank&quot;&gt;vQmod&lt;/a&gt;™&quot; (aka Virtual Quick Mod) is an override system designed to avoid having to change core files. The concept is quite simple... Instead of making changes to the core files directly, the changes are created as xml search/replace script files.&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/blockquote&gt;
&lt;br /&gt;
For example instead to change the template&#39;s header file&amp;nbsp;&lt;strong&gt;catalog/view/theme/default/template/common/header.tpl,&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
it&#39;s much more safer to create script that will do the change.&lt;br /&gt;
&lt;br /&gt;
The main benefit of using&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/vqmod/&quot; target=&quot;_blank&quot;&gt;vQmod&lt;/a&gt; is that you can safely update opencart and you don&#39;t need to worry about all HTML/PHP&amp;nbsp;patches&amp;nbsp;and hacks that you have done on it. They are safely stored as xml scripts in /vqmod/xml folder. If there is any difference in the new OpenCart version you just have to set correct searching and replacing string in the xml script and it will work the same as before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: none; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: arial, sans-serif; font-size: x-large; margin-top: 0px; max-width: 700px; padding-left: 0px;&quot;&gt;


How to install using Autoinstaller - (Didn&#39;t work for me)&lt;a class=&quot;section_anchor&quot; href=&quot;http://code.google.com/p/vqmod/wiki/Install_OpenCart#How_to_install_using_Autoinstaller&quot; style=&quot;color: #bbbbbb; display: inline; font-size: 20px; font-weight: lighter; margin-left: 0.7em; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;ol style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px; max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Download the latest version that has &quot;opencart&quot; in the title from&lt;/li&gt;
&lt;ul style=&quot;max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/vqmod&quot; rel=&quot;nofollow&quot; style=&quot;color: #0000cc;&quot;&gt;http://code.google.com/p/vqmod&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Using FTP, upload the &quot;vqmod&quot; folder from the zip to the root of your opencart store.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Be sure the vqmod folder and the vqmod/vqcache folders are writable (either 755 or 777).&lt;/li&gt;
&lt;ul style=&quot;max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Also be sure index.php and admin/index.php are writable.&lt;/li&gt;
&lt;ul style=&quot;max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;If not sure which you need, first try 755.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;If you get errors about permissions, then try 777.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Goto&amp;nbsp;&lt;a href=&quot;http://www.yoursite.com/vqmod/install&quot; rel=&quot;nofollow&quot; style=&quot;color: #0000cc;&quot;&gt;http://www.yoursite.com/vqmod/install&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;You should get a success message. If not, check permissions above and try again&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Load your store homepage and verify it works.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Using FTP, verify that there are new &quot;vq&quot; files in the &quot;vqmod/vqcache&quot; folder.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;If yes, then you are ready to start downloading or creating vQmod scripts, otherwise ask for assistance.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;&quot;&gt;
Done!&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Well NOT DONE.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;This method didn&#39;t work for me, I deleted .htaccess file in the vqmod folder, but still wasn&#39;t able to access&amp;nbsp;&lt;a href=&quot;http://www.yoursite.com/vqmod/install&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;http://www.yoursite.com/vqmod/install&lt;/a&gt;. The browser kept saying Internal server error.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: none; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: arial, sans-serif; font-size: x-large; margin-top: 0px; max-width: 700px; padding-left: 0px;&quot;&gt;


How to install Manually - (worked for me)&lt;/h1&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Backup your main site / index.php and admin/index.php before continue.&lt;/span&gt;&lt;/div&gt;
&lt;ol style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px; max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Download the latest version that has &quot;opencart&quot; in the title from&lt;/li&gt;
&lt;ul style=&quot;max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/vqmod&quot; rel=&quot;nofollow&quot; style=&quot;color: #0000cc;&quot;&gt;http://code.google.com/p/vqmod&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Using FTP, upload the &quot;vqmod&quot; folder from the zip to the root of your opencart store.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Be sure the vqmod folder and the vqmod/vqcache folders are writable (either 755 or 777).&lt;/li&gt;
&lt;ul style=&quot;max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Also be sure index.php and admin/index.php are writable.&lt;/li&gt;
&lt;ul style=&quot;max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;If not sure which you need, first try 755.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;If you get errors about permissions, then try 777.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Edit your&amp;nbsp;&lt;strong&gt;index.php&lt;/strong&gt;&amp;nbsp;file&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;FIND:&lt;/li&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #eeeeee; font-family: Monaco, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Lucida Console&#39;, monospace; font-size: 12px; max-width: 70em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// Startup&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;startup.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// Application Classes&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/customer.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/currency.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/tax.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/weight.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/length.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/cart.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/affiliate.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;REPLACE WITH:&lt;/li&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #eeeeee; font-family: Monaco, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Lucida Console&#39;, monospace; font-size: 12px; max-width: 70em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// vQmod&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;./vqmod/vqmod.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
$vqmod &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #660066;&quot;&gt;VQMod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// VQMODDED Startup&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;startup.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// Application Classes&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/customer.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/currency.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/tax.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/weight.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/length.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/cart.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/affiliate.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/pre&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;&quot;&gt;
&lt;strong&gt;Note the affiliate library file may not exist on older systems&lt;/strong&gt;. Basically any&amp;nbsp;&lt;tt style=&quot;font-family: Monaco, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Lucida Console&#39;, monospace; font-size: 12px; max-width: 66em;&quot;&gt;require_once(DIR_SYSTEM . &#39;library/xxxxxxxx.php&#39;);&lt;/tt&gt;needs to be changed to use the&amp;nbsp;&lt;tt style=&quot;font-family: Monaco, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Lucida Console&#39;, monospace; font-size: 12px; max-width: 66em;&quot;&gt;vqmod-&amp;gt;modCheck&lt;/tt&gt;&amp;nbsp;above in the same format. This also applies to any additional require_once files in the next step&lt;/div&gt;
&lt;ol style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px; max-width: 62em; padding-left: 25px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Edit your&amp;nbsp;&lt;strong&gt;admin/index.php&lt;/strong&gt;&amp;nbsp;file&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;FIND:&lt;/li&gt;
&lt;div style=&quot;line-height: 1.25em; max-width: 64em;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #eeeeee; font-family: Monaco, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Lucida Console&#39;, monospace; font-size: 12px; max-width: 70em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// Startup&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;startup.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// Application Classes&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/currency.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/user.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/weight.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/length.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;REPLACE WITH:&lt;/li&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;background-color: #eeeeee; font-family: Monaco, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Lucida Console&#39;, monospace; font-size: 12px; max-width: 70em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// vQmod&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;../vqmod/vqmod.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
$vqmod &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;color: #660066;&quot;&gt;VQMod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// VQMODDED Startup&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;startup.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;color: #880000;&quot;&gt;// Application Classes&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/currency.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/user.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/weight.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
require_once&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$vqmod&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;modCheck&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;DIR_SYSTEM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;library/length.php&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/pre&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Load your store homepage and verify it works.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;Using FTP, verify that there are new &quot;vq&quot; files in the &quot;vqmod/vqcache&quot; folder.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.3em;&quot;&gt;If yes, then you are ready to start downloading or creating vQmod scripts.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;&quot;&gt;
Done!&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; max-width: 64em;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: arial, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;This method worked. The only warning to this method is that&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;every time&lt;/span&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;&amp;nbsp;u upgrade your opencart you have to modify&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;manually&lt;/span&gt;&lt;span style=&quot;line-height: 1.25em;&quot;&gt;&amp;nbsp;these 2 index.php files.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The next post I will publish some useful vQMod scripts</description><link>http://nasko7.blogspot.com/2012/03/how-to-install-vqmod-on-open-cart.html</link><author>noreply@blogger.com (Nasko)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-2354965839454515030</guid><pubDate>Mon, 12 Sep 2011 12:22:00 +0000</pubDate><atom:updated>2012-01-22T22:19:02.468+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>Web2Py - How to create custom view for register form, login form, profile form and even reset password form?</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;How to create custom view for register form, login form, profile form and even reset password form in Web2Py?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to manage and customize the authentication forms in web2py.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say you wanna add more fields and make the profile more complete.&lt;br /&gt;
You need to overload the default user table and to add more fields to it.
After that you have to create, controllers and views for login, register, profile , password reset.
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
1 - open your db file in models (by default db.py)&amp;nbsp;and add the following code&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: python&quot;&gt;db.define_table(

&amp;nbsp; &amp;nbsp; auth.settings.table_user_name,

&amp;nbsp; &amp;nbsp; Field(&#39;first_name&#39;, length=128, default=&#39;&#39;),

&amp;nbsp; &amp;nbsp; Field(&#39;last_name&#39;, length=128, default=&#39;&#39;),

&amp;nbsp; &amp;nbsp; Field(&#39;email&#39;, length=128, default=&#39;&#39;, unique=True),

&amp;nbsp; &amp;nbsp; Field(&#39;address&#39;, length=256, default=&#39;&#39;),

&amp;nbsp; &amp;nbsp; Field(&#39;postcode&#39;, length=128, default=&#39;&#39;),

&amp;nbsp; &amp;nbsp; Field(&#39;city&#39;, length=128, default=&#39;&#39;),

&amp;nbsp; &amp;nbsp; Field(&#39;country&#39;, length=128, requires=IS_IN_SET(COUNTRIES)),


&amp;nbsp; &amp;nbsp; Field(&#39;password&#39;, &#39;password&#39;, length=512,&amp;nbsp;readable=False, label=&#39;Password&#39;),

&amp;nbsp; &amp;nbsp; Field(&#39;registration_key&#39;, length=512,&amp;nbsp;writable=False, readable=False, default=&#39;&#39;),

&amp;nbsp; &amp;nbsp; Field(&#39;reset_password_key&#39;, length=512,&amp;nbsp;writable=False, readable=False, default=&#39;&#39;),

&amp;nbsp; &amp;nbsp; Field(&#39;registration_id&#39;, length=512,&amp;nbsp;writable=False, readable=False, default=&#39;&#39;),

&amp;nbsp; &amp;nbsp; format=&#39;%(first_name)s %(last_name)s&#39;)


member = db[auth.settings.table_user_name] # get the custom_auth_table

member.first_name.requires = \

IS_NOT_EMPTY(error_message=auth.messages.is_empty)

member.last_name.requires = \

IS_NOT_EMPTY(error_message=auth.messages.is_empty)

member.password.requires = [IS_STRONG(min=5, special=0, upper=0), CRYPT()]

member.email.requires = [

IS_EMAIL(error_message=auth.messages.invalid_email),

IS_NOT_IN_DB(db, &#39;auth_user.email&#39;)]

&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
2 - How to make custom register form, profile form, login form and even reset password form&lt;br /&gt;
&lt;br /&gt;
in your controller (dafault.py) add new function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: python&quot;&gt;def register():

&amp;nbsp; &amp;nbsp; &amp;nbsp;return dict(form=auth.register())

&lt;/pre&gt;
&lt;br /&gt;
create new view (register.html) in your views/default folder:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;{{extend &#39;layout.html&#39;}}

&amp;lt;div id=&quot;reset_password&quot;&amp;gt;

Please fill the form&amp;lt;br/&amp;gt;

{{=form}}

&amp;lt;/div&amp;gt;

&lt;/pre&gt;
&lt;br /&gt;
2 - How to make custom profile form&lt;br /&gt;
CONTROLLER&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: python&quot;&gt;def profile():

&amp;nbsp; &amp;nbsp; &amp;nbsp;return dict(form=auth.profile())



&lt;/pre&gt;
&lt;br /&gt;
VIEW&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;{{extend &#39;layout.html&#39;}}

&amp;lt;div id=&quot;profile_user&quot;&amp;gt;

Please fill the form&amp;lt;br/&amp;gt;

{{=form}}

&amp;lt;/div&amp;gt;

&lt;/pre&gt;
&lt;br /&gt;
3 -&amp;nbsp;How to make custom login form&lt;br /&gt;
CONTROLLER&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: python&quot;&gt;def login():

&amp;nbsp; &amp;nbsp; &amp;nbsp;return dict(form=auth.login())
&lt;/pre&gt;
&lt;br /&gt;
VIEW&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;{{extend &#39;layout.html&#39;}}

&amp;lt;div id=&quot;login_form&quot;&amp;gt;

Please fill the form&amp;lt;br/&amp;gt;

{{=form}}

&amp;lt;/div&amp;gt;

&lt;/pre&gt;
&lt;br /&gt;
4 -&amp;nbsp;&amp;nbsp;How to make custom reset password form&lt;br /&gt;
&lt;br /&gt;
CONTROLLER&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: python&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def resetpass():

return dict(form=auth.request_reset_password())

&lt;/pre&gt;
&lt;br /&gt;
VIEW&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;{{extend &#39;layout.html&#39;}}

&amp;lt;div id=&quot;reset_password&quot;&amp;gt;

Please fill the form&amp;lt;br/&amp;gt;

{{=form}}

&amp;lt;/div&amp;gt;

&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
This is simple form inside your default layout. You can style it with CSS. You can also add more divs and split the content/user fields in different vids.&lt;br /&gt;
This can be done with using &amp;nbsp;- &amp;nbsp;form.custom and form.custom.widgets. instead of default {{=form}}&lt;br /&gt;
Example:&lt;br /&gt;
VIEW&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;{{=form.custom.begin}}

&amp;lt;div id=&quot;user_main&quot;&amp;gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; First name:

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;{{=form.custom.widget.first_name}}&amp;lt;/div&amp;gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; Last name:

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;{{=form.custom.widget.last_name}}&amp;lt;/div&amp;gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; Gender:

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; {{=form.custom.widget.gender}}

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;

&amp;lt;/div&amp;gt;

&amp;lt;div id=&quot;user_contact&quot;&amp;gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; Address:

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;{{=form.custom.widget.address}}&amp;lt;/div&amp;gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; Postcode:

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;{{=form.custom.widget.postcode}}&amp;lt;/div&amp;gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; Country:

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;{{=form.custom.widget.country}}&amp;lt;/div&amp;gt;

&amp;nbsp; &amp;nbsp; &amp;nbsp; City:

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;{{=form.custom.widget.city}}&amp;lt;/div&amp;gt;

&amp;lt;/div&amp;gt;
&lt;/pre&gt;</description><link>http://nasko7.blogspot.com/2011/09/web2py-tips-change-upload-folder.html</link><author>noreply@blogger.com (Nasko)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-3377822822356197185</guid><pubDate>Sun, 26 Jun 2011 08:00:00 +0000</pubDate><atom:updated>2012-01-28T00:01:15.814+00:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>Simple SVG driven Radar using Raphael JS graphic library</title><description>&lt;div class=&quot;posterous_autopost&quot;&gt;
I was playing with Raphael last month and decided to share what I have done.&lt;br /&gt;
It&#39;s Animated Radar&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; src=&quot;http://jsfiddle.net/J8EHk/90/embedded/&quot; style=&quot;height: 500px; width: 100%;&quot;&gt;&lt;/iframe&gt;
the source code is on &lt;a href=&quot;https://github.com/atanasov/svgradar/&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt;&lt;br /&gt;
I did the SVG part in Inkscape. exported to plain SVG format and after that had look at SVG file.&lt;br /&gt;
For more info, docs,examples -&amp;gt; &lt;a href=&quot;http://raphaeljs.com/reference.html&quot; target=&quot;_blank&quot;&gt;rahpael&lt;/a&gt; and &lt;a href=&quot;http://www.w3.org/TR/SVG11/&quot; target=&quot;_blank&quot;&gt;SVG&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;</description><link>http://nasko7.blogspot.com/2011/06/simple-svg-driven-radar-using-raphael.html</link><author>noreply@blogger.com (Nasko)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-1157810676572780379</guid><pubDate>Sun, 20 Mar 2011 20:34:00 +0000</pubDate><atom:updated>2011-09-14T20:14:40.542+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>The simplest way to use GitHub on Windows 7 with GUI</title><description>I tried some git clients, I read loads tutorials. Now I am going to write about simpliest and easiest way to commit, pull, push and clone code files using Git respository and particularly GitHub.com.&lt;br /&gt;
&lt;br /&gt;
I tryed these 4:&lt;br /&gt;
Cygwin + git + ssh. It worked. But Its console based.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/msysgit/&quot;&gt;msysgit &lt;/a&gt;+ putty stuff. Partly worked. Issue with ssh certificates&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 14px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/tortoisegit/&quot;&gt;TortoiseGit&lt;/a&gt;&amp;nbsp;- Tortoise didnt work for me too. Only &amp;nbsp;clone function.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 14px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/gitextensions/&quot;&gt;GitExtensions&lt;/a&gt;&amp;nbsp;- It&#39;s using&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/msysgit/&quot;&gt;msysgit&amp;nbsp;&lt;/a&gt;&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;http://kdiff3.sourceforge.net/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Kdiff&lt;/a&gt;&amp;nbsp;&lt;/span&gt;external programs. Its GUI based interface. But I couldn&#39;t make it work.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;After these trials. I removed all software. Deleted all folders and C:\users\username\.ssh folder where rsa keys are stored.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;The simpliest and easiest Git Client for Windows is SmartGit.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;No need of Putty or other certificate manager. Clean and fast Git client for Windows. No need to be geek, bash-ssh-git guru to use github. Nice GUI with user-friendly interface.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;Install&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/msysgit/&quot;&gt;msysgit&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px;&quot;&gt;Install&amp;nbsp;&lt;a href=&quot;http://www.syntevo.com/smartgit/index.html&quot;&gt;SmartGit&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
After installation set git path:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTVjGJcFUiqv7-xsU8rBU-LEjZVZakcNBGImAhjUTtWwKeriMOs82WBVAELrwfgjqJSud2Tl2kegRG0dUKuNN_y-l1xFniKy1Dvz4wYFf-Xl9JxT-oKr9B9X6goM9QQY803GullXfrLkWc/s1600/git_set_path.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTVjGJcFUiqv7-xsU8rBU-LEjZVZakcNBGImAhjUTtWwKeriMOs82WBVAELrwfgjqJSud2Tl2kegRG0dUKuNN_y-l1xFniKy1Dvz4wYFf-Xl9JxT-oKr9B9X6goM9QQY803GullXfrLkWc/s400/git_set_path.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has&amp;nbsp;integrated support for Github, Beanstalk, CodeBase, Unfuddle hosting providers. So you just have to put your account name and password, and you can access all your respositories.&lt;br /&gt;
&lt;br /&gt;
For SSH Client choose use SmartGit as SSH client:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsNRG7rWrcCcRS__zym1maGWlSTJPBYKROS6289_eLtAFuIjbBzyKU9od17KbKUwIfu1Vhm1uS4SV9snotym5TBJ6ItvCZNrIY6er9MIlo9o91FkP3bJmCP3qIXWhDTC6XNrbc1PBYzVa4/s1600/shh_window.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsNRG7rWrcCcRS__zym1maGWlSTJPBYKROS6289_eLtAFuIjbBzyKU9od17KbKUwIfu1Vhm1uS4SV9snotym5TBJ6ItvCZNrIY6er9MIlo9o91FkP3bJmCP3qIXWhDTC6XNrbc1PBYzVa4/s400/shh_window.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Its stand-alone application, no explorer integration. But its fully functional Git client. When you use it for first time clonning or pushing code - it will ask you to accept certificate.After that its very easy to work with your local and remote code.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqO1A7VgBTRxZ2V0CIBW6XuGSEuz0p48nwqpI3JU-sgxVtbhQMlJSFW1kW1yzraarchuSz1f6gIUQHo1sjDeiutJQxx_6Gouf3vFzgy3s8TuCxBz4qUs8sIgI0nCQRSUeNNGHX4V4x9mmc/s1600/smartgit.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqO1A7VgBTRxZ2V0CIBW6XuGSEuz0p48nwqpI3JU-sgxVtbhQMlJSFW1kW1yzraarchuSz1f6gIUQHo1sjDeiutJQxx_6Gouf3vFzgy3s8TuCxBz4qUs8sIgI0nCQRSUeNNGHX4V4x9mmc/s400/smartgit.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clonning git respository&lt;br /&gt;
Click Project menu and Clone&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_aUKsaWqXBYQApXeyXS4gpxkal-yC3CVHbcEDNXZL0xslscXl5AwLyELgU6fBfz6Lkfb6tVng3S8xAm4QRjf4nHRBzUSYh10DDyRG9O91esCYxLSJ9NRjQwX6XW_M9qan4HXSH95fA2U1/s1600/clone1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_aUKsaWqXBYQApXeyXS4gpxkal-yC3CVHbcEDNXZL0xslscXl5AwLyELgU6fBfz6Lkfb6tVng3S8xAm4QRjf4nHRBzUSYh10DDyRG9O91esCYxLSJ9NRjQwX6XW_M9qan4HXSH95fA2U1/s400/clone1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Paste the github link in Respository URL box and click Next&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Rrm9TP4jSyxTjvqAwjdjcpB7I8FJJFypZBmv3LDpBc8Ek2m15pfqAKg908Fin3rf2eQN1qAF_EzojSXANyGHlEQO1T4NUBioX5aVy3n6SNTb2m9LhlvXM2mXvtDHmb82ShrpMkzm2Pnm/s1600/clone2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Rrm9TP4jSyxTjvqAwjdjcpB7I8FJJFypZBmv3LDpBc8Ek2m15pfqAKg908Fin3rf2eQN1qAF_EzojSXANyGHlEQO1T4NUBioX5aVy3n6SNTb2m9LhlvXM2mXvtDHmb82ShrpMkzm2Pnm/s400/clone2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose where you want to store the source on your local computer and click Next&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjksNcNY3l5C8VrsE_zSDV8RleEHLtsBrCrvspKIkU8DoirJD3LihKxl1TYo6qgKlZhA5VSVdxk8kpVFzVGlI8k7981G61dyt4C-4RKpp5hHjXlmB3lqXE18gkRZ95KDWKRxujAGPTemvNK/s1600/clone3.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjksNcNY3l5C8VrsE_zSDV8RleEHLtsBrCrvspKIkU8DoirJD3LihKxl1TYo6qgKlZhA5VSVdxk8kpVFzVGlI8k7981G61dyt4C-4RKpp5hHjXlmB3lqXE18gkRZ95KDWKRxujAGPTemvNK/s400/clone3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click Finish and your will see the content of the Git respository&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for reading.</description><link>http://nasko7.blogspot.com/2011/03/simplest-way-to-use-github-on-windows-7.html</link><author>noreply@blogger.com (Nasko)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTVjGJcFUiqv7-xsU8rBU-LEjZVZakcNBGImAhjUTtWwKeriMOs82WBVAELrwfgjqJSud2Tl2kegRG0dUKuNN_y-l1xFniKy1Dvz4wYFf-Xl9JxT-oKr9B9X6goM9QQY803GullXfrLkWc/s72-c/git_set_path.png" height="72" width="72"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-1613213433351244600</guid><pubDate>Mon, 10 Jan 2011 18:44:00 +0000</pubDate><atom:updated>2011-09-14T20:17:37.576+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>C# useful Shell functions</title><description>&lt;b&gt;Get current user&#39;s StartUp folder path:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Environment.GetFolderPath(Environment.SpecialFolder.Startup) - returns string with startup path&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get list of StartUp processes started from the Register and StartUp folder:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
ManagementClass mangnmt = new ManagementClass(&quot;Win32_StartupCommand&quot;);&lt;br /&gt;
ManagementObjectCollection mcol = mangnmt.GetInstances();&lt;br /&gt;
foreach (ManagementObject strt in mcol)&lt;br /&gt;
{&lt;br /&gt;
string[] lv = new String[4];&lt;br /&gt;
lv[0] = strt[&quot;Caption&quot;].ToString();&lt;br /&gt;
lv[1] = strt[&quot;Location&quot;].ToString();&lt;br /&gt;
lv[2] = strt[&quot;Command&quot;].ToString();&lt;br /&gt;
lv[3] = strt[&quot;Description&quot;].ToString();&lt;br /&gt;
listView1.Items.Add(new ListViewItem(lv, 0));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Start new proccess, external program EXE, batch file from C#&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
System.Diagnostics.Process.Start(@filename, arguments);&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get list of images in folder&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
List images = new List();&lt;br /&gt;
DirectoryInfo di = new DirectoryInfo(@&quot;c:\myimages&quot;); // give path&lt;br /&gt;
FileInfo[] finfos = di.GetFiles(&quot;*.jpg&quot;, SearchOption.TopDirectoryOnly);&lt;br /&gt;
foreach (FileInfo fi in finfos)&lt;br /&gt;
images.Add(Image.FromFile(fi.FullName));  &lt;br /&gt;
&lt;strong&gt;Get current Windows Desktop Shell&lt;/strong&gt;&lt;br /&gt;
Microsoft.Win32.RegistryKey key;&lt;br /&gt;
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(&quot;SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\WinLogon&quot;, &lt;strong&gt;false&lt;/strong&gt;);&lt;br /&gt;
MessageBox.Show((string)(key.&lt;strong&gt;GetValue&lt;/strong&gt;(&quot;Shell&quot;)));&lt;br /&gt;
&lt;strong&gt;Change Windows Desktop Shell&lt;/strong&gt;&lt;br /&gt;
Microsoft.Win32.RegistryKey key;&lt;br /&gt;
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(&quot;SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\WinLogon&quot;, &lt;strong&gt;true&lt;/strong&gt;);&lt;br /&gt;
key.&lt;strong&gt;SetValue&lt;/strong&gt;(&quot;Shell&quot;, &quot;NewShell.exe&quot;, RegistryValueKind.String);&lt;br /&gt;
&lt;br /&gt;
Get running application full path&lt;br /&gt;
string AppPath = System.Windows.Forms.Application.StartupPath;&lt;br /&gt;
String currentProgram = System.Environment.CommandLine;&lt;br /&gt;
&lt;strong&gt;Lock, Hibernate, Restart, Stand-by, Shutdown Windows from C#&lt;/strong&gt;&lt;br /&gt;
for Restart&lt;br /&gt;
{ System.Diagnostics.Process.Start(&quot;shutdown&quot;,&quot;/r&quot;);&lt;br /&gt;
}&lt;br /&gt;
For logoff&lt;br /&gt;
{ System.Diagnostics.Process.Start(&quot;shutdown&quot;, &quot;/l&quot;);&lt;br /&gt;
}&lt;br /&gt;
For hibernate&lt;br /&gt;
{&lt;br /&gt;
System.Diagnostics.Process.Start(&quot;shutdown&quot;, &quot;/h&quot;);&lt;br /&gt;
}&lt;br /&gt;
For shutdown&lt;br /&gt;
{&lt;br /&gt;
System.Diagnostics.Process.Start(&quot;shutdown&quot;, &quot;/s&quot;);&lt;br /&gt;
}&lt;br /&gt;
For locking system&lt;br /&gt;
using System.Runtime.InteropServices;&lt;br /&gt;
[DllImport(&quot;user32.dll&quot;)]&lt;br /&gt;
public static extern void LockWorkStation();&lt;br /&gt;
{&lt;br /&gt;
LockWorkStation();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get process id and path from window handle&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
[DllImport(&quot;user32.dll&quot;, CharSet = CharSet.Auto, SetLastError = true)]&lt;br /&gt;
private static extern int GetWindowThreadProcessId(IntPtr handle, out uint processId);&lt;br /&gt;
&lt;br /&gt;
public static string GetProcessPath(IntPtr hwnd)&lt;br /&gt;
{&lt;br /&gt;
uint pid = 0;&lt;br /&gt;
GetWindowThreadProcessId(hwnd, out pid);&lt;br /&gt;
Process proc = Process.GetProcessById((int)pid);&lt;br /&gt;
return proc.MainModule.FileName.ToString();&lt;br /&gt;
}</description><link>http://nasko7.blogspot.com/2011/01/c-useful-tips-and-functions.html</link><author>noreply@blogger.com (Nasko)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-3684805095511807216</guid><pubDate>Thu, 16 Dec 2010 21:13:00 +0000</pubDate><atom:updated>2011-08-20T18:34:42.193+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>How to get list of Windows 7 Startup programs from Registry using C#?</title><description>I was googling and digging into windows Startup apps running from registry keys and the whole startup order proccess.&amp;nbsp;Here is what I found out.&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Startup apps order list.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;(I am using Windows 7 HomePremium 64 bit.)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Boot execute&lt;/b&gt; HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Run Services&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce &lt;br /&gt;
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Logon Prompt&lt;/b&gt; - user enter username and password&lt;/li&gt;
&lt;li&gt;&lt;b&gt;UserInit&lt;/b&gt; HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UserInit&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Start Shell&lt;/b&gt; HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell&lt;/li&gt;
&lt;li&gt;&lt;b&gt;LocalMachine Run keys&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce&lt;br /&gt;
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run &lt;br /&gt;
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;LocalMachine Run keys - for 32 bit apps running on 64bit OS&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnceEx&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;CurrentUser Run keys&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce &lt;br /&gt;
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run &lt;br /&gt;
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx &lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;StartUp Folder&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;I checked my Registry only Run SubKeys are actually holding startup apps and location paths. So to get all running apps its enough to get their string values and to run links in StartUp folder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;code&gt; public void GetAllApps()&lt;br /&gt;
{&lt;br /&gt;
&lt;string, string=&quot;&quot;&gt;&lt;string, string=&quot;&quot;&gt; &lt;br /&gt;
Microsoft.Win32.RegistryKey key;&lt;br /&gt;
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Run&quot;, false);&lt;br /&gt;
//MessageBox.Show(key.ValueCount.ToString());&lt;br /&gt;
foreach (string appName in key.GetValueNames()) &lt;br /&gt;
{&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
//              MessageBox.Show((string)key.GetValue(appName));&lt;br /&gt;
ParsePath(appName, (string)key.GetValue(appName),ref data);&lt;br /&gt;
db.Insert(&quot;startup&quot;, data);&lt;br /&gt;
}&lt;br /&gt;
catch (Exception ex) &lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(&quot;Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Run&quot;, false);&lt;br /&gt;
&lt;br /&gt;
foreach (string appName in key.GetValueNames())&lt;br /&gt;
{&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
MessageBox.Show((string)key.GetValue(appName));&lt;br /&gt;
}&lt;br /&gt;
catch (Exception ex)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Run&quot;, false);&lt;br /&gt;
foreach (string appName in key.GetValueNames())&lt;br /&gt;
{&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;MessageBox.Show((string)key.GetValue(appName));&lt;br /&gt;
}&lt;br /&gt;
catch (Exception ex)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
DirectoryInfo di = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.Startup));&lt;br /&gt;
FileInfo[] links = di.GetFiles(&quot;*.lnk&quot;);&lt;br /&gt;
foreach (FileInfo fi in links)&lt;br /&gt;
{&lt;br /&gt;
MessageBox.Show(fi.FullName);&amp;nbsp;&lt;/string,&gt;&lt;/string,&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;string, string=&quot;&quot;&gt;&lt;string, string=&quot;&quot;&gt;}&lt;br /&gt;
key.Close();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;/string,&gt;&lt;/string,&gt;&lt;/code&gt;&lt;/div&gt;</description><link>http://nasko7.blogspot.com/2010/12/how-to-get-list-of-windows-7-startup.html</link><author>noreply@blogger.com (Nasko)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-8045020256193825453</guid><pubDate>Sun, 12 Dec 2010 20:49:00 +0000</pubDate><atom:updated>2011-09-14T20:18:55.708+01:00</atom:updated><title>NaskoShell - my custom windows desktop replacement app</title><description>&lt;b&gt;UPDATE:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #5d5d5d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-weight: normal; line-height: 14px;&quot;&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;This is discontinued project :(&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;I don&#39;t need custom shell for Windows anymore, because I switched to linux. OpenBox+PyTyle+Conky&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Source is on my&amp;nbsp;&lt;a href=&quot;https://github.com/atanasov/NaskoShell&quot; style=&quot;color: #3c87b4; text-decoration: none;&quot;&gt;github&lt;/a&gt;&amp;nbsp;have a look I you are intersted in Custom windows desktop shell in C#.&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I have got 12.1&quot; ASUS UL20a laptop and because of the size of the screen I wanted to optimize my desktop for better experience. I tried to simplify my default Windows 7 desktop, removed all icons, made Taskbar autohide, couldn’t completely remove it though.Finally I decided to write my own Windows desktop replacement.  &lt;br /&gt;
So what I am working on is clear Desktop with: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;my daily to do tasks,&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;time,&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;reminder,&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;simple background changer,&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;some nice motivational or inspirational quotes.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;multiscreen (work, design, surf, chat, book reading, video )&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;launchy-like app launcher&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;fully keyboard control&lt;/li&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/ul&gt;I started coding it with C#. This is what I’ve got. &lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXo8H5pGxP2XA7YArwDUmF55GjIgQJaXbqk4PtfTPL4Yeqz9PozuPMifjGhuuYR5H7rPHjm1EBhxfEKX-Jiq4yGgT0BKknPOAAgIfkA8KLQPnULuDgUh02lLs19JV7o_GiAi3nKj-mKtZ6/s1600-h/image%5B4%5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;394&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhue77bTtCogDyp444qiqnQyjxsPvllIGtqY0Ag4dMfh0PfGrLIr1aFeqLA_FDIxWvWjlBjqWrMnuYqGS5FSKoft_0KwDlDTnDkNrbByQJBFZKSWqCnuapSW7SXfMI3QjWiIpE7mX6tOpBC/?imgmax=800&quot; style=&quot;background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;491&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
This week I will add background switcher, reminder and quotes.&lt;br /&gt;
&lt;br /&gt;
Update: 22.12.2010&lt;br /&gt;
&lt;br /&gt;
I am still drawing my idea in my mind. Hopefully till Christmas I will have first working version ready for realese.&lt;br /&gt;
Everything is going to be Black and White.&lt;br /&gt;
My Desktop will include:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;AppLauncher - like Launchy and many other clones&lt;/li&gt;
&lt;li&gt;Taskbar in the middle bottom of the screen&lt;/li&gt;
&lt;li&gt;Todo list&lt;/li&gt;
&lt;li&gt;System menu for Restart, Logout, Shutdown&lt;/li&gt;
&lt;li&gt;Global Key Shortcuts&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;That&#39;s my latest screenshot of my Desktop Shell&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Central text is clickable and when u click it indicates Done Task and shows you your next to do task. Using one task at a time approach. Now i am codding todo control.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-F_gADz1KdkpFcMM4cuMIjUr-hEnhpWNZX2YtTwQE3KR6IFrgXU90HsIyUJdD6ECZQGZFVmrSCYOVkh4Q8HAy5m6PJ5XX7LoKyVmIdyK3EO64NaVSVnX8Uxl4IS3o3-bAOY7sASDnLlv3/s1600/screen2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;394&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-F_gADz1KdkpFcMM4cuMIjUr-hEnhpWNZX2YtTwQE3KR6IFrgXU90HsIyUJdD6ECZQGZFVmrSCYOVkh4Q8HAy5m6PJ5XX7LoKyVmIdyK3EO64NaVSVnX8Uxl4IS3o3-bAOY7sASDnLlv3/s640/screen2.jpg&quot; width=&quot;491&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</description><link>http://nasko7.blogspot.com/2010/12/naskoshell-my-custom-windows-desktop.html</link><author>noreply@blogger.com (Nasko)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhue77bTtCogDyp444qiqnQyjxsPvllIGtqY0Ag4dMfh0PfGrLIr1aFeqLA_FDIxWvWjlBjqWrMnuYqGS5FSKoft_0KwDlDTnDkNrbByQJBFZKSWqCnuapSW7SXfMI3QjWiIpE7mX6tOpBC/s72-c?imgmax=800" height="72" width="72"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-5545405876887060816</guid><pubDate>Mon, 01 Nov 2010 20:00:00 +0000</pubDate><atom:updated>2012-09-26T20:55:33.185+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>AIR app socket connection to Socket.IO-node server using Web-socket-js flash library</title><description>&lt;b&gt;&lt;span style=&quot;color: red; font-size: large;&quot;&gt;UPDATE 2012 - &lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This article is outdated &amp;nbsp;please use&amp;nbsp;&lt;a href=&quot;https://github.com/simb/FlashSocket.IO&quot;&gt;https://github.com/simb/FlashSocket.IO&lt;/a&gt;&amp;nbsp;for connecting Socket IO and Flash/Flex/AS3&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://socket.io/&quot;&gt;Socket.IO&lt;/a&gt; is an awesome library for &lt;a href=&quot;http://nodejs.org/&quot;&gt;NodeJS&lt;/a&gt; for making&amp;nbsp; games and chat apps relying on &lt;a href=&quot;http://dev.w3.org/html5/websockets/&quot;&gt;WebSocket &lt;/a&gt;protocol. Web browsers supporting WebSockets at the time of this writing are Chrome, Safari and Firefox 4 beta, and Opera 10.70 beta Other browsers can use WebSocket over Flash or other methods (XHR Pooling, XHR Streaming, forever IFrame). In this article I will show you how I connected AIR app to Socket.IO-Node chat demo using WebSocket over Flash library made by Hiroshi Ichikawa.&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
Requirements:&lt;br /&gt;
- for the Server&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;nodejs - &lt;a href=&quot;http://nodejs.org/&quot;&gt;NodeJS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;socket.IO-node - &lt;a href=&quot;http://github.com/LearnBoost/Socket.IO-node&quot;&gt;http://github.com/LearnBoost/Socket.IO-node&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
- for the Client&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;FlashDevelop - &lt;a href=&quot;http://www.flashdevelop.org/&quot;&gt;http://www.flashdevelop.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;web-socket-js&amp;nbsp; - &lt;a href=&quot;http://github.com/gimite/web-socket-js&quot;&gt;http://github.com/gimite/web-socket-js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;3rd party lib - &lt;a href=&quot;https://github.com/mikechambers/as3corelib&quot;&gt;https://github.com/mikechambers/as3corelib&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;UPDATE - github source -&amp;gt;&amp;nbsp;&lt;a href=&quot;https://github.com/atanasov/FlexWebSocketDemo&quot;&gt;here&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
This article is not about setting up server side. You can get enough information on NodeJS and Socket.io websites. I will show you how to connect AIR app to Socket.IO server. Create new AIR Flex 4 project in Flash Develop. Make some simple GUI layout&amp;nbsp; and save it as &lt;b&gt;FlexMain.mxml &lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;code&gt;&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s:WindowedApplication xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;backgroundColor=&quot;#FFFFFF&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;backgroundAlpha=&quot;0&quot;&lt;br /&gt;
&lt;br /&gt;
creationComplete=&quot;init();&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mx:VBox width=&quot;100%&quot; height=&quot;500&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mx:List id=&quot;messages&quot; width=&quot;100%&quot; height=&quot;400&quot; dataProvider=&quot;{msgBuffer}&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mx:HBox&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mx:TextInput id=&quot;msgbox&quot; height=&quot;50&quot; width=&quot;650&quot;&amp;nbsp;&amp;nbsp;keyDown=&quot;msgboxKeyDown(event)&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;mx:Button id=&quot;btn&quot; click=&quot;sendMessage()&quot; height=&quot;50&quot; width=&quot;50&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/mx:HBox&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/mx:VBox&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/s:WindowedApplication&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;vbox height=&quot;500&quot; width=&quot;100%&quot;&gt;&lt;/vbox&gt;&lt;list height=&quot;400&quot; id=&quot;messages&quot; width=&quot;100%&quot;&gt;&lt;/list&gt;&lt;hbox&gt;&lt;/hbox&gt;&lt;textinput height=&quot;50&quot; id=&quot;msgbox&quot; width=&quot;650&quot;&gt;&lt;/textinput&gt;&lt;br /&gt;
Get the &lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;web-socket-js&lt;/b&gt;&lt;/span&gt; latest version with Git subversion control system and copy &lt;b&gt;WebSocket.as&lt;/b&gt;, &lt;b&gt;WebSocketStateEvent.as&lt;/b&gt; and &lt;b&gt;com&lt;/b&gt; folder to your project /src folder.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxAhQn0xkVkipn2dL1mBtxR3YfQ7kcDBvwCMldmweGutQ6X3ZyPBAD-UfNbb0oxMcAydSktLfsas5bgiL9TKZqP59jar1frRzJn4v_ObxvfgwofVhc_IUHdXk9e5x-83nwaTQ8bS02mDYc/s1600-h/source_folder%5B3%5D.png&quot;&gt;&lt;img alt=&quot;source_folder&quot; border=&quot;0&quot; height=&quot;289&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiBOMVwviWyZgIzmUqmDV7xUG_LOVB-YceDIzOsZoZAHRyR-tv5jddxCEc31cPRx3BNs3k5x7AOY7KBJkEHmkLvIKaPd5OcfBJLqM4EJnOVVOfsNU_5ZuB2-EG9PIU4qrtZr5r7_RaoZIG/?imgmax=800&quot; style=&quot;background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;source_folder&quot; width=&quot;264&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Get &lt;span style=&quot;color: blue;&quot;&gt;as3corelib&lt;/span&gt; from github and copy this folder &lt;b&gt;as3corelib\src\com\adobe\serialization&lt;/b&gt; to your&lt;b&gt; src\com\adobe&lt;/b&gt; folder in your project. It contains JSON classes for parsing, encoding and decoding. Now your&lt;b&gt; \src&lt;/b&gt; folder have to looks like this&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPoufsMZ42DBnXWGW7Q4s-a56gHCrJSvgfo2Tgg_PSFnCbd2Wu-iNglTBMEevXNgGnTaITHrp10xKsoD1GX_TJ3Yi8ZjvJSt_BXAp0_U43v7xqqYqwQieGwVo8fqhe8D2Nzs6YFzs9zOKa/s1600-h/source_folder2%5B4%5D.png&quot;&gt;&lt;img alt=&quot;source_folder2&quot; border=&quot;0&quot; height=&quot;450&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBLD71_xctd5Kb5OgCZOQpQpcBHA-didibNzEwmbA1ZYtXZ6HCo5YkXOQsrML2q5Dj4UMch9xmj-aE076Tcw8PRAY_g_HDkuMaIHsUQrP1Af5qSb0nY_c1ko8S7x9mNsuhhdApl5JDS5NF/?imgmax=800&quot; style=&quot;background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;source_folder2&quot; width=&quot;264&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now go to your &lt;b&gt;FlexMain.mxml&lt;/b&gt; file and add new fx:Script tag just above &amp;lt;mx:VBox&amp;gt; tag.&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;code&gt;&lt;br /&gt;
&amp;lt;fx:Script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;![CDATA[&lt;br /&gt;
&lt;br /&gt;
import flash.events.*;&lt;br /&gt;
&lt;br /&gt;
import flash.net.*;&lt;br /&gt;
&lt;br /&gt;
import flash.system.*;&lt;br /&gt;
&lt;br /&gt;
import flash.utils.*;&lt;br /&gt;
&lt;br /&gt;
import WebSocket;&lt;br /&gt;
&lt;br /&gt;
import com.adobe.serialization.json.*;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import mx.collections.ArrayCollection;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[Bindable]&lt;br /&gt;
&lt;br /&gt;
private var msgBuffer: ArrayCollection;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private var websock:WebSocket;&lt;br /&gt;
&lt;br /&gt;
private var sessionId:String;&lt;br /&gt;
&lt;br /&gt;
private var frame:String = &#39;~m~&#39;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private function init():void {&lt;br /&gt;
&lt;br /&gt;
msgBuffer = new ArrayCollection([]);&lt;br /&gt;
&lt;br /&gt;
sessionId = null;&lt;br /&gt;
&lt;br /&gt;
loadPolicyFile(&quot;xmlsocket://192.168.1.16:843&quot;);&lt;br /&gt;
&lt;br /&gt;
websock = new WebSocket(this, &quot;ws://192.168.1.16:8080/socket.io/flashsocket&quot;,&quot;&quot;);&lt;br /&gt;
&lt;br /&gt;
websock.addEventListener(&quot;open&quot;, onOpen);&lt;br /&gt;
&lt;br /&gt;
websock.addEventListener(&quot;close&quot;, onClose);&lt;br /&gt;
&lt;br /&gt;
websock.addEventListener(&quot;message&quot;, onMessage);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public function onMessage(e:Event):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var msgs:Array = websock.readSocketData();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
for each (var msg:String in msgs) {&lt;br /&gt;
&lt;br /&gt;
msg = decodeURIComponent(msg);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;log(&quot;received string: &quot;+msg);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;if (msg.substr(0, 3) == frame)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;var m:Array = msg.split(frame);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;if (sessionId == null) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;sessionId = m[2];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;log(&quot;session id= &quot; + sessionId);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;else&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&lt;br /&gt;
log(&quot; m[2] = &quot; +m[2]); &lt;br /&gt;
&lt;br /&gt;
if (m[2].substr(0, 3) == &#39;~h~&#39;)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
log(&quot;heartbeat: &quot; + msg);&lt;br /&gt;
&lt;br /&gt;
sendHeartBeat(m[2].substr(3));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
if (m[2].substr(0, 3) == &#39;~j~&#39;)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
log(&quot;json: &quot; + msg);&lt;br /&gt;
&lt;br /&gt;
parseMsg(m[2].substr(3));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
parseMsg(m[2]);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log (&quot;message: &quot; + m[2]);&lt;br /&gt;
&lt;br /&gt;
}&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
private function parseMsg(s:String):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
var msg:Object = JSON.decode(s);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (msg.announcement != null) {&lt;br /&gt;
&lt;br /&gt;
trace(&quot;announcement :&quot; + msg.announcement);&lt;br /&gt;
&lt;br /&gt;
addToList(msg.announcement);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
if (msg.message != null)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
addToList(msg.message[0]+&quot; :&quot;+msg.message[1]);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (msg.buffer != null) {&lt;br /&gt;
&lt;br /&gt;
for each (var o:Object in msg.buffer) {&lt;br /&gt;
&lt;br /&gt;
addToList(o.message[0]+&quot; : &quot;+o.message[1]);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private function addToList(s:String):void {&lt;br /&gt;
&lt;br /&gt;
msgBuffer.addItem(s);&lt;br /&gt;
&lt;br /&gt;
messages.verticalScrollPosition = messages.maxVerticalScrollPosition;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public function sendMsg(m:String):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
websock.send(frame + m.length + frame + m);&lt;br /&gt;
&lt;br /&gt;
addToList(&quot;me : &quot;+m);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public function sendHeartBeat(num:String):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
var strnum:int = 3 + num.length;&lt;br /&gt;
&lt;br /&gt;
websock.send(frame + strnum.toString() + frame+ &#39;~h~&#39; + num);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public function onClose(e:Event):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
log(&quot;websocket disconnected&quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public function onOpen(e:Event):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
log(&quot;websocket connected&quot;);&lt;br /&gt;
&lt;br /&gt;
//websock.send(frame+&#39;17&#39;+frame+&quot;USERNAME:username&quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private function sendMessage():void {&lt;br /&gt;
&lt;br /&gt;
sendMsg(msgbox.text); &lt;br /&gt;
&lt;br /&gt;
msgbox.text=&quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public function getCallerHost():String {&lt;br /&gt;
&lt;br /&gt;
return (&quot;http://192.168.1.16&quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
public function getOrigin():String {&lt;br /&gt;
&lt;br /&gt;
return (&quot;http://192.168.1.16&quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public function fatal(str:String):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
trace(str);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public function error(str:String):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
trace(str);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public function log(str:String):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
trace(str);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public function loadPolicyFile(url:String):void &lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
log(&quot;policy file: &quot; + url);&lt;br /&gt;
&lt;br /&gt;
Security.loadPolicyFile(url);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public function getCookie():String&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
return sessionId;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private function msgboxKeyDown(event:KeyboardEvent):void&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (event.keyCode == Keyboard.ENTER)&lt;br /&gt;
&lt;br /&gt;
sendMessage();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fx:Script&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;In original WebSocket.as file the author use callback functions to main project&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; file to exchange log, errors and other messages. The name of the original&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;main project file is called WebSocketMain.as.To make it working with my flex app &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;I just named it to plain Object reference. So open WebSocket.as file and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;search for &lt;b&gt;WebSocketMain&lt;/b&gt; and replace it with &lt;b&gt;Object&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Its marked with &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;big red bold&lt;/span&gt;&lt;/b&gt; font in the source.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;code&gt;&lt;br /&gt;
// Copyright: Hiroshi Ichikawa &amp;lt;http://gimite.net/en/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// License: New BSD License&lt;br /&gt;
&lt;br /&gt;
// Reference: http://dev.w3.org/html5/websockets/&lt;br /&gt;
&lt;br /&gt;
// Reference: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import flash.display.*;&lt;br /&gt;
&lt;br /&gt;
import flash.events.*;&lt;br /&gt;
&lt;br /&gt;
import flash.external.*;&lt;br /&gt;
&lt;br /&gt;
import flash.net.*;&lt;br /&gt;
&lt;br /&gt;
import flash.system.*;&lt;br /&gt;
&lt;br /&gt;
import flash.utils.*;&lt;br /&gt;
&lt;br /&gt;
import mx.core.*;&lt;br /&gt;
&lt;br /&gt;
import mx.controls.*;&lt;br /&gt;
&lt;br /&gt;
import mx.events.*;&lt;br /&gt;
&lt;br /&gt;
import mx.utils.*;&lt;br /&gt;
&lt;br /&gt;
import com.adobe.net.proxies.RFC2817Socket;&lt;br /&gt;
&lt;br /&gt;
import com.hurlant.crypto.tls.TLSSocket;&lt;br /&gt;
&lt;br /&gt;
import com.hurlant.crypto.tls.TLSConfig;&lt;br /&gt;
&lt;br /&gt;
import com.hurlant.crypto.tls.TLSEngine;&lt;br /&gt;
&lt;br /&gt;
import com.hurlant.crypto.tls.TLSSecurityParameters;&lt;br /&gt;
&lt;br /&gt;
import com.gsolo.encryption.MD5;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[Event(name=&quot;message&quot;, type=&quot;flash.events.Event&quot;)]&lt;br /&gt;
&lt;br /&gt;
[Event(name=&quot;open&quot;, type=&quot;flash.events.Event&quot;)]&lt;br /&gt;
&lt;br /&gt;
[Event(name=&quot;close&quot;, type=&quot;flash.events.Event&quot;)]&lt;br /&gt;
&lt;br /&gt;
[Event(name=&quot;error&quot;, type=&quot;flash.events.Event&quot;)]&lt;br /&gt;
&lt;br /&gt;
[Event(name=&quot;stateChange&quot;, type=&quot;WebSocketStateEvent&quot;)]&lt;br /&gt;
&lt;br /&gt;
public class WebSocket extends EventDispatcher {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private static var CONNECTING:int = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private static var OPEN:int = 1;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private static var CLOSING:int = 2;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private static var CLOSED:int = 3;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var rawSocket:Socket;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var tlsSocket:TLSSocket;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var tlsConfig:TLSConfig;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var socket:Socket;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var main:&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;b&gt;Object&lt;/b&gt;&lt;/span&gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var url:String;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var scheme:String;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var host:String;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var port:uint;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var path:String;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var origin:String;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var protocol:String;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var buffer:ByteArray = new ByteArray();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var dataQueue:Array;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var headerState:int = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var readyState:int = CONNECTING;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var bufferedAmount:int = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var headers:String;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var noiseChars:Array;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;private var expectedDigest:String;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;public function WebSocket(&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;main:&lt;span style=&quot;color: red; font-size: large;&quot;&gt;&lt;b&gt;Object&lt;/b&gt;&lt;/span&gt;, url:String, protocol:String,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;proxyHost:String = null, proxyPort:int = 0,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;headers:String = null) {&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
Save it and you can compile the AIR app.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
To test it you need to run the socket.io-node example server. It’s in the folder &lt;b&gt;example&lt;/b&gt;. Go there and run it with # &lt;b&gt;node server.js&lt;/b&gt; command.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
Set your correct network location to the server in my case it’s 192.158.1.16. change it with your server domain, ip address or localhost. The default port of socket.io-node’s example is 8080. but u can change it if you have your own socket-io based server.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
This is the final result. &lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg93089tBnJqB6JAussg3t0hN3wGuL5r23bkjFf6Lk7pjhY1tFFf_wYHrIrloqQQA4rnKaUwFzDo9F_yacjTYx5q6VZzFCSwF_I6UuM73iYbhyeKOFwgTaH0ySOeFeFXvXHmCIZ-hQPzRBL/s1600-h/airapp%5B8%5D.png&quot;&gt;&lt;img alt=&quot;airapp&quot; border=&quot;0&quot; height=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRjK4EHm49hVqCN6usmoEIx414_lEIi7aRJVcoHmNS5-EOkjE7maNwnXJ2O_U3J1vek3Kt9PTclaeFukUHBasbmaH6n30P4Ro-Zq9mqY0dYOJtNxTaXoLO7ruA3hC3KDr1XIvYl9FiYLmb/?imgmax=800&quot; style=&quot;background-image: none; border: 0px none; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;airapp&quot; width=&quot;478&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
thanks for reading!&lt;/div&gt;
</description><link>http://nasko7.blogspot.com/2010/10/how-to-connect-air-app-to-socketio-chat.html</link><author>noreply@blogger.com (Nasko)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiBOMVwviWyZgIzmUqmDV7xUG_LOVB-YceDIzOsZoZAHRyR-tv5jddxCEc31cPRx3BNs3k5x7AOY7KBJkEHmkLvIKaPd5OcfBJLqM4EJnOVVOfsNU_5ZuB2-EG9PIU4qrtZr5r7_RaoZIG/s72-c?imgmax=800" height="72" width="72"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2170691811164207225.post-5844758083439303734</guid><pubDate>Sun, 31 Oct 2010 08:59:00 +0000</pubDate><atom:updated>2011-09-14T20:21:37.604+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>How to make simple clean vertical image rotator without arrows using jQuery and jcarousel</title><description>I wanted to make simple carousel for a construction company but without arrows without additional images and effects, just simple image rotator (scroller) with anchor links to different products. Here is how i did it.&lt;br /&gt;
&lt;br /&gt;
1 - get required libs:&lt;br /&gt;
&lt;a href=&quot;http://sorgalla.com/projects/jcarousel/&quot;&gt;http://sorgalla.com/projects/jcarousel/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://jquery.com/&quot;&gt;http://jquery.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2 - write simple HTML file and add your images in list:&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;&lt;code&gt;&lt;br /&gt;
&amp;lt;!DOCTYPE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;title&amp;gt;jCarousel Vertical Demo&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.4.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery.jcarousel.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;skin.css&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
jQuery(document).ready(function() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;jQuery(&#39;#mycarousel&#39;).jcarousel({&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; vertical: true,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; scroll: 2,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; auto: 5&amp;nbsp;&amp;nbsp;//autoscroll every 5 secs&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; wrap: &#39;circular&#39; //scroll images circularly&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;});&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;ul id=&quot;mycarousel&quot; class=&quot;jcarousel-skin-simple&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/75/199481072_b4a0d09597_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/57/199481087_33ae73a8de_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/77/199481108_4359e6b971_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/58/199481218_264ce20da0_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/69/199481255_fdfe885f87_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img border=&quot;0&quot; src=&quot;http://static.flickr.com/70/229228324_08223b70fa_s.jpg&quot; alt=&quot;&quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;3 - Extract jcarousel package and copy jquery-1.4.2.min.js and jquery.jcarousel.min.js to same folder where is your html file. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;4 - create new css file &quot;skin.css&quot; with following content&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;&lt;code&gt;&lt;br /&gt;
.jcarousel-skin-simple .jcarousel-container {&lt;br /&gt;
}&lt;br /&gt;
.jcarousel-skin-simple .jcarousel-direction-rtl {&lt;br /&gt;
direction: rtl;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.jcarousel-skin-simple .jcarousel-container-vertical {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: 75px;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: 75px;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;padding: 0px 0px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.jcarousel-skin-simple .jcarousel-clip-vertical {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width:&amp;nbsp;&amp;nbsp;75px;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: 350px;&amp;nbsp;&amp;nbsp;//scroller height&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.jcarousel-skin-simple .jcarousel-item {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: 75px;&amp;nbsp;&amp;nbsp;// picture width&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: 75px;&amp;nbsp;&amp;nbsp;// picture height&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.jcarousel-skin-simple .jcarousel-direction-rtl .jcarousel-item-horizontal {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;margin-left: 10px;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;margin-right: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.jcarousel-skin-simple .jcarousel-item-vertical {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;margin-bottom: 10px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.jcarousel-skin-simple .jcarousel-item-placeholder {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;background: #fff;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;color: #000;&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
5 - Now you can play with CSS and jcarousel configuration to make best image scroller for your site.&lt;br /&gt;
&lt;br /&gt;
Thanks for reading this.&lt;/div&gt;&lt;/div&gt;</description><link>http://nasko7.blogspot.com/2010/10/how-to-make-simple-clean-vertical-image.html</link><author>noreply@blogger.com (Nasko)</author></item></channel></rss>