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

<channel>
	<title>Geek is a Lift-Style. &#187; Featured</title>
	<atom:link href="http://www.taiwangeek.com/category/featured/feed" rel="self" type="application/rss+xml" />
	<link>http://www.taiwangeek.com</link>
	<description>Time has a wonderful way of showing us what really matters.</description>
	<lastBuildDate>Mon, 23 May 2011 07:18:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>Amazon EC2神兵 &#8211; scalr</title>
		<link>http://www.taiwangeek.com/2011-04/amazon-ec2%e7%a5%9e%e5%85%b5-scalr.html</link>
		<comments>http://www.taiwangeek.com/2011-04/amazon-ec2%e7%a5%9e%e5%85%b5-scalr.html#comments</comments>
		<pubDate>Fri, 29 Apr 2011 03:34:18 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/?p=6421</guid>
		<description><![CDATA[身為台灣人 林北真的很難過 玩EC2的這麼少 分享的資料這麼的貧脊 大家都寫一些簡單的東西 哄一些初學者去玩&#8221;雲端&#8221; 可當你真的把網站放到EC2 你還是要面對架構的問題 否則雲端未必比你上一家租的VPS來得好用 現在讓林北來分享一些真正有料的 無碼的 重口味的東西吧 ps,這種東西 不是入門 是給真正的玩家看得 應該可以解救不少網管人員 scalr 開源的PHP專案 直接集佈署 監控 EC2於一身 連AIM都幫你開好了 還是燒燙燙的Nqinx+php唷 https://scalr.net/tour.html]]></description>
			<content:encoded><![CDATA[<p>身為台灣人 林北真的很難過 玩EC2的這麼少 分享的資料這麼的貧脊<br />
大家都寫一些簡單的東西 哄一些初學者去玩&#8221;雲端&#8221;</p>
<p>可當你真的把網站放到EC2 你還是要面對架構的問題 否則雲端未必比你上一家租的VPS來得好用</p>
<p>現在讓林北來分享一些真正有料的 無碼的 重口味的東西吧</p>
<p>ps,這種東西 不是入門 是給真正的玩家看得 應該可以解救不少網管人員</p>
<h3>scalr</h3>
<p>開源的PHP專案 直接集佈署 監控 EC2於一身 連AIM都幫你開好了 還是燒燙燙的Nqinx+php唷</p>
<p>https://scalr.net/tour.html</p>
<p><img src="https://scalr.net/site/images/screenshots/small/farm_map.png" alt="圖形化的Instance管理" /><br />
<img src="https://scalr.net/site/images/screenshots/small/stats.png" alt="系統資源監控" /><br />
<img src="https://scalr.net/site/images/screenshots/small/farm_edit.png" alt="一目了然的伺服器列表" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2011-04/amazon-ec2%e7%a5%9e%e5%85%b5-scalr.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Powerful Time-Savers For Web Designers</title>
		<link>http://www.taiwangeek.com/2010-06/50-powerful-time-savers-for-web-designers.html</link>
		<comments>http://www.taiwangeek.com/2010-06/50-powerful-time-savers-for-web-designers.html#comments</comments>
		<pubDate>Tue, 29 Jun 2010 17:46:49 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/50-powerful-time-savers-for-web-designers.html</guid>
		<description><![CDATA[Being a web designer is not easy. Not only do we need to have a good understanding about visual design, typography, information architecture, psychology and a plethora of other disciplines;... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/50-powerful-time-savers-for-web-designers.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Being a web designer is not easy. Not only do we need to have a<br />
good understanding about visual design, typography, information<br />
architecture, psychology and a plethora of other disciplines; in<br />
our work, we need to take care of so many details, so that our job<br />
becomes more and more time-consuming, requiring dozens of tools,<br />
attention span and an effective workflow for beautiful, timely and<br />
functional results.</p>
<p>And this is where small time-savers become handy. Be it a handy<br />
checklist, batch installer, dummy image generator or converter from<br />
Excel spreadsheet to HTML — all these things can save us a couple<br />
of minutes every day, making our work easier and more efficient.<br />
And this is why we keep collecting them for Smashing Magazine’s<br />
readers. Whether you like lists or not: this one will probably help<br />
you find those little nuggets out there that will help you avoid<br />
headaches and stress. Below we present <strong>useful time-savers<br />
for web designers</strong>.</p>
<p class="c1">
<p>You may want to <a  href="http://www.smashingmagazine.com/the-smashing-newsletter/">subcribe<br />
to Smashing Magazine’s E-Mail Newsletter</a> (32,600 subscribers)<br />
to keep updated about new useful tools, techniques and resources.<br />
The newsletter is sent out once every two weeks.</p>
<p>[Offtopic: By the way, did you know that Smashing Magazine has a<br />
<a  href="http://creatives.commindo-media.de/www/delivery/ck.php?oaparams=2__bannerid=1249__zoneid=0__cb=be1da96c6d__oadest=http%3A%2F%2Fm.smashingmagazine.com"><br />
mobile version</a>? Try it out if you have an iPhone, Blackberry or<br />
another capable device.]</p>
<h3>Time-Savers For Web Designers</h3>
<p><a  href="http://launchlist.net/">LaunchList</a><br />
This tool helps you review important items before the big launch.<br />
By default, the tool provides 28 items to be checked, but it also<br />
allows you to add custom items to the list. Each item can be<br />
commented on or crossed out. Once you’re done, you can send the<br />
report along with project’s details to multiple recipients via<br />
email. Alternatives: <a  href="http://www.boxuk.com/blog/the-ultimate-website-launch-checklist">Ultimate<br />
Website Launch Checklist</a> and Paul Boag’s <a  href="http://boagworld.com/business-strategy/pre-launch-checklist">The<br />
Ultimate Website Prelaunch Checklist</a>.</p>
<p class="showcase"><a  href="http://launchlist.net/"><img src="/Images/google-reader-share-launch.jpg" alt="Launch in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://pencil.evolus.vn/en-US/Home.aspx">Pencil<br />
Project: Sketching and Prototyping with Firefox</a><br />
Pencil is an open source GUI prototyping tool. It contains built-in<br />
stencils for diagrams and prototyping, on-screen text editing with<br />
rich text support as well as standard drawing operations. Works in<br />
Firefox 3.5+.</p>
<p class="showcase"><a  href="http://pencil.evolus.vn/en-US/Home.aspx"><img src="/Images/google-reader-share-useful-tool-212.jpg" alt="Useful-tool-212 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://zootool.com/">Zootool</a><br />
Zootool is a bookmarking website and tool for collecting images,<br />
documents, links and videos from anywhere on the Web. A bookmarklet<br />
allows you to collect items quickly and easily. You can then tag<br />
and organize your saved items in Zootool’s back end. You can also<br />
integrate Zootool with Tumblr, Twitter, Delicious and FriendFeed to<br />
share what you find. Screenshot via <a  href="http://www.macstories.net/reviews/zootool/">MacStories</a>.</p>
<p class="showcase"><a  href="http://zootool.com/"><img src="/Images/google-reader-share-tools-154.jpg" border="0" alt="Tools-154 in 50 Powerful Time-Savers For Web Designers" width="500" height="273" /></a></p>
<p><a  href="http://www.bounceapp.com/">Bounce</a><br />
A fun and easy way to share ideas on a website. The tool allows you<br />
to make notes, write feedback in an overlay of every site and then<br />
share your notes with friends.</p>
<p class="showcase"><a  href="http://www.bounceapp.com/"><img src="/Images/google-reader-share-useful-tool-220.jpg" alt="Useful-tool-220 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://ninite.com/">Ninite Batch Installer</a><br />
Ninite lets you pick your favorite software from among an extensive<br />
list (Web browsers, messaging, media, images, documents, security,<br />
runtimes, file sharing, utilities, compression, developer tools and<br />
more), creates a batch installer for them and then installs them<br />
for you automatically. Alternative: <a  href="http://www.allmyapps.com/">Allmyapps</a> allows you to bundle your<br />
favourite applications, install them in a single click and<br />
reinstall them whenever you need to.</p>
<p class="showcase"><a  href="http://ninite.com/"><img src="/Images/google-reader-share-handy-004.jpg" alt="Handy-004 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://www.supportdetails.com/">Support<br />
Details</a><br />
When in doubt, send your customers to this tool. Their data will be<br />
automatically read out of the browser (including Flash version,<br />
operating system, cookies, JavaScript status, screen resolution,<br />
browser size and more) and can be copied, sent directly to you via<br />
email or saved.</p>
<p class="showcase"><a  href="http://www.supportdetails.com/"><img src="/Images/google-reader-share-supportdetails.jpg" alt="Supportdetails in 50 Powerful Time-Savers For Web Designers" width="500" height="271" /></a></p>
<p><a  href="http://mugtug.com/darkroom/">MugTug’s<br />
Darkroom</a><br />
When you need to modify a picture but don’t have your favorite<br />
software on hand, you can use the all-in-one image processor<br />
<a  href="http://mugtug.com/darkroom/">MugTug’s Darkroom</a> which<br />
was created for photographers. You are able to adjust levels, white<br />
balance, exposure, contrast and saturation and apply a few<br />
photographic effects. In addition, Darkroom allows to upload<br />
pictures from Picasa and Flickr. Alternatives: <a  href="http://www.pixlr.com/">Pixlr</a> and <a  href="http://www.sumopaint.com/home/">Sumo Paint</a>.</p>
<p class="showcase"><a  href="http://mugtug.com/darkroom/"><img src="/Images/google-reader-share-handy-005.jpg" border="0" alt="Handy-005 in 50 Powerful Time-Savers For Web Designers" width="500" height="324" /></a></p>
<p><a  href="http://visualwebsiteoptimizer.com/">Visual Website<br />
Optimizer</a><br />
Visual Website Optimizer is undoubtedly the best A/B, split and<br />
multivariate testing software ever created by mankind.</p>
<p class="showcase"><a  href="http://visualwebsiteoptimizer.com/"><img src="/Images/google-reader-share-tools-151.jpg" alt="Tools-151 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://keyonary.com/">Keyonary</a><br />
This site a nice little application for finding shortcuts in Mac OS<br />
X, Photoshop and so on. Currently, more than 250 Photoshop<br />
shortcuts have been added. Simply type the name of application in<br />
the search box, and it spits out a long shortcut list.</p>
<p class="showcase"><a  href="http://keyonary.com/"><img src="/Images/google-reader-share-tools-143.jpg" alt="Tools-143 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://gridr.atomeye.com/">gridr buildrrr</a><br />
This generators allows you to choose the grid for your layout,<br />
preview it online and generate the CSS code right away.</p>
<p class="showcase"><a  href="http://gridr.atomeye.com/"><img src="/Images/google-reader-share-tools-145.jpg" alt="Tools-145 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://instantblueprint.com/">Instant Blueprint –<br />
Create a web project framework in seconds.</a><br />
Instant Blueprint allows you to quickly create a web project<br />
framework with valid HTML/XHTML and CSS in only a matter of<br />
seconds, allowing you to get your project up and running<br />
faster!</p>
<p class="showcase"><a  href="http://instantblueprint.com/"><img src="/Images/google-reader-share-useful-113.jpg" alt="Useful-113 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://mnutt.github.com/hummingbird/">Hummingbird</a><br />
Hummingbird lets you see how visitors are interacting with your<br />
website in real time. Hummingbird is built on top of Node.js, a new<br />
javascript web toolkit that can handle large amounts of traffic and<br />
many concurrent users.</p>
<p class="showcase"><a  href="http://mnutt.github.com/hummingbird/"><img src="/Images/google-reader-share-useful-tool-227.jpg" alt="Useful-tool-227 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://www.jsfiddle.net/">jsFiddle</a><br />
Online Editor for the Web, with support of JavaScript, MooTools,<br />
jQuery, Prototype, YUI, Glow and Dojo, HTML and CSS. The tool lets<br />
you save and run your applications within the web browser.</p>
<p class="showcase"><a  href="http://www.jsfiddle.net/"><img src="/Images/google-reader-share-useful-tool-213.jpg" alt="Useful-tool-213 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://mygengo.com/string/about">String: create a<br />
multi-language website or app</a><br />
Essentially, String is a version control for localization. This<br />
tool allows you to manage your language files – from PHP to PO to<br />
Rails to iPhone apps. You can invite users to translate your<br />
content, and keep track of changes. You can add new sections and<br />
languages as you go and then download your updated language files<br />
and place them in your app.</p>
<p class="showcase"><a  href="http://mygengo.com/string/about"><img src="/Images/google-reader-share-tools-132.jpg" alt="Tools-132 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://titanpad.com/">Titanpad</a><br />
This tool allows you to edit documents simultaneously with other<br />
users, highlighting each user’s edits in a different color. Editing<br />
is done in true real time. Nice solution for everybody who works<br />
collaboratively on text documents, whether in the same office or on<br />
the other side of the world.</p>
<p class="showcase"><a  href="http://titanpad.com/"><img src="/Images/google-reader-share-titanpad2.jpg" border="0" alt="Titanpad2 in 50 Powerful Time-Savers For Web Designers" width="500" height="322" /></a></p>
<p><a  href="http://pixelnovel.com/timeline/">Pixelnovel Timeline:<br />
Version Control for Adobe Photoshop</a><br />
This tool basically integrates a Subversion client in Adobe<br />
Photoshop with an Adobe Photoshop plug-in. You can preview versions<br />
right in Photoshop and manage version control directly from<br />
Photoshop. Not free.</p>
<p class="showcase"><a  href="http://pixelnovel.com/timeline/"><img src="/Images/google-reader-share-tools-142.jpg" alt="Tools-142 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://0to255.com/">0to255</a><br />
A simple tool that helps web designers find variations of any<br />
color. Simply pick the color that you want to start with and 0to255<br />
gives you a range of colors from black to white using an interval<br />
optimized for web design. Then, just click the variation you want<br />
to use and the hex code is automatically copied to your<br />
clipboard.</p>
<p class="showcase"><a  href="http://0to255.com/"><img src="/Images/google-reader-share-tools-135.jpg" alt="Tools-135 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://loadimpact.com/index.php">Load Impact: Website<br />
load/stress test</a><br />
The tool lets you find out the performance limits of your website<br />
before you learn the hard way. It is an online service that<br />
simulates users accessing your site and creates test report graphs<br />
to find out how many users your site could handle.</p>
<p class="showcase"><a  href="http://loadimpact.com/"><img src="/Images/google-reader-share-useful-213.jpg" alt="Useful-213 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://ideone.com/">Ideone: Online IDE &amp; Debugging<br />
Tool</a><br />
This tool is an online compiler and debugging tool which allows to<br />
compile and run code online in more than 40 programming languages,<br />
among them C++, Java, JavaScript, Perl, PHP, Python and Ruby. Nice<br />
alternatives online: <a  href="http://phpanywhere.net/">PHP<br />
Anywhere</a> (online PHP editor) and <a  href="http://www.coderun.com/">CodeRun</a> (allows you to develop, test<br />
and debug ASP.NET, PHP and Ajax applications online).</p>
<p class="showcase"><a  href="http://ideone.com/"><img src="/Images/google-reader-share-tools-105.jpg" alt="Tools-105 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://dummyimage.com/">Online Dummy Image<br />
Generator</a><br />
This online tool generates dummy images for you site: you can<br />
specify size, background and foreground colors, image format and<br />
add custom text. You can also use shortcuts for several standard<br />
dimensions including ad sizes (mediumrectangle, skyscarper,<br />
leaderboard etc.), screen resolution sizes and video standards<br />
(ntsc, pal, hd720, hd1080).</p>
<p class="showcase"><a  href="http://dummyimage.com/"><img src="/Images/google-reader-share-tools-156.jpg" alt="Tools-156 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://gethifi.com/regexp/">HiFi RegExp Tool</a><br />
Regular expressions can be a pain. The HiFi RegExp tool is 100%<br />
JavaScript using jQuery. This tool was created to help developers<br />
learn, practice, and compose regular expressions.</p>
<p class="showcase"><a  href="http://gethifi.com/regexp/"><img src="/Images/google-reader-share-tools-146.jpg" alt="Tools-146 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://tableizer.journalistopia.com/">Tableizer</a><br />
Clients often provide data in spreadsheet form, and reformatting it<br />
into HTML can be a real pain. This tool generates HTML tables out<br />
of spreadsheet data. Just copy and paste the cells from your<br />
spreadsheet, choose your options (font, font size and header color)<br />
and you have a properly formatted HTML table for your data.</p>
<p class="showcase"><a  href="http://tableizer.journalistopia.com/"><img src="/Images/google-reader-share-tableizer.gif" alt="Tableizer in 50 Powerful Time-Savers For Web Designers" width="452" height="287" /></a></p>
<p><a  href="http://www.followupthen.com/">FollowUpThen: Easy Email<br />
Reminder</a><br />
If you don’t mind sending your e-mails to a third-party, try this<br />
tool for easy email reminders. On your next email just include<br />
time-interval@followupthen.com and the tool will follow up after<br />
the time interval you specify. No account is required.</p>
<p class="showcase"><a  href="http://www.followupthen.com/"><img src="/Images/google-reader-share-tools-124.jpg" alt="Tools-124 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://www.divine-project.com/">Divine: Conversion tool<br />
from PSD to HTML</a><br />
Divine is a plug-in that sits on top of Photoshop. Once you’ve<br />
finished designing in Photoshop, launch Divine plug-in in<br />
Photoshop, assign WordPress roles to the main elements (e.g.<br />
<code>#footer</code>, <code>#header</code>, etc.), and then the<br />
plug-in will prepare all the files you need. Once you set FTP<br />
access, the tool uploads the theme automatically to your server.<br />
Absolutely free.</p>
<p class="showcase"><a  href="http://www.divine-project.com/"><img src="/Images/google-reader-share-useful-200.jpg" alt="Useful-200 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://kaleido.media.mit.edu/">Kaleido</a><br />
This tool allows you to create meaningful visuals for code and can<br />
be used to plan, organize and navigate code in a more intuitive<br />
way.</p>
<p class="showcase"><a  href="http://kaleido.media.mit.edu/"><img src="/Images/google-reader-share-tools-109.jpg" alt="Tools-109 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://mugtug.com/sketchpad/">Sketchpad</a><br />
This application is a powerful online image editor. Its tools are<br />
organized in handy, draggable boxes that can be positioned very<br />
much as you would see in traditional image-editing<br />
applications.</p>
<p><a  href="http://mugtug.com/sketchpad/"><img src="/Images/google-reader-share-sketchpad.png" alt="Screenshot" width="500" height="337" /></a></p>
<p><a  href="http://rishida.net/tools/conversion/">Unicode code<br />
converter</a><br />
Type or paste text in any of the green or grey shaded boxes and<br />
click on the button Convert button above it. Alternative<br />
representations will appear in all the other boxes. You can then<br />
cut &amp; paste the results into your document.</p>
<p class="showcase"><a  href="http://rishida.net/tools/conversion/"><img src="/Images/google-reader-share-useful-155.jpg" alt="Useful-155 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://www.gridsystemgenerator.com/">Grid System<br />
Generator</a><br />
This tool generates grid systems in valid css / xhtml for rapid<br />
prototyping, development and production environments. The grid<br />
system generators offer the ability to customize the width, no. of<br />
columns and margin(s) to allow more flexibility for various<br />
designs.</p>
<p class="showcase"><a  href="http://www.gridsystemgenerator.com/"><img src="/Images/google-reader-share-useful-176.jpg" alt="Useful-176 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://www.ud.com/">ud.com namecheck</a><br />
The tool checks availability of social usernames, domain names and<br />
trademarks.</p>
<p class="showcase"><a  href="http://www.ud.com/"><img src="/Images/google-reader-share-useful-tool-217.jpg" alt="Useful-tool-217 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://lamb.cc/typograph/">Typograph — Scale &amp;<br />
Rhythm</a><br />
A useful tool for testing typographic scale and rhythm. It lets you<br />
set factors such as the typographic scale (traditional, 3:5<br />
Fibonacci, Le Corbusier, etc.), the font size in percentage, line<br />
height, the layout, padding and the line height for h1, h2 and h3<br />
headings.</p>
<p class="showcase"><a  href="http://lamb.cc/typograph/"><img src="/Images/google-reader-share-scale.jpg" alt="Scale in 50 Powerful Time-Savers For Web Designers" width="500" height="309" /></a></p>
<p><a  href="http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_intro.html"><br />
ColorBrewer Intro – Selecting Good Color Schemes for Maps</a><br />
ColorBrewer is an online tool designed to help people select good<br />
color schemes for maps and other graphics.</p>
<p class="showcase"><a  href="http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_intro.html"><br />
<img src="/Images/google-reader-share-useful-210.jpg" alt="Useful-210 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://www.mailchimp.com/labs/inlinecss.php">CSS<br />
Inliner Tool</a><br />
If you’ve ever sent an email campaign, you know that if your CSS is<br />
not coded inline, it is likely to get stripped out by email<br />
clients, which can make your email design pretty funky looking.<br />
Writing CSS inline can be time consuming, and repetitive. MailChimp<br />
has a CSS inline conversion tool built right in that will<br />
automatically transform all of your local styles into inline<br />
styles. Designers have found it so useful, we thought we’d share it<br />
with everyone else – even if you don’t have a MailChimp<br />
account.</p>
<p class="showcase"><a  href="http://www.mailchimp.com/labs/inlinecss.php"><img src="/Images/google-reader-share-useful-222.jpg" alt="Useful-222 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://htmlpurifier.org/">HTML Purifier – Filter your<br />
HTML the standards-compliant way!</a><br />
HTML Purifier is a standards-compliant HTML filter library written<br />
in PHP. HTML Purifier removes malicious code (better known as XSS)<br />
and make sure your documents are standards compliant.</p>
<p class="showcase"><a  href="http://htmlpurifier.org/"><img src="/Images/google-reader-share-useful-223.jpg" alt="Useful-223 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://rendera.heroku.com/">Rendera</a><br />
Rendera helps you learn HTML5 and CSS. Type in your HTML code and<br />
see it rendered in real-time. Then style it with CSS. You can use<br />
any of the HTML 5 or CSS3 tags your browser supports. The tool<br />
supports HAML and SASS, too.</p>
<p class="showcase"><a  href="http://rendera.heroku.com/"><img src="/Images/google-reader-share-useful-tool-204.jpg" alt="Useful-tool-204 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://gskinner.com/RegExr/">RegExr</a><br />
An intuitive tool for learning, writing, and testing Regular<br />
Expressions.</p>
<p class="showcase"><a  href="http://gskinner.com/RegExr/"><img src="/Images/google-reader-share-useful-tool-211.jpg" alt="Useful-tool-211 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://tryruby.org/">try ruby! (in your<br />
browser)</a><br />
This tool allows you to try out Ruby code in the prompt command<br />
line online. It supports Ruby’s built-in methods, and contains a<br />
step-by-step tutorial for Ruby newbies.</p>
<p class="showcase"><a  href="http://tryruby.org/"><img src="/Images/google-reader-share-useful-tool-216.jpg" alt="Useful-tool-216 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://code.google.com/p/googlecl/">Google Command<br />
Line</a><br />
GoogleCL is a command-line utility that provides access to various<br />
Google services. It streamlines tasks such as posting to a Blogger<br />
blog, adding events to Calendar, or editing documents on Google<br />
Docs.</p>
<p class="showcase"><a  href="http://code.google.com/p/googlecl/"><img src="/Images/google-reader-share-useful-tool-222.jpg" alt="Useful-tool-222 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://www.tinyfluidgrid.com/">Tiny Fluid<br />
Grid</a><br />
Simple tool that generates code for fluid grid-based layouts.</p>
<p class="showcase"><a  href="http://www.tinyfluidgrid.com/"><img src="/Images/google-reader-share-useful-tool-206.jpg" alt="Useful-tool-206 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://fonolo.com/">Fonolo.com</a><br />
This online tool lets you skip the phone menus for hundreds of<br />
companies and makes it less frustrating to call large companies.<br />
For business owners, Fonolo allows your customers to actually see<br />
your phone menu options, before they call you.</p>
<p class="showcase"><a  href="http://fonolo.com/"><img src="/Images/google-reader-share-tools-152.jpg" alt="Tools-152 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://www.producteev.com/">Producteev: Creating To-Do<br />
Lists with Emails</a><br />
Forward your important emails to task@producteev.com and the tool<br />
will create to-do lists on the fly and send you alerts when needed.<br />
It can be integrated in E-mails, IM, Web, iPhone, Gmail, Google<br />
Calendar etc.</p>
<p class="showcase"><a  href="http://www.producteev.com/"><img src="/Images/google-reader-share-tools-127.jpg" alt="Tools-127 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<p><a  href="http://www.adduse.com/">AddUse – User research made<br />
easy</a><br />
AddUse is a web based tool that helps you create, manage and<br />
present your user research in a simple, easy to use and cost<br />
efficient way. It’s a tool to use at any given moment in your<br />
development process. It presents the results from your user tests,<br />
surveys and questionnaires in a graphical way, efficiently helping<br />
engineering, marketing and management groups make the right<br />
decisions.</p>
<p class="showcase"><a  href="http://www.adduse.com/"><img src="/Images/google-reader-share-tools-148.jpg" alt="Tools-148 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://bookwhen.com/">bookwhen</a><br />
Online registration for events, workshops, classes and courses. The<br />
free version allows for 150 events with 300 bookings per month.</p>
<p class="showcase"><a  href="http://bookwhen.com/"><img src="/Images/google-reader-share-useful-tool-218.jpg" alt="Useful-tool-218 in 50 Powerful Time-Savers For Web Designers" width="500" height="300" /></a></p>
<h4>Further useful tools</h4>
<p><a  href="http://i.seemikecode.com/">see[Mike]code: tool for<br />
remote coding interview</a><br />
This simple tool lets you conduct a short coding interview<br />
remotely: it creates a disposable page for the job candidate and<br />
allows you to discover people who struggle to code on big or small<br />
problems.</p>
<p><a  href="http://jsdo.it/">jsdo.it</a><br />
This tool allows you to write code your browser, fork and modify<br />
any code, fix bugs and add features and also ask the community<br />
about your problems.</p>
<p><a  href="http://www.exceptionhub.com/">JavaScript Error<br />
Tracking</a><br />
The service tracks JavaScript errors that occur on your site and<br />
provides you with a stack trace to help you debug. Similar errors<br />
are grouped together.</p>
<p><a  href="http://www.oldversion.com/">Old Version</a><br />
Old Version has exactly that, the older version of some of your<br />
favorite programs. Why? Because newer is not always better.<br />
Sometimes the newer versions cause conflicts. This way, you can<br />
always go back to the older version that worked for you.</p>
<p><a  href="http://www.onbile.com/">Onbile</a><br />
Onbile is a free platform for creating and managing your Mobile<br />
Website version for iPhone, Android and Blackberry users</p>
<p><a  href="http://outright.com/">Free Bookkeeping, Accounting,<br />
&amp; Tax Services; Self Employment &amp; Freelance<br />
Success</a><br />
Easily import from online accounts to put your bookkeeping on<br />
autopilot and prepare taxes. Get up-to-date reports that give you<br />
visibility into your P&amp;L, income, and expenses.</p>
<p><a  href="http://isendr.com/">iSendr</a><br />
iSendr lets you send files to your friends directly, without<br />
uploading to a server.</p>
<p><a  href="http://www.seekwp.com/">seekWP</a><br />
WordPress documentation search engine.</p>
<p><a  href="http://code.google.com/p/speedtracer/">speedtracer</a><br />
Speed Tracer is a tool to help you identify and fix performance<br />
problems in your web applications. It visualizes metrics that are<br />
taken from low level instrumentation points inside of the browser<br />
and analyzes them as your application runs. Speed Tracer is<br />
available as a Chrome extension and works on all platforms where<br />
extensions are currently supported (Windows and Linux).</p>
<p><a  href="http://www.awesomehighlighter.com/">the Awesome<br />
Highlighter</a><br />
This tool lets you highlight text on web pages and then gives you a<br />
small link to the highlighted page.</p>
<p><a  href="http://www.openwith.org">OpenWith.org</a><br />
This page provides detailed information about most file extension<br />
and links to free programs that can open and create each type of<br />
file.</p>
<h3>Last Click</h3>
<p><a  href="http://kukuklok.com/">Kuku Klok</a><br />
Online alarm clock and wake-up call for those of us who often work<br />
too much and fall asleep in front of the screen. Open the website,<br />
select the desired alarm time and set your favorite wake-up call.<br />
Keep the browser tab open. Happily, this online alarm clock works<br />
even if your Internet connection goes down. The available sounds<br />
are “Classic Clock,” “Electronic,” “Slayer Guitar,” “Military<br />
Trumpet” and “Cockerel.”</p>
<p class="showcase"><a  href="http://kukuklok.com/"><img src="/Images/google-reader-share-tools-158.jpg" alt="Tools-158 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<p><a  href="http://yizzle.com/whatthehex/">What the Hex?</a><br />
Among the variety of methods of representing color values, some are<br />
easier to identify than others. The hexadecimal system, though,<br />
often looks incomprehensible. If you feel you know colors pretty<br />
well, then this is a simple game for you. All you have to do is<br />
match the hexadecimal code (which is actually a group of three hex<br />
numbers: #<span class="c2">rr</span><span class="c3">gg</span><span class="c4">bb</span>) with the corresponding<br />
color. Of course, this is easier said than done, but you can adjust<br />
the difficulty by displaying between 2 and 48 possible answers.</p>
<p class="showcase"><a  href="http://yizzle.com/whatthehex/"><img src="/Images/google-reader-share-tools-160.jpg" border="0" alt="Tools-160 in 50 Powerful Time-Savers For Web Designers" width="500" height="292" /></a></p>
<h3>Would you like to see more similar round-ups on Smashing<br />
Magazine?</h3>
<p><a  href="http://polldaddy.com/poll/3402095/">Would you like to see<br />
more similar round-ups on SmashingMag?</a><span class="c5"><a  href="http://polldaddy.com/features-surveys/">Market<br />
Research</a></span></p>
<h3>Related Posts</h3>
<p>You may be interested in the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2009/06/29/45-incredibly-useful-web-design-checklists-and-questionnaires/"><br />
45 Incredibly Useful Web Design Checklists and<br />
Questionnaires</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/05/29/useful-glossaries-for-web-designers-and-developers/"><br />
Useful Glossaries For Web Designers and Developers</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/09/24/10-useful-usability-findings-and-guidelines/"><br />
10 Useful Usability Findings and Guidelines</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/01/27/css-typographic-tools-and-techniques/"><br />
50 Useful Design Tools For Beautiful Web Typography</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/09/29/40-desert-island-web-development-tools/"><br />
40 Desert Island Web Development Tools</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/50-powerful-time-savers-for-web-designers.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Exceptional WordPress Hacks</title>
		<link>http://www.taiwangeek.com/2010-06/10-exceptional-wordpress-hacks.html</link>
		<comments>http://www.taiwangeek.com/2010-06/10-exceptional-wordpress-hacks.html#comments</comments>
		<pubDate>Mon, 14 Jun 2010 03:23:49 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[techniques]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/66-10-exceptional-wordpress-hacks.html</guid>
		<description><![CDATA[One of the reasons people love WordPress so much is its great flexibility. You can change the software&#8217;s appearance with themes. You can enhance its functionality with plug-ins. And, last... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/10-exceptional-wordpress-hacks.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the reasons people love <strong>WordPress</strong> so much is its great flexibility. You can change the software&#8217;s appearance with themes. You can enhance its functionality with plug-ins. And, last but not least, you can totally unleash WordPress&#8217; power with hacks. Some time ago, we wrote a post showing <a  href="http://www.smashingmagazine.com/2009/01/07/10-killer-wordpress-hacks/">10 Killer WordPress Hacks</a>.</p>
<p>Today, let&#8217;s do it again with <strong>10 new and totally killer WordPress hacks</strong> to make your blog stand out from the crowd. As usual, we won&#8217;t just list the hacks alone. In each entry, you&#8217;ll find an explanation of the code as well as the kinds of problems that the hack solves.</p>
<p>You may be interested in the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2009/03/04/15-useful-twitter-plugins-and-hacks-for-wordpress/">15 Useful Twitter Hacks and Plug-Ins For WordPress</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/">Mastering WordPress Shortcodes</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/01/26/10-steps-to-protect-the-admin-area-in-wordpress/">10 Steps To Protect The Admin Area In WordPress</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/12/18/8-useful-wordpress-sql-hacks/">8 Useful WordPress SQL Hacks</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/12/02/10-useful-rss-hacks-for-wordpress/">10 Useful RSS-Tricks and Hacks For WordPress</a></li>
</ul>
<p>[Offtopic: by the way, have you ever visited Smashing Magazine's <a  href="http://creatives.commindo-media.de/www/delivery/ck.php?oaparams=2__bannerid=1248__zoneid=0__cb=0fc35035eb__oadest=http%3A%2F%2Fwww.smashingmagazine.com%2Ftagcloud%2F">List of tags</a>? There might be something interesting for you.]</p>
<h3>1. Create TinyURLs On The Fly</h3>
<p><img src="/Images/smashingmagazine3-sm1.jpg" alt="Sm1 in 10 Exceptional WordPress Hacks" width="500" height="202" /></p>
<p><strong>The problem</strong>. Because Twitter has become a social media revolution, many bloggers and Twitter users enjoy sharing blog posts they have found and liked on Twitter. However, manually creating a TinyURL before tweeting can get a little tedious. As you probably know, Twitter can bring a lot of traffic to your blog, so it is in your interest to consistently provide short URLs to your readers.</p>
<p><strong>The solution</strong>. To use this recipe, follow the simple steps below:</p>
<ol>
<li>Open your <em>functions.php</em> file.</li>
<li>Paste the following code in the file:
<pre class="brush: php;">function getTinyUrl($url) {     $tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url);     return $tinyurl; }</pre>
</li>
<li>Open your <em>single.php</em> file and paste the following in the loop:
<pre class="brush: php;">&lt;?php $turl = getTinyUrl(get_permalink($post-&gt;ID)); echo 'Tiny Url for this post: &lt;a href="'.$turl.'"&gt;'.$turl.'&lt;/a&gt;' ?&gt;</pre>
</li>
<li>That&#8217;s all you need. Each of your posts now has its own TinyURL, ready for tweeting!</li>
</ol>
<p><strong>Code explanation</strong>. The popular URL shortening service TinyURL provides a quick API that creates TinyURLs on the fly. When you pass a URL to <em>http://tinyurl.com/api-create.php</em>, the API immediately prints the related TinyURL on the screen.</p>
<p>Using the PHP function file_get_contents(), we can get it and assign it to the $tinyurl variable. The last part of the code retrieves the post&#8217;s permalink and passes it as a parameter to the getTinyUrl() function previously created.</p>
<p>Source:</p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-automatically-provide-tinyurls-for-your-wordpress-blog-posts">How to: Automatically provide TinyURLs for your WordPress blog posts</a></li>
</ul>
<h3>2. List Upcoming Posts</h3>
<p><img src="/Images/smashingmagazine3-sm8.jpg" alt="Sm8 in 10 Exceptional WordPress Hacks" width="500" height="217" /></p>
<p><strong>The problem</strong>. If you often schedule posts to be published, how about displaying them in a list? This will make your readers look forward to what you&#8217;re going to publish in a few days and can help you reach new RSS subscribers. Implementing this functionality on your WordPress blog isn&#8217;t hard at all.</p>
<p><strong>The solution</strong>. Nothing hard here. Just copy this code and paste it anywhere in your theme files.</p>
<pre class="brush: php;">&lt;div id="zukunft"&gt; 	&lt;div id="zukunft_header"&gt;&lt;p&gt;Future events&lt;/p&gt;&lt;/div&gt; 	&lt;?php query_posts('showposts=10&amp;post_status=future'); ?&gt; 	&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt; 		&lt;div &gt; 			&lt;p class&gt;&lt;b&gt;&lt;?php the_title(); ?&gt;&lt;/b&gt;&lt;?php edit_post_link('e',' (',')'); ?&gt;&lt;br /&gt; 			&lt;span class="datetime"&gt;&lt;?php the_time('j. F Y'); ?&gt;&lt;/span&gt;&lt;/p&gt; 		&lt;/div&gt; 	&lt;?php endwhile; else: ?&gt;&lt;p&gt;No future events scheduled.&lt;/p&gt;&lt;?php endif; ?&gt; &lt;/div&gt;</pre>
<p>Once you&#8217;ve saved the file, your upcoming posts will be displayed on your blog.</p>
<p><strong>Code explanation</strong>. This code use the super-powerful <em>query_posts()</em> WordPress function, which allows you to take control of the WordPress loop.</p>
<p>The parameter used is post_status, which allows you to get posts according to their status (published, draft, pending or future). The showposts parameter is also used to define how many items you&#8217;d like to get. You can change the value of this parameter on line 4 to retrieve more or less than ten posts.</p>
<p>Source:</p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-list-future-posts">How to: List future posts</a></li>
</ul>
<h3>3. Create A &#8220;Send To Facebook&#8221; Button</h3>
<p><img src="/Images/smashingmagazine3-sm2.jpg" alt="Sm2 in 10 Exceptional WordPress Hacks" width="500" height="227" /></p>
<p><strong>The problem</strong>. In the first hack, we noted that Twitter can bring a lot traffic to your blog. Another website that can boost your traffic stats easily is Facebook. In this hack, let&#8217;s see how we can create a &#8220;Send to Facebook&#8221; button for your WordPress blog.</p>
<p><strong>The solution</strong>.</p>
<ol>
<li>Open the <em>single.php</em> file in your theme.</li>
<li>Paste the following code in the loop:
<pre class="brush: php;">&lt;a href="http://www.facebook.com/sharer.php?u=&lt;?php the_permalink();?&gt;&amp;t=&lt;?php the_title(); ?&gt;" target="blank"&gt;Share on Facebook&lt;/a&gt;</pre>
</li>
<li>Alternatively, you could use the getTinyUrl() function to send a short URL to Facebook:
<pre class="brush: php;">&lt;?php $turl = getTinyUrl(get_permalink($post-&gt;ID)); ?&gt; &lt;a href="http://www.facebook.com/sharer.php?u=&lt;?php echo $turl;?&gt;&amp;t=&lt;?php the_title(); ?&gt;" target="blank"&gt;Share on Facebook&lt;/a&gt;</pre>
</li>
<li>That&#8217;s all. Your readers will now be able to share your blog post on Facebook with their friends!</li>
</ol>
<p><strong>Code explanation</strong>. This useful hack is very easy to understand: the only thing we do here is retrieve the post&#8217;s permalink and title and send them as parameters to <em>http://www.facebook.com/sharer.php</em>.</p>
<p>In the alternative method, we used the getTinyUrl() function (created in the previous hack) to send a short URL instead of the post&#8217;s permalink.</p>
<p>Source:</p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-add-a-share-on-facebook-link-to-your-wordpress-blog">How to: Add a “Share on Facebook” link to your WordPress blog</a></li>
</ul>
<h3>4. Create A Maintenance Page For Your WordPress Blog</h3>
<p><img src="/Images/smashingmagazine3-sm3.jpg" alt="Sm3 in 10 Exceptional WordPress Hacks" width="500" height="222" /></p>
<p><strong>The problem</strong>. One thing I really like about Drupal is the option to temporarily redirect visitors to a maintenance page. Sadly, WordPress doesn&#8217;t have this feature. When you upgrade your blog, switch themes or make design changes, you may not want your visitors to see your blog as it is being tweaked, especially if it has design or code problems or, even worse, security gaps.</p>
<p><strong>The solution</strong>. To solve this problem, we use the power of the <em>.htaccess</em> file. Just follow the steps below to get started.</p>
<ol>
<li>Create your maintenance page. A simple WordPress page is generally sufficient.</li>
<li>Find your <em>.htaccess</em> file (located at the root of your WordPress installation) and <strong>create a back-up</strong>.</li>
<li>Open your <em>.htaccess</em> file for editing.</li>
<li>Paste the following code:
<pre class="brush: php;">RewriteEngine on RewriteCond %{REQUEST_URI} !/maintenance.html$ RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123 RewriteRule $ /maintenance.html [R=302,L]</pre>
</li>
<li>Replace 123\.123\.123\.123 on line 3 with your IP address (<a  href="http://www.ip-adress.com/">Don&#8217;t know it?</a>). Make sure to use the same syntax.</li>
<li>Now, all visitors except you will be redirected to your maintenance page.</li>
<li>Once you&#8217;re done tweaking, upgrading, theme switching or whatever, re-open your <em>.htaccess</em> file and remove (or comment out) the redirection code.</li>
</ol>
<p><strong>Code explanation</strong>. The <em>.htaccess</em> file, which controls the Apache Web server, is very useful for these kinds of tasks.</p>
<p>In this example, we state that any visitor who has an IP different from 123.123.123.123 (which doesn&#8217;t request <em>maintenance.html</em>) should be redirected to <em>maintenance.html</em>.</p>
<p>By replacing 123.123.123.123 with your own IP address, you make sure you&#8217;re still allowed to browse your blog normally, while others are redirected to <em>maintenance.html</em>.</p>
<p>Source:</p>
<ul>
<li><a  href="http://www.catswhocode.com/blog/10-awesome-htaccess-hacks-for-wordpress">10 awesome .htaccess hacks for WordPress</a></li>
</ul>
<h3>5. Display Related Posts Without A Plug-In</h3>
<p><img src="/Images/smashingmagazine3-sm4.jpg" alt="Sm4 in 10 Exceptional WordPress Hacks" width="500" height="203" /></p>
<p><strong>The problem</strong>. One well-known way of keeping visitors on your blog longer and helping them discover news posts is to display, usually at the end of the article, a list of related content.</p>
<p>Many plug-ins will do this job, but why not super-charge your theme by integrating this functionality by default?</p>
<p><strong>The solution</strong>.</p>
<ol>
<li>Open the <em>single.php</em> file in your theme.</li>
<li>Paste the following code in the loop:
<pre class="brush: php;">&lt;?php //for use in the loop, list 5 post titles related to first tag on current post $tags = wp_get_post_tags($post-&gt;ID); if ($tags) {   echo 'Related Posts';   $first_tag = $tags[0]-&gt;term_id;   $args=array(     'tag__in' =&gt; array($first_tag),     'post__not_in' =&gt; array($post-&gt;ID),     'showposts'=&gt;5,     'caller_get_posts'=&gt;1    );   $my_query = new WP_Query($args);   if( $my_query-&gt;have_posts() ) {     while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post(); ?&gt;       &lt;p&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/p&gt;       &lt;?php     endwhile;   } } ?&gt;</pre>
</li>
<li>Save the file, and then have a look at your blog: related posts are automatically displayed!</li>
</ol>
<p><strong>Code explanation</strong>. This hack uses tags to retrieve related posts. The first thing it does is get the post&#8217;s tags. If a post has tags, the first one is extracted and used in a query that retrieves posts with the same tag.</p>
<p>By default, this code displays up to five related posts. To change this number, simply edit line 9 of the code.</p>
<p>Source:</p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-show-related-posts-without-a-plugin">How to: Show related posts without a plug-in</a></li>
</ul>
<h3>6. Automatically Retrieve The First Image From Posts On Your Home Page</h3>
<p><img src="/Images/smashingmagazine3-sm5.jpg" alt="Sm5 in 10 Exceptional WordPress Hacks" width="500" height="230" /></p>
<p><strong>The problem</strong>. Many WordPress users use custom fields to display a thumbnail on their blog home page. Of course, this is a nice solution, but how about automatically retrieving the first image from a post and using it as a thumbnail?</p>
<p><strong>The solution</strong>. This hack is quite easy to implement:</p>
<ol>
<li>Open the <em>functions.php</em> file in your theme.</li>
<li>Paste this code in. Don&#8217;t forget to specify a default image on line 10 (in case a post of yours does not have an image).
<pre class="brush: php;">function catch_that_image() {   global $post, $posts;   $first_img = '';   ob_start();   ob_end_clean();   $output = preg_match_all('/&lt;img.+src=[\'"]([^\'"]+)[\'"].*&gt;/i', $post-&gt;post_content, $matches);   $first_img = $matches [1] [0];   if(empty($first_img)){ //Defines a default image     $first_img = "/images/default.jpg";   }   return $first_img; }</pre>
</li>
<li>Save the <em>functions.php</em> file.</li>
<li>On your blog home page (<em>index.php</em>), call the function this way to get the URL of the first image from the post:
<pre class="brush: php;">&lt;?php echo catch_that_image() ?&gt;</pre>
</li>
</ol>
<p><strong>Code explanation</strong>. The function uses the global variable $post to parse the post&#8217;s content with a regular expression. If an image is found, its URL is returned by the function. If not, the default image URL is returned.</p>
<p>Source:</p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-get-the-first-image-from-the-post-and-display-it">How to: Get the first image from the post and display it</a></li>
<li><a  href="http://wordpress.org/support/topic/246893">Retreive first image from post</a></li>
</ul>
<h3>7. Resize Images On The Fly</h3>
<p><img src="/Images/smashingmagazine3-sm6.jpg" alt="Sm6 in 10 Exceptional WordPress Hacks" width="500" height="161" /></p>
<p><strong>The problem</strong>. When you use thumbnails on your blog&#8217;s home page or even images in posts, having to manually resize them is boring and wastes a lot of time. So, why not use the power of PHP to do it?</p>
<p><strong>The solution</strong>. To achieve this hack, just follow these simple steps:</p>
<ol>
<li>Get <a  href="http://timthumb.googlecode.com/svn/trunk/timthumb.php">this script</a> and save it on your computer (I&#8217;ll assume you&#8217;ve named it <em>timthumb.php</em>).</li>
<li>Use an FTP program to connect to your server and create a new directory called <em>scripts</em>. Upload the <em>timthumb.php</em> file to it.</li>
<li>Once done, you can display images like so:
<pre class="brush: php;">&lt;img src="/scripts/timthumb.php?src=/images/whatever.jpg&amp;h=150&amp;w=150&amp;zc=1" alt="Screenshot" /&gt;</pre>
<p>In other words, you just call the <em>timthumb.php</em> file and pass your image as a parameter. The same goes for your desired width and height.</p>
</li>
</ol>
<p><strong>Code explanation</strong>. The <em>timthumb.php</em> script use the PHP GD library, which allows you to manipulate images dynamically with PHP. GD is installed by default on all servers running PHP5. If you&#8217;re not running PHP5, you&#8217;ll have to check if GD is installed before using this script.</p>
<p>The <em>timthumb.php</em> file gets the parameters you&#8217;ve passed to it (image URL, width and height) and uses it to create a new image with your stated dimensions. Once that&#8217;s done, the image is returned to you.</p>
<p>Source:</p>
<ul>
<li><a  href="http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/">TimThumb PHP script released</a></li>
<li><a  href="http://www.wprecipes.com/how-to-resize-images-on-the-fly">How to: Resize images on the fly</a></li>
</ul>
<h3>8. Get Your Most Popular Posts Without A Plug-In</h3>
<p><img src="/Images/smashingmagazine3-sm7.jpg" alt="Sm7 in 10 Exceptional WordPress Hacks" width="500" height="196" /></p>
<p><strong>The problem</strong>. Displaying your most popular posts is a good way to make visitors stay longer on your blog, as is displaying related posts. Many great plug-ins can list your most popular posts, but again, why use a plug-in when you can simply hack your WordPress theme to do it automatically?</p>
<p><strong>The solution</strong>. Just paste the following code anywhere in your theme files (for example, in <em>sidebar.php</em>). To change the number of displayed posts, simply change the &#8220;5&#8243; on line 3 to your desired number.</p>
<pre class="brush: php;">&lt;h2&gt;Popular Posts&lt;/h2&gt; &lt;ul&gt; &lt;?php $result = $wpdb-&gt;get_results("SELECT comment_count,ID,post_title FROM $wpdb-&gt;posts ORDER BY comment_count DESC LIMIT 0 , 5"); foreach ($result as $post) { setup_postdata($post); $postid = $post-&gt;ID; $title = $post-&gt;post_title; $commentcount = $post-&gt;comment_count; if ($commentcount != 0) { ?&gt; &lt;li&gt;&lt;a href="&lt;?php echo get_permalink($postid); ?&gt;" title="&lt;?php echo $title ?&gt;"&gt; &lt;?php echo $title ?&gt;&lt;/a&gt; {&lt;?php echo $commentcount ?&gt;}&lt;/li&gt; &lt;?php } } ?&gt; &lt;/ul&gt;</pre>
<p><strong>Code explanation</strong>. This code executes an SQL query to the WordPress database, using the $wpdb object, to get a list of the five posts with the most comments. The results are then wrapped in an unordered HTML list and displayed on screen.</p>
<p>Source:</p>
<ul>
<li><a  href="http://www.problogdesign.com/wordpress/create-your-own-popular-posts-page/">Create your own popular posts page</a></li>
</ul>
<h3>9. Highlight Searched Text In Search Results</h3>
<p><img src="/Images/smashingmagazine3-sm9.jpg" alt="Sm9 in 10 Exceptional WordPress Hacks" width="500" height="93" /></p>
<p><strong>The problem</strong>. The WordPress search engine system is often criticized for not being powerful enough. One of its weakest points in my opinion is that searched text is not easily distinguishable from the rest of the text. Let&#8217;s solve that!</p>
<p><strong>The solution</strong>.</p>
<ol>
<li>Open your <em>search.php</em> file and find the the_title() function.</li>
<li>Replace it with the following:
<pre class="brush: php;">echo $title;</pre>
</li>
<li>Now, just before the modified line, add this code:
<pre class="brush: php;">&lt;?php 	$title 	= get_the_title(); 	$keys= explode(" ",$s); 	$title 	= preg_replace('/('.implode('|', $keys) .')/iu', 		'&lt;strong class="search-excerpt"&gt;&lt;/strong&gt;', 		$title); ?&gt;</pre>
</li>
<li>Save the <em>search.php</em> file and open <em>style.css</em>. Add the following line to it:
<pre class="brush: php;">strong.search-excerpt { background: yellow; }</pre>
</li>
</ol>
<p>That&#8217;s all. Better, isn&#8217;t it?</p>
<p><strong>Code explanation</strong>. Once again, regular expressions are a lifesaver. The regexp parses the $s content ($s is the variable containing the searched text) and automatically adds a <em>&lt;strong class=&#8221;search-excerpt&#8221;&gt;</em> element around any occurrences of $s.</p>
<p>Then, you simply modify your <em>style.css</em> file to give searched text a special style and make it more visible to your readers.</p>
<p>Sources:</p>
<ul>
<li><a  href="http://yoast.com/wordpress-search/">Make WordPress&#8217; search function suck less.</a></li>
<li><a  href="http://www.wprecipes.com/how-to-enlight-searched-text-in-search-results">How to: Highlight searched text in search results</a></li>
</ul>
<h3>10. Disable Widgetized Areas Without Editing Theme Files</h3>
<p><img src="/Images/smashingmagazine3-sm10.jpg" alt="Sm10 in 10 Exceptional WordPress Hacks" width="500" height="255" /></p>
<p><strong>The problem</strong>. Widgets are very useful, but sometimes you don&#8217;t need them on a particular page or post. Sure, you can create a page template for a particular page or even remove the widgetized zone from the code, but a much better and more elegant solution exists.</p>
<p><strong>The solution</strong>. To do this, simply add the following code to your <em>functions.php</em> file:</p>
<pre class="brush: php;">&lt;?php add_filter( 'sidebars_widgets', 'disable_all_widgets' ); function disable_all_widgets( $sidebars_widgets ) { 	if ( is_home() ) 		$sidebars_widgets = array( false ); 	return $sidebars_widgets; } ?&gt;</pre>
<p><strong>Code explanation</strong>. This code first adds a filter to the sidebars_widgets WordPress function. Now every time WordPress tries to execute this function, it will execute the disable_all_widgets function we just created.</p>
<p>The disable_all_widgets function uses WordPress conditional tags (in this example, is_home(), but you can use any conditional tag) to disable all widgets if a visitor is on a particular page or post.</p>
<p>Source:</p>
<ul>
<li><a  href="http://justintadlock.com/archives/2009/03/06/disable-widget-areas-without-touching-theme-templates">Disable widget areas (sidebars) without touching theme templates</a></li>
</ul>
<h3>Related posts</h3>
<p>You may be interested in the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2009/03/04/15-useful-twitter-plugins-and-hacks-for-wordpress/">15 Useful Twitter Hacks and Plug-Ins For WordPress</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/">Mastering WordPress Shortcodes</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/01/26/10-steps-to-protect-the-admin-area-in-wordpress/">10 Steps To Protect The Admin Area In WordPress</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/12/18/8-useful-wordpress-sql-hacks/">8 Useful WordPress SQL Hacks</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/12/02/10-useful-rss-hacks-for-wordpress/">10 Useful RSS-Tricks and Hacks For WordPress</a></li>
</ul>
<p><em>(al)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/10-exceptional-wordpress-hacks.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugins &amp; Tutorials: Your Pick</title>
		<link>http://www.taiwangeek.com/2010-06/wordpress-plugins-tutorials-your-pick.html</link>
		<comments>http://www.taiwangeek.com/2010-06/wordpress-plugins-tutorials-your-pick.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 04:22:52 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[weblogs]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/60-wordpress-plugins-tutorials-your-pick.html</guid>
		<description><![CDATA[Depending on your needs and professional skills, the choice of an optimal weblog engine can be quite time-consuming. There are many options, and selecting the best engine, you should know... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/wordpress-plugins-tutorials-your-pick.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Depending on your needs and professional skills, the choice of an optimal weblog engine can be quite time-consuming. There are many options, and selecting the best engine, you should know exactly what you&#8217;d like to have and which level of flexibility you&#8217;d like to achieve.</p>
<p>Among dozens of options, <a  href="http://www.wordpress.com">WordPress</a> remains the most popular weblog engine out there. It is simple, powerful, extensible and flexible. There are literally thousands of plugins, themes, tutorials and related articles describing the ways to optimize WordPress for publisher&#8217;s needs and achieve the best possible performance of the blog.</p>
<p><em>You know them, because you use them</em> and because you&#8217;ve searched for them once you needed them. In this post we&#8217;d like to <strong>give you an opportunity to share your knowledge</strong> and help us to create <strong>the essential list of WordPress life-savers</strong> &#8211; plug-ins, ideas, tips and useful tutorials you need to have ready to hand developing web-sites upon WordPress.</p>
<p><img src="/Images/smashingmagazine3-wordpress-logo.gif" alt="Wordpress-logo in WordPress Plugins &amp; Tutorials: Your Pick" height="264" width="500" /></p>
<p><strong>Begin</strong>: Date: 29.06.2007. Time: 08:00:00 EDT (Eastern Daylight Time) / 14:00 CEST (Central European Summer Time).</p>
<p><strong>End</strong>: Date: 30.06.2007. Time: 08:00:00 EDT (Eastern Daylight Time) / 14:00 CEST (Central European Summer Time).</p>
<p>Folks, it&#8217;s your turn now. <strong>You have 24 hours.</strong></p>
<p>[By the way, did you know we have a brand new free <a  href="http://www.smashingmagazine.com/the-smashing-newsletter/">Smashing Email Newsletter</a>? Subscribe now and get fresh short tips and tricks on Tuesdays!]</p>
<h3>How can I contribute?</h3>
<p><strong>Submit your best suggestions in comments.</strong> Please share one or more life-savers you use permanently using our comment form. Select the best ones, the ones you really couldn&#8217;t live without. Please provide the URL, the problem it solves and a brief description of the tool.</p>
<p><strong>We&#8217;ll update this post permanently over the next 24 hours.</strong> During the next 24 hours we&#8217;ll scan through each and every one of the comments, select the best suggestions, add them to the list and provide a brief description of the tools (with or without screenshot). Of course, we&#8217;ll also directly link to the person who has submitted the suggestion.</p>
<p><strong>We need your support.</strong> To make sure this post will provide web-developers with the best possible hints, we need your support. Please vote for us using the buttons at the top of this post, making sure this article reaches as many web-developers as possible and therefore offers the highest quality. Spread the word in your weblog.</p>
<p><strong>Contribute: helping other developers, you help yourself.</strong> Please share your knowledge. Help us to help developers seeking for solutions you&#8217;ve already found once you needed them. And get solutions from other developers, ready to contribute to this post as well as you do.</p>
<p><em>You can submit your own work.</em> You can also recommend plugins you&#8217;ve written and ideas you had, as long as they are useful. However, please don&#8217;t provide us with lists of WordPress plugins and tutorials &#8211; we know them already.</p>
<p><em>Spam will be blacklisted.</em> Every comment spam will be blacklisted manually, so the link will never appear on Smashing Magazine again.</p>
<p>Share your knowledge, folks. We&#8217;ll do the rest.</p>
<h3>WordPress Functional Plugins</h3>
<ul>
<li><strong>Include AdSense and YPN ads automatically</strong>. <a  href="http://www.acmetech.com/blog/2005/07/26/adsense-deluxe-wordpress-plugin/">AdSense-Deluxe</a> offers advanced options for managing the automatic insertion of Google AdSense or Yahoo Publisher Network (YPN) ads to your WordPress posts. (<a  href="http://theblogjoint.com/2006/08/29/top-wordpress-plugins/">TheBlogJoint.com</a>)</li>
<li><strong>Use a lightbox</strong>. <a  href="http://zeo.unic.net.my/notes/lightbox2-for-wordpress/">Lightbox 2.0</a> overlay images on the current page for WordPress. You can turn it on and all images are now working with it. This version of lightbox – Lightbox version 2.0 uses Prototype JavaScript Framework and Scriptaculous Effects Library. (<a  href="http://www.nadasolutions.com/">Yehia Nada</a>)</li>
<li><strong>Use an instant comments editor</strong>. <a  href="http://www.raproject.com/wordpress/wp-ajax-edit-comments/">WP Ajax Edit Comments</a> allows users and admins alike to edit comments on a post. Users can edit their own comments for a period specified by the admin, and admins can edit all post comments. What better way to show reader appreciation than letting the readers edit their own typos? (<a  href="http://www.devlounge.net/">AJ</a>)</li>
<li><strong>Use a code cleaner</strong>. <a  href="http://urbangiraffe.com/plugins/html-purified/">HTML Purified</a> will not only remove all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist, it will also make sure your documents are standards compliant, something only achievable with a comprehensive knowledge of W3C&#8217;s specifications. (<a  href="http://htmlpurifier.org/">Edward Z. Jang</a>)</li>
<li><strong>Use an audio-player</strong>. <a  href="http://www.1pixelout.net/code/audio-player-wordpress-plugin/">Audioplayer</a> makes it very easy to play mp3 files within your posts. (<a  href="http://www.nadasolutions.com/">Yehia Nada</a>)</li>
<li><strong>Use an enhanced admin interface</strong>. <a  href="http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/">Admin Drop-Down Menu</a> transforms admin menu in a quick drop-down menu; you can reach any admin page in one click, instead of first clicking on the first level link (”Manage” for example) and then only on a submenu link (”Comments“). (<a  href="http://planetozh.com/">ozh</a>)</li>
<li><strong>Use an enhanced comment form</strong>. <a  href="http://www.phrixus.co.uk/pxsmail/">PXS Mail Form</a> creates a mail form with multipart verification, various messages and an auto redirect on successful send. It is much more easy to contact with website author. Alternative: <a  href="http://green-beast.com/blog/?page_id=136">Contact Form v2.0</a>. (<a  href="http://theblogjoint.com/2006/08/29/top-wordpress-plugins/">TheBlogJoint.com</a>)</li>
<li><strong>Use a post star rating</strong>. Post Star Rating enables users to rate posts of your weblog.</li>
<li><strong>Use a search-and-replace tool</strong>. <a  href="http://urbangiraffe.com/plugins/search-regex/">Search Regex</a> adds a powerful set of search and replace functions to WordPress. These go beyond the standard searching capabilities, and allow you to search and replace almost any data stored on your site. In addition to simple searches you have the full power of PHP&#8217;s regular expressions at your disposal. (Sassan)</li>
<li><strong>Use a spam-filter to prevent spam in your comments</strong>. <a  href="http://www.sebbi.de/archives/2006/01/31/spam-karma-2-akismet-plugin/">Spam Karma 2 Akismet Plugin</a> is a standard solution for preventing spam comments. (<a  href="http://corymiller.com/blogging-tips/the-first-5-essential-tweaks-i-do-in-a-wordpress-blog-installation/">Cory Miller</a>)</li>
<li><strong>Use a stylesheet switcher</strong>. <a  href="http://dancameron.org/wordpress/wordpress-plugins/css-ajax-switch">CSS Ajax Switcher</a> combines the power of Server Side processing and DOM scripting to swap style sheets on the fly with the power of Ajax. If JavaScript? is disabled &#8211; UDASSS degrades gracefully to improve your website accessibility. Needless to say, it is very sexy indeed. (<a  href="http://dancameron.org/">Dan Cameron</a>)</li>
<li><strong>Use a tagging system</strong>. Simple Tagging is a smart, quick and powerful tagging plugin with high performance and low server requirements.</li>
<li><strong>Use and control RSS subscription in a smart way.</strong>. <a  href="http://blogs.feedburner.com/feedburner/archives/2007/05/feedburner_adopts_twoyearold_r.php">Feedburner Plugin</a>. Forwards all feed traffic to Feedburner while letting through some important User-Agents. (<a  href="http://xgrape.net/">Andreas</a>)</li>
<li><strong>Use caching to reduce the server usage</strong>. <a  href="http://mnm.uib.es/gallir/wp-cache-2/">WP-Cache 2.0</a> an extremely efficient WordPress page caching system to make your site much faster and responsive. It works by caching Worpress pages and storing them in a static file for serving future requests directly from the file rather than loading and compiling the whole PHP code and then building the page from the database. (<a  href="http://geocator.us/">Brian</a>)</li>
<li><strong>Use CAPTCHA to prevent spam</strong>. <a  href="http://www.theblog.ca/?p=21">Anti-Spam Image Plugin</a> works perfectly with users who have cookies disabled, users can pick random words to display. Alternative: <a  href="http://recaptcha.net/">reCAPTCHA</a>. (<a  href="http://www.webmaster-source.com/">redwall-hp</a>, <a  href="http://blogtoolbox.fr/">Max</a>)</li>
<li><strong>Use maths to prevent spam</strong>. <a  href="http://sw-guide.de/wordpress/plugins/math-comment-spam-protection/">Anti-Spam Image Plugin</a> asks the visitor making the comment to answer a simple math question. This is intended to prove that the visitor is a human being and not a spam robot. (<a  href="http://www.tobbis-blog.de/">Tobbi</a>)</li>
<li><strong>Use validation to prevent trackback spam</strong>. <a  href="http://sw-guide.de/wordpress/plugins/simple-trackback-validation/">Simple Trackback Validation</a> performs simple but very effective tests on all incoming trackbacks in order to stop trackback spam. (<a  href="http://www.tobbis-blog.de/">Tobbi</a>)</li>
<li><strong>Use comments subscription for your posts</strong>. <a  href="http://www.theblog.ca/?p=21">Subscribe to Comments</a> is a robust plugin that enables commenters to sign up for e-mail notification of subsequent entries. The plugin includes a full-featured subscription manager that your commenters can use to unsubscribe to certain posts, block all notifications, or even change their notification e-mail address! (<a  href="http://www.webmaster-source.com/">redwall-hp</a>)</li>
<li><strong>Use feeds to write posts in a smart way</strong>. <a  href="http://devthought.com/wp-o-matic-the-wordpress-rss-agreggator/">WP-o-Matic</a> allow you to create posts automatically from feeds. With its simple interface, you just type in the feed url, select in which categories you want to create the posts, and you’re ready to go. (<a  href="http://charliepark.org/">Charlie Park</a>)</li>
<li><strong>Use head meta tags for search engines</strong>. <a  href="http://guff.szub.net/2005/09/01/head-meta-description/">Head-Meta Description</a> provides an automatic meta description tag for your blog, inserting a dynamic description depending on the query-type (i.e. page you’re on). Some search engines are supposed to love this tag, so I guess we should, too.</li>
<li><strong>Use the search functionality</strong>. <a  href="http://www.theblog.ca/?p=21">Search Everything</a> adds search functionality with little setup. Including options to search pages, attachments, drafts, comments and custom fields (metadata). (<a  href="http://dancameron.org/">Dan Cameron</a>)</li>
<li><strong>Provide an enhanced RSS-feed.</strong>. <a  href="http://blogs.feedburner.com/feedburner/archives/2007/05/feedburner_adopts_twoyearold_r.php">Feedburner Plugin</a>. Forwards all feed traffic to Feedburner while letting through some important User-Agents. (<a  href="http://xgrape.net/">Andreas</a>)</li>
<li><strong>Create and manage Custom Fields on the fly</strong>. <a  href="http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/">Better Feed</a> allows you to enhance your feeds with several highly customisable features. (<a  href="http://planetozh.com/">ozh</a>)</li>
<li><strong>Create archives in a smart and sexy way</strong>. <a  href="http://www.sonsofskadi.net/extended-live-archive/">Extended Live Archives</a> implements a dynamic, AJAXified way of digging into the archives of a blog. (<a  href="http://theblogjoint.com/2006/08/29/top-wordpress-plugins/">TheBlogJoint.com</a>)</li>
<li><strong>Create data backups on the fly</strong>. <a  href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup</a> setups your backups to occur at almost any imaginable frequency. (<a  href="http://www.nadasolutions.com/">Yehia Nada</a>)</li>
<li><strong>Create various profiles for your users</strong>. Role Manager allows you to define and manage multiple subscriber profiles &#8211; called Roles and their Capabilities. Also you can create new Roles and Capabilities. (<a  href="http://www.uluka.com/">Saioa</a>)</li>
<li><strong>Define and execute your own functions in your posts</strong>. Code Markup makes it easy to include program code samples in your posts. You can even include HTML markup in the code sample; Code Markup magically knows which characters should be displayed as code and which should be rendered as HTML. (<a  href="http://www.blogofdan.com/">Dan</a>)</li>
<li><strong>Execute php-commands in your posts</strong>. <a  href="http://bluesome.net/post/2005/08/18/50/">Exec-PHP</a>. The Exec-PHP plugin allows <code>&lt;?php ?&gt;</code> tags inside the content or excerpt of your posts and pages to be executed just as in usual PHP files.</li>
<li><strong>Generate Google Sitemaps automatically</strong>. <a  href="http://www.arnebrachhold.de/2005/06/05/google-sitemaps-generator-v2-final">Google Sitemaps Generator</a> generates a XML-Sitemap compliant sitemap of your WordPress blog. This format is supported by Google, YAHOO and MSN Search. XML-Sitemaps can help you to get indexed by the major search engines. (<a  href="http://corymiller.com/blogging-tips/the-first-5-essential-tweaks-i-do-in-a-wordpress-blog-installation/">Cory Miller</a>)</li>
</ul>
<h3>Displaying Data with WordPress</h3>
<ul>
<li><strong>You can display popular posts</strong>. <a  href="http://alexking.org/projects/wordpress/readme?project=popularity-contest">Popularity contest</a> lets you automatically highlight your best posts to your readers. It keeps a count of your post, category and archive views, comments, trackbacks, etc. and uses them to determine which of your posts are most popular. (<a  href="http://www.staska.net/2007/03/27/top-30-wordpress-plugins-in-blogosphere/">Staska</a>)</li>
<li><strong>You can stick a post</strong>. <a  href="http://wp-plugins.net/plugin/Adhesive/#plugin_63">Adhesive</a> allows you to easily mark certain posts as &#8220;Sticky&#8221;. Sticky posts appear at the top of the page when WordPress displays several posts. (<a  href="http://www.staska.net/2007/03/27/top-30-wordpress-plugins-in-blogosphere/">Staska</a>)</li>
<li><strong>You can help landing users find what they need</strong>. <a  href="http://theundersigned.net/2006/06/landing-sites-11/">Landing sites 1.3</a> highlights search queries users were using in search engines to find your site. When visitors is referred to your site from a search engine, they are definitely looking for something specific &#8211; often they just roughly check the page they land on and then closes the window if what they are looking for isn’t there. Why not help them by showing them related posts to their search on your blog? (<a  href="http://theblogjoint.com/2006/09/21/best-seo-plugins-for-wordpress/">TheBlogJoint.com</a>)</li>
<li><strong>You can use enhanced pagination</strong>. <a  href="http://www.lesterchan.net/wordpress/category/plugins/wp-pagenavi/">WP-PageNavi</a>. This plugin adds a more advanced paging navigation your WordPress blog. Example: Pages (17): [1] 2 3 4 » &#8230; Last ». (<a  href="http://siolon.com/">Chris</a>)</li>
<li><strong>You can show similar and related posts</strong>. <a  href="http://rmarsh.com/plugins/similar-posts/">Similar Posts</a>. This plugin displays a list of posts which are related or similar to the current post. Alternative: <a  href="http://wasabi.pbwiki.com/Related+Entries">Related entries</a>. (<a  href="http://siolon.com/">Chris</a>)</li>
<li><strong>You can create archives in a smart way</strong>. <a  href="http://justinblanton.com/projects/smartarchives/">Smart Archives for WordPress</a> will allow you to display your archives in a much “cleaner” format. You can see it in action on my archives page. You’ll notice that everything on the page is hyperlinked (years, months, posts) and that all of the respective links are future-proofed. (<a  href="http://www.webmaster-source.com/">redwall-hp</a>)</li>
<li><strong>You can create footnotes in your blog posts automatically.</strong> <a  href="http://www.elvery.net/drzax/more-things/wordpress-footnotes-plugin/">WP Footnotes</a> lets you create footnotes in your blog &#8220;on the fly&#8221;. Also paginated posts are supported. (<a  href="http://siolon.com/">Chris</a>)</li>
<li><strong>You can create sidenotes automatically.</strong> <a  href="http://www.fahlstad.se/wp-plugins/fquick">fQuick</a> enables the user to add small custom quicklinks to the sidebar. With RSS feed for easy syndication. <a  href="http://www.fahlstad.se/2006/11/15/sidenotes-with-commenting-a-tutorial/">Tutorial</a>. lets you create footnotes in your blog &#8220;on the fly&#8221;. Also paginated posts are supported. (<a  href="http://theblogjoint.com/2006/08/29/top-wordpress-plugins/">TheBlogJoint.com</a>)</li>
<li><strong>You can have more control over title presentation</strong>. <a  href="http://elasticdog.com/2004/09/optimal-title/">Optimal Title</a> mirrors the function of wp_title() exactly, but moves the position of the ’separator’ to after the title rather than before. This allows you to have your blog name tacked on to the end of the page title instead of having it appear first.</li>
<li><strong>You can enhance WordPress as a CMS</strong>. <a  href="http://www.blazenewmedia.com/articles/five-wordpress-cms-enabling-plugins">CMS Enabling Plugins</a>: WordPress contains almost all the features you need to get it going as a CMS out of the box. However, you’ll find that there are a few things missing that make up the final pieces of the puzzle. Here’s an overview of the five most useful plugins I’ve found, and the part they play in making WordPress a butt-kicking CMS. (Jim)</li>
<li><strong>You can use sIFR for your headlines</strong>. <a  href="http://www.chait.net/index.php?p=310">CG-FlashyTitles</a> a drop-in Plugin for sIFR 2.0 Flash-based title replacements. (<a  href="http://theblogjoint.com/2006/08/29/top-wordpress-plugins/">TheBlogJoint.com</a>)</li>
<li><strong>You can show your favourite books automatically.</strong> <a  href="http://robm.me.uk/projects/plugins/wordpress/now-reading">Now Reading</a> allows you to maintain a virtual library of books. Display which you’ve read, which you’re currently reading, and which you plan to read; add metadata to describe them; write reviews detailing what you thought of them. (<a  href="http://siolon.com/">Chris</a>)</li>
<li><strong>You can show your current events automatically.</strong> <a  href="http://wpcal.firetree.net/">Event Calendar</a> lets you manage future events as an online calendar. Display upcoming events in a dynamic calendar, on a listings page, or as a list in the sidebar. (<a  href="http://siolon.com/">Chris</a>)</li>
<li><strong>You can use gravatars in your comments.</strong> <a  href="http://skippy.net/gravatars/">Gravatars</a> adds an author&#8217;s icon functionality in comments. (<a  href="http://theblogjoint.com/2006/08/29/top-wordpress-plugins/">TheBlogJoint.com</a>)</li>
<li><strong>You can use podcasts in your posts.</strong> <a  href="http://www.mightyseek.com/podpress/">Podpress</a>: all-singing, all-dancing podcasting tool for WordPress. (jay mcdonald)</li>
</ul>
<h3>WordPress Tutorials</h3>
<ul>
<li><strong>Separate users’ comments and admin’s comments</strong>.<br /> <a  href="http://www.tamba2.org.uk/wordpress/commentstyling/">Comment Styling in WordPress</a> and <a  href="http://5thirtyone.com/archives/774">How-to style WordPress author comments</a>. In the default of most themes, all comments look the same. There have been ways of changing the appearance before using plugins and hacks &#8211; and this is more of the same. Hopefully though it’ll give you some extra flexibility.</li>
<li><strong>Paginate your articles</strong>.<br /> <a  href="http://codex.wordpress.org/Styling_Page-Links">Styling Page-Links</a>. Did you know you could split a single post up into different web pages? Using the Next-Page Quicktag from the Write Post Panel, you can break a single post up into different web pages.</li>
<li><strong>Use time stamps.</strong><br /> <a  href="http://themeplayground.com/62/how-to-take-full-advantage-of-your-post-timestamp-in-wordpress">How to Take Full Advantage of Your Post Timestamp</a>. In WordPress you can set the date for something into the future—think of it as a dorky sort of time travel—so that you can write (if you wanted to) weeks worth of posts in an afternoon. WordPress will “update” your blog by posting your content at the time you specify each day. Here’s how to do it. (<a  href="http://themeplayground.com">Ryan Imel</a>)</li>
<li><strong>Use comment highlighting.</strong><br /> <a  href="http://www.nyssajbrown.net/2007/06/19/wordpress-tips-tricks-author-comment-highlighting/">Author Comment Highlighting</a> and <a  href="http://www.nyssajbrown.net/2007/06/28/wordpress-tips-tricks-author-highlighting-through-theme-options/">Author Highlighting Through Theme Options</a> provide information about styling author&#8217;s comments.</li>
</ul>
<h3>Resources, articles</h3>
<ul>
<li><a  href="http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/">How to create WordPress theme from scratch</a>: a series of 16 articles, which shows how to create WordPress themes from the very beginning to the very end. (<a  href="http://www.wpdesigner.com/">Small Potato</a>)</li>
<li><a  href="http://blogosquare.com/2007/06/29/things-you-should-know-when-displaying-pages-in-wordpress/" rel="nofollow">Things you should know when displaying pages in WordPress</a>: quick guide on things WordPress users should be knowing with listing Pages.</li>
<li><a  href="http://blogosquare.com/2007/06/20/things-you-should-know-when-using-post-excerpt/" rel="nofollow">Things you should know when using post excerpt</a>: detailed tutorial on how-to use excerpt and where to use them.</li>
<li><a  href="http://blogosquare.com/2007/06/07/how-to-turn-visitors-into-returning-visitors/" rel="nofollow">How-to turn visitors into returning visitors</a>: various requisite WordPress plugins to make visitors feel at ease.</li>
<li><a  href="http://blogosquare.com/2007/04/21/the-proper-way-to-write-code-in-your-blog-posts/" rel="nofollow">The proper way to write code in your blog posts</a>: how to write code in posts so that the blog doesn’t break when displaying them.</li>
<li><a  href="http://blogosquare.com/2007/03/30/quick-shooting-stats-of-your-wordpress-blog/" rel="nofollow">Quick shooting stats of your WordPress blog</a>: displaying the number of posts, comments and categories one has on his WordPress blog.</li>
</ul>
<h3>WordPress Ideas</h3>
<ul>
<li>&#8220;Change the Permalinks Structure – I use this format … /%category%/%postname%/ … I use the category slug so I can optimize my post titles with keywords that I won’t or don’t include in post titles. My friend Brian Gardner puts a .htm also at the end, which I’m experimenting with as well. My theory is that in search results some people might see the .htm and think there’s actual content in that link. Jury’s still out on that one.&#8221; (<a  href="http://corymiller.com/blogging-tips/the-first-5-essential-tweaks-i-do-in-a-wordpress-blog-installation/">Cory Miller</a>)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/wordpress-plugins-tutorials-your-pick.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Time-Savers: Code Beautifier And Formatter</title>
		<link>http://www.taiwangeek.com/2010-06/time-savers-code-beautifier-and-formatter.html</link>
		<comments>http://www.taiwangeek.com/2010-06/time-savers-code-beautifier-and-formatter.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 04:22:27 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[highlighter]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/17-time-savers-code-beautifier-and-formatter.html</guid>
		<description><![CDATA[Well-documented and readable source code is essential for every collaborative project. Logically structured, well organized and nicely formatted, the code can speed up the bug hunting and help to keep... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/time-savers-code-beautifier-and-formatter.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well-documented and readable source code is essential for every collaborative project. Logically structured, well organized and nicely formatted, the code can <strong>speed up the bug hunting</strong> and help to keep the code clean, minimal and still functional. These aspects are particularly important if the code is being developed by a group of developers: in this context a common scheme for source code presentation is necessary. <strong>You don&#8217;t have to do everything by hand;</strong> in fact, there are many tools which can save a lot of time &#8211; for you and your co-workers.</p>
<p>The tools and services we&#8217;ve collected below aren&#8217;t validators. They format and beautify the code; some of them can remove redundant elements. Using them, you have to make sure you have a backup, so your data can always be restored.</p>
<p>Let&#8217;s take a look at <strong>code beautifier and formatter which can save you a lot of time </strong>and help to maintain a clean and readable source code.</p>
<p>[Offtopic: by the way, did you know that there is a Smashing eBook Series? Book #1 is <a  href="http://shop.smashingmagazine.com/smashing-ebook-series-1-professional-web-design-intl.html">Professional Web Design</a>, 242 pages for just $9,90.]</p>
<h3>Code Beautifier And Formatter</h3>
<p>1. <a  href="http://quickhighlighter.com/">Quick Highlighter</a><br /> Quick Highlighter can format source codes written in over 85 languages &#8211; among them C++, PHP, Ruby, HTML, JavaScript, Perl, Python, Smarty, XML and more. The tool formats source code and highlights inbuilt keywords, data types etc.</p>
<p><a  href="http://quickhighlighter.com/"><img src="/Images/smashingmagazine3-quickhigh.gif" alt="Quickhigh in Time-Savers: Code Beautifier And Formatter" width="450" height="277" /></a></p>
<p>2. <a  href="http://www.prettyprinter.de/">PrettyPrinter</a><br /> Knows PHP, Java, C++, C, Perl, JavaScript, CSS. The service offers many formatting options you can use to present the code just the way you&#8217;d like it to look like.</p>
<p><a  href="http://www.prettyprinter.de/"><img src="/Images/smashingmagazine3-printer.gif" alt="Printer in Time-Savers: Code Beautifier And Formatter" width="379" height="449" /></a></p>
<p>3. <a  href="http://www.tote-taste.de/X-Project/beautify/">PHP Code Beautifier</a><br /> This tool is designed to beautify PHP code, applying most of the PEAR standard requirements to it. It can even process really scrambled scripts, e.g. all code in one line, and thus may help you to get scripts into a more readable form. It sets missing line breaks without removing any additional line breaks that you may use to group related things and corrects wrong indentation according to the level of nested braces.</p>
<p>4. <a  href="http://www.arachnoid.com/ruby/rubyBeautifier.html">Ruby Script Beautifier</a><br /> Ruby Beautifier accepts a command-line list of file names, creates a backup copy of each named file and beautifies the originals. If there is an indentation error (an imbalance of opening and closing keywords), the script will print an error message but will save the result anyway.</p>
<p>5. <a  href="http://tools.arantius.com/tabifier">Tabifier</a><br /> The tabifier is a tool to properly indent computer code. The style it produces is a mix of my personal preferences for indentation plus what I could manage to make a program produce from dirty source. The tabifier currently supports CSS, HTML, and C Style code; the latter being anything that uses curly braces to start and end blocks, and semicolons to terminate statements.</p>
<p><a  href="http://tools.arantius.com/tabifier"><img src="/Images/smashingmagazine3-tabifier.gif" alt="Tabifier in Time-Savers: Code Beautifier And Formatter" width="450" height="311" /></a></p>
<p>6. <a  href="http://www.lonniebest.com/FormatCSS/">CSS Beautifier</a><br /> This tool offers a variety of options, among them &#8211; Alphabetizing Feature and De-Capitalization Feature.</p>
<p><a  href="http://www.lonniebest.com/FormatCSS/"><img src="/Images/smashingmagazine3-lonnie.gif" alt="Lonnie in Time-Savers: Code Beautifier And Formatter" width="345" height="384" /></a></p>
<p>7. <a  href="http://cdburnerxp.se/cssparse/css_optimiser.php?lang=de">CSS Formatierer und Optimierer</a><br /> Has different compression layouts; you can sort selectors, properties, regroup selectors, optimize shorthands, compress colors, compress font-weight, discard invalid properties and add timestamps. You can also create a custom template the system will use to format the code. The result can be outputted as a file. A copy / mirror of the tool can be found on <a  href="http://www.cleancss.com/?lang=de">cleancss.com</a>.</p>
<p><a  href="http://cdburnerxp.se/cssparse/css_optimiser.php?lang=de"><img src="/Images/smashingmagazine3-css2.gif" alt="Css2 in Time-Savers: Code Beautifier And Formatter" width="450" height="400" /></a></p>
<p>8. <a  href="http://softwaremaniacs.org/soft/highlight/en/">Highlight.js</a><br /> Highlight.js highlights syntax in code examples on blogs, forums and in fact on any web pages. It&#8217;s very easy to use because it works automatically: finds blocks of code, detects a language, highlights it. Also available as WordPress-Plugin and Firefox-extension. Suported languages: Python, Ruby, Perl, PHP, HTML, CSS, Django, JavaScript, VBScript, Delphi, Java, C++, SQL. Similar tools is offered by Google: <a  href="http://google-code-prettify.googlecode.com/svn/trunk/README.html">Googles Javascript Code Prettifier</a>.</p>
<p><a  href="http://softwaremaniacs.org/soft/highlight/en/"><img src="/Images/smashingmagazine3-highlight.png" alt="Highlight in Time-Savers: Code Beautifier And Formatter" width="270" height="290" /></a><br /> <a  href="http://google-code-prettify.googlecode.com/svn/trunk/README.html"><img src="/Images/smashingmagazine3-google.gif" alt="Google in Time-Savers: Code Beautifier And Formatter" width="363" height="131" /></a></p>
<p>9. <a  href="http://pluszone.net/blog/projects/beautifierPlus/index.php">Code Beautifier Plus</a><br /> Beautifies Java, C# and ActionScript.</p>
<p><a  href="http://pluszone.net/blog/projects/beautifierPlus/index.php"><img src="/Images/smashingmagazine3-flash.gif" border="1" alt="Flash in Time-Savers: Code Beautifier And Formatter" width="399" height="420" /></a></p>
<p>10. <a  href="http://formatter.gerbenvv.nl/version3/index.php?lang=en">PHP Formatter</a><br /> PHP formatter adds comments after control structures, colors the output, links to the php-manual by inline-functions, removes comments and removes empty lines. There are 5 pre-defined layouts, but you can also define your own styles.</p>
<p><a  href="http://formatter.gerbenvv.nl/version3/index.php?lang=en"><img src="/Images/smashingmagazine3-php.gif" border="1" alt="Php in Time-Savers: Code Beautifier And Formatter" width="324" height="155" /></a></p>
<p>11. <a  href="http://beautifyphp.sourceforge.net/docs/">PHP_Beautifier</a><br /> A tool to beautify PHP 4 and PHP 5 source code &#8211; to run on your own server. Requires PHP 5.</p>
<p>12. <a  href="http://elfz.laacz.lv/beautify/?">Online Beautifier for JavaScript</a><br /> The tool completely reformats the JavaScript source code, so that it becomes a little bit more readable.</p>
<p>13. <a  href="http://couponmeister.com/beautify.aspx">Lorins simple code beautifier for C++, C#, Java, and Javascript</a><br /> You can use the source code of this beautifier to creat your own code formatters.</p>
<p>14. <a  href="http://tidy.sourceforge.net/">Tidy</a><br /> A classic. Tidy consists of many program libraries and comes and has many variations. E.g. you can use</p>
<ul>
<li><a  href="http://perso.wanadoo.fr/ablavier/TidyGUI/">TidyGUI</a> to format the code right on your desktop,</li>
<li><a  href="http://sourceforge.net/projects/tidy">HTML Tidy</a></li>
<li><a  href="http://www.w3.org/People/Raggett/tidy/">Clean up your Web pages with HTML TIDY</a></li>
<li><a  href="http://www.highdots.com/html-code-export/">HTML Code Export</a> (software based upon Tidy)</li>
<li><a  href="http://csstidy.sourceforge.net/">CSSTidy</a></li>
<li><a  href="http://perltidy.sourceforge.net/">Perltidy</a></li>
<li><a  href="http://users.skynet.be/mgueury/mozilla/index.html">HTML Validator Firefox Extension</a></li>
</ul>
<p><a  href="http://tidy.sourceforge.net/"><img src="/Images/smashingmagazine3-tidygui.gif" border="1" alt="Tidygui in Time-Savers: Code Beautifier And Formatter" width="451" height="345" /></a></p>
<h3>Commercial Solutions</h3>
<p>15. <a  href="http://www.textrush.com/">SourceFormatX Source Code Formatter &amp; Beautifier</a><br /> For developers. The tool supports neither HTML nor CSS; instead Javascript, VB, PHP, ASP, JSP, HTC, C, JAVA and more. Price: $36,99, Windows.</p>
<p><a  href="http://www.textrush.com/"><img src="/Images/smashingmagazine3-formatx.gif" alt="Formatx in Time-Savers: Code Beautifier And Formatter" width="451" height="373" /></a></p>
<p>16. <a  href="http://www.polystyle.com/">Polystyle</a><br /> Polystyle automatically reformats source code in your personal style. Polystyle learns your formatting style by examining examples of your code. It is another Windows-tool which supports Actionscript, ASP, C/C++, C#, CMAC, CSS, HTML, Java, Javascript, JSP, PHP, Pascal/Delphi, Perl, Python and Visual Basic. Price: 79$, can be used from the shell and Windows Explorer.</p>
<h3>Further Solutions</h3>
<p>17. <a  href="http://www.waterproof.fr/products/phpCodeBeautifier/">phpCodeBeautifier</a> (Win/Linux Shell), <a  href="http://www.digital-mines.com/htb/">HTB 2.0</a> (Shell).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/time-savers-code-beautifier-and-formatter.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Useful WordPress Hook Hacks</title>
		<link>http://www.taiwangeek.com/2010-06/10-useful-wordpress-hook-hacks.html</link>
		<comments>http://www.taiwangeek.com/2010-06/10-useful-wordpress-hook-hacks.html#comments</comments>
		<pubDate>Mon, 14 Jun 2010 03:23:58 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[techniques]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/74-10-useful-wordpress-hook-hacks.html</guid>
		<description><![CDATA[Hooks are very useful in WordPress. They allow you to &#8220;hook&#8221; a custom function to an existing function, which allows you to modify WordPress&#8217; functionality without editing core files. In... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/10-useful-wordpress-hook-hacks.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hooks are very useful in WordPress. They allow you to &#8220;hook&#8221; a custom function to an existing function, which allows you to modify WordPress&#8217; functionality without editing core files. In this article, we have compiled 10 extremely useful ready-to-use WordPress hooks, along with examples and coding explanations.</p>
<div style="border: 1px dashed #b2b2b2;margin: 15px 0;padding: 5px 5px 6px 5px;width: 510px">
<p style="float: left;margin: 0;padding: 3px 15px 7px 9px"><a  href="http://www.smashingmagazine.com/2009/08/05/the-smashing-book-pre-order-now-and-save-20/?utm_source=Smashing%2BMagazine&#038;utm_medium=editorialbox&#038;utm_content=editorialbox%2Btop&#038;utm_campaign=Smashing%2BBook"><img alt="Small-book in 10 Useful WordPress Hook Hacks" src="/Images/smashingmagazine3-small-book.jpg" width="75" height="74" /></a></p>
<p style="margin: 8px auto 0 auto">Want to learn more about CSS coding and web design? Take a look at our upcoming <a  href="http://www.smashingmagazine.com/2009/08/05/the-smashing-book-pre-order-now-and-save-20/?utm_source=Smashing%2BMagazine&#038;utm_medium=editorialbox&#038;utm_content=editorialbox%2Btop&#038;utm_campaign=Smashing%2BBook">Smashing Book</a> (<span style="color: #cc0000;font-weight: bold">$23.90</span> <del>$29.90</del>, available worldwide). <a  href="http://shop.smashingmagazine.com/smashingbook-dispatcher.php?utm_source=Smashing%2BMagazine&#038;utm_medium=editorialbox&#038;utm_content=editorialbox%2Btop%20to%20cart&#038;utm_campaign=Smashing%2BBook">Pre-order now with 20% discount!</a></p>
<p style="clear: both">
</div>
<p> [By the way: The <a  href="http://www.smashingmagazine.com/network-posts/">network tab</a> (on the top of the page) is updated several times a day. It features selected articles from the best web design blogs!]<br />
<h3>What Is A Hook?</h3>
<p>To achieve a particular effect on a WordPress blog, you have to modify how WordPress works. Some of these modifications are made to what WordPress developers call &#8220;core files,&#8221; files required by WordPress to work properly.</p>
<p>But modifying core files is always a bad idea. It may create a security loophole. Also, you will have lost the modification when you upgrade your WordPress installation.</p>
<p>Still, developers need to overwrite some of WordPress&#8217; functionality, which is why WordPress provides the <a  href="http://codex.wordpress.org/Plugin_API">Plugin API</a>.</p>
<p>Hooks are one of the main building blocks of WordPress plug-ins. Almost every plug-in uses a hook to overwrite WordPress&#8217; core functionality.</p>
<h4>How to Use Hooks on Your WordPress Blog</h4>
<p>Unless you&#8217;re writing a plug-in, you would write hooks in the <em>functions.php</em> file. This file is located in the <em>wp-content/themes/yourtheme</em> directory.</p>
<p>A hook, as you would expect, &#8220;hooks&#8221; one function to another. For example, you could write a custom function and attach it to one of WordPress&#8217; core functions:</p>
<pre class="brush: php;">add_action ( 'publish_post', 'myCustomFunction' );</pre>
<p>In this example, we hook our own custom function to WordPress&#8217; <code>publish-post</code> function, which means that every time WordPress executes the <code>publish-post</code> function, it will also execute this hooked function.</p>
<p>Of course, we can also remove hooks using the <code>remove_action()</code> function:</p>
<pre class="brush: php;">remove_action ( 'publish_post', 'myCustomFunction' );</pre>
<p><strong>Hooks resources:</strong></p>
<ul>
<li><a  href="http://codex.wordpress.org/Plugin_API">WordPress plugin API Codex page</a></li>
<li><a  href="http://adambrown.info/p/wp_hooks">Adam Brown&#8217;s hook database</a></li>
<li><a  href="http://www.wprecipes.com/?s=hook">Hooks from WpRecipes</a></li>
</ul>
<h3>1. Disable WordPress&#8217; Automatic Formatting</h3>
<p><img src="/Images/smashingmagazine3-sm1.png" alt="Sm1 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> You have probably noticed that, by default, WordPress converts normal quotes to &#8220;curly&#8221; quotes, and makes other little formatting changes when a post is displayed.</p>
<p>This is very cool for people who publish normal content, but anyone who uses their blog to discuss code will be annoyed because, when pasted in a text editor, code with curly quotes returns syntax errors.</p>
<p><strong>The solution</strong>.<br /> Simply paste the following code in your <em>functions.php</em> file:</p>
<pre class="brush: php;"> function my_formatter($content) { 	$new_content = ''; 	$pattern_full = '{(\[raw\].*?\[/raw\])}is'; 	$pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; 	$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); 	foreach ($pieces as $piece) { 		if (preg_match($pattern_contents, $piece, $matches)) { 			$new_content .= $matches[1]; 		} else { 			$new_content .= wptexturize(wpautop($piece)); 		} 	} 	return $new_content; } remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); add_filter('the_content', 'my_formatter', 99); </pre>
<p>Once that&#8217;s done, you can use the <code>[raw]</code> shortcode in your posts:</p>
<pre class="brush: php;">[raw]This text will not be automatically formatted.[/raw]</pre>
<p><strong>Code explanation</strong>.<br /> Our first step here was to create a function that uses a regular expression to find the <code>[raw]</code> shortcode in your posts&#8217; content.</p>
<p>Then we hook our <code>my_formatter()</code> function to WordPress&#8217; <code>the_content()</code> function, which means that <code>my_formatter()</code> will now be automatically called every time <code>the_content()</code> is called.</p>
<p>To remove the automatic formatting, we use the <code>remove_filter()</code> function, which lets you delete a hook on a specific function.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/disable-wordpress-automatic-formatting-on-posts-using-a-shortcode">Disable WordPress automatic formatting on posts using a shortcode</a></li>
</ul>
<h3>2. Detect The Visitor&#8217;s Browser Using A Hook</h3>
<p><img src="/Images/smashingmagazine3-sm2.jpg" alt="Sm2 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> Cross-browser compatibility is probably the most common problem in Web development. You will save yourself a lot of headaches if you are able to detect the browsers that people use to visit your website and then create a custom class wrapped in the <code>body</code> tag. Few people are aware of it, but WordPress can already detect browsers, and a few global variables are available for us to use.</p>
<p><strong>The solution</strong>.<br /> Nothing hard here: just paste the code below in your <em>functions.php</em> file, then save the file and you&#8217;re done!</p>
<pre class="brush: php;"> &lt;?php add_filter('body_class','browser_body_class'); function browser_body_class($classes) { 	global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; 	if($is_lynx) $classes[] = 'lynx'; 	elseif($is_gecko) $classes[] = 'gecko'; 	elseif($is_opera) $classes[] = 'opera'; 	elseif($is_NS4) $classes[] = 'ns4'; 	elseif($is_safari) $classes[] = 'safari'; 	elseif($is_chrome) $classes[] = 'chrome'; 	elseif($is_IE) $classes[] = 'ie'; 	else $classes[] = 'unknown'; 	if($is_iphone) $classes[] = 'iphone'; 	return $classes; } ?&gt; </pre>
<p>Once you have saved the file, the function will automatically add a CSS class to the <code>body</code> tag, as shown in the example below:</p>
<pre class="brush: php;">&lt;body class="home blog logged-in safari"&gt;</pre>
<p><strong>Code explanation</strong>.<br /> WordPress has global variables that return <code>true</code> if a visitor is using a particular browser. If the visitor&#8217;s browser is Google Chrome, the <code>$is_chrome</code> variable will return <code>true</code>. This is why we create the <code>browser_body_class()</code> function, which returns the name of the visitor&#8217;s browser. Once that&#8217;s done, we just hook the function to WordPress&#8217; <code>body_class()</code> function.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.nathanrice.net/blog/browser-detection-and-the-body_class-function/">Browser Detection and the body_class() Function</a></li>
<li><a  href="http://www.wprecipes.com/how-to-detect-the-visitor-browser-within-wordpress">How to detect the visitor&#8217;s browser within WordPress</a></li>
</ul>
<h3>3. Define Default Text In TinyMCE</h3>
<p><img src="/Images/smashingmagazine3-sm3.png" alt="Sm3 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> Many bloggers almost always use the same layout for their blog posts. Posts on my own blog WpRecipes.com are always displayed the same way: some text, some code and then some more text.</p>
<p>What about saving time by forcing tinyMCE (WordPress&#8217; visual editor) to display default text?</p>
<p><strong>The solution</strong>.<br /> Once again, hooks are the solution. Just open your <em>functions.php</em> file, paste the code and let the hooks work their magic!</p>
<pre class="brush: php;"> &lt;?php add_filter('default_content', 'my_editor_content'); function my_editor_content( $content ) { 	$content = "If you enjoyed this post, make sure to subscribe to my rss feed."; 	return $content; } ?&gt; </pre>
<p><strong>Code explanation</strong>.<br /> This code is powerful, and yet the method is so simple. Just create a function that returns the desired text (in this example, we have defined some simple text that asks readers to subscribe to the blog&#8217;s RSS feed), and hook the function to WordPress&#8217; <code>default_content()</code> function. That&#8217;s it.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://justintadlock.com/archives/2009/04/05/how-to-preset-text-in-the-wordpress-post-editor">How to preset text in the WordPress post editor</a></li>
<li><a  href="http://www.wprecipes.com/how-to-automatically-insert-text-in-wordpress-editor">How to: Automatically insert text in WordPress editor</a></li>
</ul>
<h3>4. Insert Content Automatically After Each Post</h3>
<p><img src="/Images/smashingmagazine3-sm4.jpg" alt="Sm4 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> Most blogs use the <em>single.php</em> template to insert some text, images or ads just after a post. Sure, this can be done by opening <em>single.php</em> and pasting the desired text after the <code>the_content()</code> function. But the text won&#8217;t show up in your RSS feed? Hooks and the technique described below solve this problem.</p>
<p><strong>The solution</strong>.<br /> One again, simply paste the code below in the <em>functions.php</em> file of your theme. That&#8217;s it.</p>
<pre class="brush: php;"> function insertFootNote($content) {         if(!is_feed() &amp;&amp; !is_home()) {                 $content.= &quot;&lt;div class='subscribe'&gt;&quot;;                 $content.= &quot;&lt;h4&gt;Enjoyed this article?&lt;/h4&gt;&quot;;                 $content.= &quot;&lt;p&gt;Subscribe to our  &lt;a href='http://feeds2.feedburner.com/WpRecipes'&gt;RSS feed&lt;/a&gt; and never miss a recipe!&lt;/p&gt;&quot;;                 $content.= &quot;&lt;/div&gt;&quot;;         }         return $content; } add_filter ('the_content', 'insertFootNote'); </pre>
<p><strong>Code explanation</strong>.<br /> The purpose of the <code>insertFootNote()</code> function is pretty simple: it simply concatenates text of your choice to the <code>$content</code> variable, which contains your post&#8217;s content.</p>
<p>Then, our <code>insertFootNote()</code> function is hooked to the <code>the_content()</code> function, and it is automatically called every time the <code>the_content</code> is called. Using this function is basically the same as typing in the text at the end of each post.</p>
<p>Notice the <code>(!is_feed)</code> condition on line 2, which prevents the text from being inserted in the RSS feed. If you want the text to appear in your RSS feed, replace line 2 with the following:</p>
<pre class="brush: php;"> if (!is_home()) { </pre>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-automatically-insert-content-after-each-post">How to: Automatically insert content after each post</a></li>
</ul>
<h3>5. Disable The &#8220;Please Update Now&#8221; Message On WordPress Dashboard</h3>
<p><img src="/Images/smashingmagazine3-sm5.png" alt="Sm5 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> Your dashboard automatically lets you know when a new version of WordPress is released by inserting a message at the top of admin pages. This is definitely a good thing, because updating gives your blog the latest functions and security fixes. But if the blog is a client project, letting the client control updates may not be a good idea.</p>
<p><strong>The solution</strong>.<br /> Just paste these four lines of code in your <em>functions.php</em> file:</p>
<pre class="brush: php;"> if (!current_user_can('edit_users')) {   add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );   add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) ); } </pre>
<p>Once you save <em>functions.php</em>, you won&#8217;t see the message on the dashboard.</p>
<p><strong>Code explanation</strong>.<br /> The first thing we do here is make sure the current user has sufficient administrative rights to update WordPress. Once we do that, we just create two hooks to overwrite the automatic check for updates and message display.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-disable-the-please-update-now-message-in-wp-dashboard">How to: Disable the &#8220;Please update now&#8221; message on WP dashboard</a></li>
</ul>
<h3>6. Disable WordPress From Auto-Saving Posts</h3>
<p><img src="/Images/smashingmagazine3-sm6.jpg" alt="Sm6 in 10 Useful WordPress Hook Hacks" /><br /><em>Photo by <a  href="http://www.flickr.com/photos/thatcanadiangirl/">thatcanadiangirl</a></em></p>
<p><strong>The problem</strong>.<br /> As you type a post in the dashboard, WordPress periodically saves the content. This is a useful feature, but sometimes you may want to disable it.</p>
<p><strong>The solution</strong>.<br /> To disable WordPress&#8217; auto-saving functionality, simply open the <em>functions.php</em> file and paste the following function:</p>
<pre class="brush: php;"> function disableAutoSave(){     wp_deregister_script('autosave'); } add_action( 'wp_print_scripts', 'disableAutoSave' ); </pre>
<p><strong>Code explanation</strong>.<br /> Again, nothing hard about this code. We simply create an action (on line 4) and hook the <code>disableAutoSave()</code> function that we created on line 1 to WordPress&#8217; <code>wp_print_scripts()</code>.</p>
<p>The result is that our <code>disableAutoSave()</code> function is called every time WordPress executes <code>wp_print_scripts()</code>. This way, we make sure the auto-save functionality is disabled.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/wordpress-hook-disable-posts-auto-saving">WordPress hook: Disable posts auto-saving</a></li>
</ul>
<h3>7. Prevent Duplicate Content On Comment Pages</h3>
<p><img src="/Images/smashingmagazine3-sm7.jpg" alt="Sm7 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> Duplicate content is an SEO problem for many websites. It can also be a problem for your WordPress blog if you don&#8217;t apply a few tricks.</p>
<p>Introduced in version 2.7, paged comments is a great addition to WordPress because it lets bloggers split comments into multiple pages. The only problem, again, is the risk of duplicate content.</p>
<p>Let&#8217;s use the new <code>rel="canonical"</code> attribute to prevent duplicate content in paged comments.</p>
<p><strong>The solution</strong>.<br /> Simply paste the following code in your <em>function.php</em> file:</p>
<pre class="brush: php;"> function canonical_for_comments() { 	global $cpage, $post; 	if ( $cpage &gt; 1 ) : 		echo &quot;\n&quot;; 	  	echo &quot;&lt;link rel='canonical' href='&quot;; 	  	echo get_permalink( $post-&gt;ID ); 	  	echo &quot;' /&gt;\n&quot;; 	 endif; } add_action( 'wp_head', 'canonical_for_comments' ); </pre>
<p><strong>Code explanation</strong>.<br /> First, we create a function to add the <code>rel="canonical"</code> attribute to comment pages, except page 1. Then we hook this function to WordPress&#8217; <code>wp_head()</code> function. As simple as that!</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/wordpress-hack-canonical-links-for-comments">WordPress hack: Canonical links for comments</a></li>
</ul>
<h3>8. Get Entire Post Or Page In A PHP Variable</h3>
<p><img src="/Images/smashingmagazine3-sm8.jpg" alt="Sm8 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> Being able to get the entire current post or page as a PHP variable is definitely a good thing. You could, for example, replace parts of the content using the <code>str_replace()</code> PHP function, and much more.</p>
<p><strong>The solution</strong>.<br /> Once again, nothing hard. Just paste the following in your <em>function.php</em> file.</p>
<pre class="brush: php;"> function callback($buffer) { 	// modify buffer here, and then return the updated code 	return $buffer; } function buffer_start() { 	ob_start("callback"); } function buffer_end() { 	ob_end_flush(); } add_action('wp_head', 'buffer_start'); add_action('wp_footer', 'buffer_end'); </pre>
<p><strong>Code explanation</strong>.<br /> To achieve this hack, we need three functions:</p>
<ul>
<li><code>callback()</code>: this function returns the whole page as a variable called <code>$buffer</code>. You can modify it before returning it by using regular expressions, for example.</li>
<li><code>buffer_start()</code>: this function simply starts the buffer. It is hooked to WordPress&#8217; <code>wp_head()</code> function.</li>
<li><code>buffer_end()</code>: this function clears the buffer. It is hooked to WordPress&#8217; <code>wp_footer()</code> function.</li>
</ul>
<p>Once we have our function, we just hook it to existing WordPress functions.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.dagondesign.com/articles/wordpress-hook-for-entire-page-using-output-buffering/">WordPress Hook for Entire Page Using Output Buffering</a></li>
</ul>
<h3>9. Use Hooks And Cron To Schedule Events</h3>
<p><img src="/Images/smashingmagazine3-sm9.jpg" alt="Sm9 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> You probably already know that WordPress can schedule events. For example, it can publish posts at preset dates and times. Using hooks and <code>wp-cron</code>, we can easily schedule our own events. In this example, we will get our WordPress blog to send us an email once hourly.</p>
<p><strong>The solution</strong>.<br /> Paste the following code block in the <em>functions.php</em> file of your theme.</p>
<pre class="brush: php;"> if (!wp_next_scheduled('my_task_hook')) { 	wp_schedule_event( time(), 'hourly', 'my_task_hook' ); } add_action( 'my_task_hook', 'my_task_function' );  function my_task_function() { 	wp_mail('you@yoursite.com', 'Automatic email', 'Hello, this is an automatically scheduled email from WordPress.'); } </pre>
<p><strong>Code explanation</strong>.<br /> The first thing we did, of course, was create a function that performs the desired action. In this example, the function is called <code>my_task_function()</code> and it just sends an email to the specified email address.</p>
<p>To schedule an event, we have to use the <code>wp_schedule_event()</code> function. The last argument has to be a hook, which is why we hook our <code>my_task_function()</code> function to <code>my_task_hook</code>.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://blog.slaven.net.au/archives/2007/02/01/timing-is-everything-scheduling-in-wordpress/">Timing is everything: scheduling in WordPress</a></li>
</ul>
<h3>10. List All Hooked Functions</h3>
<p><img src="/Images/smashingmagazine3-sm10.png" alt="Sm10 in 10 Useful WordPress Hook Hacks" /></p>
<p><strong>The problem</strong>.<br /> When things go wrong, listing all hooked functions can be very useful for debugging.</p>
<p><strong>The solution</strong>.<br /> As with the others, this code has to be pasted in your <em>functions.php</em> file. When you have finished debugging, don&#8217;t forget to remove the code from <em>functions.php</em>, or else the debugging message will continue to appear.</p>
<pre class="brush: php;"> function list_hooked_functions($tag=false){  global $wp_filter;  if ($tag) {   $hook[$tag]=$wp_filter[$tag];   if (!is_array($hook[$tag])) {   trigger_error(&quot;Nothing found for '$tag' hook&quot;, E_USER_WARNING);   return;   }  }  else {   $hook=$wp_filter;   ksort($hook);  }  echo '&lt;pre&gt;';  foreach($hook as $tag =&gt; $priority){   echo &quot;&lt;br /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;\t&lt;strong&gt;$tag&lt;/strong&gt;&lt;br /&gt;&quot;;   ksort($priority);   foreach($priority as $priority =&gt; $function){   echo $priority;   foreach($function as $name =&gt; $properties) echo &quot;\t$name&lt;br /&gt;&quot;;   }  }  echo '&lt;/pre&gt;';  return; } </pre>
<p>Once that&#8217;s done, simply call the <code>list_hooked_functions()</code> function, as shown below, to print all hooked WordPress functions on your screen.</p>
<pre class="brush: php;">list_hooked_functions();</pre>
<p><strong>Code explanation</strong>.<br /> If no hook name is provided to the function as an argument, then hooks are printed to the screen using the global variable <code>$wp_filter</code>. Alternatively, you can list one particular hook by passing its name as an attribute:</p>
<pre class="brush:php">list_hooked_functions('wp_head');</pre>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.rarst.net">Rarst.net</a></li>
</ul>
<h3>Related posts</h3>
<p>You may be interested in the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2009/07/23/10-wordpress-comments-hacks/">10 Handy WordPress Comments Hacks</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/07/02/power-tips-for-wordpress-template-developers/">Power Tips For WordPress Template Developers</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/06/10/10-useful-wordpress-loop-hacks/">10 Useful WordPress Loop Hacks</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/05/13/10-custom-fields-hacks-for-wordpress/">Custom Field Hacks For WordPress</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/03/04/15-useful-twitter-plugins-and-hacks-for-wordpress/">15 Useful Twitter Hacks and Plugins For WordPress</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/">Mastering WordPress Shortcuts</a></li>
</ul>
<p><em>(al)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/10-useful-wordpress-hook-hacks.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Extremely Useful PHP Tools</title>
		<link>http://www.taiwangeek.com/2010-06/50-extremely-useful-php-tools.html</link>
		<comments>http://www.taiwangeek.com/2010-06/50-extremely-useful-php-tools.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 04:22:19 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/2-50-extremely-useful-php-tools.html</guid>
		<description><![CDATA[By Jacob Gube PHP is one of the most widely used open-source server-side scripting languages that exist today. With over 20 million indexed domains using PHP, including major websites like... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/50-extremely-useful-php-tools.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>By Jacob Gube</em></p>
<p><strong>PHP</strong> is one of the most widely used open-source server-side scripting languages that exist today. With over 20 million indexed domains using PHP, including major	websites like Facebook, Digg and WordPress, there are good reasons why many Web developers prefer it to other server-side scripting languages, such as Python and Ruby.</p>
<p><a  href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&#038;lang=php&#038;lang2=ruby">PHP is faster</a> (<em>updated</em>), and it is <a  href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">the most used scripting language</a> in practice; it has detailed documentation, a huge community, numerous ready-to-use scripts and well-supported frameworks; and most importantly, it&#8217;s much easier to get started with PHP than with other scripting languages (Python, for example). That&#8217;s why it makes perfect sense to provide the huge community of PHP developers with an overview of useful tools and resources that can make their development process easier and more effective.</p>
<p>This post presents <strong>50 useful PHP tools that can significantly improve your programming workflow</strong>. Among other things, you&#8217;ll find a plethora of libraries and classes that aid in debugging, testing, profiling and code-authoring in PHP.</p>
<p>You may also want to take a look at the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2008/12/09/50-really-useful-css-tools/">50 Extremely Useful And Powerful CSS Tools</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/11/18/15-helpful-in-browser-web-development-tools/">15 Helpful In-Browser Web-Development Tools</a></li>
</ul>
<p>[Offtopic: by the way, did you know that there is a Smashing eBook Series? Book #2 is <a  href="https://shop.smashingmagazine.com/smashingbook-dispatcher.php?d=smashing-ebook-successful-freelancing">Successful Freelancing for Web Designers</a>, 260 pages for just $9,90.]</p>
<h3>Debugging Tools</h3>
<ul>
<li><a  href="http://code.google.com/p/webgrind/">Webgrind</a><br />Webgrind is an <a  href="http://www.xdebug.org/">Xdebug</a> profiling Web front end in PHP 5. It implements a subset of the features of <a  href="http://kcachegrind.sourceforge.net/cgi-bin/show.cgi">kcachegrind</a>, installs in seconds and works on all platforms. For quick &#8216;n&#8217; dirty optimizations, it does the job.
<p><a  href="http://code.google.com/p/webgrind/"><img src="/Images/smashingmagazine3-webgrind.jpg" alt="Webgrind in 50 Extremely Useful PHP Tools" width="500" height="413" /></a></p>
</li>
<li><a  href="http://xdebug.org/index.php">Xdebug</a><br />Xdebug is one of the most popular debugging PHP extensions.	It provides a ton of useful data to help you quickly find bugs in your	source code. Xdebug plugs right into many of the most popular PHP applications, such as PHPEclipse and phpDesigner.</li>
<li><a  href="http://gubed.mccabe.nu/">Gubed PHP Debugger</a><br />As the name implies, Gubed PHP Debugger is a PHP debugging	tool for hunting down logic errors.</li>
<li><a  href="http://www.php-debugger.com/dbg/">DBG</a><br />DBG is a robust and popular PHP debugger for use in local and	remote PHP debugging. It plugs into numerous PHP IDE&#8217;s and can easily be used	with the command line.</li>
<li><a  href="http://www.php-debug.com/www/">PHP_Debug</a><br />PHP_Debug is an open-source project that gives you useful information about your PHP code that can be used for debugging. It can output	processing times of your PHP and SQL, check the performance of particular code	blocks and get variable dumps in graphical form, which is great if you need a	more visual output than the one given to you by print_r() or var_dump().</li>
<li><a  href="http://sourceforge.net/projects/php-dyn/">PHP_Dyn</a><br />PHP_Dyn is another excellent PHP debugging tool that&#8217;s	open-source. You can trace execution and get an output of the argument and return	values of your functions.</li>
<li><a  href="http://www.bluestatic.org/software/macgdbp/">MacGDBp</a><br />MacGDBp is a live PHP debugger application for the Mac OS.	It has all the features you&#8217;d expect from a fully featured debugger, such as the	ability to step through your code and set breakpoints.</li>
</ul>
<h3>Testing and Optimization Tools</h3>
<ul>
<li><a  href="http://www.phpunit.de/">PHPUnit</a><br />PHPUnit is a complete port of the popular <a  href="http://www.junit.org/">JUnit</a> unit testing suite to PHP 5. It&#8217;s a tool	that helps you test your Web application&#8217;s stability and scalability.	Writing test cases within the PHPUnit framework is easy; here&#8217;s <a  href="http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html">how	to do it</a>.</li>
<li><a  href="http://www.simpletest.org/">SimpleTest</a><br />SimpleTest is a straightforward unit-testing platform for	PHP applications. To get up and running with SimpleTest quickly, read through	this pragmatic <a  href="http://www.simpletest.org/en/first_test_tutorial.html">tutorial</a> that shows you how to create a new test case.
<p><a  href="http://www.simpletest.org/"><img src="/Images/smashingmagazine3-simpletest.gif" alt="Simpletest in 50 Extremely Useful PHP Tools" width="349" height="152" /></a></p>
</li>
<li><a  href="http://selenium-rc.openqa.org/">Selenium</a><br />Selenium Remote Control (RC) is a test tool that allows you to write automated Web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser. It  can be used in conjunction with PHPUnit to create and run automated tests within a Web browser.</li>
<li><a  href="http://matrix.squiz.net/developer/tools/php_cs">PHP_CodeSniffer</a><br />PHP_CodeSniffer is a PHP 5 script for detecting conformance	to a predefined PHP coding standard. It&#8217;s a helpful tool for maintaining	uniform coding styles for large projects and teams.</li>
<li><a  href="http://dbug.ospinto.com/">dBug</a><br />dBug is ColdFusion&#8217;s <a  href="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-p21.htm">cfDump</a> for PHP. It&#8217;s a simple tool for outputting data tables that contain information	about arrays, classes and objects, database resources and XML resources, making it	very useful for debugging purposes.
<p><a  href="http://dbug.ospinto.com/"><img src="/Images/smashingmagazine3-11_dbug.jpg" alt="11 Dbug in 50 Extremely Useful PHP Tools" width="306" height="363" /></a></p>
</li>
<li><a  href="http://www.coderholic.com/php-profile-class/">PHP Profile Class</a><br />PHP Profile Class is an excellent PHP profiling tool for	your Web applications. Using this class will help you quickly and easily gain	insight into which parts of your app could use some refactoring and optimization.</li>
</ul>
<h3>Documentation Tools</h3>
<ul>
<li><a  href="http://phpdoc.org/">phpDocumentor</a><br />phpDocumentor (also known as phpdoc and phpdocu) is a	documentation tool for your PHP source code. It has an innumerable amount of	features, including the ability to output in HTML, PDF, CHM and XML DocBook	formats, and has both a Web-based and command-line interface as well as source-code	highlighting. To learn more about phpDocumentor, check out the <a  href="http://www.phpdoc.org/manual.php">online manual</a>.</li>
<li><a  href="http://phpdox.net/">PHP DOX</a><br />An AJAX-powered PHP documentation search engine that enables you to search titles from all PHP documentation pages.</li>
</ul>
<h3>Security Tools</h3>
<ul>
<li><a  href="http://www.phpcaptcha.org/">Securimage</a><br />Securimage is a free, open-source PHP CAPTCHA script for generating complex images and CAPTCHA codes to protect forms from spam and abuse.</li>
<li><a  href="https://trac.anl.gov/scavenger/wiki/WikiStart">Scavenger</a><br />Scavenger is an open-source, real-time vulnerability management tool. It helps system administrators respond to vulnerability findings, track vulnerability findings and review accepted and false-positive answered vulnerabilities, without &#8220;nagging&#8221; them with old vulnerabilities.</li>
<li><a  href="http://php-ids.org/">PHP-IDS</a><br />PHP-IDS (PHP-Intrusion Detection System) is a simple-to-use, well-structured, fast and state-of-the-art security layer for your PHP-based Web application.</li>
<li><a  href="http://blog.evaria.com/2007/pixy-the-php-security-scanner/">Pixy: PHP Security Scanner</a><br />Pixy is a Java program that performs automatic scans of PHP 4 source code, aimed to detect XSS and SQL injection vulnerabilities. Pixy takes a PHP program as input and creates a report that lists possible vulnerable points in the program, along with additional information for understanding the vulnerability.</li>
</ul>
<h3>Image Manipulation and Graphs</h3>
<ul>
<li><a  href="http://www.maani.us/charts4/">PHP/SWF Charts</a><br />PHP/SWF Charts is a powerful PHP tool that enables you to create attractive Web charts and graphs from dynamic data. You can use PHP scripts to generate and gather data from databases, then pass it to this tool to generate Flash (SWF) charts and graphs.</li>
<li><a  href="http://pchart.sourceforge.net/index.php">pChart &#8211; a chart-drawing PHP library</a><br />pChart is a PHP class-oriented framework designed to create aliased charts. Most of today&#8217;s chart libraries have a cost; this one is free. Data can be retrieved from SQL queries or CSV files or can be manually provided.
<p><a  href="http://simplepie.org/"><img src="/Images/smashingmagazine3-chart.gif" alt="Chart in 50 Extremely Useful PHP Tools" width="496" height="234" /></a></p>
</li>
<li><a  href="http://wideimage.sourceforge.net/wiki/MainPage">WideImage</a><br />WideImage is a PHP library for dynamic image manipulation	and processing for PHP 5. To be able to use the library, you should have the <a  href="http://us2.php.net/gd">GD PHP extension</a> installed on your Web server.</li>
<li><a  href="http://www.magickwand.org/">MagickWand For PHP</a><br />MagickWand For PHP is a PHP module suite for working with	the <a  href="http://www.imagemagick.org/script/index.php">ImageMagick</a> API, which lets you create, compose and edit bitmap images. It&#8217;s a useful tool for	quickly incorporating image-editing features in your PHP applications.</li>
</ul>
<h3>PHP Code Beautifier</h3>
<ul>
<li><a  href="http://pear.php.net/package/PHP_Beautifier">PHP_Beautifier</a><br />PHP Beautifier is a PEAR package for automatically	formatting and &#8220;beautifying&#8221; PHP 4 and PHP 5 source code.</li>
<li><a  href="http://www.waterproof.fr/products/phpCodeBeautifier/">PHPCodeBeautifier</a><br />PHPCodeBeautifier is a tool that saves you from hours of reformatting code to suit your own way of presenting it. A GUI version allows you to process files visually; a command-line version can be batched or integrated with other tools (like CVS, SubVersion, IDE, etc.); and there is also an integrated tool of PHPEdit.</li>
<li><a  href="http://qbnz.com/highlighter/">GeSHi &#8211; Generic Syntax Highlighter</a><br />GeSHi is designed to be a simple but powerful highlighting class, with the goal of supporting a wide range of popular languages. Developers can easily add new languages for highlighting and define easily customizable output formats.</li>
</ul>
<h3>Version-Control Systems</h3>
<ul>
<li><a  href="http://phing.info/trac/">Phing</a><br />Phing is a popular project version-control system for PHP.	It is a useful tool for organizing and maintaining different builds of your	project.</li>
<li><a  href="http://code.google.com/p/xinc/">xinc</a><br />xinc is a <a  href="http://www.martinfowler.com/articles/continuousIntegration.html#EveryCommitShouldBuildTheMainlineOnAnIntegrationMachine">continuous	integration server</a> version-control system written in PHP 5 (i.e. continuous	builds instead of nightly builds). It works great with other systems such as <a  href="http://subversion.tigris.org/">Subversion</a> and <a  href="http://phing.info/">Phing</a>.</li>
</ul>
<h3>Useful Extensions, Utilities and Classes</h3>
<ul>
<li><a  href="http://simplepie.org/">SimplePie</a><br />SimplePie is a PHP class that helps you work with RSS	feeds. Check out the online <a  href="http://simplepie.org/demo/">RSS and Atom feed reader</a>, which demonstrates a simple Web application that uses SimplePie.
<p><a  href="http://simplepie.org/"><img src="/Images/smashingmagazine3-spie.jpg" alt="Spie in 50 Extremely Useful PHP Tools" width="480" height="392" /></a></p>
</li>
<li><a  href="http://htmlpurifier.org/">HTML Purifier</a><br />HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier not only removes all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive white list, it also makes sure your documents are standards-compliant. Open source and highly customizable.</li>
<li><a  href="http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf">TCPDF</a><br />TCPDF is an open-source PHP class for generating PDF documents.</li>
<li><a  href="http://www.jonasjohn.de/lab/htmlsql.htm">htmlSQL</a><br />htmlSQL is a unique tool. It is a PHP class for querying	HTML values in an SQL-like syntax. Check out the <a  href="http://www.jonasjohn.de/lab/htmlsql/">live demonstration of how htmlSQL works</a>.</li>
<li><a  href="http://searchlightdigital.com/the-greatest-php-snippet-file-ever-using-quicktext-for-notepad">The Greatest PHP Snippet File Ever (Using Quicktext for Notepad++)</a><br />&#8220;A little something for all coders: a snippets file that I use for PHP coding. This is designed to be used with Quicktext for Notepad++, but feel free to adapt it to whatever text editor you prefer.&#8221;</li>
<li><a  href="http://creole.phpdb.org/trac/">Creole</a><br />Creole is a database abstraction layer for PHP5. It abstracts PHP&#8217;s native database-specific API to create more portable code while also providing developers with a clean, fully object-oriented interface based loosely on the API for Java&#8217;s JDBC.</li>
<li><a  href="http://www.codeplex.com/PHPLinq">PHPLinq</a><br />LINQ is a component that adds native data querying capabilities to PHP using a syntax reminiscent of SQL. It defines a set of query operators that can be used to query, project and filter data in arrays, enumerable classes, XML, relational databases and third-party data sources. [<a  href="http://phpimpact.wordpress.com/2008/05/29/30-useful-php-classes-and-components/">via</a>]</li>
<li><a  href="http://www.xm1math.net/phpmathpublisher/">PHPMathPublisher</a><br />With PhpMathPublisher, you can publish mathematical documents on the Web using only a PHP script (no LaTeX programs on the server and no MathML).
<p><a  href="http://www.xm1math.net/phpmathpublisher/"><img src="/Images/smashingmagazine3-math.gif" alt="Math in 50 Extremely Useful PHP Tools" width="302" height="81" /></a></p>
</li>
<li><a  href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a><br />If you&#8217;re working with PHP, there&#8217;s a big chance you&#8217;re set	up in a LAMP configuration. phpMyAdmin is Web-based tool for managing,	building, importing, exporting and exploring MySQL databases.</li>
<li><a  href="http://www.codeplex.com/PHPExcel">PHPExcel</a><br />PHPExcel is a set of useful PHP classes for working with	Microsoft Excel files. PHPExcel allows you to read Excel files and write to them. This is useful for dynamically generating Excel spreadsheets for	downloading.</li>
<li><a  href="http://p.horm.org/er/">Phormer</a><br />Phormer is a PHP-based photo gallery management application that helps you to store, categorize and trim your photos online.</li>
<li><a  href="http://www.xajaxproject.org/">xajax PHP Class	Library</a><br />xajax is a PHP class for easily working with PHP AJAX	applications. It gives you an easy-to-use API for quickly managing AJAX-related tasks.	Check out the <a  href="http://www.xajaxproject.org/examples/multiply/multiply.php">xajax Multiplier demo</a> and the <a  href="http://www.xajaxproject.org/examples/thewall/thewall.php">Graffiti	Wall demo</a> to see the xajax PHP class in action.</li>
<li><a  href="http://phpuserclass.com/">PHP User Class</a><br />PHP User Class is an excellent script that helps you	create a system for user authentication (i.e. registration, log in, account	profile, etc.). It&#8217;s a useful utility to have around if you require user	registration for your Web applications.</li>
<li><a  href="http://gtk.php.net/">PHP-GTK</a><br />PHP-GTK is a PHP extension for the <a  href="http://www.gtk.org/">GTK+</a> toolkit (a robust toolkit for developing	GUIs). It is a suite of useful OOP functions and classes to help you rapidly	build cross-platform, client-side GUI&#8217;s for your application.</li>
</ul>
<h3>PHP Online Tools and Resources</h3>
<ul>
<li><a  href="http://code.google.com/p/minify/">Minify!</a><br />Minify is a PHP 5 app that can combine multiple CSS or JavaScript files, compress their content (i.e. remove unnecessary white space and comments) and serve the results with HTTP encoding (via Gzip/deflate) and headers that allow optimal client-side caching. This will help you follow several of Yahoo!&#8217;s <a  rel="nofollow" href="http://developer.yahoo.com/performance/index.html#rules">Rules for High Performance Websites</a>.
<p><a  href="http://code.google.com/p/minify/"><img src="/Images/smashingmagazine3-minify.gif" alt="Minify in 50 Extremely Useful PHP Tools" width="550" height="221" /></a></p>
</li>
<li><a  href="http://en.dklab.ru/lib/HTTP_StaticMerger/">HTTP_StaticMerger: Automatic &#8220;merging&#8221; of CSS and JavaScript files</a><br />This library automatically merges sets of static files (CSS or JavaScript) and speeds up page loading (by lowering the number of HTTP queries). It is recommended to use this together with caching reverse-proxy to minimize the response time.</li>
<li><a  href="http://www.phpobjectgenerator.com/">PHP Object	Generator</a><br />PHP Object Generator is an open-source Web-based tool that	helps you quickly construct PHP objects and leverage object-oriented programming (OOP) principles in your	code.
<p><a  href="http://www.phpobjectgenerator.com/"><img src="/Images/smashingmagazine3-03_object_generator.jpg" alt="03 Object Generator in 50 Extremely Useful PHP Tools" width="407" height="481" /></a></p>
</li>
<li><a  href="http://www.gotapi.com/php">gotAPI/PHP</a><br />gotAPI is a useful online tool for quickly looking up PHP	functions and classes. Also check out the <a  href="http://www.gotapi.com/widgets/compiled/c1_module_php.html">Quick PHP	look-up</a> widget example in case you&#8217;d like to include this awesome look-up	feature on your website.
<p><a  href="http://www.gotapi.com/php"><img src="/Images/smashingmagazine3-04_gotapi.jpg" alt="04 Gotapi in 50 Extremely Useful PHP Tools" width="500" height="312" /></a></p>
</li>
<li><a  href="http://www.koders.com/">koders</a><br />koders is a search engine for open-source and downloadable code.	It currently has over a billion lines of code indexed and isn&#8217;t limited to just PHP.</li>
<li><a  href="http://pecl.php.net/">PECL</a><br />PECL is a directory of all known PHP extensions and a hosting facility for downloading and developing PHP extensions.</li>
</ul>
<h3>In-Browser Tools (Firefox Add-Ons)</h3>
<ul>
<li><a  href="http://www.firephp.org/">FirePHP</a><br />FirePHP is a Firefox extension that allows you to log data	in <a  href="http://getfirebug.com/">Firebug</a>. It has a variety of useful	logging features, such as the ability to change your error and exception handling	on the fly and to log errors directly to the Firebug console. To learn more about what FirePHP can do, check out	the FirePHP guide on <a  href="http://www.firephp.org/HQ/Use.htm">how to use	FirePHP</a>. For developers using the <a  href="http://framework.zend.com/">Zend	PHP framework</a>, you might find this guide on <a  href="http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framework-16/">using	 FirePHP with Zend</a> useful.
<p><a  href="http://www.firephp.org/"><img src="/Images/smashingmagazine3-01_firephp.jpg" alt="01 Firephp in 50 Extremely Useful PHP Tools" width="435" height="271" /></a></p>
</li>
<li><a  href="http://phplangeditor.mozdev.org/">phpLangEditor</a><br />phpLangEditor is a very handy Firefox add-on for translating	language files and variables in your script.
<p><a  href="http://phplangeditor.mozdev.org/"><img src="/Images/smashingmagazine3-02_phplangeditor.jpg" alt="02 Phplangeditor in 50 Extremely Useful PHP Tools" width="499" height="287" /></a></p>
</li>
<li><a  href="https://addons.mozilla.org/en-US/firefox/addon/3505">PHP	Lookup</a><br />PHP Lookup is a built-in search bar to help you quickly look	up references to PHP syntax.</li>
<li><a  href="https://addons.mozilla.org/en-US/firefox/addon/8984">PHP	Manual Search</a><br />PHP Manual Search is a handy search bar that searches <a  href="http://www.php.net/docs.php">official PHP documentation</a> from within	your Web browser.</li>
</ul>
<h3>Frameworks for PHP</h3>
<ul>
<li><a  href="http://dwoo.org/">Dwoo</a><br />Dwoo is a PHP 5 template engine positioned as an alternative to Smarty. It is (nearly) fully compatible with its templates and plug-ins, but it is being written from scratch and is aimed to go one step further with a cleaner code base.</li>
<li><a  href="http://codeigniter.com/">CodeIgniter</a><br />CodeIgniter is a powerful, high-performance, open-source PHP framework that helps you author PHP applications rapidly. CodeIgniter	is known for having a light footprint, thereby reducing your server&#8217;s work. You	can get up and running with CodeIgniter in a jiffy: it has an awesome <a  href="http://codeigniter.com/user_guide/">online manual</a>, a couple of helpful <a  href="http://codeigniter.com/tutorials/">video tutorials</a> and an active <a  href="http://codeigniter.com/forums/">user forum</a>.
<p><a  href="http://codeigniter.com/"><img src="/Images/smashingmagazine3-codeigniter.jpg" alt="Codeigniter in 50 Extremely Useful PHP Tools" width="448" height="251" /></a></p>
</li>
<li><a  href="http://www.yiiframework.com/">YII Framework</a><br />Here is a high-performance component-based PHP framework that is supposed to be more efficient than CodeIgniter, CakePHP, ZF and Symfony. An optimal solution for developing large-scale Web applications. Yii supports MVC, DAO/ActiveRecord, I18N/L10N, caching, jQuery-based AJAX support, authentication and role-based access control, scaffolding, input validation, widgets, events, theming and Web services.</li>
<li><a  href="http://www.netbeans.org/features/php/index.html">NetBeans</a><br />A dedicated PHP coding environment and complete integration with web standards. The NetBeans PHP editor is dynamically integrated with NetBeans HTML, JavaScript and CSS editing features such as syntax highlighting and the JavaScript debugger. NetBeans IDE 6.5 fully supports iterative development, so testing PHP projects follows the classic patterns familiar to web developers.</li>
<li><a  href="http://www.solarphp.com/">Solar</a><br />Solar is a PHP 5 development framework for Web applications	derived from the <a  href="http://phpsavant.com/">Savant</a> templating engine.	Solar uses the MVC architectural pattern and has a host of classes and functions for securing your Web app against SQL injection, cross-website scripting (XSS) and other common exploits.
<p><a  href="http://www.solarphp.com/"><img src="/Images/smashingmagazine3-solar.jpg" alt="Solar in 50 Extremely Useful PHP Tools" width="450" height="198" /></a></p>
</li>
<li><a  href="http://www.symfony-project.org/">symfony</a><br />symfony is an open-source PHP 5 Web application framework	that is well known for its modularity and useful library of classes. To get up	and running as fast as possible, you should check out the pragmatic symfony	online tutorial called &#8220;<a  href="http://www.jobeet.org/">The symfony 1.2	advent calendar tutorial</a>,&#8221; which takes you through a step-by-step	example of building your own symfony-based Web application.</li>
<li><a  href="http://pear.php.net/">PEAR &#8211; PHP Extension and Application Repository</a><br />PEAR is a popular framework and distribution system for reusable PHP components. The purpose of the framework is to provide a structured library of open-source code for PHP users, a system for code distribution and package maintenance and a standard style for PHP code.</li>
<li><a  href="http://propel.phpdb.org/trac/">Propel</a><br />Propel is an Object-Relational Mapping (ORM) framework for PHP 5. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data.</li>
<li><a  href="http://wiki.limb-project.com/doku.php?id=limb3:en:packages:macro">{{macro}} template engine</a><br />{{macro}} compiles initial templates into executable PHP scripts with very clean syntax (much cleaner than WACT and Smarty) and executes them very fast. The engine doesn&#8217;t use an XML-like syntax; there are only two data scopes, global and local, and no more data sources (all data is displayed with regular PHP variables); and the system supports all WACT features such as templates wrapping and including.<img src="/Images/smashingmagazine3-macro.gif" alt="Macro in 50 Extremely Useful PHP Tools" width="450" height="183" /></li>
<li><a  href="http://framework.zend.com/">Zend Framework</a><br />The Zend Framework by <a  href="http://www.zend.com/en/company/">Zend Technologies</a> (the creators of	PHP&#8217;s scripting engine) is a popular PHP Web application framework that	embraces the principles of PHP OOP; it&#8217;s very extensible and has built-in	utilities for working with free Web service APIs, such as those of <a  href="http://code.google.com/apis/gdata/">Google</a>, <a  href="http://flickr.com/services/">Flickr</a> and <a  href="http://aws.amazon.com/">Amazon</a>.</li>
<li><a  href="http://www.qcodo.com/">Qcodo</a><br />Qcodo is an excellent open-source PHP Web application	framework. It&#8217;s subdivided into two parts: (1) Code Generator, and (2) Qforms. Code	Generator handles the creation of object code and PHP and HTML front-end code from	your data model. Qforms is an intuitive system for handling and creating	complex PHP-driven HTML Web forms. Check out <a  href="http://www.qcodo.com/demos/">demos of applications that use Qcodo and	presentational material that covers Qcodo</a>.
<p><a  href="http://www.qcodo.com/"><img src="/Images/smashingmagazine3-qc.gif" alt="Qc in 50 Extremely Useful PHP Tools" width="528" height="249" /></a></p>
</li>
<li><a  href="http://www.modernmethod.com/sajax/">SAJAX</a><br />SAJAX is a JavaScript and AJAX application framework that works	well with PHP (as well as several other server-side scripting languages). See	SAJAX at work by going to <a  href="http://www.modernmethod.com/sajax/sajax-0.12/php/example_wall.php">Wall	live demonstration</a>.</li>
<li><a  href="http://www.smarty.net/">Smarty</a><br />Smarty is a popular PHP templating system to help you	separate PHP logic and front-end code (HTML, CSS, JavaScript). It will keep your projects	modular and easier to maintain.</li>
<li><a  href="http://cakephp.org/">CakePHP</a><br />CakePHP is one of the leading PHP frameworks for creating	robust, fully-featured Web applications. CakePHP has an extensive and well-organized <a  href="http://book.cakephp.org/">online manual</a>. If you want to learn via	video tutorials, check out the <a  href="http://live.cakephp.org/">CakePHP	screencasts</a>.
<p><a  href="http://cakephp.org/"><img src="/Images/smashingmagazine3-cake.jpg" alt="Cake in 50 Extremely Useful PHP Tools" width="417" height="180" /></a></p>
</li>
<li><a  href="http://phpsavant.com/yawiki/">Savant2</a><br />Savant2 is another popular object-oriented PHP templating	system. Instead of a special syntax unique to Savant2, you use PHP syntax to	develop your project&#8217;s template.</li>
<li><a  href="http://www.phpspec.org/">PHPSpec</a><br />PHPSpec is a simple and intuitive PHP framework. It follows	the Behavior-Driven Development principle and therefore allows you to write	behavior-oriented code, oftentimes in plain English.</li>
</ul>
<h3>PHP IDEs and Editors</h3>
<ul>
<li><a  href="http://www.phpeclipse.com/">PHPEclipse</a><br />PHPEclipse is a popular PHP source-code editor that is open source	and runs on all the major operating systems, such as Windows, Linux	and Mac OS. It has all the features you&#8217;d expect from a PHP source-code editor,	such as code-folding, syntax highlighting, hover-over tool tips and	support for XDebug and DBG.
<p><a  href="http://www.phpeclipse.com/"><img src="/Images/smashingmagazine3-07_php_eclipse.jpg" alt="07 Php Eclipse in 50 Extremely Useful PHP Tools" width="445" height="424" /></a></p>
</li>
<li><a  href="http://www.nusphere.com/products/phped.htm">PhpED</a><br />PhpED is an excellent IDE for Windows users. It is one of	the most robust and feature-packed IDEs currently out on the market and has	useful features such as a built-in <a  href="http://www.nusphere.com/products/php_profiler.htm">source-code profiler</a> to find bottlenecks in your PHP source code and excellent integration with	third-party apps and services just as front-end code validation.
<p><a  href="http://www.nusphere.com/products/phped.htm"><img src="/Images/smashingmagazine3-08_phped.jpg" alt="08 Phped in 50 Extremely Useful PHP Tools" width="500" height="339" /></a></p>
</li>
<li><a  href="http://www.mpsoftware.dk/phpdesigner.php">phpDesigner</a><br />phpDesigner is a lightweight PHP editor/IDE that also	handles front-end code and markup remarkably well. Check out the phpDesigner <a  href="http://www.mpsoftware.dk/tutorials.php">online tutorials</a>, as well as <a  href="http://www.mpsoftware.dk/phpdesigner_screencasts.php">screencasts on phpDesigner</a> to help you learn more about the IDE.
<p><a  href="http://www.mpsoftware.dk/phpdesigner.php"><img src="/Images/smashingmagazine3-09_phpdesigner.jpg" alt="09 Phpdesigner in 50 Extremely Useful PHP Tools" width="350" height="300" /></a></p>
</li>
<li><a  href="http://www.zend.com/en/products/studio/">Zend	Studio</a><br />Zend Studio is an excellent PHP IDE for Eclipse. It&#8217;ll help	you develop, deploy and manage Rich Internet Applications (RIAs) in an	intuitive interface.
<p><a  href="http://www.zend.com/en/products/studio/"><img src="/Images/smashingmagazine3-10_zend_studio.jpg" alt="10 Zend Studio in 50 Extremely Useful PHP Tools" width="485" height="333" /></a></p>
</li>
<li><a  href="http://www.aptana.com/php">Aptana PHP</a><br />Aptana PHP is an open-source IDE extension/plug-in to be used	in conjunction with Aptana Studio. To learn more, be sure to check out the <a  href="http://www.aptana.com/docs/index.php/PHP">online documentation about	Aptana PHP</a>.</li>
<li><a  href="http://www.eclipse.org/pdt/">PDT</a><br />PDT is a PHP Development Tools framework that&#8217;s part of the	Eclipse project. PDT includes all the necessary tools for you to create PHP-based Web applications.</li>
<li><a  href="http://www.jcxsoftware.com/vs.php">VS.Php</a><br />VS.Php is a PHP IDE for MS Visual Studio, making it a great	IDE for recently converted ASP developers who have used MS VS to develop Web applications. To get you up and running ASAP with VS.Php, check out Jcx.Software&#8217;s <a  href="http://www.jcxsoftware.com/tutorials.php">online tutorials</a> as well	as its <a  href="http://www.jcxsoftware.com/jcx/vsphp/docs">online documentation</a>.</li>
<li><a  href="http://www.phpedit.com/">PHPEdit</a><br />PHPEdit is an excellent PHP editor/IDE with a ton of useful	features and a very intuitive user interface. To learn more about why PHPEdit	is a good IDE, read the <a  href="http://www.phpedit.com/Features/10-reasons-to-use-PHPEdit">10 reasons to	use PHPEdit</a> and view the <a  href="http://www.phpedit.com/Features/Screencasts/PHPEdit-3.0-Overview">introductory	screencast about PHPEdit</a>.</li>
</ul>
<h3>Sources and Resources</h3>
<ul>
<li><a  href="http://code.google.com/p/phpfr/">PHP Function Reference</a><br />PHP Function Reference (PHPfr) is a Mac OS X dashboard widget that provides a fast look-up of information about the PHP Web programming language.</li>
<li><a  href="http://phpimpact.wordpress.com/2008/05/29/30-useful-php-classes-and-components/">30 Useful PHP Classes and Components</a><br />30 useful PHP classes and components that you can use to test, develop, debug and deploy your PHP applications.</li>
<li><a  href="http://phpadvent.org/2008">PHP advent 2008</a><br />In December, phpadvent.org collected the wisdom of people in the PHP community who kindly donated their ideas and tips to see us through the new year.</li>
<li><a  href="http://www.sitepoint.com/blogs/2008/05/13/useful-in-browser-development-tools-for-php/">Useful in-browser development tools for PHP</a></li>
<li><a  href="http://www.phpclasses.org/">PHPClasses.org</a><br />A huge repository of various PHP classes.</li>
<li><a  href="http://mashable.com/2007/09/26/php-toolbox/">PHP Developer&#8217;s Toolbox</a><br />Various PHP-related resources in a brief overview.</li>
</ul>
<h3>Related articles</h3>
<p>You might also want to take a look at the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2008/12/09/50-really-useful-css-tools/">50 Extremely Useful And Powerful CSS Tools</a></li>
<li><a  href="http://www.smashingmagazine.com/2008/11/18/15-helpful-in-browser-web-development-tools/">15 Helpful In-Browser Web-Development Tools</a></li>
</ul>
<p><em>(al)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/50-extremely-useful-php-tools.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Useful WordPress Coding Techniques</title>
		<link>http://www.taiwangeek.com/2010-06/10-useful-wordpress-coding-techniques.html</link>
		<comments>http://www.taiwangeek.com/2010-06/10-useful-wordpress-coding-techniques.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 04:22:43 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/45-10-useful-wordpress-coding-techniques.html</guid>
		<description><![CDATA[Since last year, the WordPress themes market has grown incredibly. The reason? Great designs, of course, but also a lot of amazing new functionality. Top WordPress developers are always looking... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/10-useful-wordpress-coding-techniques.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since last year, the WordPress themes market has grown incredibly. The reason? Great designs, of course, but also a lot of amazing new functionality. Top WordPress developers are always looking to get the most out of WordPress and use all of their knowledge to find ways to make their favorite blogging engine even more powerful.</p>
<p>In this article, we have compiled <strong>10 useful WordPress code snippets, hacks and tips</strong> to help you create a WordPress theme that stands out from the crowd.</p>
<p>You may be interested in the following related posts:</p>
<ul>
<li><a  href="http://87.237.120.170/2009/07/02/power-tips-for-wordpress-template-developers/">Power Tips For WordPress Template Developers</a></li>
<li><a  href="http://87.237.120.170/2009/06/10/10-useful-wordpress-loop-hacks/">10 Useful WordPress Loop Hacks</a></li>
<li><a  href="http://87.237.120.170/2009/05/13/10-custom-fields-hacks-for-wordpress/">Custom Field Hacks For WordPress</a></li>
<li><a  href="http://87.237.120.170/2009/02/02/mastering-wordpress-shortcodes/">Mastering WordPress Shortcuts</a></li>
</ul>
<p>[Offtopic: by the way, did you know that Smashing Magazine has one of the most influential and popular Twitter accounts? Join our discussions and get updates about useful tools and resources — <a  href="http://creatives.commindo-media.de/www/delivery/ck.php?oaparams=2__bannerid=1252__zoneid=0__cb=c3f655874b__oadest=http%3A%2F%2Ftwitter.com%2Fsmashingmag">follow us on Twitter</a>!]</p>
<h3>1. Style Posts Individually</h3>
<p><img src="/Images/smashingmagazine3-sm11.jpg" width="500" height="333" alt="Sm11 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> Your blog has a lot of posts, but the posts aren&#8217;t all of the same type. To give special styling to one or more of your posts, you can take advantage of both the <code>post_class()</code> function and the post ID.</p>
<p><strong>The solution</strong>.<br /> To apply this trick, just open your <em>single.php</em> file, find the loop and replace it with the following:</p>
<pre class="brush: php"> &lt;?php if (have_posts()) : ?&gt; &lt;?php while (have_posts()) : the_post(); ?&gt; &lt;div &lt;?php post_class() ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt; &lt;h3&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt; &lt;?php the_content(); ?&gt; &lt;/div&gt; &lt;?php endwhile; else: ?&gt; &lt;?php _e('Sorry, no posts matched your criteria.'); ?&gt; &lt;?php endif; ?&gt;</pre>
<p><strong>Code explanation</strong>.<br /> The important part is mostly in line 3. Here, we have added the PHP <code>post_class()</code> function. Introduced in WordPress 2.8, this function adds CSS classes to the post. For example, it can add:</p>
<ul>
<li>.hentry</li>
<li>.sticky</li>
<li>.category-tutorials</li>
<li>.tag-wordpress</li>
</ul>
<p>With these CSS classes now added, you can now give a custom style to all posts that have the <code>sticky</code> tag or those that belong to the <code>tutorials</code> category.</p>
<p>The other important piece of this code is <code>id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;</code>. By displaying the ID of the post here, we&#8217;re able to style a particular post. As an example:</p>
<pre class="brush: php;"> #post-876{ 	background:#ccc; }</pre>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://justagirlintheworld.com/take-advantage-of-the-new-sticky-post-feature-in-wordpress-27/">Take advantage of the new post class</a></li>
</ul>
<h3>2. Display Related Posts&#8230; With Thumbnails!</h3>
<p><img src="/Images/smashingmagazine3-sm2.gif" width="500" height="261" alt="Sm2 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> After they have read your latest post, what do your readers do? That&#8217;s easy: most of them simply leave. A great way to keep them interested is to display a list of related posts. Many plug-ins can do that, but for those who like to know how things works, here is some nice code to get related posts and their thumbnails.</p>
<p><strong>The solution</strong>.<br /> Simply paste this code after the <code>the_content()</code> function in your <em>single.php</em> file:</p>
<pre class="brush: php;"> &lt;?php $original_post = $post; $tags = wp_get_post_tags($post-&gt;ID); if ($tags) {   echo '&lt;h2&gt;Related Posts&lt;/h2&gt;';   $first_tag = $tags[0]-&gt;term_id;   $args=array(     'tag__in' =&gt; array($first_tag),     'post__not_in' =&gt; array($post-&gt;ID),     'showposts'=&gt;4,     'caller_get_posts'=&gt;1    );   $my_query = new WP_Query($args);   if( $my_query-&gt;have_posts() ) {     echo &quot;&lt;ul&gt;&quot;;     while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post(); ?&gt;       &lt;li&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/timthumb/timthumb.php?src=&lt;?php echo get_post_meta($post-&gt;ID, &quot;post-img&quot;, true); ?&gt;&amp;h=40&amp;w=40&amp;zc=1&quot; alt=&quot;&quot; /&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;     &lt;?php endwhile;     echo &quot;&lt;/ul&gt;&quot;;   } } $post = $original_post; wp_reset_query(); ?&gt; </pre>
<p><strong>Code explanation</strong>.<br /> First, this code makes use of <a  href="http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/">TimbThumb</a>, a PHP image-resizing script. We have used it to automatically resize images to 40 by 40 pixels.</p>
<p>Once this code is pasted in your theme, it uses the first tag of the post to fetch related posts. In this example, four related posts are displayed. You can change this number on line 10.</p>
<p>Also, notice that I have cloned the <code>$post</code> variable at the beginning of the script and restored it at the end. This prevents problems that may occur with the loop, such as comments being assigned to the wrong post.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-show-related-posts-without-a-plugin">How to: Show related posts without a plug-in</a></li>
</ul>
<h3>3. Alternate Post Styling On Your Home Page</h3>
<p><img src="/Images/smashingmagazine3-sm3.jpg" width="500" height="355" alt="Sm3 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> Many new WordPress themes have an amazing way of displaying posts on the home page. For example, we can display the first three posts bigger than the rest, with images and extended text, with the remaining posts shown more simply.</p>
<p>I have seen many themes in which developers use two distinct loops to achieve this, which isn&#8217;t necessary and can cause further problems. Let&#8217;s use a much simpler method.</p>
<p><strong>The solution</strong>.<br /> Here is a custom loop that displays the first three posts different than the rest. You can replace the existing loop in your <em>index.php</em> file with this code.</p>
<pre class="brush: php;"> &lt;?php $postnum = 0; while (have_posts()) : the_post(); ?&gt; &lt;?php if ($postnum &lt;= 3){ ?&gt; &lt;div &lt;?php post_class() ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;   &lt;div class=&quot;date&quot;&gt;&lt;span&gt;&lt;?php the_time('M j') ?&gt;&lt;/span&gt;&lt;/div&gt;     &lt;h2&gt;(&lt;?php echo $postnum;?&gt;)&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt; 	&lt;div class=&quot;post-image&quot; style=&quot;text-align:center;&quot;&gt; 		&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory' ); ?&gt;/timthumb.php?src=&lt;?php  echo catch_that_image(); ?&gt;&amp;amp;w=500&amp;amp;h=200&amp;amp;zc=1&quot; alt=&quot;&lt;?php the_title(); ?&gt;&quot; /&gt;&lt;/a&gt; 	&lt;/div&gt; 	&lt;p&gt;&lt;?php the_content('Read the rest of this entry &amp;raquo;'); ?&gt;&lt;/p&gt; 	&lt;p class=&quot;more&quot;&gt;&lt;a href=&quot;#&quot;&gt;Read More&lt;/a&gt;&lt;/p&gt;   &lt;/div&gt; &lt;/div&gt; &lt;?php } else { &lt;div &lt;?php post_class( 'single ' . $end ); ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt; 	&lt;div class=&quot;post-content&quot;&gt; 		&lt;h3&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;(&lt;?php echo $postnum; ?&gt;)&lt;?php the_title(); ?&gt;&lt;/a&gt; &lt;?php edit_post_link('_', '', ''); ?&gt;&lt;/h3&gt; 		&lt;p&gt;&lt;?php the_excerpt( '' ); ?&gt;&lt;/p&gt; 		&lt;p class=&quot;more&quot;&gt;&lt;a href=&quot;#&quot;&gt;Read More ?&lt;/a&gt;&lt;/p&gt; 	&lt;/div&gt; &lt;/div&gt;&lt;!-- End post --&gt; &lt;?php } 	endwhile; 	?&gt; </pre>
<p><strong>Code explanation</strong>.<br /> Nothing hard here! We just created a PHP variable, named <code>$postnum</code>, which is invoked at the end of the loop. If <code>$postnum</code> is less than or equal to 3, the post is displayed in full. Otherwise, it is displayed in its more compact form.</p>
<h3>4. Using Multiple Loops</h3>
<p><img src="/Images/smashingmagazine3-sm4.jpg" width="500" height="151" alt="Sm4 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> When coding complex WordPress pages with more than one loop, it can happen that one of the loops doesn&#8217;t behave as expected: for example, unwanted offset, repeated posts, etc. Happily, with a bit of knowledge and a very useful function, we can avoid this.</p>
<p><strong>The solution</strong>.<br /> The following example features two distinct loops. Notice the <code>rewind_posts()</code> function on line 8. This example can be used on any WordPress file as is: <em>index.php</em>, <em>single.php</em>, etc.</p>
<pre class="brush: php;"> // First loop (get the last 3 posts in the "featured" category) &lt;?php query_posts('category_name=featured&amp;showposts=3'); ?&gt; &lt;?php while (have_posts()) : the_post(); ?&gt;   &lt;!-- Do stuff... --&gt; &lt;?php endwhile;?&gt; //loop reset &lt;?php rewind_posts(); ?&gt; //Second loop (Get all posts) &lt;?php while (have_posts()) : the_post(); ?&gt;   &lt;!-- Do stuff... --&gt; &lt;?php endwhile; ?&gt; </pre>
<p><strong>Code explanation</strong>.<br /> This piece of code doesn&#8217;t use any hacks; <code>rewind_posts()</code> is a standard WordPress function.</p>
<p>The purpose of <code>rewind_posts()</code> is to &#8220;clear&#8221; a loop that has been previously used (like the first loop in our example above), allowing you to use a second loop that isn&#8217;t affected by the first loop&#8217;s results.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.catswhocode.com/blog/multiple-wordpress-loops">Multiple WordPress Loops Explained</a></li>
</ul>
<h3>5. Overwrite Post Titles Easily</h3>
<p><img src="/Images/smashingmagazine3-sm4.jpg" width="500" height="230" alt="Sm4 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> <code>the_title()</code> is a basic but very useful WordPress function: it displays the post or page&#8217;s title. No more, no less. But hey, have you ever wished you were able to display the full title in your listing of posts and a custom title on the actual post&#8217;s page? If so, find out how right here.</p>
<p><strong>The solution</strong>.<br /> In your <em>single.php</em> file, find the call to the <code>the_title()</code> function and replace it with the following code:</p>
<pre class="brush: php;"> &lt;?php $title = get_post_meta($post-&gt;ID, &quot;custom-title&quot;, true); if ($title != &quot;&quot;) { 	echo &quot;&lt;h1&gt;&quot;.$title.&quot;&lt;/h1&gt;&quot;; } else { ?&gt; 	&lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt; &lt;?php } ?&gt; </pre>
<p>Once that&#8217;s done, you can rewrite the post&#8217;s title by creating a field named <code>custom-title</code>. Its value will be your custom title for this post.</p>
<p><strong>Code explanation</strong>.<br /> When this code loads, it retrieves the meta field named <code>custom-title</code>. If this meta field exists and isn&#8217;t blank, it is displayed as the post&#8217;s title. Otherwise, the <code>the_title()</code> function is called, and the post&#8217;s regular title is displayed.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/allow-title-overwrite-on-your-wordpress-blog">Allow title overwrite on your WordPress blog</a></li>
</ul>
<h3>6. Add Multiple Sidebars</h3>
<p><img src="/Images/smashingmagazine3-sm3.jpg" width="500" height="288" alt="Sm3 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> Sidebars are great because they allow you to display a lot of useful info, such as related posts, author info, a blog roll, 125&#215;125-pixel ad spaces and so on. But sidebars can quickly become very busy, and readers may be hard-pressed to find what they&#8217;re looking for. So, what about having different sidebars available and displaying the most appropriate one for the post?</p>
<p><strong>The solution</strong>.<br /> To apply this hack, duplicate your <em>sidebar.php</em> file and fill it with whatever information you would like to appear. Save the file as <em>sidebar-whatever.php</em>.</p>
<p>Once that&#8217;s done, open your <em>single.php</em><sup>*</sup> file and find the call to the <code>get_sidebar()</code> function:</p>
<pre class="brush: php;"> &lt;?php get_sidebar(); ?&gt; </pre>
<p>Replace it with:</p>
<pre class="brush: php;"> &lt;?php $sidebar = get_post_meta($post-&gt;ID, "sidebar", true); get_sidebar($sidebar); ?&gt; </pre>
<p>Now when you write a post, create a custom field named <code>sidebar</code>. Set its value as the name of the sidebar that you want to include. For example, if its value is <em>right</em>, WordPress will automatically include <em>sidebar-right.php</em> as a sidebar. </p>
<p> If no custom <em>sidebar</em> field is found, WordPress automatically includes the default sidebar.</p>
<p><em>*The same can be done with page.php.</em></p>
<p><strong>Code explanation</strong>.<br /> This trick is quite simple. The first thing we did was look for a custom field named <em>sidebar</em> and get its value as a variable. Then, the variable is used as a parameter for the WordPress function <code>get_sidebar()</code>, which allows us to specify a particular file to use as a sidebar.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/wordpress-hack-choose-the-sidebar-to-use-post-by-post">WordPress hack: Choose the sidebar to use, post by post</a></li>
</ul>
<h3>7. Display Content Only To Registered Users</h3>
<p><img src="/Images/smashingmagazine3-sm7.gif" width="500" height="82" alt="Sm7 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> As you probably know, WordPress lets you decide whether to allow readers to create accounts and sign in to your blog. If you want to increase your blog&#8217;s registered readers or would just like to reward existing readers, why not keep some content private, just for them?</p>
<p><strong>The solution</strong>.<br /> To achieve this hack, we&#8217;ll use a shortcode. The first step is to create it. Open your <em>functions.php</em> file and paste the following code:</p>
<pre class="brush: php;"> function member_check_shortcode($atts, $content = null) {   if (is_user_logged_in() &#038;&amp; !is_null($content) &#038;&amp; !is_feed()) {     return $content;   } else {     return 'Sorry, this part is only available to our members. Click here to become a member!'; } add_shortcode('member', 'member_check_shortcode'); </pre>
<p>Once that&#8217;s done, you can add the following to your posts to create a section or text (or any other content) that will be displayed only to registered users:</p>
<pre class="brush: php;"> [member] This text will be displayed only to registered users. [/member] </pre>
<p>That&#8217;s it. Registered users will see the text contained in the shortcode, while unregistered users will see a message asking them to register.</p>
<p><strong>Code explanation</strong>.<br /> The first thing we&#8217;ve done is create a function named <code>member_check_shortcode</code>, which checks whether the current user is logged in. If they are, then the text contained in the <code>[member]</code> shortcode is displayed. Otherwise, the message on line 5 is shown.</p>
<p>If you&#8217;d like to know more about WordPress shortcodes, you should definitely have a look at our <a  href="http://87.237.120.170/2009/02/02/mastering-wordpress-shortcodes/">Mastering WordPress Shortcodes</a> post.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://justintadlock.com/archives/2009/05/09/using-shortcodes-to-show-members-only-content">Using shortcodes to show members-only content</a></li>
<li><a  href="http://www.wprecipes.com/wordpress-shortcode-display-content-to-registered-users-only">WordPress shortcode: Display content to registered users only</a></li>
</ul>
<h3>8. Display Your Most Popular Content In The Sidebar</h3>
<p><img src="/Images/smashingmagazine3-sm8.jpg" width="500" height="185" alt="Sm8 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> If you want to feature your best content and help readers discover more articles from your blog, you might want to display a list of your most popular posts, based on the number of comments they&#8217;ve received, in your sidebar.</p>
<p><strong>The solution</strong>.<br /> This code is really easy to implement. Just paste it wherever you&#8217;d like your popular posts to appear. To get more or less than five posts, just change the value of the SQL <code>limit</code> clause on line 3.</p>
<pre class="brush: php;"> &lt;h2&gt;Popular Posts&lt;/h2&gt; &lt;ul&gt; &lt;?php $result = $wpdb-&gt;get_results(&quot;SELECT comment_count,ID,post_title FROM $wpdb-&gt;posts ORDER BY comment_count DESC LIMIT 0 , 5&quot;); foreach ($result as $post) { setup_postdata($post); $postid = $post-&gt;ID; $title = $post-&gt;post_title; $commentcount = $post-&gt;comment_count; if ($commentcount != 0) { ?&gt; &lt;li&gt;&lt;a href=&quot;&lt;?php echo get_permalink($postid); ?&gt;&quot; title=&quot;&lt;?php echo $title ?&gt;&quot;&gt; &lt;?php echo $title ?&gt;&lt;/a&gt; {&lt;?php echo $commentcount ?&gt;}&lt;/li&gt; &lt;?php } } ?&gt; &lt;/ul&gt; </pre>
<p><strong>Code explanation</strong>.<br /> In this code, we use the <code>$wpdb</code> object to send a custom SQL query to the WordPress database. Then we verify that the results aren&#8217;t empty (i.e. that no posts are without comments), and finally we display the list of posts.</p>
<p><strong>Sources</strong></p>
<ul>
<li><a  href="http://www.problogdesign.com/wordpress/create-your-own-popular-posts-page/">Create your own &#8220;Popular Posts&#8221; page</a></li>
<li><a  href="http://www.wprecipes.com/how-to-display-your-most-popular-content-in-your-blog-sidebar">How to: Display your most popular content in your blog sidebar</a></li>
</ul>
<h3>9. Create A Drop-Down Menu For Easy Tag Navigation</h3>
<p><img src="/Images/smashingmagazine3-sm91.jpg" width="478" height="156" alt="Sm91 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> Tags are cool because they allow you to categorize content using precise terms. But displaying tag clouds is a problem: they are ugly, not easy to use and can be extremely big.</p>
<p>So, what&#8217;s the solution? Simply create a drop-down menu for your tags. That way, they don&#8217;t get in the way, but people still have easy access to them.</p>
<p><strong>The solution</strong>.<br /> To create our drop-down menu of tags, we first have to paste the two functions below into the <em>functions.php</em> file of our WordPress theme:</p>
<pre class="brush: php;"> &lt;?php function dropdown_tag_cloud( $args = '' ) { 	$defaults = array( 		'smallest' =&gt; 8, 'largest' =&gt; 22, 'unit' =&gt; 'pt', 'number' =&gt; 45, 		'format' =&gt; 'flat', 'orderby' =&gt; 'name', 'order' =&gt; 'ASC', 		'exclude' =&gt; '', 'include' =&gt; '' 	); 	$args = wp_parse_args( $args, $defaults ); 	$tags = get_tags( array_merge($args, array('orderby' =&gt; 'count', 'order' =&gt; 'DESC')) ); // Always query top tags 	if ( empty($tags) ) 		return; 	$return = dropdown_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args 	if ( is_wp_error( $return ) ) 		return false; 	else 		echo apply_filters( 'dropdown_tag_cloud', $return, $args ); } function dropdown_generate_tag_cloud( $tags, $args = '' ) { 	global $wp_rewrite; 	$defaults = array( 		'smallest' =&gt; 8, 'largest' =&gt; 22, 'unit' =&gt; 'pt', 'number' =&gt; 45, 		'format' =&gt; 'flat', 'orderby' =&gt; 'name', 'order' =&gt; 'ASC' 	); 	$args = wp_parse_args( $args, $defaults ); 	extract($args); 	if ( !$tags ) 		return; 	$counts = $tag_links = array(); 	foreach ( (array) $tags as $tag ) { 		$counts[$tag-&gt;name] = $tag-&gt;count; 		$tag_links[$tag-&gt;name] = get_tag_link( $tag-&gt;term_id ); 		if ( is_wp_error( $tag_links[$tag-&gt;name] ) ) 			return $tag_links[$tag-&gt;name]; 		$tag_ids[$tag-&gt;name] = $tag-&gt;term_id; 	} 	$min_count = min($counts); 	$spread = max($counts) - $min_count; 	if ( $spread &lt;= 0 ) 		$spread = 1; 	$font_spread = $largest - $smallest; 	if ( $font_spread &lt;= 0 ) 		$font_spread = 1; 	$font_step = $font_spread / $spread; 	// SQL cannot save you; this is a second (potentially different) sort on a subset of data. 	if ( 'name' == $orderby ) 		uksort($counts, 'strnatcasecmp'); 	else 		asort($counts); 	if ( 'DESC' == $order ) 		$counts = array_reverse( $counts, true ); 	$a = array(); 	$rel = ( is_object($wp_rewrite) &amp;&amp; $wp_rewrite-&gt;using_permalinks() ) ? ' rel="tag"' : ''; 	foreach ( $counts as $tag =&gt; $count ) { 		$tag_id = $tag_ids[$tag]; 		$tag_link = clean_url($tag_links[$tag]); 		$tag = str_replace(' ', '&amp;nbsp;', wp_specialchars( $tag )); 		$a[] = "\t&lt;option value='$tag_link'&gt;$tag ($count)&lt;/option&gt;"; 	} 		switch ( $format ) : 	case 'array' : 		$return =&amp; $a; 		break; 	case 'list' : 		$return = "&lt;ul class='wp-tag-cloud'&gt;\n\t&lt;li&gt;"; 		$return .= join("&lt;/li&gt;\n\t&lt;li&gt;", $a); 		$return .= "&lt;/li&gt;\n&lt;/ul&gt;\n"; 		break; 	default : 		$return = join("\n", $a); 		break; 	endswitch; 	return apply_filters( 'dropdown_generate_tag_cloud', $return, $tags, $args ); } ?&gt; </pre>
<p>Once you&#8217;ve pasted this function in your <em>functions.php</em> file, you can use it to create your drop-down menu of tags. Just open the file where you want the list to be displayed and paste the following code:</p>
<pre class="brush: php;"> &lt;select name="tag-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"&gt; 	&lt;option value="#"&gt;Liste d'auteurs&lt;/option&gt; 	&lt;?php dropdown_tag_cloud('number=0&amp;order=asc'); ?&gt; &lt;/select&gt;</pre>
<p><strong>Code explanation</strong>.<br /> To achieve this hack, we take the <code>wp_tag_cloud()</code> WordPress function and rewrite it to make it display tags in an HTML &#8220;Select&#8221; element.</p>
<p>Then, we just call the newly created <code>dropdown_tag_cloud()</code> in our theme to display the drop-down menu items.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.catswhocode.com/blog/top-10-wordpress-hacks-from-june-09">Top 10 WordPress hacks from June &#8216;09</a></li>
</ul>
<h3>10. Auto-Resize Images Using TimThumb And WordPress Shortcodes</h3>
<p><img src="/Images/smashingmagazine3-sm10.jpg" width="500" height="191" alt="Sm10 in 10 Useful WordPress Coding Techniques" /></p>
<p><strong>The problem</strong>.<br /> A good blog post needs images, whether screenshots or simple eye-candy. Readers always prefer articles with nice pictures to plain boring text.</p>
<p>But images can be a pain to deal with, especially because of their various sizes. So how about we create a WordPress shortcode that uses Timthumb to automatically resize images?</p>
<p><strong>The solution</strong>.<br /> The first thing to do is create the shortcode. Paste the following code in your <em>functions.php</em> file:</p>
<pre class="brush: php;"> function imageresizer( $atts, $content = null ) { 	return '&lt;img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2009/10//timthumb/timthumb.php?src='.$content.'&amp;w=590" alt="" /&gt;'; } add_shortcode('img', 'imageresizer');</pre>
<p>Now, you can use the following syntax to add an automatically resized image to your blog post:</p>
<pre class="brush: php;">[img]http://www.yoursite.com/yourimage.jpg[/img]</pre>
<p><strong>Code explanation</strong>.<br /> You have probably already noticed how cool WordPress shortcodes are and how they make your blogging life easier. This code simply creates a shortcode that takes a single parameter: the image&#8217;s URL. Please notice that <strong>it&#8217;s not a good idea to resize large images this way</strong> as it unnecessarily increases the server load &ndash; in such cases it&#8217;s better to create and upload smaller images instead.</p>
<p>TimThumb resizes the image to 590 pixels wide, as specified on line 2 <code>(w=590)</code>. Of course, you can change this value or add a height parameter (e.g. <code>h=60</code>).</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.catswhocode.com/blog/top-10-wordpress-hacks-from-june-09">Top 10 WordPress hacks from June &#8216;09</a></li>
</ul>
<h3>Related posts</h3>
<p>You may be interested in the following related posts:</p>
<ul>
<li><a  href="http://www.smashingmagazine.com/2009/07/23/10-wordpress-comments-hacks/">10 Handy WordPress Comments Hacks</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/07/02/power-tips-for-wordpress-template-developers/">Power Tips For WordPress Template Developers</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/06/10/10-useful-wordpress-loop-hacks/">10 Useful WordPress Loop Hacks</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/05/13/10-custom-fields-hacks-for-wordpress/">Custom Field Hacks For WordPress</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/03/04/15-useful-twitter-plugins-and-hacks-for-wordpress/">15 Useful Twitter Hacks and Plugins For WordPress</a></li>
<li><a  href="http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/">Mastering WordPress Shortcuts</a></li>
</ul>
<h4>About the Author</h4>
<p><em>This guest post was written by Jean-Baptiste Jung, a 27-year-old WordPress expert from the French-speaking part of Belgium. He blogs about WordPress at <a  href="http://www.wprecipes.com">WpRecipes</a>, about practical Web development tips at <a  href="http://www.catswhocode.com">Cats Who Code</a> and about blogging at <a  href="http://www.catswhoblog.com">Cats Who Blog</a>. You can stay in touch with Jean by following him on <a  href="http://twitter.com/catswhocode">Twitter</a>.</em></p>
<p><em>(al)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/10-useful-wordpress-coding-techniques.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Fields Hacks For WordPress</title>
		<link>http://www.taiwangeek.com/2010-06/custom-fields-hacks-for-wordpress.html</link>
		<comments>http://www.taiwangeek.com/2010-06/custom-fields-hacks-for-wordpress.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 04:22:30 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/23-custom-fields-hacks-for-wordpress.html</guid>
		<description><![CDATA[In our previous articles on WordPress hacks, we discussed the incredible flexibility of WordPress, which is one of the biggest reasons for its popularity among bloggers worldwide. Custom fields in... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/custom-fields-hacks-for-wordpress.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In our previous articles on WordPress hacks, we discussed the incredible flexibility of WordPress, which is one of the biggest reasons for its popularity among bloggers worldwide. <strong>Custom fields</strong> in particular, which let users create variables and add custom values to them, are one of the reasons for WordPress&#8217; flexibility.</p>
<p>In this article, we&#8217;ve compiled a list of <strong>10 useful things that you can do with custom fields in WordPress</strong>. Among them are setting expiration time for posts, defining how blog posts are displayed on the front page, displaying your mood or music, embedding custom CSS styles, disabling search engine indexing for individual posts, inserting a “Digg this” button only when you need it and, of course, displaying thumbnails next to your posts</p>
<p>[Offtopic: by the way, did you know that Smashing Magazine has one of the most influential and popular Twitter accounts? Join our discussions and get updates about useful tools and resources — <a  href="http://creatives.commindo-media.de/www/delivery/ck.php?oaparams=2__bannerid=1252__zoneid=0__cb=c3f655874b__oadest=http%3A%2F%2Ftwitter.com%2Fsmashingmag">follow us on Twitter</a>!]</p>
<h3>1. Set An Expiration Time For Posts</h3>
<p><img src="/Images/smashingmagazine3-sm2.jpg" alt="Sm2 in Custom Fields Hacks For WordPress" /><br /> <em>Image source: <a  href="http://www.ludimaginary.net/photograph-219.html">Richard Vantielcke</a></em></p>
<p><strong>The problem.</strong> Sometimes (for example, if you&#8217;re running a contest), you want to be able to publish a post and then automatically stop displaying it after a certain date. This may seem quite hard to do but in fact is not, using the power of custom fields.</p>
<p><strong>The solution.</strong> Edit your theme and replace your current WordPress loop with this &#8220;hacked&#8221; loop:</p>
<pre class="brush: php;">&lt;?php if (have_posts()) :      while (have_posts()) : the_post(); ?&gt;          $expirationtime = get_post_custom_values('expiration');          if (is_array($expirationtime)) {              $expirestring = implode($expirationtime);          }          $secondsbetween = strtotime($expirestring)-time();          if ( $secondsbetween &gt; 0 ) {              // For example...              the_title();              the_excerpt();          }      endwhile; endif; ?&gt;</pre>
<p>To create a post set to expire at a certain date and time, just create a custom field. Specify <em>expiration</em> as a key and your date and time as a value (with the format <strong>mm/dd/yyyy 00:00:00</strong>). The post will not show up after the time on that stamp.</p>
<p><strong>Code explanation.</strong> This code is simply a custom WordPress loop that automatically looks to see if a custom field called <em>expiration</em> is present. If one is, its value is compared to the current date and time.</p>
<p>If the current date and time is equal to or earlier than the value of the custom <em>expiration</em> field, then the post is not displayed.</p>
<p>Note that this code does not remove or unpublish your post, but just prevents it from being displayed in the loop.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-set-post-expiration-datetime-on-your-wordpress-blog">How to: Set a post&#8217;s expiration date and time on your WordPress blog</a></li>
</ul>
<h3>2. Define How Blog Posts Are Displayed On The Home Page</h3>
<p><img src="/Images/smashingmagazine3-sm3.jpg" alt="Sm3 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> I&#8217;ve always wondered why 95% of bloggers displays <em>all</em> of their posts the same way on their home page. Sure, WordPress has no built-in option to let you define how a post is displayed. But wait: with custom fields, we can do it easily.</p>
<p><strong>The solution.</strong> The following hack lets you define how a post is displayed on your home page. Two values are possible:</p>
<ul>
<li>Full post</li>
<li>Post excerpt only</li>
</ul>
<p>Once more, we&#8217;ll use a custom WordPress loop. Find the loop in your <em>index.php</em> file and replace it with the following code:</p>
<pre class="brush: php;">&lt;?php if (have_posts()) :     while (have_posts()) : the_post();          $customField = get_post_custom_values("full");        	 if (isset($customField[0])) {               //Custom field is set, display a full post               the_title();               the_content();          } else {               // No custom field set, let's display an excerpt               the_title();               the_excerpt();     endwhile; endif; ?&gt;</pre>
<p>In this code, excerpts are displayed by default. To show full posts on your home page, simply edit the post and create a custom field called <em>full</em> and give it any value.</p>
<p><strong>Code explanation.</strong> This code is rather simple. The first thing it does is look for a custom field called <em>full</em>. If this custom field is set, full posts are displayed. Otherwise, only excerpts are shown.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-manually-define-to-show-full-post-or-excerpt-on-your-homepage">How to: Manually define whether to show full posts or excerpts on your home page</a></li>
</ul>
<h3>3. Display Your Mood Or The Music You&#8217;re Listening To</h3>
<p><img src="/Images/smashingmagazine3-sm4.jpg" alt="Sm4 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> About five or six years ago, I was blogging on a platform called LiveJournal. Of course it wasn&#8217;t great as WordPress, but it had nice features that WordPress doesn&#8217;t have. For example, it allowed users to display their current mood and the music they were listening to while blogging.</p>
<p>Even though I wouldn&#8217;t use this feature on my blog, I figure many bloggers would be interested in knowing how to do this in WordPress.</p>
<p><strong>The solution.</strong> Open your <em>single.php</em> file (or modify your <em>index.php</em> file), and paste the following code anywhere within the loop:</p>
<pre class="brush: php;">$customField = get_post_custom_values("mood"); if (isset($customField[0])) {     echo "Mood: ".$customField[0]; }</pre>
<p>Save the file. Now, when you write a new post, just create a custom field called <em>mood</em>, and type in your current mood as the value.</p>
<p><strong>Code explanation.</strong> This is a very basic use of custom fields, not all that different from the well-known hack for displaying thumbnails beside your posts&#8217; excerpts on the home page. It looks for a custom field called <em>mood</em>. If the field is found, its value is displayed.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-display-your-current-mood-on-your-posts">How to: Display your current mood on your posts</a></li>
</ul>
<h3>4. Add Meta Descriptions To Your Posts</h3>
<p><img src="/Images/smashingmagazine3-sm5.png" alt="Sm5 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> WordPress, surprisingly, does not use meta description tags by default.</p>
<p>Sure, for SEO, meta tags are not as important as they used to be. Yet still, they can enhance your blog&#8217;s search engine ranking nevertheless.</p>
<p>How about using custom fields to create meta description tags for individual posts?</p>
<p><strong>The solution.</strong> Open your <em>header.php</em> file. Paste the following code anywhere within the &lt;head&gt; and &lt;/head&gt; tags:</p>
<pre class="brush: php;">&lt;meta name="description" content=" &lt;?php if ( (is_home()) || (is_front_page()) ) {     echo ('Your main description goes here'); } elseif(is_category()) {     echo category_description(); } elseif(is_tag()) {     echo '-tag archive page for this blog' . single_tag_title(); } elseif(is_month()) {     echo 'archive page for this blog' . the_time('F, Y'); } else {     echo get_post_meta($post-&gt;ID, "Metadescription", true); }?&gt;"&gt;</pre>
<p><strong>Code explanation.</strong> To generate meta descriptions, this hack makes extensive use of WordPress conditional tags to determine which page the user is on.</p>
<p>For category pages, tag pages, archives and the home page, a static meta description is used. Edit lines 3, 7 and 9 to define your own. For posts, the code looks for a custom field called <em>Metadescription</em> and use its value for the meta description.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.malcolmcoles.co.uk/blog/unique-meta-description-and-meta-keywords-in-your-wordpress-themes/">Unique meta description and meta keyword tags in your WordPress themes </a></li>
<li><a  href="http://www.wprecipes.com/how-to-create-a-meta-description-function-for-your-wordpress-blog">How to: Create a meta description function for your WordPress blog</a></li>
</ul>
<h3>5. Link To External Resources</h3>
<p><img src="/Images/smashingmagazine3-sm6.jpg" alt="Sm6 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> Many bloggers have asked me the following question: &#8220;How can I link directly to an external source, rather than creating a post just to tell visitors to visit another website?&#8221;</p>
<p>The solution to this problem is to use custom fields. Let&#8217;s see how we can do that.</p>
<p><strong>The solution.</strong> The first thing to do is open your <em>functions.php</em> file and paste in the following code:</p>
<pre class="brush: php;">function print_post_title() { 	global $post; 	$thePostID = $post-&gt;ID; 	$post_id = get_post($thePostID); 	$title = $post_id-&gt;post_title; 	$perm  = get_permalink($post_id); 	$post_keys = array(); $post_val  = array(); 	$post_keys = get_post_custom_keys($thePostID); 	if (!empty($post_keys)) {   	  foreach ($post_keys as $pkey) {     	    if ($pkey=='url1' || $pkey=='title_url' || $pkey=='url_title') {       	      $post_val = get_post_custom_values($pkey);     	    }   	  }   	  if (empty($post_val)) {     	    $link = $perm;   	  } else {     	    $link = $post_val[0];   	  } 	} else {   	  $link = $perm; 	} 	echo '&lt;h2&gt;&lt;a href="'.$link.'" rel="bookmark" title="'.$title.'"&gt;'.$title.'&lt;/a&gt;&lt;/h2&gt;'; }</pre>
<p>Once that&#8217;s done, open your <em>index.php</em> file and replace the standard code for printing titles&#8230;</p>
<pre class="brush: php;">&lt;h2&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;</pre>
<p>&#8230; with a call to our newly created <em>print_post_title()</em> function:</p>
<pre class="brush: php;">&lt;?php print_post_title() ?&gt;</pre>
<p>Now, whenever you feel like pointing one of your posts&#8217; titles somewhere other than your own blog, just scroll down in your post editor and create or select a custom key called <em>url1</em> or <em>title_url</em> or <em>url_title</em> and put the external URL in the value box.</p>
<p><strong>Code explanation.</strong> This is a nice custom replacement function for the <em>the_title()</em> WordPress function.</p>
<p>Basically, this function does the same thing as the good old <em>the_title()</em> function, but also looks for a custom field. If a custom field called <em>url1</em> or <em>title_url</em> or <em>url_title</em> is found, then the title link will lead to the external website rather than the blog post. If the custom field isn&#8217;t found, the function simply displays a link to the post itself.</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.istudioweb.com/hacking-wordpress-theme-external-url-for-post-title-2008-01-12/">Hacking WordPress theme: external URL for post title</a></li>
<li><a  href="http://www.wprecipes.com/how-to-link-to-some-external-ressource-in-post-title">How to: Link to an external resource in the post&#8217;s title</a></li>
</ul>
<h3>6. Embed Custom CSS Styles</h3>
<p><img src="/Images/smashingmagazine3-sm7.jpg" alt="Sm7 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> Certain posts sometimes require additional CSS styling. Sure, you can switch WordPress&#8217; editor to HTML mode and add inline styling to your post&#8217;s content. But even when inline styling is useful, it isn&#8217;t always the cleanest solution.</p>
<p>With custom fields, we can easily create new CSS classes for individual posts and make WordPress automatically add them to the blog&#8217;s header.</p>
<p><strong>The solution.</strong> First, open your <em>header.php</em> file and insert the following code between the <em>&lt;head&gt;</em> and <em>&lt;/head&gt;</em> HTML tags:</p>
<pre class="brush: php;">&lt;?php if (is_single()) {     $css = get_post_meta($post-&gt;ID, 'css', true);     if (!empty($css)) { ?&gt;         &lt;style type="text/css"&gt;         &lt;?php echo $css; ?&gt;         &lt;style&gt;     &lt;?php } } ?&gt;</pre>
<p>Now, when you write a post or page that requires custom CSS styling, just create a custom field called <em>css</em> and paste in your custom CSS styling as the value. As simple as that!</p>
<p><strong>Code explanation.</strong> First, the code above makes sure we&#8217;re on an actual post&#8217;s page by using WordPress&#8217; conditional tag <em>is_single()</em>. Then, it looks for a custom field called <em>css</em>. If one is found, its value is displayed between <em>&lt;style&gt;</em> and <em>&lt;/style&gt;</em> tags.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-embed-css-in-your-posts-with-a-custom-field">How to: Embed CSS in your posts with a custom field</a></li>
</ul>
<h3>7. Re-Define The &lt;title&gt; Tag</h3>
<p><img src="/Images/smashingmagazine3-sm1.jpg" alt="Sm1 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> On blogs, as on every other type of website, content is king. And SEO is very important for achieving your goals with traffic. By default, most WordPress themes don&#8217;t have an optimized &lt;title&gt; tag.</p>
<p>Some plug-ins, such as the well-known &#8220;All in One SEO Pack,&#8221; override this, but you can also do it with a custom field.</p>
<p><strong>The solution.</strong> Open your <em>header.php</em> file for editing. Find the &lt;title&gt; tag and replace it with the following code:</p>
<pre class="brush: php;">&lt;title&gt; &lt;?php if (is_home () ) {     bloginfo('name'); } elseif ( is_category() ) {     single_cat_title(); echo ' - ' ; bloginfo('name'); } elseif (is_single() ) {     $customField = get_post_custom_values("title");     if (isset($customField[0])) {         echo $customField[0];     } else {         single_post_title();     } } elseif (is_page() ) {     bloginfo('name'); echo ': '; single_post_title(); } else {     wp_title('',true); } ?&gt; &lt;/title&gt;</pre>
<p>Then, if you want to define a custom title tag, simply create a custom field called <em>title</em>, and enter your custom title as a value.</p>
<p><strong>Code explanation.</strong> With this code, I have used lots of template tags to generate a custom &lt;title&gt; tag for each kind of post: home page, page, category page and individual posts.</p>
<p>If the active post is an individual post, the code looks for a custom field called <em>title</em>. If one is found, its value is displayed as the title. Otherwise, the code uses the standard <em>single_post_title()</em> function to generate the post&#8217;s title.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-redifine-title-tag-with-a-custom-field">How to: Redefine the title tag with a custom field</a></li>
</ul>
<h3>8. Disable Search Engine Indexing For Individual Posts</h3>
<p><img src="/Images/smashingmagazine3-sm8.jpg" alt="Sm8 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> Have you ever wanted to create semi-private posts, accessible to your regular readers but not to search engines? If so, one easy solution is to&#8230; you guessed it! Use a custom field.</p>
<p><strong>The solution.</strong> First, get the ID of the post that you&#8217;d not like to be indexed by search engines. We&#8217;ll use a post ID of 17 for this example.</p>
<p>Open your <em>header.php</em> file and paste the following code between the &lt;head&gt; and  &lt;/head&gt; tags:</p>
<pre class="brush: php;"> &lt;?php $cf = get_post_meta($post-&gt;ID, 'noindex', true);     if (!empty($cf)) {     echo '&lt;meta name="robots" content="noindex"/&gt;'; } ?&gt;</pre>
<p>That&#8217;s all. Pretty useful if you want certain info to be inaccessible to search engines!</p>
<p><strong>Code explanation.</strong> In this example, we used the <em>get_post_meta()</em> function to retrieve the value of a custom field called <em>noindex</em>. If the custom field is set, then a <em>&lt;meta name=&#8221;robots&#8221; content=&#8221;noindex&#8221;/&gt;</em> tag is added.</p>
<p><strong>Source:</strong></p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-disable-search-engine-indexing-on-a-single-post">How to: disable search engine indexing of a single post</a></li>
</ul>
<h3>9. Get Or Print Any Custom Field Value Easily With A Custom Function</h3>
<p><img src="/Images/smashingmagazine3-sm9.jpg" alt="Sm9 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> Now that we&#8217;ve shown you lot of great things you can do with custom fields, how about an automated function for easily getting custom fields values?</p>
<p>Getting custom field values isn&#8217;t hard for developers or those familiar with PHP, but can be such a pain for non-developers. With this hack, getting any custom field value has never been easier.</p>
<p><strong>The solution.</strong> Here&#8217;s the function. Paste it into your theme&#8217;s <em>functions.php</em> file. If your theme doesn&#8217;t have this file, create it.</p>
<pre class="brush: php;">function get_custom_field_value($szKey, $bPrint = false) { 	global $post; 	$szValue = get_post_meta($post-&gt;ID, $szKey, true); 	if ( $bPrint == false ) return $szValue; else echo $szValue; }</pre>
<p>Now, to call the function and get your custom field value, use the following code:</p>
<pre class="brush: php;">&lt;?php if ( function_exists('get_custom_field_value') ){         get_custom_field_value('featured_image', true); } ?&gt;</pre>
<p><strong>Code explanation.</strong> First, we use the PHP <em>function_exists()</em> function to make sure the <em>get_custom_field_value</em> function is defined in our theme. If it is, we use it. The first argument is the custom field name (here, <em>featured_image</em>), and the second lets you echo the value (true) or call it for further PHP use (false).</p>
<p><strong>Sources:</strong></p>
<ul>
<li><a  href="http://www.mattvarone.com/wordpress/useful-functions-for-wordpress/">Useful custom functions for WordPress</a></li>
<li><a  href="http://www.wprecipes.com/how-to-easily-get-the-value-of-a-custom-field">How to: Easily get the value of a custom field</a></li>
</ul>
<h3>10. Insert A &#8220;Digg This&#8221; Button Only When You Need It</h3>
<p><img src="/Images/smashingmagazine3-sm10.png" alt="Sm10 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem.</strong> To get traffic from well-known Digg.com, a good idea is to integrate its &#8220;Digg this&#8221; button into your posts so that readers can contribute to the posts&#8217; success.</p>
<p>But do <em>all</em> of your posts need this button? Definitely not. For example, if you write an announcement telling readers about improvements to your website, submitting the post to Digg serves absolutely no value.</p>
<p><strong>The solution.</strong> Custom fields to the rescue once again. Just follow these steps to get started:</p>
<ol>
<li>Open your <em>single.php</em> file and paste these lines where you want your &#8220;Digg this&#8221; button to be displayed:
<pre class="brush: php;">&lt;?php $cf = get_post_meta($post-&gt;ID, 'digg', true);   if (!emptyempty($cf)) {   echo 'http://digg.com/tools/diggthis.js" type="text/javascript"&gt;'} ?&gt;</pre>
</li>
<li>Once you&#8217;ve saved the <em>single.php</em> file, you can create a custom field called <em>digg</em> and give it any value. If set, a Digg button will appear in the post.</li>
</ol>
<p><strong>Code explanation.</strong> This code is very simple. Upon finding a custom field called <em>digg</em>, the code displays the &#8220;Digg this&#8221; button. The JavaScript used to display the &#8220;Digg this&#8221; button is provided by Digg itself.</p>
<h3>Bonus: Display Thumbnails Next To Your Posts</h3>
<p><img src="/Images/smashingmagazine3-sm11.png" alt="Sm11 in Custom Fields Hacks For WordPress" /></p>
<p><strong>The problem</strong> Most people knows this trick and have implemented it successfully on their WordPress-powered blogs. But I figure some people still may not know how to display nice thumbnails right next to the posts on their home page.</p>
<p>To view examples of this well-known trick, visit my blogs <a  href="http://www.wprecipes.com">WpRecipes</a> and <a  href="http://www.catswhocode.com">Cats Who Code</a>.</p>
<p><strong>The solution.</strong></p>
<ol>
<li>Start by creating a default image in Photoshop or Gimp. The size in my example is 200&#215;200 pixels but is of course up to you. Name the image <em>default.gif</em>.</li>
<li>Upload your <em>default.gif</em> image to the <em>image</em> directory in your theme.</li>
<li>Open the <em>index.php</em> file and paste in the following code where you&#8217;d like the thumbnails to be displayed:
<pre class="brush: php;">&lt;?php $postimageurl = get_post_meta($post-&gt;ID, 'post-img', true); if ($postimageurl) { ?&gt;       &lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark"&gt;&lt;img src="&lt;?php echo $postimageurl; ?&gt;" alt="Post Pic" width="200" height="200" /&gt;&lt;/a&gt; &lt;?php } else { ?&gt;       &lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark"&gt;&lt;img src="&lt;?php bloginfo('template_url'); ?&gt;/images/wprecipes.gif" alt="Screenshot" width="200" height="200" /&gt;&lt;/a&gt; &lt;?php } ?&gt;</pre>
</li>
<li>Save the file.</li>
<li>In each of your posts, create a custom field called <em>post-img</em>. Set its value as the URL of the image you&#8217;d like to display as a thumbnail.</li>
</ol>
<p><strong>Code explanation</strong> The code looks for a custom field called <em>post-img</em>. If found, its value is used to display a custom thumbnail.</p>
<p>In case a <em>post-img</em> custom field is not found, the default image is used, so you&#8217;ll never have any posts without thumbnails.</p>
<h3>More Custom Field Resources</h3>
<ul>
<li><a  href="http://www.tutorial9.net/web-tutorials/add-thumbnails-to-wordpress-with-custom-fields/">Add Thumbnails to WordPress with Custom Fields</a><br /> A very detailed article about adding thumbnails to your posts with custom fields. A great follow-up to the last hack we showed!</li>
<li><a  href="http://www.kriesi.at/archives/how-to-use-wordpress-custom-fields">How to Use WordPress Custom Fields</a><br /> Want to know more about custom fields? Then this article is definitely for you.</li>
<li><a  href="http://wefunction.com/2008/10/tutorial-creating-custom-write-panels-in-wordpress/">Creating Custom Write Panels in WordPress</a><br /> A very detailed tutorial on creating custom write panels in WordPress using custom fields.</li>
<li><a  href="http://wordpress.org/extend/plugins/custom-shortcodes/">Custom Shortcodes</a><br /> A cool WordPress plug-in for managing custom fields using the insert shortcodes.</li>
<li><a  href="http://wordpress.org/extend/plugins/more-fields/">More Fields</a><br /> The More Fields plug-in allows you to create more user-friendly custom fields. Definitely interesting for when you create WordPress-powered websites for clients!</li>
</ul>
<p><em>(al)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/custom-fields-hacks-for-wordpress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>53 CSS-Techniques You Couldn&#8217;t Live Without</title>
		<link>http://www.taiwangeek.com/2010-06/53-css-techniques-you-couldnt-live-without.html</link>
		<comments>http://www.taiwangeek.com/2010-06/53-css-techniques-you-couldnt-live-without.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 04:22:59 +0000</pubDate>
		<dc:creator>tung</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[techniques]]></category>

		<guid isPermaLink="false">http://www.taiwangeek.com/72-53-css-techniques-you-couldnt-live-without.html</guid>
		<description><![CDATA[CSS is important. And it is being used more and more often. Cascading Style Sheets offer many advantages you don&#8217;t have in table-layouts &#8211; and first of all a strict... <a class="meta-more" href="http://www.taiwangeek.com/2010-06/53-css-techniques-you-couldnt-live-without.html">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>CSS is important. And it is being used more and more often. Cascading Style Sheets offer many advantages you don&#8217;t have in table-layouts &#8211; and first of all a strict separation between layout, or design of the page, and the information, presented on the page. Thus the design of pages can be easily changed, just replacing a css-file with another one. Isn&#8217;t it great? Well, actually, it is.</p>
<p>Over the last few years web-developers have written many articles about CSS and developed many useful techniques, which can save you a lot of time &#8211; of course, if you are able to find      them in time. Below you&#8217;ll find a list of techniques we , as web-architects, really couldn&#8217;t live without. They are essential and they indeed make our life easier. Let&#8217;s take a look at <strong>53 CSS-based techniques you should always have ready to hand if you develop web-sites</strong>. <em>Links checked: June/11 2008.</em></p>
<p>You might want to take a look at the article <a  href="http://www.smashingmagazine.com/2008/02/21/powerful-css-techniques-for-effective-coding/">Powerful CSS-Techniques For Effective Coding</a>.</p>
<p>1. <a  href="http://www.nundroo.com/navigation/">CSS Based Navigation</a></p>
<p><a  href="http://www.nundroo.com/navigation/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0000.gif" alt="Css-techniques0000 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>2. <a  href="http://superfluousbanter.org/archives/2004/05/navigation-matrix-reloaded/">Navigation Matrix Reloaded</a></p>
<p><a  href="http://superfluousbanter.org/archives/2004/05/navigation-matrix-reloaded/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0001.gif" alt="Css-techniques0001 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>3. <a  href="http://exploding-boy.com/images/cssmenus/menus.html">CSS Tabs</a></p>
<p><a  href="http://exploding-boy.com/images/cssmenus/menus.html"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0002.gif" alt="Css-techniques0002 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>4. <a  href="http://applestooranges.com/blog/post/css-for-bar-graphs/?id=55">CSS For Bar Graphs</a></p>
<p><a  href="http://applestooranges.com/blog/post/css-for-bar-graphs/?id=55"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0003.gif" alt="Css-techniques0003 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>5. <a  href="http://icant.co.uk/sandbox/footercollapsetables/">Collapsing Tables: An Example</a></p>
<p><a  href="http://icant.co.uk/sandbox/footercollapsetables/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0004.gif" alt="Css-techniques0004 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>6. <a  href="http://www.flog.co.nz/lab/ARC/ARC.htm">Adam&#8217;s Radio &amp; Checkbox Customisation Method</a></p>
<p><a  href="http://www.flog.co.nz/lab/ARC/ARC.htm"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0005.gif" alt="Css-techniques0005 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>7. <a  href="http://www.mezzoblue.com/tests/revised-image-replacement/">CSS Image Replacement</a></p>
<p><a  href="http://www.mezzoblue.com/tests/revised-image-replacement/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0006.gif" alt="Css-techniques0006 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>8. CSS Shadows (<a  href="http://web-graphics.com/mtarchive/001589.php">CSS Shadows Roundup</a>)</p>
<p><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0007.gif" alt="Css-techniques0007 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></p>
<p>9. <a  href="http://www.smileycat.com/miaow/archives/000044.php#nojavascript">CSS Rounded Corners Roundup</a> (<a  href="http://www.smileycat.com/miaow/archives/000044.php#nojavascript">Nifty Corners</a>)</p>
<p><a  href="http://www.smileycat.com/miaow/archives/000044.php#nojavascript"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0008.gif" alt="Css-techniques0008 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>10. Drop Cap &#8211; Capital Letters with CSS</p>
<p><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0009.gif" alt="Css-techniques0009 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></p>
<p>11. Define Image Opacity with CSS</p>
<p><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0010.gif" alt="Css-techniques0010 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></p>
<p>12. <a  href="http://www.smileycat.com/miaow/archives/000230.php">How to Create a Block Hover Effect for a List of Links</a></p>
<p><a  href="http://www.smileycat.com/miaow/archives/000230.php"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0011.gif" alt="Css-techniques0011 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>13. <a  href="http://www.sitepoint.com/test/pullquote.htm">Pullquotes with CSS</a> (<a  href="http://www.456bereastreet.com/archive/200609/automatic_pullquotes_with_javascript_and_css/">Automatic Pullquotes with JavaScript and CSS</a></p>
<p><a  href="http://www.sitepoint.com/test/pullquote.htm"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0012.gif" alt="Css-techniques0012 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>14.CSS Diagrams</p>
<p><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0013.gif" alt="Css-techniques0013 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></p>
<p>15. <a  href="http://storage.couchfort.net/cssCurves/">CSS Curves</a></p>
<p><a  href="http://storage.couchfort.net/cssCurves/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0014.gif" alt="Css-techniques0014 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>16. <a  href="http://www.themaninblue.com/experiment/footerStickAlt/">Footer Stick</a> allows for the footer of a Web page to appear either at the bottom of the browser window or the bottom of the Web page content – whichever is visually lowest.</p>
<p><a  href="http://www.themaninblue.com/experiment/footerStickAlt/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0015.gif" alt="Css-techniques0015 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>17. <a  href="http://www.frankmanno.com/ideas/css-imagemap/">CSS Image Map</a></p>
<p><a  href="http://www.frankmanno.com/ideas/css-imagemap/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0016.gif" alt="Css-techniques0016 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>18. <a  href="http://moneytreesystems.com/css/picpopup.html">CSS Image Pop-Up</a></p>
<p><a  href="http://moneytreesystems.com/css/picpopup.html"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0017.gif" alt="Css-techniques0017 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>19. <a  href="http://snipplr.com/view/2122/css-image-preloader/">CSS Image Preloader</a></p>
<p><a  href="http://snipplr.com/view/2122/css-image-preloader/"><br /> <img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0018.gif" alt="Css-techniques0018 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>20. <a  href="http://www.ampsoft.net/webdesign-l/image-button.html">CSS Image Replacement for Buttons</a></p>
<p><a  href="http://www.ampsoft.net/webdesign-l/image-button.html"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0019.gif" alt="Css-techniques0019 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>21. <a  href="http://lab.arc90.com/2006/07/link_thumbnail.php">Link Thumbnail</a></p>
<p><a  href="http://lab.arc90.com/2006/07/link_thumbnail.php"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0020.gif" alt="Css-techniques0020 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>22. <a  href="http://mikecherim.com/experiments/css_map_pop.php">CSS Map Pop</a></p>
<p><a  href="http://mikecherim.com/experiments/css_map_pop.php"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0021.gif" alt="Css-techniques0021 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>23. <a  href="http://mikecherim.com/gbcms_xml/news_page.php?id=12">PHP-based CSS Style Switcher</a></p>
<p><a  href="http://mikecherim.com/gbcms_xml/news_page.php?id=12"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0022.gif" alt="Css-techniques0022 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>24. <a  href="http://mikecherim.com/gbcms_xml/news_page.php?id=0">CSS Unordered List Calender</a> (<a  href="http://veerle.duoh.com/blog/comments/a_css_styled_calendar/">CSS Styled Calender</a>)</p>
<p><a  href="http://mikecherim.com/gbcms_xml/news_page.php?id=0"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0023.gif" alt="Css-techniques0023 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>25. <a  href="http://www.smashingmagazine.com/2006/11/11/css-based-forms-modern-solutions/">CSS-Based Forms: Techniques</a></p>
<p><a  href="http://www.smashingmagazine.com/2006/11/11/css-based-forms-modern-solutions/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0024.gif" alt="Css-techniques0024 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>26. <a  href="http://www.smashingmagazine.com/2006/12/29/css-based-tables-modern-solutions/">CSS-Based Tables: Techniques</a></p>
<p><a  href="http://www.smashingmagazine.com/2006/12/29/css-based-tables-modern-solutions/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0025.gif" alt="Css-techniques0025 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>27. <a  href="http://css-discuss.incutio.com/?page=PrintStylesheets">Printing Web-Documents and CSS</a></p>
<p><a  href="http://css-discuss.incutio.com/?page=PrintStylesheets"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0027.gif" alt="Css-techniques0027 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>28. <a  href="http://www.alistapart.com/articles/improvingprint/">Improved Links-Display for Print-Layouts with CSS</a></p>
<p><a  href="http://www.alistapart.com/articles/improvingprint/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0026.gif" alt="Css-techniques0026 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>29. CSS-Submit Buttons<br /> <img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0028.gif" alt="Css-techniques0028 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></p>
<p>30. <a  href="http://www.456bereastreet.com/lab/teaser/">CSS Teaser Box</a></p>
<p><a  href="http://www.456bereastreet.com/lab/teaser/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0029.gif" alt="Css-techniques0029 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>31. <a  href="http://www.macworld.com/2005/12/secrets/januarycreate/index.php">CSS Tricks for Custom Bullets</a></p>
<p><a  href="http://www.macworld.com/2005/12/secrets/januarycreate/index.php"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0030.gif" alt="Css-techniques0030 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>32. <a  href="http://www.colly.com/index.php?/weblog/comments/ticked_off_links_reloaded">Ticked Off Links Reloaded</a></p>
<p><a  href="http://www.colly.com/index.php?/weblog/comments/ticked_off_links_reloaded"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0031.gif" alt="Css-techniques0031 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>33. <a  href="http://www.deltatangobravo.com/images/zoom/">CSS Zooming</a></p>
<p><a  href="http://www.deltatangobravo.com/images/zoom/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0032.gif" alt="Css-techniques0032 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>34. <a  href="http://komodomedia.com/blog/index.php/2005/08/24/creating-a-star-rater-using-css/">Creating a Star Rater using CSS</a></p>
<p><a  href="http://komodomedia.com/blog/index.php/2005/08/24/creating-a-star-rater-using-css/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0033.gif" alt="Css-techniques0033 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>35. <a  href="http://webdesign.maratz.com/lab/visited_links_styling/">The ways to style visited Links</a></p>
<p><a  href="http://webdesign.maratz.com/lab/visited_links_styling/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0034.gif" alt="Css-techniques0034 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>36. <a  href="http://webdesign.maratz.com/lab/pdf_links_labeling/">PDF, ZIP, DOC Links Labeling</a></p>
<p><a  href="http://webdesign.maratz.com/lab/pdf_links_labeling/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0035.gif" alt="Css-techniques0035 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>37. <a  href="http://www.barenakedapp.com/the-design/displaying-percentages">Displaying Percentages with CSS</a></p>
<p><a  href="http://www.barenakedapp.com/the-design/displaying-percentages"><br /> <img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0036.gif" alt="Css-techniques0036 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>38. <a  href="http://ghettocooler.net/2005/11/13/image-floats-without-the-text-wrap/">Image Floats without the Text Wrap</a></p>
<p><a  href="http://ghettocooler.net/2005/11/13/image-floats-without-the-text-wrap/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0037.gif" alt="Css-techniques0037 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>39. <a  href="http://webdesign.maratz.com/lab/new_window_link/">Let visitors decide, whether or not will they open link in a new window</a></p>
<p><a  href="http://webdesign.maratz.com/lab/new_window_link/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0038.gif" alt="Css-techniques0038 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>40. <a  href="http://www.maxdesign.com.au/presentation/external/">Simple accessible external links</a></p>
<p><a  href="http://www.maxdesign.com.au/presentation/external/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0039.gif" alt="Css-techniques0039 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>41. <a  href="http://24ways.org/2005/splintered-striper">Zebra Table with JavaScript and CSS</a></p>
<p><a  href="http://24ways.org/2005/splintered-striper"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0040.gif" alt="Css-techniques0040 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>42. <a  href="http://www.jakpsatweb.cz/css/css-vertical-center-solution.html">Vertical Centering with CSS</a> (<a  href="http://www.456bereastreet.com/lab/centered/both/">Horizontal and Vertical Centering with CSS</a></p>
<p><a  href="http://www.jakpsatweb.cz/css/css-vertical-center-solution.html"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0041.gif" alt="Css-techniques0041 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>43. <a  href="http://lab.arc90.com/2006/05/unobtrusive_sidenotes.php">Unobtrusive Sidenotes</a></p>
<p><a  href="http://lab.arc90.com/2006/05/unobtrusive_sidenotes.php"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0042.gif" alt="Css-techniques0042 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>44. <a  href="http://lab.arc90.com/2006/07/image_caption_1.php">Image Caption with CSS</a> (<a  href="http://www.boagworld.com/archives/2006/07/styled_images_with_caption.html">Styled Images with Caption</a>)</p>
<p><a  href="http://lab.arc90.com/2006/07/image_caption_1.php"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0043.gif" alt="Css-techniques0043 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>45. <a  href="http://petewilliamsagency.com/css/examples/pie/">Dynamic Piechart with CSS</a></p>
<p><a  href="http://petewilliamsagency.com/css/examples/pie/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0044.gif" alt="Css-techniques0044 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>46. <a  href="http://www.brandspankingnew.net/archive/2005/07/format_footnote.html">Format Footnotes with CSS</a></p>
<p><a  href="http://www.brandspankingnew.net/archive/2005/07/format_footnote.html"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0045.gif" alt="Css-techniques0045 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>47. <a  href="http://www.alexandersperl.de/tutorials/css/sitemap.html">Hierarchical Sitemap with CSS</a></p>
<p><a  href="http://www.alexandersperl.de/tutorials/css/sitemap.html"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0046.gif" alt="Css-techniques0046 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>48. <a  href="http://www.colly.com/index.php?/weblog/comments/snooks_resizable_underlines/">Snook’s Resizable Underlines</a></p>
<p><a  href="http://www.colly.com/index.php?/weblog/comments/snooks_resizable_underlines/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0047.gif" alt="Css-techniques0047 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>49. <a  href="http://www.alistapart.com/articles/switchymclayout">Switchy McLayout: An Adaptive Layout Technique</a></p>
<p><a  href="http://www.alistapart.com/articles/switchymclayout"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0048.gif" alt="Css-techniques0048 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>50. <a  href="http://www.scottjehl.com/v7/index.php/process/stylemap_visual_sitemap/">StyleMap: CSS+HTML Visual Sitemap</a></p>
<p><a  href="http://www.scottjehl.com/v7/index.php/process/stylemap_visual_sitemap/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0049.gif" alt="Css-techniques0049 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>51. <a  href="http://www.devlounge.net/articles/custom-reading-width-beta">Custom Reading Width</a></p>
<p><a  href="http://www.devlounge.net/articles/custom-reading-width-beta"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0050.gif" alt="Css-techniques0050 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>52. <a  href="http://www.bioneural.net/2006/04/01/create-a-valid-css-alert-message/">CSS Alert Message</a></p>
<p><a  href="http://www.bioneural.net/2006/04/01/create-a-valid-css-alert-message/"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0051.gif" alt="Css-techniques0051 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
<p>53. <a  href="http://24ways.org/2006/css-production-notes">CSS Production Notes</a></p>
<p><a  href="http://24ways.org/2006/css-production-notes"><img style="margin-left: 4em" src="/Images/smashingmagazine3-css-techniques0052.gif" alt="Css-techniques0052 in 53 CSS-Techniques You Couldnt Live Without" width="485" height="170" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.taiwangeek.com/2010-06/53-css-techniques-you-couldnt-live-without.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (request URI doesn't have a trailing slash)

Served from: www.taiwangeek.com @ 2012-05-19 05:48:19 -->
