<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Codepal &#187; Tutorials</title>
	<atom:link href="http://www.code-pal.com/category/blog/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code-pal.com</link>
	<description>We develop enthralling web experiences.</description>
	<lastBuildDate>Tue, 03 Jan 2012 19:43:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>WordPress Year in Review: The Best Tutorials of 2011</title>
		<link>http://www.code-pal.com/wordpress-year-in-review-the-best-tutorials-of-2011/</link>
		<comments>http://www.code-pal.com/wordpress-year-in-review-the-best-tutorials-of-2011/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 19:43:16 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[about wordpress]]></category>
		<category><![CDATA[best of wordpress]]></category>
		<category><![CDATA[future of wordpress]]></category>
		<category><![CDATA[how to wordpress]]></category>
		<category><![CDATA[how to wordpress website]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[why wordpress]]></category>
		<category><![CDATA[word press]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress 3]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=875</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2012/01/best-tutorials-of-2011-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="best-tutorials-of-2011" title="best-tutorials-of-2011" /></p>2011 has seen a lot of changes in Wordpress with loads of new features and updates. We also saw Wordpress grow as a CMS. It has become the top most CMS platform used in the world. It has a content management system <a href="http://w3techs.com/technologies/overview/content_management/all">market share</a> of around <strong>54.3%</strong> Here is a round up of some of the the best, unique and useful Wordpress tutorials written in 2011 and what to expect in the future.
]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2012/01/best-tutorials-of-2011-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="best-tutorials-of-2011" title="best-tutorials-of-2011" /></p><p>The following round up of tutorials is my latest article written for <a href="http://wp.tutsplus.com/articles/wordpress-year-in-review-the-best-tutorials-of-2011/">WPTuts+</a>. It contains the following sections of tutorials:</p>
<ul>
<li>Theme Development Related Tutorials</li>
<li>Plugins Related</li>
<li>WordPress Security Related</li>
<li>Data Analysis</li>
<li>Troubleshooting and Debugging WordPress</li>
<li>WordPress Post Management Related</li>
<li>Looking forward to 2012</li>
</ul>
<p>Here is a preview of the article. </p>
<hr />
<h3>Theme Development Related</h3>
<h4>Deploy Your WordPress Blog to the Cloud</h4>
<div class="post-image"><img src="http://wptutsplus.s3.amazonaws.com/138_BestOf2011/images/tut1.jpg" border="0" /></div>
<p>For the last decade, hosting a large scale web application has been a daunting task, reserved only for experts. Not anymore; when Amazon opened its server architecture, everything changed. Computer hardware moved to the cloud, and became available to any and all developers. In this tutorial, we will install WordPress in the cloud.</p>
<p><a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/" target="_blank">Tutorial Link</a><br/></p>
<h3>WordPress Security Related</h3>
<h4>Quick Tip: Backing Up Your Blog with VaultPress</h4>
<div class="post-image"><img src="http://wptutsplus.s3.amazonaws.com/138_BestOf2011/images/tut43.jpg" border="0" /></div>
<p>As with almost every other web app, WordPress stores information in a database. There’s always a chance that your data could be lost or corrupted, and it’s wise to have a solid backup strategy in place. This is where VaultPress enters the scene to save the day, providing complete backup and security for your WordPress site.</p>
<p><a href="http://www.code-pal.com/quick-tip-backing-up-your-blog-with-vaultpress/" target="_blank">Tutorial Link</a><br/></p>
<p>Check out the complete list of the best tutorials of 2011 by visiting my latest article at <a href="http://wp.tutsplus.com/articles/wordpress-year-in-review-the-best-tutorials-of-2011/">WPTuts+</a>. Also do leave your suggestions and feed backs. Would love to know what kind of tutorials and round ups you would like to read in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/wordpress-year-in-review-the-best-tutorials-of-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Backing Up Your Blog with VaultPress</title>
		<link>http://www.code-pal.com/quick-tip-backing-up-your-blog-with-vaultpress/</link>
		<comments>http://www.code-pal.com/quick-tip-backing-up-your-blog-with-vaultpress/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 19:21:21 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Quick tip]]></category>
		<category><![CDATA[Vaultpress]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=867</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/07/vaultpress-thumbnail-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Backing up your Wordpress blog with Vaultpress" title="vaultpress-thumbnail" /></p>As with almost every other web app, WordPress stores information in a database. There’s always a chance that your data could be lost or corrupted, and it’s wise to have a solid backup strategy in place. This is where VaultPress enters the scene to save the day, providing complete backup and security for your WordPress site.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/07/vaultpress-thumbnail-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Backing up your Wordpress blog with Vaultpress" title="vaultpress-thumbnail" /></p><h3>Introduction</h3>
<p><a href="http://vaultpress.com/">VaultPress</a> is the latest product from <a href="http://automattic.com/">Automattic</a> (the creators of WordPress.com) which provides around the clock, complete backup of your WordPress blog. It performs a synchronization of every post, comment, media file, revision and dashboard setting across at least two separate cloud services.</p>
<p>If that is not enough, they provide continuous security, disaster recovery and also help you in the migration of your blog to a new host. All this sounds interesting, and if you want to start backing up and securing your blog right away, then this Quick Tip will have you set up in five minutes!.</p>
<p><a href="http://wp.tutsplus.com/tutorials/security/quick-tip-backing-up-your-blog-with-vaultpress/"><img alt="" src="http://wptutsplus.s3.amazonaws.com/004_vaultpress/installation-steps.jpg" class="alignnone" width="550" height="352" /></a></p>
<p>This quick tip is one of my tutorials at <a href="http://wp.tutsplus.com/tutorials/security/quick-tip-backing-up-your-blog-with-vaultpress/">WPTuts+</a> Check out the complete tutorial <a href="http://wp.tutsplus.com/tutorials/security/quick-tip-backing-up-your-blog-with-vaultpress/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/quick-tip-backing-up-your-blog-with-vaultpress/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>40+ Stunning WordPress Portfolio Themes</title>
		<link>http://www.code-pal.com/40-stunning-wordpress-portfolio-themes/</link>
		<comments>http://www.code-pal.com/40-stunning-wordpress-portfolio-themes/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 06:41:25 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Premium]]></category>
		<category><![CDATA[Round Up]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=857</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/07/40-stunning-wordpress-themes-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="40-stunning-wordpress-themes" title="40-stunning-wordpress-themes" /></p>WordPress is the most popular blogging and CMS platform out there. The vast amount of features and the flexibility it provides, one can create mind blowing themes for it. Here is a round up list of the most stunning WordPress themes, created specifically for displaying your design portfolio.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/07/40-stunning-wordpress-themes-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="40-stunning-wordpress-themes" title="40-stunning-wordpress-themes" /></p><p>This is my first round up ever. What better way to write my first round up post than to display a list of the best WordPress themes out there for portfolio purposes. This list consists of the most stunning WordPress portfolio themes both free and premium ones. This is also my latest post at <a href="http://wp.tutsplus.com/articles/40-stunning-wordpress-portfolio-themes/">WPTuts+</a></p>
<h3>Boldly</h3>
<p><a href="http://wp.tutsplus.com/articles/40-stunning-wordpress-portfolio-themes/"><img class="alignnone" src="http://wptutsplus.s3.amazonaws.com/014_40portfoliothemes/images/boldy.jpg" alt="" width="550" height="456" /></a><br />
Boldly is a beautiful theme for portfolio with an amazing slider at the top. It has all the qualities of a premium theme and has loads of customization options at the backend.<br />
<a href="http://wordpress.site5.net/boldy">Preview</a> | <a href="http://gk.site5.com/t/325">Download</a></p>
<h3>Wordfolio</h3>
<p><a href="http://wp.tutsplus.com/articles/40-stunning-wordpress-portfolio-themes/"><img alt="" src="http://wptutsplus.s3.amazonaws.com/014_40portfoliothemes/images/wordfolio.jpg" class="alignnone" width="550" height="457" /></a><br />
Wordfolio is an award winning wordpress portfolio theme. It has this unique innovative concept of displaying the featured work, which impresses the visitor within seconds. It&#8217;s totally worth the price.<br />
<a href="http://themeforest.net/item/wordfolio/full_screen_preview/38723?ref=WordPressPremium">Preview</a> | <a href="http://themeforest.net/item/wordfolio/38723?ref=WordPressPremium">Buy</a></p>
<p>To check out the remaining awesome 38 themes and their download links, visit my latest post at <a href="http://wp.tutsplus.com/articles/40-stunning-wordpress-portfolio-themes/">WPTuts+</a>. Also do leave your suggestions and feed backs. Would love to know what kind of tutorials and round ups you would like to read in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/40-stunning-wordpress-portfolio-themes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Using Shortcodes in Theme Development</title>
		<link>http://www.code-pal.com/quick-tip-using-shortcodes-in-theme-development/</link>
		<comments>http://www.code-pal.com/quick-tip-using-shortcodes-in-theme-development/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 16:20:07 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Quick tip]]></category>
		<category><![CDATA[Shortcodes]]></category>
		<category><![CDATA[Theme Development]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=845</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/07/using-shortcodes-in-wordpress-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="using-shortcodes-in-wordpress" title="using-shortcodes-in-wordpress" /></p>The WordPress Shortcode API was introduced to WordPress in Version 2.5. Since then, it has become a widely used method for allowing quick customisation of layout and inserting certain formatting snippets. But shortcodes can be equally useful when creating WordPress themes – here’s how you can make full use of them!]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/07/using-shortcodes-in-wordpress-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="using-shortcodes-in-wordpress" title="using-shortcodes-in-wordpress" /></p><p><a href="http://www.envato.com">Envato</a> just launched their latest tuts+ site <a href="http://wp.tutsplus.com">WPTuts+</a>. This site is completely dedicated to wordpress and I am sure I will be writing  many tutorials there in the future <img src='http://www.code-pal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . This is one of the quick tips I wrote for WPTuts+ which briefly explains how you can use the powerful shortcodes feature provided by WordPress.</p>
<h3>Introduction</h3>
<p>Shortcodes have many benefits if used properly in theme files. If you are familiar with preprocessor macros in C / C ++, then shortcodes can serve a somewhat similar function in WordPress. The basic purpose of using a shortcode is to replace the placeholder with your own custom piece of HTML code when the server sends the page to the client side. The steps involved in creation and implementation of shortcodes are as follows&#8230;</p>
<p>You can check out the complete quick tip at the new  <a href="http://wp.tutsplus.com/tutorials/plugins/quick-tip-using-shortcodes-in-theme-development/">WPTuts+ site</a> . Do share your comments and views regarding this quick tip and also any suggestions for tutorials you would like to read <img src='http://www.code-pal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/quick-tip-using-shortcodes-in-theme-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create a Multi-Layout Portfolio with WordPress</title>
		<link>http://www.code-pal.com/create-a-multi-layout-portfolio-with-wordpress/</link>
		<comments>http://www.code-pal.com/create-a-multi-layout-portfolio-with-wordpress/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 19:12:20 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Grunge]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=834</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/06/multi-layout-portfolio-usin-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="multi-layout-portfolio-usin" title="multi-layout-portfolio-usin" /></p>WordPress, as a content management system, is often used for creating portfolio websites. With the evolution of user interface design and functionalities, a new trend has emerged: displaying portfolio items in different layouts. This tutorial details the process of creating a dedicated portfolio section in WordPress’ backend, and using jQuery and CSS3 to display the portfolio in a classy manner.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/06/multi-layout-portfolio-usin-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="multi-layout-portfolio-usin" title="multi-layout-portfolio-usin" /></p><p>My latest tutorial for <a href="http://net.tutsplus.com/tutorials/wordpress/create-a-multi-layout-portfolio-with-wordpress/" target="_blank">NetTuts</a> discusses about how we can use WordPress as a CMS and flex it to our needs to create a stunning portfolio with multiple layouts. In this tutorial, we are going to extensively use powerful features of WordPress, such as custom posts, custom taxonomies, and we’ll also write a function to fetch our own custom excerpts. This is what we are going to create</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2011/06/final-preview.jpg" alt="Create a Multi Layout Portfolio Using WordPress" title="final-preview" width="550" height="345" class="alignnone size-full wp-image-839" /></div>
<p>The multi-layout theme will function in such a way that the user can select between a grid and list layout.This is the basic design of how our portfolio site will appear in grid mode:</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2011/06/grid-layout-view.jpg" alt="Multi- Layout Portfolio - Grid View" title="grid-layout-view" width="550" height="508" class="alignnone size-full wp-image-841" /></div>
<p>Once the user clicks on the list view control, the whole layout will smoothly change to a list view which will contain the title of the project, the tags associated with it, and a short description.</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2011/06/list-layout-view.jpg" alt="Multi Layout Portfolio With WordPress - List View" title="list-layout-view" width="550" height="508" class="alignnone size-full wp-image-840" /></div>
<p>Check out the complete <a href="http://net.tutsplus.com/tutorials/wordpress/create-a-multi-layout-portfolio-with-wordpress/">tutorial</a> on Nettuts and get started on creating that cool portfolio you always wanted! Do share your creations, suggestions with us <img src='http://www.code-pal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/create-a-multi-layout-portfolio-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Integrating Cloud Zoom with WP e-Commerce Gold Cart Gallery</title>
		<link>http://www.code-pal.com/integrating-cloud-zoom-with-wp-e-commerce-gold-cart-gallery/</link>
		<comments>http://www.code-pal.com/integrating-cloud-zoom-with-wp-e-commerce-gold-cart-gallery/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 09:56:43 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Cloud Zoom]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[Gold Cart]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=799</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/04/cloud-zoom-wp-ecommerce-thumbnail1-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Integrating Cloud Zoom with WP e-Commerce Gold Cart Gallery" title="cloud-zoom-wp-ecommerce-thumbnail" /></p>WP e-Commerce&apos; s new version got integrated with Wordpress in a much better manner and has become one of my favourite Wordprss e-Commerce plugins. One of my projects required the integration of Cloud Zoom jQuery plugin with the Gold Cart Gallery. So here is a short hack on how to achieve it in a convincing manner.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2011/04/cloud-zoom-wp-ecommerce-thumbnail1-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Integrating Cloud Zoom with WP e-Commerce Gold Cart Gallery" title="cloud-zoom-wp-ecommerce-thumbnail" /></p><p><strong>Update 30th April, 2011: The WP e-Commerce Gold Cart Plugin got updated to a new version (v2.9.1). They did some changes in the gallery display method. Hence, I had to modify the code I posted earlier, so that it can work with the updated version of the Gold Cart Gallery.:</strong></p>
<h3>The Project</h3>
<p>This project of mine required a gallery in the single product page and also the <a href="http://www.professorcloud.com/mainsite/cloud-zoom.htm" target="_blank">Cloud Zoom plugin</a> enabled such that the users can have a zoomed view of the product&apos;s main image just by hovering over the image. The Gold Cart plugin for WP e-Commerce enabled the Gallery option but it provides the thickbox feature as the default option for previewing images. </p>
<h3>The Problem</h3>
<p>Even though the gallery was displaying the thumbnails perfectly well but there was some problem with it because after clicking on the thumbnail of the images in the gallery, the main product image was not being replaced. The Cloud Zoom plugin was activated on the main image of the product and without the option of the image being replaced by the images in the gallery, the whole point of implementing the gallery was pointless. </p>
<h3>The Solution</h3>
<p>So after doing a bit of research and finding no solution to replace the main image with the image being clicked in the gallery, I was forced to find another solution to the problem. Cloud Zoom is an awesome plugin and luckily it provides an option of implementing a gallery too, by just adding some classes and a complex rel attribute for the hyprlink tags of the images. This can be done in the following manner:</p>
<pre class="brush: xml; title: ;">
&lt;html&gt;
&lt;head&gt;

&lt;!-- Load the Cloud Zoom CSS file --&gt;
&lt;link href=&quot;/styles/cloud-zoom.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;

&lt;!-- You can load the jQuery library from the Google Content Network.
Probably better than from your own server. --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt;

&lt;!-- Load the Cloud Zoom JavaScript file --&gt;
&lt;script type=&quot;text/JavaScript&quot; src=&quot;/js/cloud-zoom.1.0.2.min.js&quot;&gt;&lt;/script&gt;

&lt;/head&gt;
    &lt;body&gt;

        &lt;!--
        An anchor with class of 'cloud-zoom' should surround the small image.
        The anchor's href should point to the big zoom image.
        Any options can be specified in the rel attribute of the anchor.
        Options should be specified in regular JavaScript object format,
        but without the braces.
        --&gt;

        &lt;a href='/images/zoomengine/bigimage00.jpg' class = 'cloud-zoom' id='zoom1'
            rel=&quot;adjustX: 10, adjustY:-4&quot;&gt;
            &lt;img src=&quot;/images/zoomengine/smallimage.jpg&quot; alt='' title=&quot;Optional title display&quot; /&gt;
        &lt;/a&gt;

        &lt;!--
        You can optionally create a gallery by creating anchors with a class of 'cloud-zoom-gallery'.
        The anchor's href should point to the big zoom image.
        In the rel attribute you must specify the id of the zoom to use (useZoom: 'zoom1'),
        and also the small image to use (smallImage: /images/....)
        --&gt;

        &lt;a href='/images/zoomengine/bigimage00.jpg' class='cloud-zoom-gallery' title='Thumbnail 1'
        	rel=&quot;useZoom: 'zoom1', smallImage: '/images/zoomengine/smallimage.jpg' &quot;&gt;
        &lt;img src=&quot;/images/zoomengine/tinyimage.jpg&quot; alt = &quot;Thumbnail 1&quot;/&gt;&lt;/a&gt;

        &lt;a href='/images/zoomengine/bigimage01.jpg' class='cloud-zoom-gallery' title='Thumbnail 2'
        	rel=&quot;useZoom: 'zoom1', smallImage: ' /images/zoomengine/smallimage-1.jpg'&quot;&gt;
        &lt;img src=&quot;/images/zoomengine/tinyimage-1.jpg&quot; alt = &quot;Thumbnail 2&quot;/&gt;&lt;/a&gt;                  

        &lt;a href='/images/zoomengine/bigimage02.jpg' class='cloud-zoom-gallery' title='Thumbnail 3'
        	rel=&quot;useZoom: 'zoom1', smallImage: '/images/zoomengine/smallimage-2.jpg' &quot;&gt;
        &lt;img src=&quot;/images/zoomengine/tinyimage-2.jpg&quot; alt = &quot;Thumbnail 3&quot;/&gt;&lt;/a&gt;

    &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The details on the arguments for the Cloud Zoom plugin are provided <a target="_blank" href="http://www.professorcloud.com/mainsite/cloud-zoom-integration.htm">here</a>. </p>
<p>Now from the above example the main points to note are as follows:</p>
<ul>
<li>Class <strong>cloud-zoom</strong> in the main image&apos;s hyperlink tag. </li>
<li>The href attribute of the hyperlink tag contains the <strong>link to the larger version</strong> of the main image.</li>
<li>The r<strong>el attribute</strong> in the main image hyper link which provides the <strong>primary arguments for the plugin</strong>, which defines how the plugin will work. </li>
<li>The hyperlink tag encloses the <strong>smaller version</strong> of the product main image.</li>
<li>The class <strong>cloud-zoom-gallery</strong> in the hyperlink tag for the gallery thumbnails. </li>
<li>The href attribute of the hyperlink tag contains the link to the <strong>larger version</strong> of the image.</li>
<li> The arguments in the rel attribute for the hyperlink tag in the thumbnail gallery. It contains the <strong>id of the main image hyperlink</strong>, the <strong>link to the small version</strong> of the image. </li>
<li>The gallery hyperlinks enclose the <strong>tiny thumbnail</strong> images of the gallery.</li>
</ul>
<p>Hence, we basically need three versions of the images to implement the gallery. </p>
<ul>
<li>Large Version to enable zoom:<strong> Provided by the Gold Cart plugin itself.</strong></li>
<li>Medium version which is supposed to be the size of the main image for the single product page: <strong>We have to fetch from the database.</strong></li>
<li>Finally, the small tiny thumbnails for the gallery: <strong>Provided by the Gold Cart Plugin itself.</strong></li>
</ul>
<p>Now I am going to describe how to integrate this with the Gold Cart plugin and the required hack. First of all, after installing the Gold Cart Plugin, make sure that you have uploaded some images for the product and enabled the gallery in the settings. Also disable the lightbox feature.</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2011/04/cart-pesentation-options.jpg" alt="Gold Cart Presentation Settings for the Gallery" title="cart-pesentation-options" width="550" height="241" class="alignnone size-full wp-image-813" /></div>
<p>After that make sure that the gallery is being displayed in the single product&apos;s page. Now lets do some code modification. Make sure you have backed up everything, specially the gold cart plugin before proceeding. Edit the <strong>gold_shopping_cart.php</strong> file and search for the function to display the gallery i.e. <strong>gold_shpcrt_display_gallery</strong>. In this function, go to the section which displays the gallery for versions above 3.8.  This should start from the line number 308 (if you haven’t done any modifications to the code already). This is the original version of the code which displays the gallery:</p>
<pre class="brush: php; title: ;">
$output = '';
$product_name = get_the_title( $product_id );
$output .= &quot;&lt;div class='wpcart_gallery'&gt;&quot;;
$args = array(
	'post_type'      =&gt; 'attachment',
	'post_parent'    =&gt; $product_id,
	'post_mime_type' =&gt; 'image',
	'orderby'        =&gt; 'menu_order',
	'order'          =&gt; 'ASC',
	'numberposts'    =&gt; -1
);
$attachments = get_posts($args);
$featured_img = get_post_meta($product_id, '_thumbnail_id');
$thumbnails = array();
if ($attachments) {
	foreach ($attachments as $post) {
		setup_postdata($post);
		$link = wp_get_attachment_link( $post-&gt;ID, 'gold-thumbnails' );
		$size = is_single() ? 'medium-single-product' : 'product-thumbnails';
		$preview_link = wp_get_attachment_image_src( $post-&gt;ID, $size);
		$link = str_replace( 'a href' , 'a rev=&quot;' . $preview_link[0] . '&quot; class=&quot;thickbox&quot; rel=&quot;' . $product_name . '&quot; href' , $link );

		// always display the featured thumbnail first
		if ( in_array( $post-&gt;ID, $featured_img ) )
			array_unshift( $thumbnails, $link );
		else
			$thumbnails[] = $link;
	}
}
$output .= implode( &quot;\n&quot;, $thumbnails );
$output .= &quot;&lt;/div&gt;&quot;;
wp_reset_query();
</pre>
<p>Now this is the modified version of the above code:</p>
<pre class="brush: php; title: ;">
$output = '';
$product_name = get_the_title( $product_id );
$output .= &quot;&lt;div class='wpcart_gallery'&gt;&quot;;
$args = array(
	'post_type'      =&gt; 'attachment',
	'post_parent'    =&gt; $product_id,
	'post_mime_type' =&gt; 'image',
	'orderby'        =&gt; 'menu_order',
	'order'          =&gt; 'ASC',
	'numberposts'    =&gt; -1
);
$attachments = get_posts($args);
$featured_img = get_post_meta($product_id, '_thumbnail_id');
$thumbnails = array();
if ($attachments) {
	foreach ($attachments as $post) {
		setup_postdata($post);
		$link = wp_get_attachment_link( $post-&gt;ID, 'gold-thumbnails' );
		$size = is_single() ? 'medium-single-product' : 'product-thumbnails';
		$preview_link = wp_get_attachment_image_src( $post-&gt;ID, $size);
		// ORIGNIAL $link to Represent gallery images with thickbox
		//$link = str_replace( 'a href' , 'a rev=&quot;' . $preview_link[0] . '&quot; class=&quot;thickbox&quot; rel=&quot;' . $product_name . '&quot; href' , $link );

		// Fetching Medium Image and modifying $link w.r.t the Cloud Zoom jQuery Plugin options to display gallery
		$link = str_replace('attachment-gold-thumbnails','',$link); // removing the class from the img tag because its causing a conflict with the cloud zoom plugin
		$small_image = wp_get_attachment_image_src( $post-&gt;ID, array(337,437)); // returns an array
		$rel_options = &quot;useZoom: 'zoom1', smallImage: '&quot;.$small_image[0].&quot;'&quot;;
		$link = str_replace( 'a href' , 'a rev=&quot;' . $preview_link[0] . '&quot; class=&quot;cloud-zoom-gallery&quot; rel=&quot;' . $rel_options . '&quot; href' , $link );					

		// always display the featured thumbnail first
		if ( in_array( $post-&gt;ID, $featured_img ) )
			array_unshift( $thumbnails, $link );
		else
			$thumbnails[] = $link;
	}
}
$output .= implode( &quot;\n&quot;, $thumbnails ); // Imploding Array element as list items
$output .= &quot;&lt;/div&gt;&quot;; // Ending list
wp_reset_query();
</pre>
<p>Now you can see from the above code that all we need to do is fetch a smaller version of the image (to display in the main image section) and modify the rel attributes such that the cloud zoom plugin activates the gallery feature too. </p>
<p>To enable the Cloud Zoom feature, edit the <strong>wpsc-single_product.php</strong> and modify the code where the image is displayed in a hyerplink tag. You can search it by the class product_image. You need to modify the rel attribute and add an id and a class to the hyperlink enclosing the image.</p>
<pre class="brush: xml; title: ;">
&lt;a id=&quot;zoom1&quot; rel=&quot;position: 'inside',smoothMove: 4&quot; class=&quot;cloud-zoom&quot; href=&quot;&lt;?php echo wpsc_the_product_image(); ?&gt;&quot;&gt;
                       &lt;img class=&quot;product_image&quot; id=&quot;product_image_&lt;?php echo wpsc_the_product_id(); ?&gt;&quot; alt=&quot;&lt;?php echo wpsc_the_product_title(); ?&gt;&quot; title=&quot;&lt;?php echo wpsc_the_product_title(); ?&gt;&quot; src=&quot;&lt;?php echo wpsc_the_product_thumbnail(get_option('product_image_width'),get_option('product_image_height'),'','single'); ?&gt;&quot;/&gt;
&lt;/a&gt;
</pre>
<p>This is all you need to do to integrate the Cloud Zoom jQuery plugin with the WP e-Commerce Gold Cart Plugin&apos;s gallery. Also if you want to enable the jCarousel jQuery plugin on the gallery images, then you need to enclose the gallery hyperlink tags in list elements. For this you need to modify the code slightly such that the hyperlink tags are enclosed in an unordered list.</p>
<pre class="brush: php; title: ;">
$output = '';
$product_name = get_the_title( $product_id );
$output .= &quot;&lt;ul class='wpcart_gallery jcarousel-skin-tango'&gt;&lt;li&gt;&quot;; // Adding li tag to start implode array elements as list items
$args = array(
	'post_type'      =&gt; 'attachment',
	'post_parent'    =&gt; $product_id,
	'post_mime_type' =&gt; 'image',
	'orderby'        =&gt; 'menu_order',
	'order'          =&gt; 'ASC',
	'numberposts'    =&gt; -1
);
$attachments = get_posts($args);
$featured_img = get_post_meta($product_id, '_thumbnail_id');
$thumbnails = array();
if ($attachments) {
	foreach ($attachments as $post) {
		setup_postdata($post);
		$link = wp_get_attachment_link( $post-&gt;ID, 'gold-thumbnails' );
		$size = is_single() ? 'medium-single-product' : 'product-thumbnails';
		$preview_link = wp_get_attachment_image_src( $post-&gt;ID, $size);
		// ORIGNIAL $link to Represent gallery images with thickbox
		//$link = str_replace( 'a href' , 'a rev=&quot;' . $preview_link[0] . '&quot; class=&quot;thickbox&quot; rel=&quot;' . $product_name . '&quot; href' , $link );

		// Fetching Medium Image and modifying $link w.r.t the Cloud Zoom jQuery Plugin options to display gallery
		$link = str_replace('attachment-gold-thumbnails','',$link); // removing the class from the img tag because its causing a conflict with the cloud zoom plugin
		$small_image = wp_get_attachment_image_src( $post-&gt;ID, array(337,437)); // returns an array
		$rel_options = &quot;useZoom: 'zoom1', smallImage: '&quot;.$small_image[0].&quot;'&quot;;
		$link = str_replace( 'a href' , 'a rev=&quot;' . $preview_link[0] . '&quot; class=&quot;cloud-zoom-gallery&quot; rel=&quot;' . $rel_options . '&quot; href' , $link );					

		// always display the featured thumbnail first
		if ( in_array( $post-&gt;ID, $featured_img ) )
			array_unshift( $thumbnails, $link );
		else
			$thumbnails[] = $link;
	}
}
$output .= implode( &quot;&lt;/li&gt;&lt;li&gt;&quot;, $thumbnails ); // Imploding Array element as list items
$output .= &quot;&lt;/li&gt;&lt;/ul&gt;&quot;; // Ending list
wp_reset_query();
</pre>
<h3>Conclusion</h3>
<p>This method works pretty well for integrating the Cloud Zoom plugin with the WP e-Commerce Gold Cart gallery. But one drawback is that we are modifying the actual contents of the gold cart plugin and all the changes will be lost the day we update the WP e-Commerce gold cart plugin. Hence, I will try to make a plugin which enables this functionality rather than hard coding it in the plugin files.</p>
<p><small><strong>Disclaimer</strong>: The above tutorial is meant to enable the Cloud Zoom jQuery plugin with the WP e-Commerce Gold Cart Gallery. I am not responsible if anything goes wrong and the shopping cart does not behave in the expected way. Please take proper backups before messing with any code of the theme or the plugin files.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/integrating-cloud-zoom-with-wp-e-commerce-gold-cart-gallery/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>How to Create a FAQ Page with WordPress and Custom Post Types</title>
		<link>http://www.code-pal.com/how-to-create-a-faq-page-with-wordpress-and-custom-post-types/</link>
		<comments>http://www.code-pal.com/how-to-create-a-faq-page-with-wordpress-and-custom-post-types/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 18:46:52 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS 3]]></category>
		<category><![CDATA[Custom Post]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=673</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/12/creating-faq-with-wp-jquery-150x150.png" class="attachment-thumbnail wp-post-image" alt="creating-faq-with-wp-jquery" title="creating-faq-with-wp-jquery" /></p>In the web world, a FAQ page is created specifically for the viewers/customers, and contains general questions and their respective answers about a particular product or service. This tutorial details the process of creating a dedicated FAQ section in the WordPress backend with custom post types, as well as how to spice up the actual page a bit by using jQuery and CSS.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/12/creating-faq-with-wp-jquery-150x150.png" class="attachment-thumbnail wp-post-image" alt="creating-faq-with-wp-jquery" title="creating-faq-with-wp-jquery" /></p><p>I wrote a tutorial for <a href="http://net.tutsplus.com/tutorials/wordpress/creating-an-interactive-faq-with-wordpress-and-jquery-ui/" target="_blank">NetTuts</a> about how to use the ever popular Blogging/CMS platform WordPress, to create a dedicated FAQ section in the back-end using &#8216;Custom Post Types&#8217;. Then fetch those custom post types and display in the front end in a spiced up manner using jQuery and CSS3.<br />
This is what the end product will look like.</p>
<div class="post-image"><img src="http://www.code-pal.com/wp-content/uploads/2010/12/final-preview.jpg" alt="Create a faq page with wordpress and custom post types final" title="final-preview" width="550" height="472" class="alignnone size-full wp-image-677" /></div>
<p>When the user clicks on any of the FAQs, the page will scroll down automatically to the respective answer and highlight it.</p>
<div class="post-image">
<img src="http://www.code-pal.com/wp-content/uploads/2010/12/current-faq.jpg" alt="Current Faq Section" title="current-faq" width="550" height="346" class="alignnone size-full wp-image-678" />
</div>
<p>Check out the complete <a href="http://net.tutsplus.com/tutorials/wordpress/creating-an-interactive-faq-with-wordpress-and-jquery-ui/">tutorial</a> on Nettuts and create some cool, interactive FAQs page for your own site. Do share your creations with us <img src='http://www.code-pal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/how-to-create-a-faq-page-with-wordpress-and-custom-post-types/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a Neon Blink Effect for your Forms using CSS3 and jQuery</title>
		<link>http://www.code-pal.com/creating-a-neon-blink-effect-for-your-forms-using-css3-and-jquery/</link>
		<comments>http://www.code-pal.com/creating-a-neon-blink-effect-for-your-forms-using-css3-and-jquery/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 17:07:00 +0000</pubDate>
		<dc:creator>Rakesh</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS 3]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=574</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/07/neon-blink-effect-form-css3-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Neon Blink Effect for Forms using CSS3 and jQuery" title="neon-blink-effect-form-css3" /></p>Our latest tutorial at <a href="http://1stwebdesigner.com" target="_blank">1stWebDesigner</a>. How cool will it be to have a glowing blink effect behind your input boxes in a form without using Flash? Well, then this tutorial teaches you on how to build one in the easiest manner possible.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/07/neon-blink-effect-form-css3-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="Neon Blink Effect for Forms using CSS3 and jQuery" title="neon-blink-effect-form-css3" /></p><p>Well thanks to the bright new kid on the block, CSS3, spruced up with a bit of jQuery, I will show you how to build a nifty effect to enhance your forms.</p>
<p>Am sure that this cool Neon blink effects in forms are going to be useful for a lot of purposes so don’t miss my tutorial on <a href="http://www.1stwebdesigner.com/tutorials/neon-blink-effect-forms-css3-jquery/" target="_blank">1stWebDesigner.com</a>.</p>
<div class="post-image"><a href="http://www.1stwebdesigner.com/tutorials/neon-blink-effect-forms-css3-jquery/"><img class="alignnone size-full wp-image-581" src="http://www.code-pal.com/wp-content/uploads/2010/07/neon-blink-effect-final.jpg" alt="neon-blink-effect-final" width="500" height="500" /></a></div>
<p>In this tutorial, we have made use of <strong>@-webkit-keyframes </strong>which works only in browsers using the Webkit layout engine like <strong>Chrome</strong> and <strong>Safari</strong>. For browsers like Firefox and Opera, where there is no alternative, we will have to gracefully degrade the effect, which in this case will be just a box-shadow on focus. Internet Explorer ( till version 8 ) cannot render most of what we will learn here, but IE 9 does seem to be very promising from what I’ve seen in the recent platform preview.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/creating-a-neon-blink-effect-for-your-forms-using-css3-and-jquery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Create a Cool Slide Out Panel with CSS3 only</title>
		<link>http://www.code-pal.com/how-to-create-a-cool-slide-out-panel-with-css3-only/</link>
		<comments>http://www.code-pal.com/how-to-create-a-cool-slide-out-panel-with-css3-only/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 11:43:47 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[CSS 3]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=546</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/07/slide-out-css3-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="slide-out-css3" title="slide-out-css3" /></p>Many sites have a really cool hidden panel which contains some relevant information and this panel is revealed to us, with a cool animation, when we click on a particular button or hover over it. This has usually been achieved using jQuery. But now as we advent towards the future and CSS3 is becoming a reality, here is a tutorial on how to build an animated slide out panel using only CSS3.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/07/slide-out-css3-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="slide-out-css3" title="slide-out-css3" /></p><p>I wrote a tutorial for <a href="http://www.1stwebdesigner.com/" target="_blank">1stwebdesigner.com</a> It is about how to use CSS3 to achieve goals which were only possible using javascript libraries like jQuery and Mootools. In this tutorial, we create a slide out subscribe panel.</p>
<div class="post-image"><a href="http://www.1stwebdesigner.com/tutorials/slide-out-panel-css3/"><img class="alignnone size-full wp-image-550" title="Final Preview of the Tutorial" src="http://www.code-pal.com/wp-content/uploads/2010/07/final-preview.jpg" alt="Final Preview of the Tutorial" width="550" height="346" /></a></div>
<p>Once the viewer hovers over the subscribe button on the top right hand corner, the whole hidden panel will come sliding down with a very smooth animation effect revealing the subscribing options to the visitor. All of this will be done by just using CSS3.</p>
<div class="post-image"><a href="http://www.1stwebdesigner.com/tutorials/slide-out-panel-css3/"><img class="alignnone size-full wp-image-549" title="after-hover" src="http://www.code-pal.com/wp-content/uploads/2010/07/after-hover.jpg" alt="Effect on Hovering over the subscribe button" width="550" height="337" /></a></div>
<p>Don&#8217;t miss my <a title="How to Create a Cool Slide Out Panel with CSS3 only" href="http://www.1stwebdesigner.com/tutorials/slide-out-panel-css3/" target="_blank">tutorial</a> on 1stWebDesigner.com if you want to bypass using javascript to achieve this cool sliding effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/how-to-create-a-cool-slide-out-panel-with-css3-only/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The &#8216;Select&#8217; Problem After Using jqTransform and its Solution</title>
		<link>http://www.code-pal.com/the-select-problem-after-using-jqtransform-and-its-solution/</link>
		<comments>http://www.code-pal.com/the-select-problem-after-using-jqtransform-and-its-solution/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:33:08 +0000</pubDate>
		<dc:creator>Sumeet</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[jqTransform]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.code-pal.com/?p=411</guid>
		<description><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/02/jqtransform-thumbnail-150x150.png" class="attachment-thumbnail wp-post-image" alt="The &#039;Select&#039; Problem After Using jqTransform and its Solution" title="The &#039;Select&#039; Problem After Using jqTransform and its Solution" /></p>Recently, I was working on a project which required a customized form with only select boxes. I used jqTransform to customize the form and while working on it I discovered that after transforming the select box into a list of hyperlinks, the 'change' method of the select box doesn't work at all. As 'on-value-change' event is a very important function for any drop down list box so here is a very simple solution to manipulate it while using jqTransform.]]></description>
			<content:encoded><![CDATA[<p><img width="150" height="150" src="http://www.code-pal.com/wp-content/uploads/2010/02/jqtransform-thumbnail-150x150.png" class="attachment-thumbnail wp-post-image" alt="The &#039;Select&#039; Problem After Using jqTransform and its Solution" title="The &#039;Select&#039; Problem After Using jqTransform and its Solution" /></p><h3>The Project</h3>
<p>In this recent project of mine, I was required to construct a landing page. In this landing page, there would be a list of languages and after the user selects any particular language, the homepage of the site would open automatically in the respective selected language. It was also required to style the select list box in the way it was given in the design of the landing page. So I opted for the <a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/" target="_blank">jqTransform</a> jQuery plug-in, which I used once to style some forms. <a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/" target="_blank">jqTransform</a> is very nice plug-in to customize the forms in a very easy way and the end product is no doubt beautiful. But in this case, it became a minor speed breaker to my progress.</p>
<h3>The Problem</h3>
<p>The drop down list control of the html form contains the &#8216;select&#8217; tags which enclose the various &#8216;option&#8217; tags. Here is a form which I am using in this tutorial to explain the problem:</p>
<pre class="brush: xml; title: ;">
&lt;form&gt;
	&lt;h4&gt;Select Box Without jqTransform&lt;/h4&gt;
	&lt;div id=&quot;box-city&quot; class=&quot;select-menus&quot;&gt;
		&lt;label&gt;City&lt;/label&gt;
		&lt;br/&gt;
		&lt;select name=&quot;select-country&quot;&gt;
  		        &lt;option&gt;Gotham&lt;/option&gt;
			&lt;option&gt;New York City&lt;/option&gt;
			&lt;option&gt;Smallville&lt;/option&gt;
		&lt;/select&gt;
		&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
	&lt;/div&gt;
&lt;/form&gt;
</pre>
<p>What jqTransform does is, it scans the whole &#8216;select&#8217; tag and creates an unordered list containing hyper-links of the options in the drop-down-list. It then hides the original &#8216;select&#8217; tag and its content.</p>
<pre class="brush: xml; title: ;">
&lt;form class=&quot;jqtransform jqtransformdone&quot;&gt;
	&lt;h4&gt;Select box with jqTransform and normal select change method&lt;/h4&gt;
	&lt;div class=&quot;select-menus&quot; id=&quot;box-name&quot;&gt;
		&lt;label style=&quot;cursor: pointer;&quot;&gt;Name&lt;/label&gt;
		&lt;div class=&quot;jqTransformSelectWrapper&quot; style=&quot;z-index: 10; width: 150px;&quot;&gt;
			&lt;div&gt;
				&lt;span style=&quot;width: 119px;&quot;&gt;Batman&lt;/span&gt;
				&lt;a class=&quot;jqTransformSelectOpen&quot; href=&quot;#&quot;&gt;&lt;/a&gt;
			&lt;/div&gt;
                        &lt;ul style=&quot;width: 148px; display: none; visibility: visible; height: 100px; overflow: hidden;&quot;&gt;
				&lt;li&gt;&lt;a index=&quot;0&quot; href=&quot;#&quot; class=&quot;selected&quot;&gt;Batman&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a index=&quot;1&quot; href=&quot;#&quot;&gt;Robin&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a index=&quot;2&quot; href=&quot;#&quot;&gt;Superman&lt;/a&gt;&lt;/li&gt;
				&lt;li&gt;&lt;a index=&quot;3&quot; href=&quot;#&quot;&gt;Spiderman&lt;/a&gt;&lt;/li&gt;
			&lt;/ul&gt;
			&lt;select name=&quot;select-country&quot; class=&quot;jqTransformHidden&quot; style=&quot;&quot;&gt;
	 				&lt;option&gt;Batman&lt;/option&gt;
					&lt;option&gt;Robin&lt;/option&gt;
					&lt;option&gt;Superman&lt;/option&gt;
					&lt;option&gt;Spiderman&lt;/option&gt;
			&lt;/select&gt;
		&lt;/div&gt;
		&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
	&lt;/div&gt;
&lt;/form&gt;
</pre>
<p>This does not create a problem when we use the &#8216;select&#8217; tag generally for selecting a particular value and then performing the form submission by using a submit button. It creates a problem when we want to perform some function when the value of the drop down list is changed. </p>
<p>This is normally achieved in javascript by using the &#8216;change&#8217; method of the select control. The &#8216;change&#8217; method captures the value-change event and we can access the value selected by the user in the following manner.</p>
<pre class="brush: jscript; title: ;">
// Capturing the change event of the Non-Transformed Select Box.
$(&quot;#box-city select&quot;).change(function(){
	var value= $(this).val();
    alert(&quot;Value Selected = &quot;+value);
});
</pre>
<p>But after using the <a href="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/" target="_blank">jqTransform</a> plugin, the &#8216;select&#8217; tag is no more there to apply the change method on. </p>
<h3>The Solution</h3>
<p>The solution to this, is a very simple one. We can simulate the change event for the jqTransformed drop down list by applying a click function to the hyper-link element within the unordered list. Then we can have the selected value by accessing the text of the span tag where the selected element is set or displayed.</p>
<pre class="brush: jscript; title: ;">
// Capturing the change event of the Transformed Select Box using the modified method of capturing the value change event.
$(&quot;#box-age div.jqTransformSelectWrapper ul li a&quot;).click(function(){
	var value= $(&quot;#box-age div.jqTransformSelectWrapper span&quot;).text()
	alert(&quot;Value Selected = &quot;+value);
	return false; //prevent default browser action
});
</pre>
<h3>Conclusion</h3>
<p>This is one way of simulating the change function for drop-down-list boxes after using jqTransform to customize them. The other option is to modify the jqTransform plugin itself to properly access the onChange event of the &#8216;Select&#8217; boxes. I hope the jqTransform plug-in developers can fix this problem in their next release of the plug-in. Though this is not a very important or common bug but I do hope that this was of some help. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-pal.com/the-select-problem-after-using-jqtransform-and-its-solution/feed/</wfw:commentRss>
		<slash:comments>73</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/


Served from: www.code-pal.com @ 2012-02-11 09:44:51 -->
