<?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>Huy Dinh &#187; PHP</title>
	<atom:link href="http://huydinh.co.uk/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://huydinh.co.uk/blog</link>
	<description>Just 8 bit crazy about coding</description>
	<lastBuildDate>Sat, 23 Jan 2010 11:47:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Replacement zoomer for Magento</title>
		<link>http://huydinh.co.uk/blog/2008/08/31/replacement-zoomer-for-magento/</link>
		<comments>http://huydinh.co.uk/blog/2008/08/31/replacement-zoomer-for-magento/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 11:57:55 +0000</pubDate>
		<dc:creator>Huy Dinh</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[zoomer]]></category>

		<guid isPermaLink="false">http://huydinh.co.uk/blog/?p=40</guid>
		<description><![CDATA[One of Magento's little annoyances is the main image preview method - like everything else about Magento, it comes with bells and whistles. Is that a bad thing? Well, yes.
Before I complain, look at the original zoomer.
I'd argue whether the average user needs to zoom into an image using the a slider, because imo, they [...]]]></description>
			<content:encoded><![CDATA[<p>One of <a title="Magento homepage" href="http://www.magentocommerce.com/" target="_blank">Magento</a>'s little annoyances is the main image preview method - like everything else about Magento, it comes with bells and whistles. Is that a bad thing? Well, yes.</p>
<p>Before I complain, look at the <a href="http://demo.magentocommerce.com/asicsr-men-s-gel-kayanor-xii.html">original zoomer</a>.</p>
<p>I'd argue whether the average user needs to zoom into an image using the a slider, because imo, they wither want to see the whole image or as much detail as possible (maximum zoom). Luckily the front end is much easier to change than the back end, so I've made my own zoomer tool which is infinitely easier to use (because you can't actually control anything) you just roll the mouse pointer over the image, a little box will appear that shows a portion of the actual image with maximum zoom. Move the mouse pointer and the zoomed image will be updated accordingly.</p>
<p>Easy, peasy, nifty.</p>
<p>See a <a title="Zoomer demo" href="/demo/zoomer/">demo</a> and <a title="Download zoomer" href="/demo/zoomer/zoomer.zip">download</a> it.</p>
<p>It was written specificly for <a title="Magento homepage" href="http://www.magentocommerce.com/" target="_blank">Magento</a> 1.1 so uses <a title="Prototype homepage" href="http://www.prototypejs.org/" target="_blank">Prototype</a> 1.4 instead of the latest.</p>
<p>To use it, follow similar instructions to <a title="Install Lightbox for Magento" href="http://www.magentocommerce.com/wiki/adding_lightbox_to_magento_v2" target="_blank">installing lightbox</a>:</p>
<p>Put the .js in the main js folder: /js/huy/.<br />
Put the .css in your theme's css folder: /skin/frontend/default/default/css/huy/</p>
<p>In /app/design/frontend/default/default/template/catalog/product/view/ delete the following lines:</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"a-center"</span> id=<span style="color:#FF0000;">"track_hint"</span>&gt;&lt;?php <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$this</span>-&gt;__<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Double click on above image to view full picture'</span><span style="color:#006600; font-weight:bold;">&#41;</span> ?&gt;&lt;/p&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"image-zoom"</span> id=<span style="color:#FF0000;">"track_outer"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;img id=<span style="color:#FF0000;">"zoom_out"</span> src=<span style="color:#FF0000;">"&lt;?php echo $this-&gt;getSkinUrl('images/slider_btn_zoom_out.gif') ?&gt;"</span> alt=<span style="color:#FF0000;">"&lt;?php echo $this-&gt;__('Zoom Out') ?&gt;"</span> <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"btn-zoom-out"</span> /&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;div id=<span style="color:#FF0000;">"track"</span>&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div id=<span style="color:#FF0000;">"handle"</span>&gt;&lt;/div&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;img id=<span style="color:#FF0000;">"zoom_in"</span> src=<span style="color:#FF0000;">"&lt;?php echo $this-&gt;getSkinUrl('images/slider_btn_zoom_in.gif') ?&gt;"</span> alt=<span style="color:#FF0000;">"&lt;?php echo $this-&gt;__('Zoom In') ?&gt;"</span> <span style="color:#000000; font-weight:bold;">class</span>=<span style="color:#FF0000;">"btn-zoom-in"</span> /&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/div&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color:#FF0000;">"text/javascript"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Event.observe<span style="color:#006600; font-weight:bold;">&#40;</span>window, <span style="color:#FF0000;">'load'</span>, <span style="color:#000000; font-weight:bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; product_zoom = <span style="color:#000000; font-weight:bold;">new</span> Product.Zoom<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'image'</span>, <span style="color:#FF0000;">'track'</span>, <span style="color:#FF0000;">'handle'</span>, <span style="color:#FF0000;">'zoom_in'</span>, <span style="color:#FF0000;">'zoom_out'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;/script&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You may want to change the styling of zoomer.css to taste.</p>
<p>Remember to minify it!</p>
]]></content:encoded>
			<wfw:commentRss>http://huydinh.co.uk/blog/2008/08/31/replacement-zoomer-for-magento/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Minify Magento&#8217;s JS and CSS</title>
		<link>http://huydinh.co.uk/blog/2008/08/31/minify-magentos-js-and-css/</link>
		<comments>http://huydinh.co.uk/blog/2008/08/31/minify-magentos-js-and-css/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 10:38:13 +0000</pubDate>
		<dc:creator>Huy Dinh</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[optimisation]]></category>

		<guid isPermaLink="false">http://huydinh.co.uk/blog/?p=36</guid>
		<description><![CDATA[I don't want to sound like a broken record but Magento is slow. So why then aren't the JS and CSS minified by default?
My love for optimisation knows no boundaries, as such, I've taken it on myself to provide an automated solution - here it is:
minify.zip
It's a simple script that scans through each theme's layout/page.xml [...]]]></description>
			<content:encoded><![CDATA[<p>I don't want to sound like a broken record but <a title="Magento homepage" href="http://connect.magentocommerce.com/" target="_blank">Magento</a> is slow. So why then aren't the JS and CSS minified by default?</p>
<p>My love for optimisation knows no boundaries, as such, I've taken it on myself to provide an automated solution - here it is:</p>
<p><a title="Download minify.zip" href="http://www.huydinh.co.uk/files/minify.php">minify.zip</a></p>
<p>It's a simple script that scans through each theme's layout/page.xml and minifies each JS and CSS it finds.</p>
<p>To use the script, you need to have the Java runtime environment installed, php must have shell execution abilities and your webserver must have write permissions in  each theme's page.xml (<em>/app/design/frontend/default/default/layout/page.xml</em>), css folder (<em>/skin/frontend/default/default/css</em>) and the main js folder (<em>/js</em>). You also need to have <a title="YUI Compressor" href="http://developer.yahoo.com/yui/compressor/" target="_blank">YUI Compressor</a>'s build <strong>jar </strong>file on your server (<a title="Download YUI Compressor" href="http://www.julienlecomte.net/yuicompressor/" target="_blank">download it here</a>).</p>
<p>One last thing is to edit the script with your Magento's root folder and location of YUI Compressor's jar file.</p>
<p>It is recommended that you put the script into a password protected folder!</p>
<p>Oh, one last thing: I haven't tested the script in a Windows environment so it may not work.</p>
]]></content:encoded>
			<wfw:commentRss>http://huydinh.co.uk/blog/2008/08/31/minify-magentos-js-and-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Crooked Tongues Store  &#8211; refreshed</title>
		<link>http://huydinh.co.uk/blog/2008/07/22/crooked-tongues-store-refreshed/</link>
		<comments>http://huydinh.co.uk/blog/2008/07/22/crooked-tongues-store-refreshed/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 20:13:24 +0000</pubDate>
		<dc:creator>Huy Dinh</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://huydinh.co.uk/blog/?p=24</guid>
		<description><![CDATA[Crooked Tongues, the famous online sneakers store has been updated with a new ecommerce system - one built from scratch, based on the CMS I built for Freeview... well, not quite "based on" but there are similar features and functionality - especially the recursive navigation/categorisation structure whereby each category can have child categories... there's a [...]]]></description>
			<content:encoded><![CDATA[<p>Crooked Tongues, the famous online sneakers store has been updated with a new ecommerce system - one built from scratch, based on the CMS I built for Freeview... well, not quite "based on" but there are similar features and functionality - especially the recursive navigation/categorisation structure whereby each category can have child categories... there's a name for that design pattern but I don't remember what it is.</p>
<p>Built using the Code Igniter framework by Ca Phun Ung and I, it's very fast and robust and was completed in record time of aproximately 2 months. Most of the backend logic was done by me, templates and javascript by Ca Phun.</p>
<p><a title="Visit crooked tongues sneakers store" href="http://www.crookedtongues.com" target="_blank"><img class="aligncenter size-full wp-image-25" title="Crooked Tongues Store" src="http://huydinh.co.uk/blog/wp-content/uploads/2008/07/crookedtongues.png" alt="" width="500" height="383" /></a></p>
<p>I'm pretty proud of this shopping cart system... it has a little bit of data redundancy but it makes the system faster so even though I'm an optimisation evangelist, I think having the redundancy is a good call.</p>
<p>The system is quite flexible - you can sell shoes with multiple size/quantities, apparel with up to 20 different sizes, accessories without a size, homogeneous products with 1 difference... such as a choice of colour.</p>
<p>Anyway, hop over to <a title="Visit crooked tongues sneakers store" href="http://www.crookedtongues.com" target="_blank">http://www.crookedtongues.com</a> for some street culture.</p>
]]></content:encoded>
			<wfw:commentRss>http://huydinh.co.uk/blog/2008/07/22/crooked-tongues-store-refreshed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slots Logic &#8211; a slot machine search engine</title>
		<link>http://huydinh.co.uk/blog/2008/02/06/slots-logic-a-slot-machine-search-engine/</link>
		<comments>http://huydinh.co.uk/blog/2008/02/06/slots-logic-a-slot-machine-search-engine/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 13:24:46 +0000</pubDate>
		<dc:creator>Huy Dinh</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://huydinh.co.uk/blog/2008/02/06/slots-logic-a-slot-machine-search-engine/</guid>
		<description><![CDATA[Previously known as Slots Boffin, Slots Logic is a website with information and reviews about slot machines. I don't know when it was launched but is live now, and it's pretty good.
The site is nice and colourful with good icons and graphics. My part in the site was the PHP engine that searches for specific [...]]]></description>
			<content:encoded><![CDATA[<p>Previously known as Slots Boffin, Slots Logic is a website with information and reviews about slot machines. I don't know when it was launched but is live now, and it's pretty good.</p>
<p>The site is nice and colourful with good icons and graphics. My part in the site was the PHP engine that searches for specific slot machines.</p>
<p>So, if you want to know more about slot machines, go to <a href="http://www.slotslogic.com" title="Slots Logic" target="_blank">http://www.slotslogic.com</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://huydinh.co.uk/blog/2008/02/06/slots-logic-a-slot-machine-search-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
