<?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, WordPress and Drupal Developer</title>
	
	<link>http://tech-hive.com</link>
	<description>Mae Paulino | Web Designer and Front End Developer</description>
	<lastBuildDate>Mon, 01 Aug 2011 05:29:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.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>&lt;form&gt; function() &amp; .class on September 2011!</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/iM0s8WVix-c/</link>
		<comments>http://tech-hive.com/advocacies/events/form-function-class-on-september-2011-20110801/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 05:28:22 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[ffcph]]></category>
		<category><![CDATA[pwdo]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=409</guid>
		<description><![CDATA[Philippine Web Designers Organization is bringing back &#60;form&#62; function() &#038; .class this year! It&#8217;s going to be on September 10 and 11, 2011 (yes, that&#8217;s 9/11) and will have 3-hour awesome workshops on HTML5 and CSS3, Javascript, Usability and Design by the country&#8217;s leading designers and front-end developers. There will also be talks on Business, Mobile Dev, Branding, and future trends. Speakers include Dan Matutina, Rico Sta. Cruz, Jason Torres, JP de Guzman, Allan Caeg, Drei Gonzales and John Leyson. Since the format totally changed, thanks to AIM for accommodating our last minute request BTW (they&#8217;re awesome!), the price will have to reflect said change as well. So this year, the payment scheme will be as follows: Early Bird (ends September 3): PhP 1,500 per day PhP 2,000 for 2 days Walk In: PhP 2,000 per day (no discount for 2-day signups) Note that to prevent long lines and annoyed &#8230; <a href="http://tech-hive.com/advocacies/events/form-function-class-on-september-2011-20110801/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://pwdo.org">Philippine Web Designers Organization</a> is bringing back &lt;form&gt; function() &#038; .class this year! It&#8217;s going to be on September 10 and 11, 2011 (yes, that&#8217;s 9/11) and will have 3-hour awesome workshops on HTML5 and CSS3, Javascript, Usability and Design by the country&#8217;s leading designers and front-end developers. There will also be talks on Business, Mobile Dev, Branding, and future trends. Speakers include <a href="http://ideals.ph" title="Dan Matutina of Ideals Creative">Dan Matutina</a>, <a href="http://sinefunc.com" title="Rico of Sinefunc">Rico Sta. Cruz</a>, <a href="http://proudcloud.net" title="Jason Torres of Proud Cloud">Jason Torres</a>, <a href="http://raincreativelabs.com" title="JP de Guzman of Rain Creative Labs">JP de Guzman</a>, <a href="http://usautoparts.com" title="Allan Caeg of US Auto Parts">Allan Caeg</a>, <a href="http://hugomanila.com" title="Drei Gonzales of HUGO Manila">Drei Gonzales</a> and <a href="http://liquidandliquid.com" title="John Leyson of Liquid and Liquid">John Leyson</a>.</p>
<p>Since the format totally changed, thanks to <a href="http://www.aim.edu/" title="Asian Institute of Management, Makati">AIM</a> for accommodating our last minute request BTW (they&#8217;re awesome!), the price will have to reflect said change as well. So this year, the payment scheme will be as follows:</p>
<blockquote><p>
<strong>Early Bird (ends September 3): </strong></p>
<ul>
<li>PhP 1,500 per day </li>
<li>PhP 2,000 for 2 days</li>
</ul>
<p><strong>Walk In:</strong> PhP 2,000 per day <em>(no discount for 2-day signups)</em></p></blockquote>
<p>Note that to prevent long lines and annoyed participants like what happened in 2009, we&#8217;re strictly implementing the payment scheme. Meaning, if you didn&#8217;t pay on or before <strong>September 3</strong>, then you will be considered a <strong>walk-in</strong> and will have to pay the rate of 2,000 PhP a day. It doesn&#8217;t matter if you registered before September 3, what we&#8217;re going to take into account is <em>when</em> you actually paid, sorry. :(</p>
<p>If you want to know more, head on over to the FFC site to see the <a href="http://www.pwdo.org/ffc/schedule/">schedule</a> and <a href="http://www.pwdo.org/ffc/register/">register</a>! Or if you want, you can also contact us to be one of our <a href="http://www.pwdo.org/ffc/sponsors/">sponsors</a> which we&#8217;ll really appreciate!</p>
<p>Hope to see you there and don&#8217;t forget to say hi! :)</p>
<img src="http://feeds.feedburner.com/~r/tech-hive/~4/iM0s8WVix-c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/advocacies/events/form-function-class-on-september-2011-20110801/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://tech-hive.com/advocacies/events/form-function-class-on-september-2011-20110801/</feedburner:origLink></item>
		<item>
		<title>Introducing HTML5 and HTML5 for Web Designers, a review</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/FCmXlBi-zyw/</link>
		<comments>http://tech-hive.com/reviews/books/introducing-html5-and-html5-for-web-designers-a-review-20110110/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 09:00:00 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[a book apart]]></category>
		<category><![CDATA[bruce lawson]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jeremy keith]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[remy sharp]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=146</guid>
		<description><![CDATA[I wasn&#8217;t really HTML5&#8242;s biggest fan. The fact that you can write it however you want made me very worried that it might result in poor coding again (unclosed tags, or mismatched closing tags). But after reading Introducing HTML5 and HTML5 for Web Designers, I realized that what it lacked in rigid coding conventions it made up with semantic elements like section, article, nav, aside, header and footer to name a few. If you&#8217;re planning on learning more about HTML5 then I suggest that you pick up these two books as it will help you immensely. Funny enough, while I&#8217;m reading these books, I suddenly realized how bad I did in coding this site up. I&#8217;m currently in the process of re-writing the entire thing while keeping in mind the mobile first philosophy. It&#8217;s a little challenging, but that&#8217;s how things get more fun, right? (I sure miss IE a &#8230; <a href="http://tech-hive.com/reviews/books/introducing-html5-and-html5-for-web-designers-a-review-20110110/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I wasn&#8217;t really HTML5&#8242;s biggest fan. The fact that you can write it however you want made me very worried that it might result in poor coding again (unclosed tags, or mismatched closing tags). But after reading <cite>Introducing HTML5</cite> and <cite>HTML5 for Web Designers</cite>, I realized that what it lacked in <em>rigid</em> coding conventions it made up with semantic elements like <code>section</code>, <code>article</code>, <code>nav</code>, <code>aside</code>, <code>header</code> and <code>footer</code> to name a few.</p>
<p>If you&#8217;re planning on learning more about HTML5 then I suggest that you pick up these two books as it will help you immensely. Funny enough, while I&#8217;m reading these books, I suddenly realized how bad I did in coding this site up. I&#8217;m currently in the process of re-writing the entire thing while keeping in mind the <a href="http://www.lukew.com/ff/entry.asp?933">mobile first</a> <a href="http://www.lukew.com/ff/entry.asp?1117">philosophy</a>. It&#8217;s a little challenging, but that&#8217;s how things get more fun, right? (I sure miss <a href="http://tech-hive.com/tagged/ie/">IE</a> a little bit.)</p>
<section>
<h3>Introducing HTML5 by Bruce Lawson and Remy Sharp</h3>
<p><img src="http://tech-hive.com/wp-content/uploads/2010/10/introducing-html5.jpg" alt="Introducing HTML5 book cover" title="Introducing HTML5" class="alignright size-full wp-image-314" width="200" /> Bought <a href="http://www.amazon.com/gp/product/B003WJRW2U?ie=UTF8&#038;tag=laslea-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B003WJRW2U">Introducing HTML5</a> (ref) a couple of days after I got my Kindle. The sample file was engaging and I thought it would be great to read about HTML5 in one place. The web is just buzzing with <a href="http://www.google.com/search?q=html5&#038;hl=en&#038;tbs=nws:1,qdr:m&#038;prmd=nl&#038;source=lnt&#038;sa=X&#038;ei=GVXbTIDDI4GevQOdwZSKCg&#038;ved=0CA4QpwU" title="Search results for HTML5 for the past month">HTML5 news and tips and tricks</a> that just getting up to date is hard to do.</p>
<p>The book uses a conversational tone and it&#8217;s probably the biggest reason why I <strong>love</strong> it. <a href="http://brucelawson.co.uk/">Bruce Lawson</a> and <a href="http://remysharp.com/">Remy Sharp</a> were able to discuss the difference between seemingly similar elements in a very clear and concise way. The explanations are so easy to understand that I just realized that, unfortunately, the only thing I did right in my markup (in this site) is using <code>article</code> for my blog posts.</p>
<p>The book is divided into 10 chapters, they discussed how HTML started to structuring text elements and new types of forms, to using <code>video</code> and <code>audio</code> tags properly as well as <code>canvas</code>, how to access and set data storages, offline mode, drag and drop, geolocation and APIs.</p>
<h4>Pros</h4>
<p>I love how in-depth the book is, it gave a lot of examples that you can follow throughout the book, the discussions on which element is which and what for is so succinct. Introduction to HTML5 is a very meaty one, it&#8217;s the type of book you&#8217;re going to consult over and over again.</p>
<p><span id="more-146"></span></p>
<h4>Cons</h4>
<p>I think it&#8217;s just a case of it&#8217;s me not you here, but the discussion about the APIs just went <i>whoosh</i> over my head. I did try to read it over and over and over but it kept on making me nod to sleep so I just gave up and vowed to pick it up again when I can understand most of it and not look at the words and abbreviations as if they&#8217;re just a bunch of gibberish.</p>
</section>
<section>
<h3>HTML5 for Web Designers by Jeremy Keith</h3>
<p class="center"><img src="http://tech-hive.com/wp-content/uploads/2011/01/HTML5FWD-feature.png" alt="HTML5FWD-feature.png" title="HTML5FWD-feature.png" width="600" height="276"/></p>
<p>I wasn&#8217;t really planning on buying <a href="http://books.alistapart.com/products/html5-for-web-designers">HTML5 for Web Designers</a> by <a href="http://adactio.com/journal/">Jeremy Keith</a> at all, but you know, you can never have enough knowledge about something, specially when it comes to web technologies.</p>
<p>The book is neither too short nor too long. It was just the right length to keep you interested while giving you the best blow-by-blow on the new things that HTMl5 has to offer. The book is divided into 6 comprehensible chapters, like in Introducing HTML5, it touched on a brief history of HTML with less focus on the politics behind it.</p>
<h4>Pros</h4>
<p>The book is such a light read, I think I was able to finish through in about a day. Jeremy Keith not only described what the elements are for and the best case scenario for each of them but he also gave a script for backwards compatibility. I really, really love that its tone is conversational, that&#8217;s why I also love <a href="http://www.amazon.com/gp/product/1430219203?ie=UTF8&#038;tag=laslea-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=1430219203">Web Standards Solutions: The Markup and Style Handbook, Special Edition</a><img src="http://www.assoc-amazon.com/e/ir?t=laslea-20&#038;l=as2&#038;o=1&#038;a=1430219203" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> (ref) by Dan Cederholm. I am such a sucker for these types of books because in my experience, technical books tend to be&#8230; well, too technical and boring.</p>
<h4>Cons (not so much)</h4>
<p>I think I would have liked it if he tackled on canvas, and the APIs in the book no matter how lightly he discussed it. I think I&#8217;ll be able to understand it even more instead of me getting so lost on how to make all those things work. He did mention that he won&#8217;t touch it in the beginning of the book but still, you can&#8217;t help but feel wanting in the end.</p>
</section>
<img src="http://feeds.feedburner.com/~r/tech-hive/~4/FCmXlBi-zyw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/reviews/books/introducing-html5-and-html5-for-web-designers-a-review-20110110/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://tech-hive.com/reviews/books/introducing-html5-and-html5-for-web-designers-a-review-20110110/</feedburner:origLink></item>
		<item>
		<title>Airphilexpress’ pricing bug</title>
		<link>http://feedproxy.google.com/~r/tech-hive/~3/lYy73qAREJw/</link>
		<comments>http://tech-hive.com/advocacies/usability/airphilexpress-pricing-bug-20101207/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 10:41:32 +0000</pubDate>
		<dc:creator>Mae</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[airlines]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[pricing issues]]></category>
		<category><![CDATA[seat sale]]></category>

		<guid isPermaLink="false">http://tech-hive.com/?p=316</guid>
		<description><![CDATA[The past year, I realized that I love traveling as much as I love airline seat sales, I follow a number of airlines like Cebu Pacific, PAL, Tiger Airways and Air Asia for all the seat sale goodness. On the 23rd of November, Air Philippines Express announced a seat sale, a one-way fare of 1,888 from Manila to Singapore. For something that usually costs 5,000 Philippine Pesos and up, that&#8217;s already a steal! So, as usual, I hurriedly tested how much this will cost me since my friend and I are planning a trip there anyway. I like the fact that you can a number of days so you can choose from them, unlike Cebu Pacific&#8217;s standard practice of making me click and wait to see other days. I didn&#8217;t know that there&#8217;s going to be a stop over but I thought that it&#8217;s fine, that&#8217;s what you get for &#8230; <a href="http://tech-hive.com/advocacies/usability/airphilexpress-pricing-bug-20101207/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The past year, I realized that I love traveling as much as I love airline seat sales, I follow a number of airlines like <a href="http://www.cebupacificair.com">Cebu Pacific</a>, <a href="http://www.philippineairlines.com">PAL</a>, <a href="http://www.tigerairways.com.au">Tiger Airways</a> and <a href="http://www.airasia.com">Air Asia</a> for all the seat sale goodness.</p>
<p>On the 23rd of November, <a href="http://airphilexpress.com">Air Philippines Express</a> announced a seat sale, a one-way fare of 1,888 from Manila to Singapore. For something that usually costs 5,000 Philippine Pesos and up, that&#8217;s already a steal! So, as usual, I hurriedly tested how much this will cost me since my friend and I are planning a trip there anyway.</p>
<p class="text-center"><img src="http://tech-hive.com/wp-content/uploads/2010/12/Screen-shot-2010-11-23-at-1.14.32-PM.png" alt="Screen shot 2010-11-23 at 1.14.32 PM.png" title="Screen shot 2010-11-23 at 1.14.32 PM.png" width="600" height="465" /></p>
<p>I like the fact that you can a number of days so you can choose from them, unlike Cebu Pacific&#8217;s standard practice of making me click and wait to see other days.</p>
<p class="center"><img src="http://tech-hive.com/wp-content/uploads/2010/12/Screen-shot-2010-11-23-at-1.15.01-PM.png" alt="Screen shot 2010-11-23 at 1.15.01 PM.png" title="Screen shot 2010-11-23 at 1.15.01 PM.png" width="600" height="564" /></p>
<p>I didn&#8217;t know that there&#8217;s going to be a stop over but I thought that it&#8217;s fine, that&#8217;s what you get for being such a cheapskate. Until&#8230;</p>
<p><span id="more-316"></span></p>
<p class="center"><img src="http://tech-hive.com/wp-content/uploads/2010/12/Screen-shot-2010-11-23-at-1.15.26-PM.png" alt="Screen shot 2010-11-23 at 1.15.26 PM.png" title="Screen shot 2010-11-23 at 1.15.26 PM.png" width="564" height="600" /></p>
<p>I may have misunderstood this whole thing but looking back at the previous screenshot, it has been to my understanding that the fare of 1,888 is going to cover the entire trip, <em>with</em> the stopover and the base fare is indeed 3776, I expected the final fare to be around 4,000 due to taxes but I never expected that even the stopover&#8217;s going to be 1,888, too! With this, it appears that the non-stop regular fare of 4,488 is the better choice.</p>
<p>Of course, I cannot discount the fact that it&#8217;s just a software problem, but still. It&#8217;s wise to iron out blocker bugs like these before announcing <em>anything</em>. Specially in this kind of tight industry since apparently, everyone wants to travel but doesn&#8217;t want to spend as much. (LOL) </p>
<p>Anyway, isn&#8217;t it deploying 101? There were times before when we had to keep working until 2 or 3 in the morning because we just deployed, and we had to make sure that we go through the site a couple of times to make sure that every bugs, from minor to blockers, have been &#8220;squashed&#8221; before we retire for bed. Something like this shouldn&#8217;t have been overlooked.</p>
<p>If it <em>is</em> intentional, then they have a serious problem because what they&#8217;re doing is misleading and just plain wrong.</p>
<p>I know it&#8217;s a bit late to be complaining about this, but I wondered if this has been brought to their attention or if I&#8217;m just one of the lucky few to have experienced this. I wish they&#8217;ve sorted this out already because Cebu Pacific needs a competitor.</p>
<img src="http://feeds.feedburner.com/~r/tech-hive/~4/lYy73qAREJw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tech-hive.com/advocacies/usability/airphilexpress-pricing-bug-20101207/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://tech-hive.com/advocacies/usability/airphilexpress-pricing-bug-20101207/</feedburner:origLink></item>
		<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, submit a comment, gather information from your audience, and lots more through them. However, apart from fieldset, we don&#8217;t really have a semantic way of marking up a pair of form elements. There are different ways in marking up one&#8217;s form: div, p, ul or ol and dl. Because using dl, or definition list, to mark up a form is still unusual even though it&#8217;s not exactly a new idea, I will be talking and boring you, unfortunate people, about it here. Understanding the dl element dl is one of the most overlooked element in HTML since, I assume, people mostly associate it with just definition lists, aka glossary. But &#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>
<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 javascript, all the styles should be in CSS, and the document structure in HTML. One time, while working on our internal project, I thought I&#8217;d try a little -webkit-transition-duration 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 scrolled from one background position to the next every time we hover on it because of the delay! It was really amusing. CSS3 Carousel I experimented a little bit with transition and descendant selectors, but apparently, p ~ p doesn&#8217;t work with :hover or :active or :focus very well &#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>
<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 and MVC frameworks more. When I first looked at the code within Volusion&#8217;s LiveEditor, I thought &#8220;Well this is going to be simple and easy.&#8221; But I was so, so, so wrong. It was a nightmare so hard, I&#8217;m not used to making the design work for the CMS &#8212; I&#8217;m used to bending it with my jedi mind tricks (or well, try). Volusion only has one theme for everything. 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 &#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>
<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>14</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 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. 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: Sweetcron. 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 &#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>
<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 problems took me hours of frustration, so I better chronicle it. :( 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 display value to inline-block 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 block and inline, that&#8217;s how little I think of it). Inline 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 inline-block, we achieve just &#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>
<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 of updating it until Matt Mallunweg talked about WordPress 2.7 at WordCamp. 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. One update later and I&#8217;m testing the thing locally (yay!) and so far, I say that I like it. Documentation 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 &#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://tech-hive.com/wp-content/uploads/2008/09/help_link.png"><img src="http://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://tech-hive.com/wp-content/uploads/2008/09/dashboard.png"><img src="http://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://tech-hive.com/wp-content/uploads/2008/09/media_library.png"><img src="http://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>
<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 host the video in her own blog and use WordPress to file it for her. She can use a plugin that will let her upload the videos in her blog or do it the &#8220;harder&#8221; way. Something that I&#8217;m very fond of doing. Seriously, I&#8217;m the type of person who would only resort to using plugins if: I&#8217;m lazy at the time to think of another way without using a plugin My head is aching and I&#8217;m getting frustrated because it just won&#8217;t follow what I&#8217;m telling it. The reason is because I am not a developer and it&#8217;s really hard to be dependent on a plugin specially if that &#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://tech-hive.com/wp-content/uploads/2008/09/picture-6.png"><img src="http://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>
<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>
	</channel>
</rss>
