<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Tech Hive | Front End Development, etcetera</title>
	
	<link>http://tech-hive.com</link>
	<description>Mae Paulino</description>
	<lastBuildDate>Thu, 12 Aug 2010 21:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/tech-hive" /><feedburner:info uri="tech-hive" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>tech-hive</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Using dl for a Semantic Form</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/dudOHK7ImME/</link>
		<comments>http://tech-hive.com/front-end/html/using-dl-for-a-semantic-form-20100813/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 21:00:00 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[definition lists]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[semantic form]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=168</guid>
		<description><![CDATA[Wufoo&#8217;s login form Semantics in forms are one of the things that needs to be talked about, in my opinion, since they are one of the most important parts of a web site. You create/edit user accounts, create/edit blog posts, &#8230; <a href="http://tech-hive.com/front-end/html/using-dl-for-a-semantic-form-20100813/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="alignleft"><img src="http://tech-hive.com/wp-content/uploads/2010/08/form.jpg" alt="" title="Wufoo&#039;s login form" width="300" height="185" class="size-full wp-image-243" /><br />
<a href="http://wufoo.com" class="extra">Wufoo&#8217;s</a> login form</p>
<p>Semantics in forms are one of the things that needs to be talked about, in my opinion, since they are one of the most important parts of a web site. You create/edit user accounts, create/edit blog posts, submit a comment, gather information from your audience, and lots more through them. However, apart from <code>fieldset</code>, we don&#8217;t really have a semantic way of marking up a pair of form elements.</p>
<p>There are different ways in marking up one&#8217;s form: <code>div</code>, <code>p</code>, <code>ul</code> or <code>ol</code> and <code>dl</code>. Because using <code>dl</code>, or definition list, to mark up a form is still unusual even though it&#8217;s <a href="http://www.clagnut.com/blog/241/" title="October 3, 2003 - Form Layout">not exactly</a> <a href="http://www.devarticles.com/c/a/Web-Design-Standards/Web-Forms/2/" title="August 23, 2004 - Web Forms">a new idea</a>, I will be talking and boring you, unfortunate people, about it here.</p>
<h3>Understanding the <code>dl</code> element</h3>
<p><code>dl</code> is one of the most overlooked element in HTML since, I assume, people mostly associate it with just definition lists, aka glossary. But it can be much, much more as was shown by Mike Robinson in his article about <a href="http://html5doctor.com/the-dl-element/">the <code>dl</code> element</a> in HTML5 Doctor. The HTML5 draft describes definition list as:</p>
<blockquote cite="http://www.w3.org/TR/html5/grouping-content.html#the-dl-element"><p>The <code>dl</code> element represents an association list consisting of zero or more name-value groups (a description list). Each group must consist of one or more names (<code>dt</code> elements) followed by one or more values (<code>dd</code> elements). </p>
<p><cite><a href="http://www.w3.org/TR/html5/grouping-content.html#the-dl-element">HTML5 Working Draft: The <code>dl</code> element</a></cite></p></blockquote>
<p>The key to why <code>dl</code> is the mark up that makes most sense (at least to me) is the <strong>name-value groups</strong> phrase. Form elements are all about pairing as you have the label which is the name and the corresponding value which is the <code>input</code> or <code>textarea</code> or <code>select</code>.</p>
<p><span id="more-168"></span></p>
<p>Using <code>dl</code>, your code is going to look something like this:</p>
<pre><code>&lt;form action=""&gt;
  &lt;dl&gt;
    &lt;dt&gt;&lt;label for="input-value"&gt;Label Name&lt;/label&gt;&lt;/dt&gt;
    &lt;dd&gt;&lt;input type="text" name="input-value" id="input-value" size="32" /&gt;&lt;/dd&gt;
  &lt;/dl&gt;
&lt;/form&gt;</code></pre>
<h3>Pros</h3>
<p>Aside from your code being semantic, using definition lists for forms will enable you to have a correctly styled form element by default since both <code>dt</code> (definition term aka term) and <code>dd</code> (definition aka value) are block elements. <code>dl</code> also lets you mark checkboxes up with more sense like so:</p>
<pre><code>&lt;dt&gt;Select one or more option:&lt;/dt&gt;
&lt;dd&gt;
  &lt;label&gt;
    &lt;input type="checkbox" name="value-1" id="value-1" /&gt;
  &lt;/label&gt;
&lt;/dd&gt;
&lt;dd&gt;
  &lt;label&gt;
    &lt;input type="checkbox" name="value-2" id="value-2" /&gt;
  &lt;/label&gt;
&lt;/dd&gt;
&lt;dd&gt;
  &lt;label&gt;
    &lt;input type="checkbox" name="value-3" id="value-3" /&gt;
  &lt;/label&gt;
&lt;/dd&gt;</code></pre>
<p>I have to admit that I&#8217;m stumped checkboxes and radio boxes. There are times when it makes sense to put the option heading in a <code>legend</code>, but you can&#8217;t always put them in a separate <code>fieldset</code>! Using a heading element makes even less sense. Most of the time, I just use <code>label</code> even though it&#8217;s not really linked to anything. Well, <code>p</code> works, too.</p>
<h3>Cons</h3>
<p>Like everything else, using <code>dl</code> isn&#8217;t really foolproof:</p>
<ul>
<li><code>dt</code> and <code>dd</code> are separate elements which makes it harder for you to clear them in case you&#8217;ve decided to float them and have multiple values. This scenario is easier for <code>div</code>, <code>li</code> and <code>p</code> because they act as a wrapper to the label-input pair. You can fix this by clearing your <code>dt</code>.</li>
<li>You&#8217;ll encounter a version of the above mentioned problem when you have an empty value in a pair. You can either put a space (<code>&#038;nbsp ;</code>) or min-height. I&#8217;m thinking that min-height is the better solution between the two, though.</li>
<li>An IE 6 problem: when you add a block element within <code>dl</code> and its child elements, IE6 escapes the definition list so that the block element is outside it. There&#8217;s still a workaround like, instead of <code>p</code>, you can use <code>span</code> instead, which sort of defeats the purpose of what we&#8217;re trying to do. Ken, a co-worker of mine assured me that that problem doesn&#8217;t exist in IE 7, which is a sigh of relief.</li>
</ul>
<p>Personally, I think the pros outweighs the various CSS issues you might encounter in the process. Nothing makes you feel better than being able to solve a CSS problem, which is probably why I miss IE 6 sometimes (isn&#8217;t that sad?). :( </p>
<p>How do you mark up your form? Do you think you&#8217;ll try and switch to <code>dl</code> one of these days?</p>
<div class="more_reading">
<h3>Further reading</h3>
<p>Still not bored to death? :P </p>
<ul>
<li><a href="http://www.w3.org/TR/html5/forms.html#forms">HTML5 Working Drafts: Forms</a></li>
<li><a href="http://reference.sitepoint.com/html/elements-form">List of Form Elements in SitePoint</a></li>
<li><a href="http://web.enavu.com/snippets/web-forms-semantic-mark-up-in-our-forms-part-2/">Semantic Mark Up in our Forms</a></li>
</ul>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/oMQXOg4ybh1zhflIUndHe6CAgIg/0/da"><img src="http://feedads.g.doubleclick.net/~a/oMQXOg4ybh1zhflIUndHe6CAgIg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/oMQXOg4ybh1zhflIUndHe6CAgIg/1/da"><img src="http://feedads.g.doubleclick.net/~a/oMQXOg4ybh1zhflIUndHe6CAgIg/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/dudOHK7ImME" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/front-end/html/using-dl-for-a-semantic-form-20100813/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/front-end/html/using-dl-for-a-semantic-form-20100813/</feedburner:origLink></item>
		<item>
		<title>The CSS3 Carousel Experiment</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/nAVrzjYQCjY/</link>
		<comments>http://tech-hive.com/front-end/css/css-animation-20100806/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 09:17:00 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[carousel]]></category>
		<category><![CDATA[css carousel]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[sample codes]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=90</guid>
		<description><![CDATA[When I first read about CSS Animation, I thought that they shouldn&#8217;t be messing with the separation of logic and style. In my mind, it should be clear that logic (animation, rotation, even the alternating row styles) should be in &#8230; <a href="http://tech-hive.com/front-end/css/css-animation-20100806/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I first read about <a title="CSS Animation in Webkit - October 31, 2007" href="http://webkit.org/blog/138/css-animation/">CSS Animation</a>, I thought that they shouldn&#8217;t be messing with the separation of logic and style. In my mind, it should be clear that logic (animation, rotation, even the alternating row styles) should be in javascript, all the styles should be in CSS, and the document structure in HTML.</p>
<p>One time, while working on our internal project, I thought I&#8217;d try a little <code>-webkit-transition-duration</code> because I wanted the color of the links to gradually change to something else on hover. But when I hovered on our main navigation that was using a sprite image, the background <em>scrolled</em> from one background position to the next every time we hover on it because of the delay! It was really amusing.</p>
<h3>CSS3 Carousel</h3>
<p>I experimented a little bit with transition and descendant selectors<del datetime="2010-08-05T07:01:00+00:00">, but apparently, <code>p ~ p</code> doesn&#8217;t work with <code>:hover</code> or <code>:active</code> or <code>:focus</code> very well</del> (browser notes below) and came up with this <a href="http://tech-hive.com/experiments/animation/carousel.html">CSS3 carousel experiment</a>.</p>
<p>To do this, you should have the following markup:</p>
<pre><code>&lt;div class="carousel"&gt;
  &lt;a href="#" class="first-image"&gt;1&lt;/a&gt;
  &lt;a href="#" class="second-image"&gt;2&lt;/a&gt;
  &lt;a href="#" class="third-image"&gt;3&lt;/a&gt;
  &lt;a href="#" class="fourth-image"&gt;4&lt;/a&gt;
  &lt;img src="main-background.jpg" alt="" /&gt;
&lt;/div&gt;</code></pre>
<p>It&#8217;s really rather plain, it&#8217;s because we&#8217;ll be choosing the image using CSS&#8217; child selectors to move the image and it won&#8217;t work if we enclose the links in a div or list.</p>
<p>And this CSS:</p>
<pre><code>  img { -webkit-transition: all 5s; -o-transition: all 5s; }
  .carousel { width: 500px; height: 372px; overflow: hidden; }
  a.first-image:hover ~ img { margin-left: 0; }
  a.second-image:hover ~ img { margin-left: -500px; }
  a.third-image:hover ~ img { margin-left: -1000px; }
  a.fourth-image:hover + img { margin-left: -1500px; }</code></pre>
<p id="ecsstender">New child selectors: the <code>~</code> symbol is used to select all fellow child elements, in this case, an image. If you add another image, it will be selected by this, too. The <code>+</code> sign on the other hand is to select a descendant that directly follows it. It&#8217;s really exciting, go nuts! <sup><a href="#ecsstender-link">1</a></sup></p>
<div class="message note">
<p>Some people would obviously rather use a div and apply the image as background, all you have to do is replace img with div or the class you assigned to it.</p>
</div>
<h3>Browser (in)compatibilities:</h3>
<ul>
<li>For some reason, webkit-based browsers doesn&#8217;t interpret this very well, the second and third link can&#8217;t be triggered unless you hover on the fourth link first.</li>
<li>Firefox interprets the child selectors perfectly but not transition because it will only be implemented in <a href="https://developer.mozilla.org/en/CSS/-moz-transition#Browser_compatibility">Firefox 4</a>.</li>
<li>The experiment works perfectly in Opera 10.6 and it gives me a warm fuzzy feeling inside. :D</li>
</ul>
<div class="more_reading">
<h3>Further Reading:</h3>
<ul>
<li><a href="http://webkit.org/specs/CSSVisualEffects/">CSS Visual Effects Specs from Webkit</a></li>
<li><a href="http://css3.bradshawenterprises.com/">CSS3 Transitions, Transforms and Animations</a> &mdash; There is an example for CSS3 Carousel here, too. It uses js to move from one image to the next so I think this will give you more flexibility in writing your HTML.</li>
<li><a href="http://www.the-art-of-web.com/css/css-animation/">CSS Animation from Art of Web</a></li>
<li><a href="http://www.the-art-of-web.com/css/timing-function/">Timing Function from Art of Web</a></li>
<li><a href="http://24ways.org/2009/css-animations">CSS Animations from 24Ways</a></li>
<li><a href="http://www.cssplay.co.uk/menu/animation.html">CSS Flick Animation from CSSPlay</a></li>
<li id="ecsstender-link"><sup><a href="#ecsstender" title="Go back to the child selector paragraph">^</a></sup> <a href="http://test.ecsstender.org/extensions/eCSStender.CSS3-selectors.js/test/sizzle-test.html">Child selector support test and examples from eCSStender</a></li>
</ul>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/ZIr_NTcwqjcLwxz8oifv_xf6kMM/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZIr_NTcwqjcLwxz8oifv_xf6kMM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZIr_NTcwqjcLwxz8oifv_xf6kMM/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZIr_NTcwqjcLwxz8oifv_xf6kMM/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/nAVrzjYQCjY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/front-end/css/css-animation-20100806/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/front-end/css/css-animation-20100806/</feedburner:origLink></item>
		<item>
		<title>Volusion, every themer’s nightmare</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/54lJCjRVYeM/</link>
		<comments>http://tech-hive.com/reviews/shopping-carts/volusion-every-themers-nightmare-20100615/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 15:12:00 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[Shopping Carts]]></category>
		<category><![CDATA[theming woes]]></category>
		<category><![CDATA[volusion]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=93</guid>
		<description><![CDATA[Recently, I had to convert a PSD into a theme for a Volusion store. I don&#8217;t really mind doing something new because I know that you&#8217;ll always, always learn something from it. But volusion just made me appreciate WordPress, Drupal &#8230; <a href="http://tech-hive.com/reviews/shopping-carts/volusion-every-themers-nightmare-20100615/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://tech-hive.com/wp-content/uploads/2010/06/volusion.png" alt="Volusion Logo" title="Volusion Logo" width="225" height="78" class="alignleft size-full wp-image-107" /> Recently, I had to convert a PSD into a theme for a <a href="http://volusion.com">Volusion</a> store. <a href="http://tech-hive.com/reviews/cms/on-creating-themes-and-going-out-of-your-comfort-zone-20091002">I don&#8217;t really mind doing something new</a> because I know that you&#8217;ll always, always learn something from it. But volusion just made me appreciate WordPress, Drupal and MVC frameworks more.</p>
<p>When I first looked at the code within Volusion&#8217;s LiveEditor, I thought <q>&#8220;Well this is going to be simple and easy.&#8221;</q> But I was so, so, so wrong. It was <del datetime="2010-06-14T14:38:52+00:00">a nightmare</del> so hard, I&#8217;m not used to making the design work <em>for</em> the CMS &mdash; I&#8217;m used to bending it with my jedi mind tricks (or well, try).</p>
<p><strong>Volusion only has one theme for <em>everything</em>.</strong> Ever since I started learning more and more about Drupal, I&#8217;ve started to appreciate this one-theme-for-all-page strategy where you update all of the options in the admin panel instead of in the theme itself. It wasn&#8217;t easy at first because I was used to how WordPress works but I realized that this way is actually more flexible (and dare I say user-friendly for the clients once they&#8217;re used to it), so that&#8217;s not really what I dislike <em>dislike</em> about Volusion.</p>
<p><strong>It&#8217;s that there really is that one HTML file, and your CSS.</strong> With Volusion, you can show the contents of the site by adding <code>&lt;div id="content_area"&gt;&lt;/div&gt;</code> within your theme, the Volusion script adds the code and content within that <code>div</code>. And boy, do they add codes (read: <code>table</code>, <code>b</code>, <code>font</code>!)! Unfortunately for you, the designer/front-end developer, you can&#8217;t edit the codes that&#8217;s within it. This means no conditional tags for your menu or sub menu, no includes, nothing. Just your HTML and CSS. :(</p>
<p>The code they add within <code>#content_area</code> doesn&#8217;t have a lot of classes or IDs either, having them would have made my life easier because I can select them through CSS. But no, they&#8217;re using tables within tables within tables within tabl&mdash; well, you get the drift. So in the end, don&#8217;t be surprised if your CSS will look something like this:</p>
<pre><code> table[cellspacing="2"] table table table font { styles }
  table[cellpadding="8"] table table td .classname table { styles }</code></pre>
<p>You <em>can</em> customize how it looks per category but whenever you have to adjust something, let&#8217;s say, change a URL in one of the sections or add a new section, it means that you have to edit it in <strong>all of the category pages</strong>. It&#8217;s like editing static HTML files all over again. This makes me sad because I feel that Volusion was left by its CMS counterpart and got stuck in the 90s. What. Is. Up?</p>
<p>Since you can&#8217;t edit what goes on in your <code>#content_area</code> div, it also means that if you want a bigger product image, you&#8217;ll have to, you guessed it, update all of the product images so it will match the new design&#8217;s specified image proportion. When the client said she wanted a bigger image, I initially thought that I&#8217;d just select a bigger version of the product image either in the option or code unfortunately though, there&#8217;s no option for it. There <em>is</em> an article in their support section on <a href="http://support.volusion.com/article/configuring-custom-product-photo-sizes">how to change your product thumbnails</a>.</p>
<p>The submit buttons are all in images, too. Call me rigid in my ways or just plain lazy, but I&#8217;d like to have the <em>option</em> of just creating one background image to apply on all text-based buttons. And if I ever decide that images make a better experience for the users then I&#8217;d like to have that option, too.</p>
<p>I wonder what&#8217;s going on with them, with the advent of hosted ecommerce solutions like <a href="http://shopify.com">shopify</a> and <a href="http://bigcartel.com">bigcartel</a>, just to name a few, you&#8217;d think they&#8217;d do everything they can to make theming and updating the sites easier and more flexible for their clients. I do know that you have to make your app backwards compatible for all of those who can&#8217;t be bothered to update their design since whenever; but isn&#8217;t it also the service provider&#8217;s responsibility to make sure that what they have is at par with what&#8217;s out there? I&#8217;m really curious with what&#8217;s cooking in the Volusion HQ, will they be updating their backend&#8217;s design (that doesn&#8217;t work that well with webkit-based browsers), etc?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/SUaWyBRlOaNK8HZAFDL0sb_rlm0/0/da"><img src="http://feedads.g.doubleclick.net/~a/SUaWyBRlOaNK8HZAFDL0sb_rlm0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/SUaWyBRlOaNK8HZAFDL0sb_rlm0/1/da"><img src="http://feedads.g.doubleclick.net/~a/SUaWyBRlOaNK8HZAFDL0sb_rlm0/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/54lJCjRVYeM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/reviews/shopping-carts/volusion-every-themers-nightmare-20100615/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://tech-hive.com/reviews/shopping-carts/volusion-every-themers-nightmare-20100615/</feedburner:origLink></item>
		<item>
		<title>On creating themes and going out of your comfort zone</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/eTnu82rqpqk/</link>
		<comments>http://tech-hive.com/reviews/cms/on-creating-themes-and-going-out-of-your-comfort-zone-20091002/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 04:55:42 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[cms themes]]></category>
		<category><![CDATA[lifestream]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[sample codes]]></category>
		<category><![CDATA[sweetcron]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=63</guid>
		<description><![CDATA[I have always been a WordPress girl, but you have to admit that there are instances where you just have to use something that specializes in that area. I&#8217;ve recently overhauled Last Leaf and turned it into a lifestream. I &#8230; <a href="http://tech-hive.com/reviews/cms/on-creating-themes-and-going-out-of-your-comfort-zone-20091002/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have always been a WordPress girl, but you have to admit that there are instances where you just have to use something that specializes in <em>that</em> area. </p>
<p>I&#8217;ve recently overhauled <a href="http://lastleaf.org/items/view/180/new-last-leaf">Last Leaf</a> and turned it into a lifestream. I have stopped blogging there since the start of the year and have always thought of turning it into just that but I haven&#8217;t because creating themes for another CMS seemed intimidating.</p>
<p>At first, I thought of writing my own lifestream, it should have been my way of learning more about RoR but until now, all I have in my folder is the basic install (which I have forgotten how I was able to produce) so I turned to the next best thing: <a href="http://sweetcron.com">Sweetcron</a>. It&#8217;s been months since I have looked at Sweetcron, I remember that I found it so unfriendly to customize to one&#8217;s needs before. Turns out, all I really needed was to read a <a href="http://net.tutsplus.com/misc/building-a-custom-lifestream-website-with-sweetcron/" title="Nettuts: Building a Custom Lifestream Website with Sweetcron">good documentation</a>, a lot of focus and plenty of time to test things out. It&#8217;s a pleasant exercise, and it&#8217;s something I know I&#8217;ll do again.</p>
<p>And so, with the intro done and over with, I suggest that you try and do something you haven&#8217;t tried before once in a while, if you&#8217;re not yet ready to commit full-time to something really big (RoR for me) then do some little things (like theme customizations, I think I want to try Drupal next) and so, here are the notes I made myself remember while writing Last Leaf&#8217;s theme:</p>
<ul>
<li>
<h2>Base your first theme on one of the default ones</h2>
<p>Most of the time, you already have almost everything you need in the default theme, the developers won&#8217;t include that otherwise, I think. Trying to edit the defaults also make the learning curve more enjoyable because you know you won&#8217;t just break something because it acts as your guide in the process.</p>
<p>My first WordPress theme was something based on <a href="http://www.wordpresstheme.com/themes/theme-wordpress-classic/">WordPress Classic</a>, I have little to no knowledge in CSS that time and that&#8217;s the best thing I could come up with. It helped me get familiar with the CMS&#8217; templating system (man, I sound so pretentious) as well as taught me what this CSS shenanigan is. With Sweetcron, I used the Boxy Theme. As soon as you were able to stop the nauseous feeling whenever you see a PHP snippet, you&#8217;d realize that it&#8217;s pretty straightforward. </p>
<p><img src="http://tech-hive.com/wp-content/uploads/2009/09/Picture-3.png" alt="Social Media" title="Social Media" width="160" height="110" class="alignright size-full wp-image-66" /> I had a great time styling the individual boxes, it got a little confusing after a while though, what with all those accounts, so I made a separate file for each one of them like what you can see on the image, it made _activity_feeds.php less cluttered and made isolating the problem easier.
	</li>
<li>
<h2>Experiment</h2>
<p>I wanted to get just the image within the post because I&#8217;m not planning on directing people into the single page of every items and all I really want to show sometimes are the <a href="http://lastleaf.org/items/site/google.com">interior decors</a> I love. At first I used this: <code>&lt;?php echo $item-&gt;item_data[$item-&gt;get_feed_class()]['image']['m']?&gt;</code> which is something you need to call the images you uploaded in Flickr but won&#8217;t work anywhere else. Thankfully, somewhere in the _activity_feeds.php file is <code>&lt;?php echo $item-&gt;get_image()?&gt;</code> and that&#8217;s what I used for my Tumblr and Google Reader posts.</p>
<p>However, I don&#8217;t post images there all the time so I need a way to retrieve the text if the image doesn&#8217;t exist and so, there goes the only thing I&#8217;m good at, if-else statement:</p>
<pre>
<code>&lt;?php if ($item->get_image() == ''):?&gt;
     &lt;?php //display your text here ?&gt;
&lt;?php else: ?&gt;
     &lt;?php //and this is for your photo ?&gt;
&lt;?php endif; ?&gt;</code>
</pre>
</li>
<li>
<h2>Search and then ask</h2>
<p>I would&#8217;ve probably given up on Sweetcron the second time have I not found that <a href="http://net.tutsplus.com/misc/building-a-custom-lifestream-website-with-sweetcron/" title="Nettuts: Building a Custom Lifestream Website with Sweetcron">Nettuts tutorial</a>, all you really need to do is keep your cool if you can&#8217;t find a solution to your problem. And if you can&#8217;t find the solution through searching, go to the usergroup/website of the CMS.
</li>
</ul>
<p>Sweetcron is still new and AFAIK, there&#8217;s only one <a href="http://yongfook.com" title="Yongfook, developer of Sweetcron">developer</a> so it&#8217;s understandable if there&#8217;s no documentation on the site like: is there a way to retrieve the tags I added in my starred items in Google Reader? How do I truncate the title? (&lt;?php echo word_limiter($item-&gt;get_title(), 20) ?&gt; doesn&#8217;t work :() Is it possible that I could host the images in my own server instead of relying on other sites? However, the <a href="http://groups.google.com/group/sweetcron" title="Sweetcron Google Group">community</a> behind it is very, very friendly and you&#8217;re sure to find answers you&#8217;re looking for there, unless you&#8217;re too shy to ask for it. :P</p>

<p><a href="http://feedads.g.doubleclick.net/~a/avmFlfqQ28oIBWYUCfsVJYG2BOM/0/da"><img src="http://feedads.g.doubleclick.net/~a/avmFlfqQ28oIBWYUCfsVJYG2BOM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/avmFlfqQ28oIBWYUCfsVJYG2BOM/1/da"><img src="http://feedads.g.doubleclick.net/~a/avmFlfqQ28oIBWYUCfsVJYG2BOM/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/eTnu82rqpqk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/reviews/cms/on-creating-themes-and-going-out-of-your-comfort-zone-20091002/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/reviews/cms/on-creating-themes-and-going-out-of-your-comfort-zone-20091002/</feedburner:origLink></item>
		<item>
		<title>Random CSS tips and tricks</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/lxAon_eCT5s/</link>
		<comments>http://tech-hive.com/front-end/css/random-css-tips-and-tricks-20080916/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 08:45:03 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[browser incompatibility]]></category>
		<category><![CDATA[CSS tips]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[sample codes]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=10</guid>
		<description><![CDATA[I wrote (as in handwritten) this a couple of weeks ago when I was having trouble sleeping, chances are you already know these things but, for the benefit of my rusty memory, I&#8217;ll still post it here. Besides, solving these &#8230; <a href="http://tech-hive.com/front-end/css/random-css-tips-and-tricks-20080916/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wrote (as in handwritten) this a couple of weeks ago when I was having trouble sleeping, chances are you already know these things but, for the benefit of my rusty memory, I&#8217;ll still post it here. Besides, solving these problems took me hours of frustration, so I better chronicle it. :(</p>
<ul>
<li>There are times when list items occupy a huge space in IE even though you&#8217;re sure that you haven&#8217;t specified excessive paddings and margins to it. Setting the list item&#8217;s <code>display</code> value to <code>inline-block</code> will solve this (I&#8217;m a little surprised that IE 6 can interpret this value because I&#8217;ve always thought that it only knows <code>block</code> and <code>inline</code>, that&#8217;s how little I think of it).
<p><code>Inline</code> doesn&#8217;t allow paddings and margins at the top and bottom area of the elements, however, it also means losing the width and layout of the element. In <code>inline-block</code>, we achieve just that, lose the excess top and bottom spaces while still being able to maintain the layout of the element. (That is, based on my understanding)</p>
<p>And in some bizarre cases, <code>inline</code> will do and yes, it will still look like it&#8217;s a block item and will just take out the excess margin, weird, yes?  I wish I have an explanation for this.</li>
<li>There are numerous times and reasons why we want to set <code>list-style</code> to <code>none</code>. What sucks is that after you&#8217;ve turned off the <code>list-style</code> to the parent list item, you&#8217;d realize that you want the bullets to show in the children element.
<p>All hell breaks lose when no matter what head-banging you do, it just won&#8217;t show up. Thankfully, <code>display: list-item</code> is there to restore the bullets and is working in IE too!</li>
<li>List items are supposed to line up neatly even when a float is used to an image before it. However, there are times when that&#8217;s not the case in, you guess it! <em>IE 6</em>. Standards-aware browsers will be solved by adding:
<pre><code>{ overflow:hidden; list-item-position:inside; }</code></pre>
<p>The result may be that the bullet may be a little too close to the text but at least it&#8217;s not below the list item just like in IE. The trick is to use <code>display:inline-block</code> too.</li>
<li>Not all of the CSS problems are in IE. Sometimes the great Fx 2 has some quirks too. It usually happens in the useful, albeit a little used, <em>autocomplete function</em>. What usually happens is that the autocomplete items go under the <code>div</code> elements below it.
<p>Here&#8217;s what I usually do:</p>
<p>HTML</p>
<pre><code>&lt;div class="parent_element"&gt;
  &lt;div class="autocomplete"&gt;
    &lt;ul&gt;
      &lt;li&gt;Value here&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
<p>CSS</p>
<pre><code>.parent_element { position:relative; z-index:99; overflow:visible; }</code></pre>
<p>What my understanding of this is that once the <code>z-index</code> is set, then it lifts the entire <code>div</code> and everything within it above every other element in the page therefore eliminating the problem.</li>
</ul>

<p><a href="http://feedads.g.doubleclick.net/~a/77o4kIFw7ZoE0OYC6uXWeKK_gGc/0/da"><img src="http://feedads.g.doubleclick.net/~a/77o4kIFw7ZoE0OYC6uXWeKK_gGc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/77o4kIFw7ZoE0OYC6uXWeKK_gGc/1/da"><img src="http://feedads.g.doubleclick.net/~a/77o4kIFw7ZoE0OYC6uXWeKK_gGc/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/lxAon_eCT5s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/front-end/css/random-css-tips-and-tricks-20080916/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/front-end/css/random-css-tips-and-tricks-20080916/</feedburner:origLink></item>
		<item>
		<title>A peek at WordPress 2.7</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/2UlDGZPvs3A/</link>
		<comments>http://tech-hive.com/wordpress/overview/a-peek-at-wordpress-2-7-20080912/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 08:47:17 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[Overview]]></category>
		<category><![CDATA[usability review]]></category>
		<category><![CDATA[WordPress update]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=15</guid>
		<description><![CDATA[I&#8217;ve had a copy of the WordPress nightly builds since WP 2.5 RC1 went out because I want to be one of the cool kids who&#8217;s &#8220;ahead of the pack&#8221;. But it just sat there, gathering dust. I never thought &#8230; <a href="http://tech-hive.com/wordpress/overview/a-peek-at-wordpress-2-7-20080912/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a copy of the WordPress nightly builds since <a href="http://www.tech-hive.com/wordpress/first-impressions-on-the-wordpress-25-rc1/">WP 2.5 RC1</a> went out because I want to be one of the cool kids who&#8217;s &ldquo;ahead of the pack&rdquo;. But it just sat there, gathering dust. I never thought of updating it until <a href="http://ma.tt">Matt Mallunweg</a> talked about WordPress 2.7 at <a href="http://www.tech-hive.com/updates/wordcamp-philippines-2008/">WordCamp</a>. I was so excited that I updated it once I got home and did not go around to testing and seeing the new features until someone in the mailing list commended the developers for the new comments thread feature.</p>
<p>One update later and I&#8217;m testing the thing locally (yay!) and so far, I say that I like it. </p>
<h3>Documentation</h3>
<p>I think they&#8217;re planning to integrate the codex to a WP install, am I right? Either that or they&#8217;re too lazy to type in the correct link, I&#8217;d like to believe that it&#8217;s the former just because that would be nice. That way I don&#8217;t have to keep on trying to remember the URI of <a href="http://codex.wordpress.org">WordPress codex</a>, so lame, believe me, I know. And don&#8217;t forget a search box! </p>
<div id="attachment_111" class="wp-caption center" style="width: 510px"><a href="http://www.tech-hive.com/wp-content/uploads/2008/09/help_link.png"><img src="http://www.tech-hive.com/wp-content/uploads/2008/09/help_link-300x89.png" alt="Help integrated in a WP Install?" title="Help integrated in a WP Install?" width="300" height="89" class="size-medium wp-image-111" /></a><p class="wp-caption-text">Help integrated in a WP Install?</p></div>
<p>Now it&#8217;s cute and all but I see a potential problem to it and that is &mdash; <em>tons of files to download/upload</em>. It seems that the 5 minute install is no longer true, it will if you don&#8217;t include the time you need to download then upload the entire thing (I&#8217;m not a big fantastico fan, sorry). But then again, maybe they are going to create a way to connect the install to the codex database? Or whatever is more appropriate name for it.</p>
<h3>Dashboard</h3>
<div id="attachment_112" class="wp-caption alignleft" style="width: 310px"><a href="http://www.tech-hive.com/wp-content/uploads/2008/09/dashboard.png"><img src="http://www.tech-hive.com/wp-content/uploads/2008/09/dashboard-300x161.png" alt="Dashboard" title="Dashboard" width="300" height="161" class="size-medium wp-image-112" /></a><p class="wp-caption-text">Dashboard</p></div>
<p>The new dashboard layout sure is clean but somehow, I kinda miss the &#8220;blogs who linked here&#8221; and &#8220;recent comments&#8221; panels. Sure, they&#8217;re filled with splogs and comments dating 2 months back but I kinda like it that way. Or maybe not.</p>
<h3 class="clear">Content</h3>
<h4>Media Library</h4>
<p>I love that you <em>don&#8217;t</em> have to go to the Write Post page just to upload a photo, &#8217;cause you know, sometimes you just <em>want</em> to upload a photo because you&#8217;re too lazy to open your FTP program. I really like the new media library (which was, no offense, kinda worthless before).</p>
<div id="attachment_105" class="wp-caption center" style="width: 510px"><a href="http://www.tech-hive.com/wp-content/uploads/2008/09/media_library.png"><img src="http://www.tech-hive.com/wp-content/uploads/2008/09/media_library-300x165.png" alt="Media Library Panel" title="Media Library Panel" width="300" height="165" class="size-medium wp-image-105" /></a><p class="wp-caption-text">Media Library Panel</p></div>
<p>I wonder if an upload video feature is so far-fetched. Or is it even unthinkable because the file size is so huge and why would you want to host your own videos anyway when there&#8217;s <a href="http://youtube.com">youtube</a>, <a href="http://revver.com">revver</a>, <a href="http://vimeo.com">vimeo</a> and likes now?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Peit1htftAno7NQxnrdiQoiDvho/0/da"><img src="http://feedads.g.doubleclick.net/~a/Peit1htftAno7NQxnrdiQoiDvho/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Peit1htftAno7NQxnrdiQoiDvho/1/da"><img src="http://feedads.g.doubleclick.net/~a/Peit1htftAno7NQxnrdiQoiDvho/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/2UlDGZPvs3A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/wordpress/overview/a-peek-at-wordpress-2-7-20080912/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/wordpress/overview/a-peek-at-wordpress-2-7-20080912/</feedburner:origLink></item>
		<item>
		<title>Presenting videos using WordPress</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/0O3wjvxOsgo/</link>
		<comments>http://tech-hive.com/tutorials/presenting-videos-using-wordpress-20080909/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 08:54:56 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sample codes]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=23</guid>
		<description><![CDATA[And without using a plugin. I thought of creating this post when I was on my way home from the recently concluded WordCamp Philippines. There was a woman who was in Karla Redor&#8216;s talk who asked on how she can &#8230; <a href="http://tech-hive.com/tutorials/presenting-videos-using-wordpress-20080909/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>And without using a plugin.</p>
<p>I thought of creating this post when I was on my way home from the recently concluded <a href="http://www.tech-hive.com/updates/wordcamp-philippines-2008/">WordCamp Philippines</a>. There was a woman who was in <a href="http://rockersworld.com">Karla Redor</a>&#8216;s talk who asked on how she can host the video in her own blog and use WordPress to file it for her. She can use a <a href="http://lorelle.wordpress.com/2007/02/17/video-music-podcasts-audio-and-multimedia-wordpress-plugins/">plugin that will let her upload the videos in her blog</a> or do it the &ldquo;harder&rdquo; way. Something that I&#8217;m very fond of doing.</p>
<p>Seriously, I&#8217;m the type of person who would only resort to using plugins if:</p>
<ol>
<li>I&#8217;m lazy at the time to think of another way without using a plugin</li>
<li>My head is aching and I&#8217;m getting frustrated because it just won&#8217;t follow what I&#8217;m telling it.</li>
</ol>
<p>The reason is because I am <em>not</em> a developer and it&#8217;s really hard to be dependent on a plugin specially if that plugin is what&#8217;s keeping your blog alive. Also, if the developer of the plugin suddenly stops supporting the plugin and no one else is willing to take it up from there. What&#8217;s worse is if it&#8217;s not compatible with the newer version of WordPress. Then I will be lost.</p>
<p>So anyway, on to the &ldquo;how&rdquo;.</p>
<ol>
<li>Convert you video to a <code>.swf</code> file, you can use <a href="http://heywatch.com">Hey!Watch</a>, it has a fee though but considering how it will make your life easier, I think it&#8217;s worth it. Besides it will convert a video for $0.10 so I don&#8217;t think that&#8217;s too much.</li>
<li>Next in your code (you&#8217;d want to add this in your <code>single.php</code> page), call for the video custom field (which you&#8217;ll be adding later on). Note that this should be <strong>within</strong> <a href="http://codex.wordpress.org/The_Loop">the loop</a>. <small>Also, note that the snippet is taken from a <a href="http://wordpress.org/support/topic/196935">WordPress support forum</a> and changed to suit the topic.</small>
<pre><code>&lt;?php $video = get_post_meta($post->ID, 'video', true); ?&gt;
&lt;?php if (!empty($video)) {;?&gt;
&lt;object type="application/x-shockwave-flash" data="&lt;?php echo $video; ?&gt;" width="400" height="300"&gt;
&lt;param name="movie" value="&lt;?php echo $video; ?&gt;" /&gt;
&lt;/object&gt;
&lt;?php }; ?&gt;</code></pre>
<p>What does this mean? The first line sets the <code>$video</code> variable to the value of the <code>video</code> key (of the custom field). Next it checks if the <code>video</code> has a value attached to it (in that particular post). If it does, it inserts the value in the <code>data</code> and <code>value</code> properties of <code>object</code> and <code>param</code>. If the <code>video</code> doesn&#8217;t have any values then it won&#8217;t display anything.</p>
<p>This way, it saves you the time to copy and paste the entire code for the video. Now if you want the lazier way, you will have to adhere to some restrictions. For example, you can set the value of <code>data</code> and <code>value</code> to:</p>
<p><code>&lt;?php bloginfo('url') ?&gt;/videos/&lt;?php echo $video; ?&gt; </code></p>
<p>This means that you will only be able to upload videos within the videos folder within your root. That way, you&#8217;ll only put the filename of the video in the custom field value.
</li>
<li>Once you&#8217;ve uploaded your video to your server (within the specified folder of course), go to the admin panel of your blog and then create a post (or a page) in your custom fields area, do what&#8217;s illustrated in the image below:
<p><a href="http://www.tech-hive.com/wp-content/uploads/2008/09/picture-6.png"><img src="http://www.tech-hive.com/wp-content/uploads/2008/09/picture-6.png" alt="" title="Custom Fields" width="500" height="200" class="alignnone size-full wp-image-86" /></a></p>
<p>As you can see, I decided that I want to have another folder within my videos folder. My videos will be categorized according to shows, so the value of my video key is unang_hirit/episode_100.swf. Once published, the post&#8217;s HTML will appear like this:</p>
<pre><code>&lt;object type="application/x-shockwave-flash" data="http://domain.com/videos/unang_hirit/episode_100.swf" width="400" height="300"&gt;
  &lt;param name="movie" value="http://domain.com/videos/unang_hirit/episode_100.swf" /&gt;
&lt;/object&gt;</code></pre>
</li>
</ol>
<h3>Featured Video</h3>
<p>If for some reason, you want to create a section that is called the &ldquo;Featured Video&rdquo; section on your sidebar, you can call it by using the following lines of code:</p>
<pre><code>&lt;?php query_posts('category_name=Featured Videos&#038;showposts=1'); ?&gt;
  &lt;?php while (have_posts()) : the_post(); ?&gt;
    &lt;?php $video = get_post_meta($post->ID, 'video', true); ?&gt;
    &lt;?php if (!empty($video)) {;?&gt;
    &lt;object type="application/x-shockwave-flash" data="&lt;?php echo $video; ?&gt;" width="400" height="300"&gt;
    &lt;param name="movie" value="&lt;?php echo $video; ?&gt;" /&gt;
    &lt;/object&gt;
    &lt;?php }; ?&gt;
  &lt;?php endwhile(); ?&gt;</code></pre>
<p>If you&#8217;d notice, we recycled the code from above. The only difference is the <code>query_posts</code> tag before the loop. What the <code>query_posts</code> tag does is that it takes a single, recently added post (<code>showposts=1</code>) from a category called &ldquo;Featured Videos&rdquo;. And it&#8217;s the same business as what was discussed above.</p>
<p><strong>Further reading:</strong></p>
<ul>
<li><a href="http://codex.wordpress.org/Using_Custom_Fields">WordPress Codex: Using Custom Fields</a></li>
<li><a href="http://www.alistapart.com/articles/flashsatay">A List Apart: Embedding Flash While Supporting Standards</a></li>
<li><a href="http://codex.wordpress.org/Template_Tags/query_posts">WordPress Codex: Template Tags: query_posts</a></li>
</ul>

<p><a href="http://feedads.g.doubleclick.net/~a/rn-akrRhjhjZVljRuxlT-W-A9S4/0/da"><img src="http://feedads.g.doubleclick.net/~a/rn-akrRhjhjZVljRuxlT-W-A9S4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/rn-akrRhjhjZVljRuxlT-W-A9S4/1/da"><img src="http://feedads.g.doubleclick.net/~a/rn-akrRhjhjZVljRuxlT-W-A9S4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/0O3wjvxOsgo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/tutorials/presenting-videos-using-wordpress-20080909/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/tutorials/presenting-videos-using-wordpress-20080909/</feedburner:origLink></item>
		<item>
		<title>min-height in IE 6</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/l4KFl9Y1tO8/</link>
		<comments>http://tech-hive.com/front-end/css/min-height-in-ie-6-20080831/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 08:53:24 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS tips]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[sample codes]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=21</guid>
		<description><![CDATA[Would you look at this, while everyone has finally decided that they will be dropping support for IE 6, that&#8217;s when I decided to create a tutorial for implementing min-height for the browser. Anyway, onto the post. We all know &#8230; <a href="http://tech-hive.com/front-end/css/min-height-in-ie-6-20080831/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Would you look at this, while everyone has finally decided that they will be dropping support for <code>IE 6</code>, that&#8217;s when I decided to create a tutorial for implementing <code>min-height</code> for the browser. Anyway, onto the post.</p>
<p>We all know that the <code>min-height</code> property doesn&#8217;t work in <code>IE 6</code>. Instead, the <code>height</code> property acts as both the element&#8217;s <code>height</code> and <code>min-height</code>. Its role will ultimately rely on the value of your <code>overflow</code> property.</p>
<p>If the <code>overflow</code> property is set to <code>hidden</code> then the height of the element is its <code>max-height</code>. If set on <code>visible</code>, however, then it will be its <code>min-height</code>.</p>
<h3><code>Overflow: Visible</code></h3>
<p>The element will take up the specified height and when the content of the element exceeds the height then the element will just expand vertically (or horizontally, if it needs to). You can define whether the it will expand vertically of horizontally by specifying the value for <code>overflow-y</code> (vertically) or <code>overflow-x</code> (horizontally) (your CSS document won&#8217;t validate for CSS 2.1 though, but it&#8217;s valid once tested against CSS 3).</p>
<p>So your CSS (for IE 6) will look something like this:</p>
<pre><code>div.parent-element { height:300px; overflow-y:visible; overflow-x:hidden; }</code></pre>
<h3>The Complexities that <code>hasLayout</code> Brings</h3>
<p>There are some instances when you have to define the <code>height</code> and <code>overflow</code> properties of an element (usually applicable to lists) to meet the demands of the <code>hasLayout</code> curse in IE. In these instances, you will have to add a bogus height and <code>overflow:hidden</code> thinking that it will not bring harm to your design.</p>
<p>That is until you wanted to add a <code>min-height</code> to the parent <code>div</code>.</p>
<p>If your bogus height is set to 1%, you element will collapse. Setting the <code>height</code> to <code>auto</code> will render your layout worse than before because that means that your element &#8220;will not have a layout&#8221; (ie, your <code>hasLayout</code> is nonexistent in IE).</p>
<p>Setting the <code>height</code> to 100%, however, will then expand your element to the height of its parent <code>div</code> (or element).</p>
<p>You can solve this dilemma by changing your <code>overflow</code> value from <code>hidden</code> to <code>visible</code> and setting the height of your element (usually, list items) to 1% just to retain the bogus height.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/q2e5Yc3KOoZxGjEltLW8NXRvPqE/0/da"><img src="http://feedads.g.doubleclick.net/~a/q2e5Yc3KOoZxGjEltLW8NXRvPqE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/q2e5Yc3KOoZxGjEltLW8NXRvPqE/1/da"><img src="http://feedads.g.doubleclick.net/~a/q2e5Yc3KOoZxGjEltLW8NXRvPqE/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/l4KFl9Y1tO8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/front-end/css/min-height-in-ie-6-20080831/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/front-end/css/min-height-in-ie-6-20080831/</feedburner:origLink></item>
		<item>
		<title>Lessons learned in dealing with IE 6</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/3jPIhuphCVM/</link>
		<comments>http://tech-hive.com/front-end/css/lessons-learned-in-dealing-with-ie-6-20080617/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 08:41:18 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[browser incompatibility]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=8</guid>
		<description><![CDATA[I&#8217;ve been &#8220;battling&#8221; with IE for more than 3 years now and I just felt that it&#8217;s finally time to not only bash the poor beloved browser and instead pay homage to the good things that it was able to &#8230; <a href="http://tech-hive.com/front-end/css/lessons-learned-in-dealing-with-ie-6-20080617/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been &ldquo;battling&rdquo; with IE for more than 3 years now and I just felt that it&#8217;s finally time to not only bash the poor <del datetime="2008-06-17T10:00:29+00:00">beloved</del> browser and instead pay homage to the good things that it was able to instill on me.</p>
<h3>There is no such thing as one tweak fix all</h3>
<p>If there&#8217;s such a thing, the guy (or girl) who was able to find that tweak would&#8217;ve been a bajillionaire by now. That or he/she&#8217;s<del datetime="2008-06-17T10:00:29+00:00">, unfortunately</del> probably a Microsoft employee by now.</p>
<h3>Patience is a virtue (and a very important skill)</h3>
<p>There was a time before when I was able to &ldquo;fix&rdquo; a specific IE bug in one of my dreams. I can&#8217;t remember what that bug was though, but I&#8217;m sure that happened, because that also happened when I was trying to play with WordPress before.</p>
<p>Anyway, I think IE is a great therapy for people who need to manage their angers. I used to be very explosive when I&#8217;m angry or when I can&#8217;t find a solution to a problematic rendering error. Sure, you can say that I matured a little but I think that if IE&#8217;s following my every whim all the time, then I don&#8217;t think I would be used to seeing any design screwed up in the <del datetime="2008-06-17T10:00:29+00:00">blasted</del> <del datetime="2008-06-17T10:00:29+00:00">beloved</del> browser.</p>
<h3>If it fixed your problem&#8230;</h3>
<p>Chances are that it opened a LOT of seemingly unrelated problems waiting to be discovered. I fixed a height problem and the next thing I know, the other elements (who are important at that!) are not showing up anymore. So be wary, be very, very wary about that hacks and fixes.</p>
<h3>With IE, anything is possible</h3>
<p>I honestly have a feeling that the Murphy&#8217;s Law was created with IE in mind, no kidding! If you think that there&#8217;s no way that any element will collapse specially if you already specified its width and height, then expect IE to crush that belief of yours.</p>
<h3>If you&#8217;re dealing with IE, it&#8217;s OK to be paranoid</h3>
<p>And check, and check, and check. There was a time when an office mate and I was checking the same site in IE, just different machines and it&#8217;s rendering differently. Seriously.</p>
<h3>If your element collapsed in IE, chances are that it doesn&#8217;t have a <code>haslayout</code></h3>
<p>And that usually means you need to add a <code>height</code> and <code>width</code> to your element and if that still did not work, add an <code>overflow:hidden</code>. Sometimes that still won&#8217;t work so you have to add a <code>display:block</code>. That usually does the trick. If you don&#8217;t want to add a specific height however, you can add <code>1%</code> or <code>100%</code> as its value, anything as long as it&#8217;s not <code>auto</code> or a pixel or <code>em</code>. Be careful though, if you add a height to its parent div, it&#8217;ll take the height of its parent.</p>
<h3>I could never stress this enough &#8212; <code>haslayout</code> is everything in IE</h3>
<p>If your element is inline, then it&#8217;s fine, but if it&#8217;s a block-level element we&#8217;re talking about, grab the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&#038;displaylang=en">IE dev toolbar</a> and hunt for that ever-elusive <code>haslayout</code> property.</p>
<p>Sidenote: Want to run 2 IE in the same machine? Download IE 6 and then download a copy of <a href="http://tredosoft.com/IE7_standalone">IE 7 standalone</a>, yes, it&#8217;s necessary that it&#8217;s in that order and not the other way around because last time I had IE 7 as my default browser and got the IE 6 standalone, IE dev toolbar no longer worked which is one of the things that enabled me to keep my sanity back then.</p>
<h3>Before using an IE hack, check out if you can solve the problem without it.</h3>
<p> Yes, even if it drives you insane. It&#8217;s daunting, it&#8217;s scary, but it&#8217;s to be done. I hate to look at an IE6 specific stylesheet that contains more or less 100 lines of code. If it&#8217;s a problem with margins, try to see if the changes you need to do will make such a big impact to the other browsers, if it&#8217;s hardly noticeable then apply the fix in your main stylesheet. Now if we&#8217;re talking about 20-25 pixels (or more) difference then by all means, do it in a separate stylesheet.</p>
<h3>IE6 doesn&#8217;t want &lt;tr&gt; to have borders</h3>
<p>It&#8217;s annoying when I realized that. I thought the problem was that the table doesn&#8217;t have <code>haslayout</code> (how can a table not have a haslayout when it&#8217;s a block-level element by default, yes?!) that&#8217;s why the borders won&#8217;t show up. Turns out that IE doesn&#8217;t render a border when it&#8217;s in the <code>&lt;tr&gt;</code> tag, you have to add the border in the <code>&lt;td&gt;</code> tag and don&#8217;t forget to add <code>border-collapse:collapse</code> for your <code>table</code> so that the border will look continuous.</p>
<h3>Test again and again and again</h3>
<p>I told this to you before, remember? You can never be too sure with IE so you <em>must</em> be paranoid. You <em>must</em> be an OC and you must never forget to expect the worst case scenarios.</p>
<p>So there! What IE taught me so far, anyone else want to throw in some ideas too?</p>
<p>One unrelated musing, do you know that I just finally realized that this sign &lt; stands for less than and &gt; stands for greater than. It&#8217;s stupid, <strong>I know</strong> but it&#8217;s true! And guess what finally taught me this very &ldquo;complicated&rdquo; mathematical symbol. </p>
<div class="message note">
<strong>HTML!</strong></p>
<p>The less than (&lt;) sign&#8217;s equivalent (just in case you didn&#8217;t know) is &amp; lt; and the greater than (&gt;) sign&#8217;s equivalent is &amp; gt;. Finally, it&#8217;s out of my system.
</p></div>

<p><a href="http://feedads.g.doubleclick.net/~a/vPfjKngu03lyIngODE6E9Qe5RW8/0/da"><img src="http://feedads.g.doubleclick.net/~a/vPfjKngu03lyIngODE6E9Qe5RW8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vPfjKngu03lyIngODE6E9Qe5RW8/1/da"><img src="http://feedads.g.doubleclick.net/~a/vPfjKngu03lyIngODE6E9Qe5RW8/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/3jPIhuphCVM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/front-end/css/lessons-learned-in-dealing-with-ie-6-20080617/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/front-end/css/lessons-learned-in-dealing-with-ie-6-20080617/</feedburner:origLink></item>
		<item>
		<title>Appending the title of the post in “Read more” links for WordPress</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/x7vbE7BilD8/</link>
		<comments>http://tech-hive.com/tutorials/appending-the-title-of-the-post-in-read-more-links-for-wordpress-20080428/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 08:52:38 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sample codes]]></category>
		<category><![CDATA[usability tip]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=18</guid>
		<description><![CDATA[One of the guidelines in usability is that you should provide only one way that will lead them to a certain action. For example, if someone sees 2 option buttons, chances are that they might think that each option button &#8230; <a href="http://tech-hive.com/tutorials/appending-the-title-of-the-post-in-read-more-links-for-wordpress-20080428/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the guidelines in usability is that you should <strong>provide only one way that will lead them to a certain action</strong>. For example, if someone sees 2 option buttons, chances are that they might think that each option button does separate tasks when in fact their functions are the same. Also, we have to make sure that the links are descriptive enough and if not, then we should provide a title for the link so when a user hovers over it then they&#8217;ll know where the link will take them. </p>
<p>On a similar note, accessibility advocates encourages people to use unique name for every link that we use on a page (kinda like what I was saying before only have a different reason), meaning countless &ldquo;Read more of this entry&rdquo; is not really the best practice because you&#8217;re using the same text over and over and these texts are leading the user to different pages.</p>
<p>I was looking for a way to add that in <code>&lt;?php the_content(); ?&gt;</code> tag in wordpress before but I couldn&#8217;t do it. What I did then was append the <code>the_title();</code> within <code>the_content();</code> so it looked like this &#8211;</p>
<p><code>&lt;?php the_content('Read more of ' . the_title() . ' &amp; raquo;' ?&gt;</code></p>
<p>The problem though is that it does echo the &ldquo;Read more of&rdquo; but the title is no where in sight! I was so ready to find a way to make it show by hacking away through function.php, thankfully I remembered to check <a href="http://codex.wordpress.org/Template_Tags/the_content" title="Wordpress Codex - Template Tags - the_content"><code>the_content</code> page in the codex first</a>.</p>
<p>What I should&#8217;ve done in the first place is to add parameters to the <code>the_title()</code> tag so it will show like this &#8211;</p>
<p><code>&lt;?php the_content('Read more of ' . the_title('', '', false)) ?&gt;</code></p>
<p>This follows the same parameter as the <code>the_title();</code> template tag.</p>
<blockquote>
<h3>Parameters</h3>
<p><strong>before </strong><br />
(string) Text to place before the title. Defaults to &#8221;.</p>
<p><strong>after </strong><br />
(string) Text to place after the title. Defaults to &#8221;.</p>
<p><strong>display </strong><br />
(Boolean) Display the title (TRUE) or return it for use in PHP (FALSE). Defaults to TRUE.
</p></blockquote>
<p>So you may use it like this:</p>
<p><code>&lt;?php the_content('Read more of ' . the_title('&#038;ldquo ;', '&#038;rdquo ; &#038;raquo ;', false)) ?&gt;</code></p>
<p>So it will echo as <em>Read more of &ldquo;Title of the Post&rdquo; &raquo;</em>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/vz98UbhWWeZnqEHhn2WmE5feifU/0/da"><img src="http://feedads.g.doubleclick.net/~a/vz98UbhWWeZnqEHhn2WmE5feifU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vz98UbhWWeZnqEHhn2WmE5feifU/1/da"><img src="http://feedads.g.doubleclick.net/~a/vz98UbhWWeZnqEHhn2WmE5feifU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/tech-hive/~4/x7vbE7BilD8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/tutorials/appending-the-title-of-the-post-in-read-more-links-for-wordpress-20080428/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://tech-hive.com/tutorials/appending-the-title-of-the-post-in-read-more-links-for-wordpress-20080428/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 1.091 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-09-07 23:18:36 -->
