<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0"><channel><title>Build Internet!</title> <link>http://buildinternet.com</link> <description>Web Design, Development, and Business</description> <lastBuildDate>Tue, 20 Jul 2010 19:55:48 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/buildinternet" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="buildinternet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">buildinternet</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item><title>When to use $_SESSION vs $_COOKIE</title><link>http://buildinternet.com/2010/07/when-to-use-_session-vs-_cookie/</link> <comments>http://buildinternet.com/2010/07/when-to-use-_session-vs-_cookie/#comments</comments> <pubDate>Tue, 20 Jul 2010 19:55:48 +0000</pubDate> <dc:creator>Brian Muse</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Basics]]></category> <category><![CDATA[Cookies]]></category> <category><![CDATA[Managing Data]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Sessions]]></category> <category><![CDATA[Web Development]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8907</guid> <description><![CDATA[A critical feature in web programming is the ability to seamlessly pass data from one page load to the next. It’s used most commonly when dealing with user logins, but also for passing error messages, shopping carts, etc. Storing data across pages using PHP is done with two variables in the global scope, called $_SESSION [...]Related posts:<ol><li><a
href='http://buildinternet.com/2009/12/creating-your-first-php-application-part-2/' rel='bookmark' title='Permanent Link: Creating Your First PHP Application: Part 2'>Creating Your First PHP Application: Part 2</a> <small>This post is the second part in a three part...</small></li><li><a
href='http://buildinternet.com/2009/12/creating-your-first-php-application-part-3/' rel='bookmark' title='Permanent Link: Creating Your First PHP Application: Part 3'>Creating Your First PHP Application: Part 3</a> <small>In part 1 and part 2 we built the necessary...</small></li><li><a
href='http://buildinternet.com/2009/08/fundamentals-of-mysql-query-validation/' rel='bookmark' title='Permanent Link: Fundamentals of MySQL Query Validation'>Fundamentals of MySQL Query Validation</a> <small>Editor&#8217;s Note: This is a guest post from Christian Engel,...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/evnTLOyGYAlQzrv7et7PyC1xPH0/0/da"><img src="http://feedads.g.doubleclick.net/~a/evnTLOyGYAlQzrv7et7PyC1xPH0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/evnTLOyGYAlQzrv7et7PyC1xPH0/1/da"><img src="http://feedads.g.doubleclick.net/~a/evnTLOyGYAlQzrv7et7PyC1xPH0/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8907"></span></p><p>A critical feature in web programming is the ability to seamlessly pass data from one page load to the next. It’s used most commonly when dealing with user logins, but also for passing error messages, shopping carts, etc.</p><p>Storing data across pages using PHP is done with two variables in the global scope, called $_SESSION and $_COOKIE, and although accomplishing the same end goal, the both go about it in very different ways. The purpose of this article is to give a brief look into the differences between cookies and sessions, when it’s better to use one versus the other, and the pros and cons of the two.</p><p><strong>The difference is in how each store data.</strong> Cookies store data locally in the user&#8217;s browser, while sessions store data on the webserver.</p><h3>Session Basics</h3><p>Sessions are simply server-side cookies each with a corresponding client side cookie that contains only a reference to its server-side counterpart. When a user visits a page, the client sends the reference code to the server, and PHP will then match that reference code to a server-side cookie and load the data in the server’s cookie into the $_SESSION superglobal.</p><h4>Pros</h4><ol><li>Can store very large amounts of data easily.</li><li>Save bandwidth by passing only a reference to the session each pageload. A client-side cookie has to pass all of its data.</li><li>Data is stored on the web server. This makes sessions secure, because the data cannot be viewed or edited by the client.</li></ol><h4>Cons</h4><ol><li>Ends when the browser is closed unless you&#8217;ve configured php.ini to extend sessions&#8217; cookie lifetime. Cannot last forever.</li></ol><h3>Cookie Basics</h3><p>Cookie data is sent to the web server every page load. PHP reads and stores the value into the $_COOKIE superglobal. When a cookie is created, you can give it a lifespan. After that lifespan runs out, it will expire.</p><h4>Pros</h4><ol><li>Can last as long as the website needs. They will still be there even if the browser is closed and reopened.</li><li>Useful for “remember me” logins</li><li>Useful for storing temporary user settings. For example, if a user is browsing a paginated list of items, sorted a certain way, the sorting setting can be stored in a cookie.</li></ol><h4>Cons</h4><ol><li>Stored in the users filesystem. This means that the user can tamper with it and view it.</li><li>Can only store a limited amount of data.</li><li>Must pass all data to the webserver each pageload. This takes up more bandwidth.</li></ol><h3>Cookies in Action</h3><h4>Creating a cookie</h4><p>The function definition:</p><p><em>bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, int secure]]]]])</em></p><pre class="php" name="code">&lt;?php
    if (!isset($_COOKIE['Ordering'])) {
        setcookie("Ordering", $_POST['ChangeOrdering'], time() + 31536000);
    }
?&gt;</pre><h4>Using a cookie</h4><pre class="php" name="code">&lt;?php
	echo (isset($_COOKIE[‘ordering’])) ? $_COOKIE[‘ordering’] : ‘cookie value not set’;
?&gt;</pre><h4>Deleting a cookie</h4><pre class="php" name="code">&lt;?php setcookie(‘favorite_color’); ?&gt;</pre><p>Setting a cookie with no value is the same as deleting it. This will not remove the file from the client computer. To do this, you can set the cookie expiration date to a time in the past, and the browser will take care of it.</p><h3>Sessions in Action</h3><h4>Creating a session</h4><pre class="php" name="code">&lt;?php session_start(); ?&gt;</pre><p>This must be called near the top of your code before any output. When you call this function, PHP will check to see if the user sent a session cookie. If so, it will load the session data into $_SESSION. If not, it will create a new session file on the server and send the ID back to the client.</p><h4>Setting a value</h4><pre class="php" name="code">&lt;?php $_SESSION[‘first_name’] = ‘Brian’; ?&gt;</pre><h4>Reading a session value</h4><pre class="php" name="code">&lt;?php echo $_SESSION[‘first_name’]; ?&gt;</pre><h4>Removing session data</h4><pre class="php" name="code">&lt;?php unset($_SESSION[‘first_name’]); ?&gt;</pre><h4>Ending a session</h4><pre class="php" name="code">&lt;?php session_destroy(); ?&gt;</pre><h3>The Bottom Line</h3><p>Sessions are cookies where the data is stored on the server. Cookies are stored in the users filesystem (typically in their “Temporary Internet Files” folder). Both have their advantages, but on any given day, you’ll probably find yourself using sessions much more commonly.</p><h4>PHP Documentation</h4><ol><li><a
title="PHP Session Manual" href="http://www.php.net/manual/en/book.session.php">PHP Manual: Sessions</a></li><li><a
title="PHP Cookie Manual" href="http://php.net/manual/en/features.cookies.php">PHP Manual: Cookies</a></li></ol><p>Related posts:<ol><li><a
href='http://buildinternet.com/2009/12/creating-your-first-php-application-part-2/' rel='bookmark' title='Permanent Link: Creating Your First PHP Application: Part 2'>Creating Your First PHP Application: Part 2</a> <small>This post is the second part in a three part...</small></li><li><a
href='http://buildinternet.com/2009/12/creating-your-first-php-application-part-3/' rel='bookmark' title='Permanent Link: Creating Your First PHP Application: Part 3'>Creating Your First PHP Application: Part 3</a> <small>In part 1 and part 2 we built the necessary...</small></li><li><a
href='http://buildinternet.com/2009/08/fundamentals-of-mysql-query-validation/' rel='bookmark' title='Permanent Link: Fundamentals of MySQL Query Validation'>Fundamentals of MySQL Query Validation</a> <small>Editor&#8217;s Note: This is a guest post from Christian Engel,...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=RosxV6lfg3Q:t_JDWRlOZwA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=RosxV6lfg3Q:t_JDWRlOZwA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=RosxV6lfg3Q:t_JDWRlOZwA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=RosxV6lfg3Q:t_JDWRlOZwA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=RosxV6lfg3Q:t_JDWRlOZwA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=RosxV6lfg3Q:t_JDWRlOZwA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=RosxV6lfg3Q:t_JDWRlOZwA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=RosxV6lfg3Q:t_JDWRlOZwA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=RosxV6lfg3Q:t_JDWRlOZwA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=RosxV6lfg3Q:t_JDWRlOZwA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/RosxV6lfg3Q" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/07/when-to-use-_session-vs-_cookie/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Sketchy Social Media Icons Freebie</title><link>http://buildinternet.com/2010/07/sketchy-social-media-icons-freebie/</link> <comments>http://buildinternet.com/2010/07/sketchy-social-media-icons-freebie/#comments</comments> <pubDate>Thu, 15 Jul 2010 13:48:24 +0000</pubDate> <dc:creator>Ethan Kociela</dc:creator> <category><![CDATA[Resources]]></category> <category><![CDATA[Freebie]]></category> <category><![CDATA[icons]]></category> <category><![CDATA[Social Media]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8884</guid> <description><![CDATA[As a designer that at one time had the ambition to become an illustrator, you can imagine I miss the hands-on work quite a bit. I look for any opportunity I can get to incorporate drawing in design. It&#8217;s an easy thing to overlook given the modern day design styles, but it&#8217;s important to go [...]Related posts:<ol><li><a
href='http://buildinternet.com/2010/03/social-media-is-bullshit/' rel='bookmark' title='Permanent Link: Social Media is Bullshit'>Social Media is Bullshit</a> <small>Some of you probably clicked that link ready to defend...</small></li><li><a
href='http://buildinternet.com/2009/08/a-bundle-of-free-icons/' rel='bookmark' title='Permanent Link: A Bundle of Free Icons'>A Bundle of Free Icons</a> <small>For Web Designers Dusk iPhone Style Icons PixelMixer Basic Set...</small></li><li><a
href='http://buildinternet.com/2009/07/totally-tweet-freebie-replacement-tweetie-icon/' rel='bookmark' title='Permanent Link: Totally Tweet Freebie &#8211; Replacement Tweetie Icon'>Totally Tweet Freebie &#8211; Replacement Tweetie Icon</a> <small>This freebie is a redesign of the existing icon for...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/t9uouwGS8xbduseFmz9sgKVOX2w/0/da"><img src="http://feedads.g.doubleclick.net/~a/t9uouwGS8xbduseFmz9sgKVOX2w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/t9uouwGS8xbduseFmz9sgKVOX2w/1/da"><img src="http://feedads.g.doubleclick.net/~a/t9uouwGS8xbduseFmz9sgKVOX2w/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8884"></span></p><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><p>As a designer that at one time had the ambition to become an illustrator, you can imagine I miss the hands-on work quite a bit. I look for any opportunity I can get to incorporate drawing in design. It&#8217;s an easy thing to overlook given the modern day design styles, but it&#8217;s important to go back to your roots sometimes.</p><p>I&#8217;m going to be bold and say social media is popular enough that I don&#8217;t need to justify making these. I tried to show some love to the top social media sites that I frequent across the <a
title="Urban Dictionary" href="http://www.urbandictionary.com/define.php?term=interweb" target="_blank">Interweb</a>.</p><ul><li>Every icon is a .PNG (making them easy to edit) and packaged together.</li><li>The set includes four sizes for each icon: 16&#215;16, 32&#215;32, 48&#215;48, 57&#215;57.</li><li>It also includes two sizes for each icon next to its type mark: 32px tall, 57px tall</li></ul><p><img
alt="" src="http://buildinternet.s3.amazonaws.com/images/sketchy-social/sketchy-collection.jpg" title="The Collection" class="aligncenter" width="600" height="1115" /></p><div
id="livedownload"><a
class="livedownloadonly" title="Download the icons" href="http://buildinternet.s3.amazonaws.com/images/sketchy-social/sketchy-social-media.zip"></a></div><h3>Usage and Sharing</h3><p>Released under this <a
href="http://creativecommons.org/licenses/by-nc-sa/2.5/ca/">Creative Commons license</a>. While it&#8217;s not required, if you end up using any of these graphics, a link to this post would be greatly appreciated.</p><p>Related posts:<ol><li><a
href='http://buildinternet.com/2010/03/social-media-is-bullshit/' rel='bookmark' title='Permanent Link: Social Media is Bullshit'>Social Media is Bullshit</a> <small>Some of you probably clicked that link ready to defend...</small></li><li><a
href='http://buildinternet.com/2009/08/a-bundle-of-free-icons/' rel='bookmark' title='Permanent Link: A Bundle of Free Icons'>A Bundle of Free Icons</a> <small>For Web Designers Dusk iPhone Style Icons PixelMixer Basic Set...</small></li><li><a
href='http://buildinternet.com/2009/07/totally-tweet-freebie-replacement-tweetie-icon/' rel='bookmark' title='Permanent Link: Totally Tweet Freebie &#8211; Replacement Tweetie Icon'>Totally Tweet Freebie &#8211; Replacement Tweetie Icon</a> <small>This freebie is a redesign of the existing icon for...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=cIX7sQGAxR4:GIjo8LL43tE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cIX7sQGAxR4:GIjo8LL43tE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=cIX7sQGAxR4:GIjo8LL43tE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cIX7sQGAxR4:GIjo8LL43tE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=cIX7sQGAxR4:GIjo8LL43tE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cIX7sQGAxR4:GIjo8LL43tE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=cIX7sQGAxR4:GIjo8LL43tE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cIX7sQGAxR4:GIjo8LL43tE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cIX7sQGAxR4:GIjo8LL43tE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=cIX7sQGAxR4:GIjo8LL43tE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/cIX7sQGAxR4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/07/sketchy-social-media-icons-freebie/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>Client Rejection – Why No Means Nothing</title><link>http://buildinternet.com/2010/06/client-rejection-why-no-means-nothing/</link> <comments>http://buildinternet.com/2010/06/client-rejection-why-no-means-nothing/#comments</comments> <pubDate>Mon, 28 Jun 2010 18:49:00 +0000</pubDate> <dc:creator>Chandler Quintin</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[Clients]]></category> <category><![CDATA[Negotiation]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8859</guid> <description><![CDATA[We’ve all had it happen before – you put a ton of work into a fantastic idea, proposal, and/or meeting with an awesome potential client and it goes swimmingly. You’re excited, they’re excited, you’re even more excited since they’re excited.  The endless cycle of excitement is the best right? When this situation has a fairytale [...]Related posts:<ol><li><a
href='http://buildinternet.com/2009/06/watch-your-language-clients-pricing/' rel='bookmark' title='Permanent Link: Watch Your Language: Clients &#038; Pricing'>Watch Your Language: Clients &#038; Pricing</a> <small>// Want more pricing help? This is day two of...</small></li><li><a
href='http://buildinternet.com/2008/12/6-ways-to-get-the-email-response-you-need/' rel='bookmark' title='Permanent Link: 6 Ways to Get the Email Response You Need'>6 Ways to Get the Email Response You Need</a> <small>Have you ever sent out a crystal clear email only...</small></li><li><a
href='http://buildinternet.com/2010/01/when-clients-take-too-much-design-control/' rel='bookmark' title='Permanent Link: When Clients Take Too Much Design Control'>When Clients Take Too Much Design Control</a> <small>“Looks great. Let’s just move the main content down and...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/sxlGUFWrvOADr77-mMXyjW1HJhY/0/da"><img src="http://feedads.g.doubleclick.net/~a/sxlGUFWrvOADr77-mMXyjW1HJhY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/sxlGUFWrvOADr77-mMXyjW1HJhY/1/da"><img src="http://feedads.g.doubleclick.net/~a/sxlGUFWrvOADr77-mMXyjW1HJhY/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8859"></span><br
/><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></p><p>We’ve all had it happen before – you put a ton of work into a fantastic idea, proposal, and/or meeting with an awesome potential client and it goes swimmingly. You’re excited, they’re excited, you’re even more excited since they’re excited.  The endless cycle of excitement is the best right? When this situation has a fairytale ending paved with productivity, a portfolio builder and some cash, it’s awesome!</p><p>But, how many times has that excitement turned into disappointment when further talks go nowhere? Next thing you know, the client has simply said “No” or “Sorry, we’re no longer doing this project” or even the classic, “We’re going with someone else on this one”? Well, whether you’re in digital design, marketing, or any sort of sales, it has probably happened more times than you count. <strong>The client rejection is the nature of the beast, but what does a rejection </strong><em><strong>really</strong></em><strong> mean? No means no, or does it?</strong></p><h3>You can take “No” the way everyone else does…</h3><p><a
href="http://www.flickr.com/photos/nathangibbs/98592171/"><img
class="aligncenter" title="Image via Flickr by nathangibbs" src="http://buildinternet.s3.amazonaws.com/images/client-rejection/no-curb.jpg" alt="" width="600" height="160" /></a><br
/> Taking a “No” as if it means “No” goes something like this: The client opportunity falls through, and you inform your support system. You know, friends, family, Twitter, your significant other, whoever. Your friends and family will tell you it probably has nothing to do with you and that the rejection happened for a reason. Your colleagues will tell you that the client wasn’t worth working with anyway and that your time is coming.</p><p>As laughable as it is, your significant other will be the one to come up with as many negative things to say about that potential client no matter how ridiculous they might be – come on, admit it, you’ve been there! Some of what your support system tells you will be true however, most of it is just a pillow for your ego to land on. Oh well, they said “No”, right? Wrong.</p><h3>You can take another “No” approach…</h3><p><a
href="http://www.flickr.com/photos/minxlabs/2297989507/"><img
class="aligncenter" title="Image via Flickr by UnstablePixel" src="http://buildinternet.s3.amazonaws.com/images/client-rejection/lightbulb.jpg" alt="" width="600" height="160" /></a></p><p>Similar to how a toddler takes the answer “No” and finds a way to change the answer, there is an approach that seem crazy but can seriously work. The approach? <em>Ignore the word “No”. </em>What does this mean? Well, it doesn’t exactly mean ignoring the word “no” and doing the client work anyways without their consent – <strong>it means, “try again”</strong>. They’ve said no to your first plan, so you’re going to send them something new.</p><p>You’ve already poured hours upon hours into the proposal, so simply send them something adjusted based on their reason for “no” or your gut feeling for what went wrong. If they actually liked your proposal but it was something as simple as budget, see where you can cut costs, and send them a new revision. If it was relevant references, see where you can dig up some more references through clients of clients or even someone you might have missed. If it was a portfolio problem, see where you can respond with other capabilities or more work that might weigh on their decision. If you feel like the client felt you were not capable, send them a compelling one-pager addressing their concern upfront and prove yourself.</p><p>Did I mention budget? Sometimes, the budget can “fix” <em>other </em>problems, if you know what I mean. If you were too expensive and the portfolio simply can’t justify, but your idea was <em>really</em> solid, you may find that the client is more willing to take a small risk at your lowered pricing. Cutting monetary corners isn’t just something you can do as a offensive move – cutting monetary corners is a defensive move potential clients can do to get the job done at a lower risk from a 2<sup>nd</sup> choice contractor.</p><h3><strong>Nothing to lose, everything to gain</strong></h3><p><strong><a
href="http://www.flickr.com/photos/markybon/113305662/"><img
class="aligncenter" title="Image via Flickr by Markybon" src="http://buildinternet.s3.amazonaws.com/images/client-rejection/dice.jpg" alt="" width="600" height="160" /></a></strong></p><p>As mentioned above, you’ve already put the work in, so what do you have to lose? The only thing you need to do is figure out a new approach and give it another shot. What’s an hour of contemplating your bottom line, making a few calls, or putting a couple more pieces together? Certainly don’t try a second time if you were certainly off-base, but don’t miss an opportunity to make things right if you felt like you were almost there. With nothing to lose, you’d be making a huge mistake and missing an even bigger opportunity by not trying again. The worst that could happen is another “No” which you’ve already digested once – is it really going to hurt the 2<sup>nd</sup> time? The best that could happen is that you’ve got another client under your belt and a huge opportunity to prove yourself.</p><h3>The odds of success</h3><p>Ignoring “No” and trying again does not mean you’re betting on a sure thing. In fact, you might not even get a response. It’s more like a game of roulette – it’s a black (let’s talk), a red (another no), or a green (straight up yes). If you know about roulette, you’ll know hitting green is rare, but hitting black is nearly 50-50. If your services or ideas were spot on and the potential client has a lot of candidates to chose from, you’ve got a great shot.</p><p><strong>You’ll find that more often than not, a client is willing to listen if you got something new to show them especially if they liked you.</strong> Like your family said, it’s nothing personal &#8211; they should give you a 2<sup>nd</sup> listen<em>. </em>Take a chance.<em> Your odds are great, in fact, not sending a 2<sup>nd</sup> try is just as bad as not sending a first.</em></p><p>Related posts:<ol><li><a
href='http://buildinternet.com/2009/06/watch-your-language-clients-pricing/' rel='bookmark' title='Permanent Link: Watch Your Language: Clients &#038; Pricing'>Watch Your Language: Clients &#038; Pricing</a> <small>// Want more pricing help? This is day two of...</small></li><li><a
href='http://buildinternet.com/2008/12/6-ways-to-get-the-email-response-you-need/' rel='bookmark' title='Permanent Link: 6 Ways to Get the Email Response You Need'>6 Ways to Get the Email Response You Need</a> <small>Have you ever sent out a crystal clear email only...</small></li><li><a
href='http://buildinternet.com/2010/01/when-clients-take-too-much-design-control/' rel='bookmark' title='Permanent Link: When Clients Take Too Much Design Control'>When Clients Take Too Much Design Control</a> <small>“Looks great. Let’s just move the main content down and...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNiO-iPvxWo:-MY82BqA3ys:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNiO-iPvxWo:-MY82BqA3ys:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=mNiO-iPvxWo:-MY82BqA3ys:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNiO-iPvxWo:-MY82BqA3ys:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=mNiO-iPvxWo:-MY82BqA3ys:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNiO-iPvxWo:-MY82BqA3ys:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=mNiO-iPvxWo:-MY82BqA3ys:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNiO-iPvxWo:-MY82BqA3ys:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNiO-iPvxWo:-MY82BqA3ys:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=mNiO-iPvxWo:-MY82BqA3ys:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/mNiO-iPvxWo" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/06/client-rejection-why-no-means-nothing/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>Freebie Fiesta – Twitter Bird &amp; Egg Illustrations</title><link>http://buildinternet.com/2010/06/freebie-fiesta-twitter-bird-egg-illustrations/</link> <comments>http://buildinternet.com/2010/06/freebie-fiesta-twitter-bird-egg-illustrations/#comments</comments> <pubDate>Tue, 22 Jun 2010 19:16:27 +0000</pubDate> <dc:creator>Sam Dunn</dc:creator> <category><![CDATA[Resources]]></category> <category><![CDATA[Freebie]]></category> <category><![CDATA[Twitter]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8836</guid> <description><![CDATA[I was inspired by the vast number of Twitter birds out there and decided to provide my own entry the internet&#8217;s collection of our feathery friend. Everything is neatly packaged in transparent .png format, which means the bird will have no difficulty nesting in whatever site you place him in. Feel free to leave a [...]Related posts:<ol><li><a
href='http://buildinternet.com/2010/07/sketchy-social-media-icons-freebie/' rel='bookmark' title='Permanent Link: Sketchy Social Media Icons Freebie'>Sketchy Social Media Icons Freebie</a> <small>As a designer that at one time had the ambition...</small></li><li><a
href='http://buildinternet.com/2010/02/share-feedback-with-twitter-and-the-bit-ly-api/' rel='bookmark' title='Permanent Link: Share Feedback with Twitter and the Bit.ly API'>Share Feedback with Twitter and the Bit.ly API</a> <small>Regular blog readers probably notice the wide range of social...</small></li><li><a
href='http://buildinternet.com/2009/07/totally-tweet-freebie-replacement-tweetie-icon/' rel='bookmark' title='Permanent Link: Totally Tweet Freebie &#8211; Replacement Tweetie Icon'>Totally Tweet Freebie &#8211; Replacement Tweetie Icon</a> <small>This freebie is a redesign of the existing icon for...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/dyAZil5ITS7HYpoV-ZKHn38RUUI/0/da"><img src="http://feedads.g.doubleclick.net/~a/dyAZil5ITS7HYpoV-ZKHn38RUUI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/dyAZil5ITS7HYpoV-ZKHn38RUUI/1/da"><img src="http://feedads.g.doubleclick.net/~a/dyAZil5ITS7HYpoV-ZKHn38RUUI/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8836"></span><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></p><p>I was inspired by the <a
href="http://thedesignsuperhero.com/2008/10/featuring-twitter-birds-20-twitter-bird-designs/">vast</a> <a
href="http://www.hongkiat.com/blog/100-remarkably-beautiful-twitter-icons-and-buttons/">number</a> of Twitter birds out there and decided to provide my own entry the internet&#8217;s collection of our feathery friend.</p><p>Everything is neatly packaged in transparent .png format, which means the bird will have no difficulty nesting in whatever site you place him in.</p><p>Feel free to leave a link in the comments if you end up using any of the illustrations for a project &#8211; enjoy!</p><h3>Inside the Bundle</h3><p><img
class="aligncenter" title="Twitter Freebie Teaser" src="http://buildinternet.s3.amazonaws.com/images/twitter-bird/teaser-sheet.png" alt="" width="600" height="500" /></p><div
id="livedownload"><a
class="livedownloadonly" title="Download the Illustrations" href="http://buildinternet.s3.amazonaws.com/images/twitter-bird/Twitter%20Bird%20%26%20Egg.zip"></a></div><h3>Usage and Sharing</h3><p>Released under this <a
href="http://creativecommons.org/licenses/by-nc-sa/2.5/ca/">Creative Commons license</a>. While it&#8217;s not required, if you end up using any of these graphics, a link to this post would be greatly appreciated.</p><p>If you want to share this file with anyone, please link directly to this post ( <a
href="http://buildinternet.com/2010/06/freebie-fiesta-twitter-bird-egg-illustrations/">http://buildinternet.com/2010/06/freebie-fiesta-twitter-bird-egg-illustrations/</a> ).</p><p>*The font used in the above graphics is called <a
href="http://www.dafont.com/jonny-quest-classic.font">Johnny Quest Classic</a>.</p><p>Related posts:<ol><li><a
href='http://buildinternet.com/2010/07/sketchy-social-media-icons-freebie/' rel='bookmark' title='Permanent Link: Sketchy Social Media Icons Freebie'>Sketchy Social Media Icons Freebie</a> <small>As a designer that at one time had the ambition...</small></li><li><a
href='http://buildinternet.com/2010/02/share-feedback-with-twitter-and-the-bit-ly-api/' rel='bookmark' title='Permanent Link: Share Feedback with Twitter and the Bit.ly API'>Share Feedback with Twitter and the Bit.ly API</a> <small>Regular blog readers probably notice the wide range of social...</small></li><li><a
href='http://buildinternet.com/2009/07/totally-tweet-freebie-replacement-tweetie-icon/' rel='bookmark' title='Permanent Link: Totally Tweet Freebie &#8211; Replacement Tweetie Icon'>Totally Tweet Freebie &#8211; Replacement Tweetie Icon</a> <small>This freebie is a redesign of the existing icon for...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=cXNznsT9MqA:oalLCdOuDz0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cXNznsT9MqA:oalLCdOuDz0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=cXNznsT9MqA:oalLCdOuDz0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cXNznsT9MqA:oalLCdOuDz0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=cXNznsT9MqA:oalLCdOuDz0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cXNznsT9MqA:oalLCdOuDz0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=cXNznsT9MqA:oalLCdOuDz0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cXNznsT9MqA:oalLCdOuDz0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=cXNznsT9MqA:oalLCdOuDz0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=cXNznsT9MqA:oalLCdOuDz0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/cXNznsT9MqA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/06/freebie-fiesta-twitter-bird-egg-illustrations/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Warping Drop Shadows to Give Depth</title><link>http://buildinternet.com/2010/06/warping-drop-shadows-to-give-depth/</link> <comments>http://buildinternet.com/2010/06/warping-drop-shadows-to-give-depth/#comments</comments> <pubDate>Fri, 18 Jun 2010 19:01:05 +0000</pubDate> <dc:creator>Zach Dunn</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Design]]></category> <category><![CDATA[Interface Design]]></category> <category><![CDATA[Photoshop]]></category> <category><![CDATA[Trend]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8819</guid> <description><![CDATA[Even though CSS3 has brought a lot to the table in regards to drop shadow effects, there are still plenty of reasons to use image alternatives. The drop shadows generated by CSS3 are relatively uniform, and don&#8217;t deviate much past size and transparency. In some cases, you might want to give a page some extra [...]Related posts:<ol><li><a
href='http://buildinternet.com/2009/03/light-and-shadows-feathering-gradients-in-photoshop/' rel='bookmark' title='Permanent Link: Light and Shadows &#8211; Feathering Gradients in Photoshop'>Light and Shadows &#8211; Feathering Gradients in Photoshop</a> <small>The Overview The Basics of Feathering and Getting Started So...</small></li><li><a
href='http://buildinternet.com/2009/03/quick-tip-use-layer-masks-to-erase-in-photoshop/' rel='bookmark' title='Permanent Link: Quick Tip &#8211; Use Layer Masks to Erase in Photoshop'>Quick Tip &#8211; Use Layer Masks to Erase in Photoshop</a> <small>We&#8217;ve all had to work with photos that need to...</small></li><li><a
href='http://buildinternet.com/2010/02/flexible-color-schemes-in-layouts-with-rgba/' rel='bookmark' title='Permanent Link: Flexible Color Schemes in Layouts with RGBa'>Flexible Color Schemes in Layouts with RGBa</a> <small>This will be an experiment in transparency. CSS has come a long...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/fLEEhAV8SiV7qR4HwbahhRXxLz8/0/da"><img src="http://feedads.g.doubleclick.net/~a/fLEEhAV8SiV7qR4HwbahhRXxLz8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fLEEhAV8SiV7qR4HwbahhRXxLz8/1/da"><img src="http://feedads.g.doubleclick.net/~a/fLEEhAV8SiV7qR4HwbahhRXxLz8/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8819"></span><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></p><p>Even though CSS3 has brought a lot to the table in regards to drop shadow effects, there are still plenty of reasons to use image alternatives. The drop shadows generated by CSS3 are relatively uniform, and don&#8217;t deviate much past size and transparency. In some cases, you might want to give a page some extra depth.</p><p>I ran into a similar situation in a recent client project, and decided to use a recent trend of warping drop shadows to help add some extra excitement to the page. You might have seen similar effects in other tutorials involving deleting a circular section, but this method will keep the edges from being too sharp. It also allows you to work with non-rectangular shapes because all points are editable in the warp tool&#8217;s grid.</p><h3>Setting Up</h3><p>Start a new Photoshop document. The size doesn&#8217;t matter because all of the elements will scale accordingly. I recommend changing the background color to something that will make a white box stand out, but not drown out a black shadow. We&#8217;ll use a light blue for the example. Draw up a white box and we&#8217;re ready to start on the shadow.</p><p><img
class="aligncenter" title="Before any shadows" src="http://buildinternet.s3.amazonaws.com/images/warping-drop-shadows/2d-content-box.png" alt="Before any shadows" width="600" height="300" /></p><h3>Add the Shadow</h3><p>You might be tempted to use blending options right now. Resist the urge, because we&#8217;re aiming for something much more distinct.</p><p>Start by making a new layer that is positioned between the background and content box from the previous step. On the new layer, draw a rectangle selection that is just slightly smaller than the width of the content box. Fill this area with black.</p><p><img
class="aligncenter" title="Fill selection with black" src="http://buildinternet.s3.amazonaws.com/images/warping-drop-shadows/drop-shadow-solid-rectangle.png" alt="Fill selection with black" width="600" height="300" /></p><p>With the black rectangle layer selection go to Filter&gt;Gaussian Blur and set the radius to 6 pixels.</p><p><img
class="aligncenter" title="Blurring the Shadow" src="http://buildinternet.s3.amazonaws.com/images/warping-drop-shadows/gaussian-blur-drop-shadow.png" alt="Blurring the Shadow" width="600" height="420" /></p><h4>Love the Warp Tool</h4><p><a
title="Introduction to the warp tool" href="http://psd.tutsplus.com/tutorials/photo-effects-tutorials/making-sense-of-the-warp-tool-its-all-about-the-lines/">Photoshop&#8217;s warp tool</a> is wildly underrated. It&#8217;s good for much more than messing around with celebrity faces or other random attempts to doctor photos. It&#8217;s particular <strong>good at taking specific shapes and molding them into another shape without ruining the appearance</strong>. This point is exactly why we&#8217;ll use it to shape our new drop shadow.</p><p>With the shadow layer selected, head to Edit&gt;Transform&gt;Warp to bring up the warping grid. Use the handles on this control to give a curvature to the blurred rectangle. Feel free to shift the layer around to get the best positioning.</p><p><img
class="aligncenter" title="Warp grid in action" src="http://buildinternet.s3.amazonaws.com/images/warping-drop-shadows/drop-shadow-warp-grid.png" alt="Warp grid in action" width="600" height="300" /></p><p>Once the shape is set, simply lower the layer&#8217;s opacity down to about 15% and you&#8217;ve got a finished shadow that simulates a subtle page curl. Nice work!</p><p><img
class="aligncenter" title="A warped drop shadow" src="http://buildinternet.s3.amazonaws.com/images/warping-drop-shadows/warped-shadow-final.png" alt="A warped drop shadow" width="600" height="300" /></p><h3>Wrapping Up</h3><p>There you have it, a drop shadow that gives content areas a feeling of &#8220;coming off the page&#8221; depth. As you might have guessed by now, this is a perfect footer background for content areas throughout the page. Not bad!</p><p>Related posts:<ol><li><a
href='http://buildinternet.com/2009/03/light-and-shadows-feathering-gradients-in-photoshop/' rel='bookmark' title='Permanent Link: Light and Shadows &#8211; Feathering Gradients in Photoshop'>Light and Shadows &#8211; Feathering Gradients in Photoshop</a> <small>The Overview The Basics of Feathering and Getting Started So...</small></li><li><a
href='http://buildinternet.com/2009/03/quick-tip-use-layer-masks-to-erase-in-photoshop/' rel='bookmark' title='Permanent Link: Quick Tip &#8211; Use Layer Masks to Erase in Photoshop'>Quick Tip &#8211; Use Layer Masks to Erase in Photoshop</a> <small>We&#8217;ve all had to work with photos that need to...</small></li><li><a
href='http://buildinternet.com/2010/02/flexible-color-schemes-in-layouts-with-rgba/' rel='bookmark' title='Permanent Link: Flexible Color Schemes in Layouts with RGBa'>Flexible Color Schemes in Layouts with RGBa</a> <small>This will be an experiment in transparency. CSS has come a long...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=fk8AZVdtRFg:O9K922O36Q8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=fk8AZVdtRFg:O9K922O36Q8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=fk8AZVdtRFg:O9K922O36Q8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=fk8AZVdtRFg:O9K922O36Q8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=fk8AZVdtRFg:O9K922O36Q8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=fk8AZVdtRFg:O9K922O36Q8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=fk8AZVdtRFg:O9K922O36Q8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=fk8AZVdtRFg:O9K922O36Q8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=fk8AZVdtRFg:O9K922O36Q8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=fk8AZVdtRFg:O9K922O36Q8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/fk8AZVdtRFg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/06/warping-drop-shadows-to-give-depth/feed/</wfw:commentRss> <slash:comments>25</slash:comments> </item> <item><title>How to Automatically Linkify Text with PHP Regular Expressions</title><link>http://buildinternet.com/2010/05/how-to-automatically-linkify-text-with-php-regular-expressions/</link> <comments>http://buildinternet.com/2010/05/how-to-automatically-linkify-text-with-php-regular-expressions/#comments</comments> <pubDate>Sun, 30 May 2010 00:55:21 +0000</pubDate> <dc:creator>Brian Muse</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Advanced]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Regular Expressions]]></category> <category><![CDATA[Web Development]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8784</guid> <description><![CDATA[Good software enables us to take a lot of niceties for granted. Intelligent interfaces handle all the simple tasks so that we don&#8217;t need to worry about them. For example, when I type &#8220;www.desktopped.com&#8221; into an email or an instant message, I expect that it will be clickable on the other end without having to [...]Related posts:<ol><li><a
href='http://buildinternet.com/2010/04/automatically-shorten-url-on-page-load-in-wordpress/' rel='bookmark' title='Permanent Link: Automatically Shorten URL on Page Load in WordPress'>Automatically Shorten URL on Page Load in WordPress</a> <small>A few weeks back, we posted a tutorial using the...</small></li><li><a
href='http://buildinternet.com/2009/07/an-introduction-to-object-oriented-php-part-3/' rel='bookmark' title='Permanent Link: An Introduction to Object Oriented PHP &#8211; Part 3'>An Introduction to Object Oriented PHP &#8211; Part 3</a> <small>Introduction Welcome to the third and final part of a...</small></li><li><a
href='http://buildinternet.com/2009/08/fundamentals-of-mysql-query-validation/' rel='bookmark' title='Permanent Link: Fundamentals of MySQL Query Validation'>Fundamentals of MySQL Query Validation</a> <small>Editor&#8217;s Note: This is a guest post from Christian Engel,...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/VswWrbHmDKdKPczZbgxfph2ukLE/0/da"><img src="http://feedads.g.doubleclick.net/~a/VswWrbHmDKdKPczZbgxfph2ukLE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/VswWrbHmDKdKPczZbgxfph2ukLE/1/da"><img src="http://feedads.g.doubleclick.net/~a/VswWrbHmDKdKPczZbgxfph2ukLE/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8784"></span><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></p><p>Good software enables us to take a lot of niceties for granted. Intelligent interfaces handle all the simple tasks so that we don&#8217;t need to worry about them. For example, when I type &#8220;<a
href="http://www.desktopped.com">www.desktopped.com</a>&#8221; into an email or an instant message, I expect that it will be clickable on the other end without having to manually add in HTML tags. Another example is parsing text from a twitter feed. For example, &#8220;<a
href="http://www.twitter.com/desktopped">@desktopped</a> is a blog about the <a
href="http://search.twitter.com/search?q=computers">#computers</a>&#8220;, we expect both <a
href="http://www.twitter.com/desktopped">@desktopped</a> and <a
href="http://search.twitter.com/search?q=computers">#computers</a> to be links.</p><p>The ability to &#8220;linkify&#8221; text is a great tool to have when developing a blog or website. Possible uses include:</p><ul><li>Turning URLs clickable in content, comments, and anywhere else</li><li>Turning valid email addresses clickable</li><li>Turning twitter text clickable so that <a
href="http://www.twitter.com/desktopped">@desktopped</a>, <a
href="http://search.twitter.com/search?q=computers">#computers</a>, <a
href="http://www.desktopped.com">www.desktopped.com</a> all become links.</li></ul><p>To search a string for patterns, such as strings that begin with &#8220;http://&#8221; or &#8220;@&#8221; is an ability that can be applied in almost endless ways to improve the way we process and display data.</p><p>How can we do this? The best way with PHP is to use a universal pattern matching syntax called regular expressions and some useful PHP functions.</p><h3>Regular Expressions Basics</h3><p>A regular expression is a pattern string that represents a set of strings by using a variety of special characters.</p><h4>The Basic Special Characters</h4><ul><li>| connects two possible values and will turn up a match if the string matches either. For example hi|hello matches the strings &#8220;hi&#8221; and &#8220;hello&#8221;</li><li>() are used to group values and set order of operations. For example, br(i|y)an will match both &#8220;brian&#8221; and &#8220;bryan&#8221;.</li><li>[] are used to match a single character that appears inside the brackets. [abc] will match &#8220;a&#8221;, &#8220;b&#8221;, or &#8220;c&#8221;, but not &#8220;d&#8221;.</li><li>* will turn up a match if there is zero or more of the preceding element. The string go*gle will match &#8220;ggle&#8221;, &#8220;gogle&#8221;, &#8220;google&#8221;, &#8220;gooogle&#8221;, etc.</li><li>+ will turn up a match if there is one or more of the preceding element. The string go+gle will match &#8220;gogle&#8221;, &#8220;google&#8221;, gooogle&#8221;, etc.</li><li>? will turn up a match if there is zero or one of the preceding character. The string desktopp?ed will match both &#8220;desktopped&#8221; and &#8220;desktoped&#8221;.</li></ul><h4>Other Common Special Characters</h4><ul><li>\w will match a &#8220;word&#8221; character, which translates to any character alphanumeric or &#8216;_&#8217;</li><li>\n \r and \t will match a new line, carriage return and tab respectively.</li></ul><p>A full reference for special characters can be found here:</p><p>http://www.php.net/manual/en/function.preg-replace.php#89364</p><h3>PHP Function: preg_replace</h3><p>The preg_replace function in PHP will take a regular expressions pattern, a replacement string, and the text to be examined as arguments. It will check the input text against the pattern and then if there&#8217;s a match it will place certain pieces of the input text into the replacement string.</p><p>The pieces that are placed into the replacement string are determined by what is in parenthesis in the pattern string. They are then referenced in the replacement string by using $0, $1, $2, etc., where the $n matches the nth parenthesized pattern.</p><h4>A Simple Example</h4><pre class="php" name="code">$text= 'My name is Brian';
$pattern = 'My name is (Brian|Sam|Zach)';
$replacement = '$1 is a pretty cool guy.';
echo preg_replace($pattern, $replacement, $text);</pre><p>The code will output &#8220;Brian is a pretty cool guy.&#8221; If $text was &#8220;My name is Zach&#8221;, the output would be &#8220;Zach is a pretty cool guy.&#8221; If $text was &#8220;My name is Nick&#8221;, there&#8217;d be no match and the original text would be returned; &#8220;My name is Nick&#8221;.</p><h4>Useful Regex Functions</h4><p>This function will turn all URLs in a body of text into clickable links</p><pre class="php" name="code">function link_it($text)
{
    $text= preg_replace("/(^|[\n ])([\w]*?)((ht|f)tp(s)?:\/\/[\w]+[^ \,\"\n\r\t&lt;]*)/is", "$1$2&lt;a href=\"$3\" &gt;$3&lt;/a&gt;", $text);
    $text= preg_replace("/(^|[\n ])([\w]*?)((www|ftp)\.[^ \,\"\t\n\r&lt;]*)/is", "$1$2&lt;a href=\"http://$3\" &gt;$3&lt;/a&gt;", $text);
    $text= preg_replace("/(^|[\n ])([a-z0-9&#038;\-_\.]+?)@([\w\-]+\.([\w\-\.]+)+)/i", "$1&lt;a href=\"mailto:$2@$3\"&gt;$2@$3&lt;/a&gt;", $text);
    return($text);
}</pre><p>This function will turn all pound signs (#) and at-sign (@) into hash tag and @reply links in a twitter feed.</p><pre class="php" name="code">function twitter_it($text)
{
    $text= preg_replace("/@(\w+)/", '&lt;a href="http://www.twitter.com/$1" target="_blank"&gt;@$1&lt;/a&gt;', $text);
    $text= preg_replace("/\#(\w+)/", '&lt;a href="http://search.twitter.com/search?q=$1" target="_blank"&gt;#$1&lt;/a&gt;',$text);
    return $text;
}</pre><p>This function finds strings in your post body that you&#8217;ve identified with the pattern :tagname: and turns them into tag searches on your blog. For example: &#8220;This post is about :PHP:.&#8221; will result in &#8220;The post is about <a
href="http://buildinternet.com/tag/php/">PHP</a>&#8220;.</p><pre class="php" name="code">function tag_it($text)
{
    $text= preg_replace("/:(\w+):/", '&lt;a href="http://www.buildinternet.com/tag/$1/" target="_blank"&gt;$1&lt;/a&gt;',$text);
    return $text;
}</pre><p>This function will highlight search terms in search result titles on your WordPress blog. Pass an array of keywords and it will do the rest. (Must be used inside the loop)</p><pre class="php" name="code">function highlight_terms($keys_array)
{
    $title = get_the_title();
    return preg_replace('/('.implode('|', $keys_array) .')/iu', '&lt;span class="highlight"&gt;$0&lt;/span&gt;', $title);
}</pre><p>The function will take any string (usually a page title) and generate a URL slug.</p><pre class="php" name="code">function create_slug($string)
{
    $string= strtolower(trim($string));
    $string= preg_replace('/[^a-z0-9-]/', '-', $string);
    $string= preg_replace('/-+/', "-", $string);
    return $string;
}</pre><h4>Further Reading</h4><p>Regular Expressions Resource:<br
/> <a
href="http://www.regular-expressions.info">http://www.regular-expressions.info</a></p><p>PHP pre_replace Manual:<br
/> <a
href="http://php.net/manual/en/function.preg-replace.php">http://php.net/manual/en/function.preg-replace.php</a></p><p>Related posts:<ol><li><a
href='http://buildinternet.com/2010/04/automatically-shorten-url-on-page-load-in-wordpress/' rel='bookmark' title='Permanent Link: Automatically Shorten URL on Page Load in WordPress'>Automatically Shorten URL on Page Load in WordPress</a> <small>A few weeks back, we posted a tutorial using the...</small></li><li><a
href='http://buildinternet.com/2009/07/an-introduction-to-object-oriented-php-part-3/' rel='bookmark' title='Permanent Link: An Introduction to Object Oriented PHP &#8211; Part 3'>An Introduction to Object Oriented PHP &#8211; Part 3</a> <small>Introduction Welcome to the third and final part of a...</small></li><li><a
href='http://buildinternet.com/2009/08/fundamentals-of-mysql-query-validation/' rel='bookmark' title='Permanent Link: Fundamentals of MySQL Query Validation'>Fundamentals of MySQL Query Validation</a> <small>Editor&#8217;s Note: This is a guest post from Christian Engel,...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=ahrlJtyxXFs:mjR074-EoLU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=ahrlJtyxXFs:mjR074-EoLU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=ahrlJtyxXFs:mjR074-EoLU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=ahrlJtyxXFs:mjR074-EoLU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=ahrlJtyxXFs:mjR074-EoLU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=ahrlJtyxXFs:mjR074-EoLU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=ahrlJtyxXFs:mjR074-EoLU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=ahrlJtyxXFs:mjR074-EoLU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=ahrlJtyxXFs:mjR074-EoLU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=ahrlJtyxXFs:mjR074-EoLU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/ahrlJtyxXFs" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/05/how-to-automatically-linkify-text-with-php-regular-expressions/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>Interface Design is a Conversation</title><link>http://buildinternet.com/2010/05/interface-is-a-conversation/</link> <comments>http://buildinternet.com/2010/05/interface-is-a-conversation/#comments</comments> <pubDate>Sat, 01 May 2010 21:22:57 +0000</pubDate> <dc:creator>Zach Dunn</dc:creator> <category><![CDATA[Articles]]></category> <category><![CDATA[Communication]]></category> <category><![CDATA[Copywriting]]></category> <category><![CDATA[Interface Design]]></category> <category><![CDATA[Philosophy]]></category> <category><![CDATA[Usability]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8746</guid> <description><![CDATA[A recent round of client work at One Mighty Roar has got me thinking a lot more about successful interface design. Specifically, how can we build pages that send a clear message without losing aesthetic or professional edge? The question turns out not to be &#8220;How does it look?&#8221; but, &#8220;What is it saying?&#8221; Dazzling [...]Related posts:<ol><li><a
href='http://buildinternet.com/2010/03/effective-pitch-and-registration-design/' rel='bookmark' title='Permanent Link: Effective Pitch and Registration Page Design'>Effective Pitch and Registration Page Design</a> <small>This post is supported by Webdesigner Depot, a popular web...</small></li><li><a
href='http://buildinternet.com/2009/01/dont-click-here-placing-links-in-context/' rel='bookmark' title='Permanent Link: Don&#8217;t Click Here! &#8211; Placing Links in Context'>Don&#8217;t Click Here! &#8211; Placing Links in Context</a> <small>If you&#8217;re interested in reading this article, click here. On...</small></li><li><a
href='http://buildinternet.com/2009/12/what-nasa-can-teach-you-about-web-design/' rel='bookmark' title='Permanent Link: What NASA Can Teach You About Web Design'>What NASA Can Teach You About Web Design</a> <small>Today we&#8217;re going to talk about space. What does space...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/lvj0HcKaZMc36dfC9DHakWlXNFM/0/da"><img src="http://feedads.g.doubleclick.net/~a/lvj0HcKaZMc36dfC9DHakWlXNFM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/lvj0HcKaZMc36dfC9DHakWlXNFM/1/da"><img src="http://feedads.g.doubleclick.net/~a/lvj0HcKaZMc36dfC9DHakWlXNFM/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8746"></span><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></p><p>A recent round of client work at One Mighty Roar has got me thinking a lot more about successful interface design. Specifically, how can we build pages that send a clear message without losing aesthetic or professional edge? The question turns out not to be &#8220;How does it look?&#8221; but, &#8220;What is it saying?&#8221;</p><p>Dazzling graphics can lose the thrill over time, but a clearly worded page has lasting power.</p><p>I came to a realization. <strong>There are very few group interactions <em>with</em> the internet</strong>. It&#8217;s <em>rare</em> for more than one person to use the same computer and browse a website together. There are obviously times when everyone in your office gathers to watch a cute cat video on YouTube, but you get the idea. This one-to-one relationship has a few important implications:</p><ol><li>The site can typically speak directly to a single person rather than an entire organization. Instead treating the visitor like a faceless representative, they are now an individual.</li><li>You can start by addressing individual needs, then (if needed) the needs of the visitor&#8217;s group. This means that a site could have &#8220;You and your team will benefit&#8221; as opposed to &#8220;Your Company&#8221;. This is a subtle change, but as we&#8217;ll discuss later, it can pay to appeal to individual ego.</li></ol><p>You only have to care about one person at a time. That&#8217;s a <em>powerful</em> direction.</p><h3>Interaction is Personal</h3><p
style="text-align: center;"><img
class="aligncenter" src="https://buildinternet.s3.amazonaws.com/images/interface-conversation/you-and-site-relationship.jpg" alt="Personalized Site Interaction" width="600" height="200" /></p><p>A one-to-one interaction with a visitor is low risk. With nobody is watching over your shoulder and rating your interactions, there is no pressure to fake understanding. It&#8217;s like asking your best friend to explain something to you &#8212; they&#8217;ll be direct and conversational. <strong>With this type of relationship, a visitor&#8217;s ego and reputation can stay untouched.</strong> This is why blogs are such a great way to learn new skills, the process is judgement-free and failing doesn&#8217;t hurt.</p><p>In recent years, the trend has been to replace the standard &#8220;Welcome&#8221; to a more personalized &#8220;Hello&#8221;. This is a step in the right direction. As Darren Hoyt recently wrote about in &#8220;<a
title="Designing with Social Skills" href="http://www.darrenhoyt.com/2010/04/20/designing-with-social-skills/">Designing with Social Skills</a>&#8220;, interfaces should be designed for humans.</p><p>A large company probably won&#8217;t want to greet visitors in the same way that a designer does on his portfolio. There&#8217;s a level of professionalism that needs to be maintained, and the larger the entity represented, the more important the tone. I firmly believe that it is possible to show professionalism without sacrificing a personalized conversation with the user. Not every visitor is going to be a potential investor with an MBA. But if they were, would it even matter? Business professionals are people at the end of the day too, after all.</p><h3>Readability Matters</h3><p>Jason Fried said it best with &#8220;<a
href="http://37signals.com/svn/archives2/getting_real_copywriting_is_interface_design.php">Copywriting is Interface Design</a>&#8220;. <strong>A button&#8217;s label has just as much (if not more) impact as the design of the button itself</strong>. In the one-to-one relationship that visitors have with a site, phrasing and reading level can be considered convienences of an interface. This is why tools like <a
title="Advanced Grammar and Spelling Check" href="http://afterthedeadline.com/">After The Deadline</a> are so important with web copy. These kinds of services consider the implications of grammar on <em>comprehension</em>, and not just technical mistakes.</p><p
style="text-align: center;"><a
title="Simply Worded Titles" href="http://37signals.com/"><img
class="aligncenter" src="https://buildinternet.s3.amazonaws.com/images/interface-conversation/37signals-simple-wording.png" alt="37Signals Simple Wording" width="600" height="400" /></a></p><p>It&#8217;s always suprised me how more service-oriented sites don&#8217;t include a &#8220;reading level&#8221; button right next to the font size options. Isn&#8217;t it just as important to understand the content as it is to see the letters clearly? The message of &#8220;If you don&#8217;t understand this, you shouldn&#8217;t be here&#8221; is a barrier to interface design. It&#8217;s a free excuse to ignore real problems.</p><p>The &#8220;About Us&#8221; page is not a collegiate thesis paper nor is it a first-grade picture book. The problem is that of those two extremes, sites are more likely to fall into the &#8220;professionalism&#8221; trap of overdesigned sentences. On the other hand, <strong>when&#8217;s the last time you wished a site used bigger words?</strong></p><h4>How to Chart Readability</h4><p>Readability of the English language can be measured using a number of tests. For example, the <a
title="Flesh-Kincaid on Wikipedia" href="http://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_test">Flesch-Kincaid</a> rates readability by grade level and is calculated using a combination of words, syllables, and sentence structures. The <a
title="The ARI" href="http://en.wikipedia.org/wiki/Automated_Readability_Index">Automated Readability Index</a> is another popular method.</p><p><em><strong>Try This:</strong> Google Docs has a few of these measures built in by default, but for a quick test try using <a
title="Readability Score Tool" href="http://www.addedbytes.com/code/readability-score/">this online tool</a>. Put some of your own work to the test. Are you overdesigning sentences?</em></p><h3>Wording Can Be Selfish</h3><p>When I&#8217;m on a website, <strong>I don&#8217;t care about &#8220;The Site Policy&#8221;, but I do care how it affects me</strong>. Headings and copy can afford to be selfish, because that&#8217;s probably what they care most about. Be self-centered on behalf of the visitor, and you&#8217;ll be surprised at how well the results come out.</p><h4>Lessons from FAQ</h4><p>The average Frequently Asked Questions page is a great reference for this. One of the reasons that FAQ pages work so well is because they phrase problems in terms of the user. Rather than &#8220;Billing Policy&#8221;, the FAQ becomes &#8220;How will <em>I</em> be billed?&#8221; Wording is concrete and in relation to the user instead of some abstract idea. <strong>It&#8217;s all about you</strong>.</p><p
style="text-align: center;"><a
title="Sample Account FAQS" href="http://help.beanstalkapp.com/faqs/account-billing"><img
class="aligncenter" src="https://buildinternet.s3.amazonaws.com/images/interface-conversation/beanstalk-faq-wording.jpg" alt="Beanstalk FAQ Wording" width="600" height="400" /></a></p><p>Let&#8217;s use <a
title="Sample Account FAQS" href="http://help.beanstalkapp.com/faqs/account-billing">Beanstalk&#8217;s service documentation</a> as an example. They make heavy use of personalized language to present common questions. Would their documentation be as effective without it? Most likely, but the real added value is much more subtle. The Beanstalk folks have shown that they realize people (not robots) use the service. These are people that would rather get things done instead of feel a false sense of professionalism from decoding overdesigned sentences.</p><p>If an idea can be done in a single sentence, why not?</p><h3>What About You?</h3><p>What&#8217;s your take on successful interfaces? Assuming a page layout is successful, how do you keep communication clear? If you have feedback or suggestions that you&#8217;d like to share on this, please let us know in the comments below.</p><h4>Resource &amp; Further Reading</h4><p>For those interested in a little more.</p><ol><li><a
title="Grammar and Spelling Check" href="http://afterthedeadline.com/">After The Deadline</a></li><li><a
title="W3C on Readability" href="http://www.w3.org/TR/WCAG20/#understandable">Understandable Interface Principles from the W3C</a></li><li><a
title="A Collection of Readability Tips" href="http://www.problogdesign.com/blog-usability/30-ways-to-improve-readability/">30 Ways to Improve Readability</a></li><li><a
title="Goals instead of Actions" href="http://www.usabilitypost.com/2010/02/16/focus-on-goals/">Focus on Goals, Not Actions</a></li><li><a
title="Writing with Users in Mind" href="http://www.uxbooth.com/blog/writing-user-friendly-content/">Writing User Friendly Content</a></li></ol><p>Related posts:<ol><li><a
href='http://buildinternet.com/2010/03/effective-pitch-and-registration-design/' rel='bookmark' title='Permanent Link: Effective Pitch and Registration Page Design'>Effective Pitch and Registration Page Design</a> <small>This post is supported by Webdesigner Depot, a popular web...</small></li><li><a
href='http://buildinternet.com/2009/01/dont-click-here-placing-links-in-context/' rel='bookmark' title='Permanent Link: Don&#8217;t Click Here! &#8211; Placing Links in Context'>Don&#8217;t Click Here! &#8211; Placing Links in Context</a> <small>If you&#8217;re interested in reading this article, click here. On...</small></li><li><a
href='http://buildinternet.com/2009/12/what-nasa-can-teach-you-about-web-design/' rel='bookmark' title='Permanent Link: What NASA Can Teach You About Web Design'>What NASA Can Teach You About Web Design</a> <small>Today we&#8217;re going to talk about space. What does space...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNwRBKPP7TI:Yexk1H0uAN0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNwRBKPP7TI:Yexk1H0uAN0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=mNwRBKPP7TI:Yexk1H0uAN0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNwRBKPP7TI:Yexk1H0uAN0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=mNwRBKPP7TI:Yexk1H0uAN0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNwRBKPP7TI:Yexk1H0uAN0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=mNwRBKPP7TI:Yexk1H0uAN0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNwRBKPP7TI:Yexk1H0uAN0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=mNwRBKPP7TI:Yexk1H0uAN0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=mNwRBKPP7TI:Yexk1H0uAN0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/mNwRBKPP7TI" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/05/interface-is-a-conversation/feed/</wfw:commentRss> <slash:comments>28</slash:comments> </item> <item><title>Things to Know About Custom Tumblr Theme Design</title><link>http://buildinternet.com/2010/04/things-to-know-about-custom-tumblr-theme-design/</link> <comments>http://buildinternet.com/2010/04/things-to-know-about-custom-tumblr-theme-design/#comments</comments> <pubDate>Mon, 26 Apr 2010 18:02:13 +0000</pubDate> <dc:creator>Zach Dunn</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Basics]]></category> <category><![CDATA[Design]]></category> <category><![CDATA[FAQ]]></category> <category><![CDATA[Layout]]></category> <category><![CDATA[Template]]></category> <category><![CDATA[Tumblr]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8532</guid> <description><![CDATA[Tumblr has done a lot of growing over the past few years. Recently I&#8217;ve had to develop a few themes inside of Tumblr for part of a larger overall campaign. Coming from WordPress, I appreciated the platform&#8217;s simplicity, but wasn&#8217;t sure about how customizable it would actually be. I was under the impression that custom [...]Related posts:<ol><li><a
href='http://buildinternet.com/2010/01/create-custom-option-panels-with-wordpress-2-9/' rel='bookmark' title='Permanent Link: Create Custom Option Panels with WordPress 2.9'>Create Custom Option Panels with WordPress 2.9</a> <small>WordPress is a powerful engine in itself, but sometimes themes...</small></li><li><a
href='http://buildinternet.com/2009/07/how-to-add-an-announcement-box-to-your-wordpress-theme/' rel='bookmark' title='Permanent Link: How to Add an Announcement Box to Your WordPress Theme'>How to Add an Announcement Box to Your WordPress Theme</a> <small>If you&#8217;ve been following this blog for over a month,...</small></li><li><a
href='http://buildinternet.com/2009/06/quick-tip-separate-page-templates-in-wordpress/' rel='bookmark' title='Permanent Link: Quick Tip &#8211; Separate Page Templates in WordPress'>Quick Tip &#8211; Separate Page Templates in WordPress</a> <small>Sometimes not every page on a blog can fit the...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/mTHioIxmZ352h9UZQptfP0qSS2M/0/da"><img src="http://feedads.g.doubleclick.net/~a/mTHioIxmZ352h9UZQptfP0qSS2M/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/mTHioIxmZ352h9UZQptfP0qSS2M/1/da"><img src="http://feedads.g.doubleclick.net/~a/mTHioIxmZ352h9UZQptfP0qSS2M/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8532"></span><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></p><p>Tumblr has done a lot of growing over the past few years. Recently I&#8217;ve had to develop a few themes inside of Tumblr for part of a larger overall campaign. Coming from WordPress, I appreciated the platform&#8217;s simplicity, but wasn&#8217;t sure about how customizable it would actually be. I was under the impression that custom theme design was a lot more complicated than it actually is.</p><p>This post goes over a few of the basic questions that I&#8217;ve come across in starting with custom theme development for Tumblr blogs. It&#8217;s not a definitive list, but should help get you moving the first time through.</p><p>Tumblr is not a typical content management system. It&#8217;s a simple way to put categorized types of information online in blog format. You will probably not be able to teach your theme new tricks by expanding <a
title="Tumblr's API" href="http://www.tumblr.com/docs/en/api">the API</a>. The focus is on rearranging the blog&#8217;s content using basic HTML and CSS, just like the <a
title="CSS Zen Garden" href="http://www.csszengarden.com/">CSS Zen Garden project started years back</a>.</p><p>You can still customize, just within the limits of basic check boxes, text inputs, and color swatches. If you think about it, that&#8217;s really all you need.</p><h3>Where Do My Images Go?</h3><p><a
href="http://www.tumblr.com/themes/upload_static_file"><img
class="aligncenter" title="Tumblr's Static Uploader" src="http://buildinternet.s3.amazonaws.com/images/tips-for-tumblr/upload-static-tumblr.png" alt="Tumblr's Static Uploader" width="600" height="323" /></a></p><p>Unless you&#8217;re a typography purist, you&#8217;ll probably use a few images in theme design. In the past, posting images to &#8220;closed&#8221; systems had involved an upload to a third-party (e.g. Image Shack) and then linking images that way. As it turns out, <strong>you don&#8217;t have to host your own theme files</strong>. <a
title="Tumblr Uploader" href="http://www.tumblr.com/themes/upload_static_file">Tumblr offers a static file uploader</a> for use with custom themes. Just make sure to respect the uploader, and keep it limited to theme assets only. If you turn it into a personal dumping ground, your account can get banned.</p><h3>Build in Blocks</h3><p>Content types break down into blocks. You can specify a photo post using Block:Photo and a quote using Block:Quote. Your theme&#8217;s HTML is really just a single page with all possible options on it. When a visitor loads the page, the content displays according to the structure defined by its block. All post types are encapsulated by the {block:Posts} tag.</p><h4>A Sample Block</h4><pre class="html" name="code">&lt;div id="wrapper"&gt;
	&lt;!-- Start of Post Type Blocks --&gt;
	{block:Posts}

		&lt;!-- Sample Quote Block --&gt;
		{block:Quote}
			&lt;div class="quote"&gt;
				{Quote}
				{block:Source}
		 			&lt;span class="source"&gt;{Source}&lt;/span&gt;
				{/block:Source}
			&lt;/div&gt;
		{/block:Quote}

		&lt;!-- Sample Photo Block --&gt;
		{block:Photo}
			&lt;div class="photo"&gt;
				{LinkOpenTag}
					&lt;img src="{PhotoURL-500}" alt="{PhotoAlt}"/&gt;
				{LinkCloseTag}
				{block:Caption}
					&lt;p&gt;{Caption}&lt;/p&gt;
				{/block:Caption}
			&lt;/div&gt;
		{/block:Photo}

	{/block:Posts}
&lt;/div&gt;</pre><h3>You Start with Some Basic Variables</h3><p>The theme HTML declares Tumblr variables using a special markup that looks something like this:</p><pre class="html" name="code">{MetaDescription}</pre><p>In most cases, these variables represent options available within the customize menu in Tumblr&#8217;s dashboard. In the snippet above, the &#8220;MetaDescription&#8221; will load whatever the Info&gt;Description box contains. MetaDescription is an example of one of the <a
title="Basic Variables" href="http://www.tumblr.com/docs/en/custom_themes#basic-variables">basic variables that every theme starts with</a>. Think of it like a simplified version of WordPress&#8217; template tags.</p><h3>Custom Options are Easy</h3><p><img
class="aligncenter" title="A Sample Options Panel" src="http://buildinternet.s3.amazonaws.com/images/tips-for-tumblr/tumblr-theme-options.png" alt="A Sample Options Panel" width="600" height="323" /></p><p>Most Tumblr users will probably not know HTML and CSS like you do. If you plan on developing a theme to release to the general community, <strong>it&#8217;s a good idea to make as much of the theme controllable from the customize menu as possible.</strong> The default code editor is not the most elegantly designed, and it&#8217;s definitely not something users should have to change font colors from.</p><p>If you have to use an API that isn&#8217;t already supported within Tumblr&#8217;s initial tags, you can do so with some JavaScript and a custom field. As mentioned above, server-side scripting is off the table.</p><h4>Defined via Meta Tag</h4><p>You declare all custom options using a meta tag in the top of the theme&#8217;s HTML. If we wanted to specify a field for favorite book, the code might look something like this:</p><pre class="html" name="code">&lt;meta name="text:Favorite Book" content=""/&gt;</pre><p>This would cause the following option to display inside the theme customization screen:</p><p><img
class="aligncenter" title="Favorite Book Option" src="http://buildinternet.s3.amazonaws.com/images/tips-for-tumblr/tumblr-custom-book-text.jpg" alt="Favorite Book Option" width="600" height="250" /></p><p>You display the option&#8217;s value within the theme using a custom Tumblr tag:</p><pre class="html" name="code">&lt;p&gt;{text:Favorite Book}&lt;/p&gt;</pre><p>Notice how the prefix &#8220;text:&#8221; designates the type of field to display, and the content attribute specifies the default value. <strong>Spaces in the option&#8217;s name do not matter</strong>. The <a
title="Appearance Options" href="http://www.tumblr.com/docs/en/custom_themes#appearance-options">full documentation has a complete list of available options</a> including color swatches, image uploads, and checkbox IF statements.</p><h3>Comments Work Differently</h3><p><a
href="http://staff.tumblr.com/post/551098481/webby-awards"><img
class="aligncenter" title="A Tumblr Comment Feed" src="http://buildinternet.s3.amazonaws.com/images/tips-for-tumblr/tumblr-comment-feed.png" alt="A Tumblr Comment Feed" width="600" height="323" /></a></p><p>One of the most frustrating things to WordPress developers about Tumblr is the lack of comments. Users can certainly respond to posts, but not in the traditional &#8220;Type Message Here&#8221; way. Tumblr comments come in a few flavors of responses, and they take some getting used to for theme development.</p><p>If I like another Tumblr blog&#8217;s post, I can reblog (post it to my page) with more comments in the post body. I could also &#8220;Like&#8221; a post without reposting it myself. In either case, Tumblr places a trackback line into original post that summarizes your action.</p><p>If you look at a few active posts on Tumblr, you see how posts can get away without have direct comments through this type of sharing. The staff blog announced <a
title="Tumblr Notes Announcement" href="http://staff.tumblr.com/post/79974741/notes">a new &#8220;Notes&#8221; feature</a> to add another option for post feedback, but not many themes support it yet.</p><h3>Other Expansions</h3><p>In the past 6 months, the Tumblr team has <a
title="Variable Transformations" href="http://staff.tumblr.com/post/536133267/theme-variable-transformations">continued to expand the platform&#8217;s capabilities</a>. They&#8217;ve added the ability to ask questions, get user feedback, and integrate Twitter accounts into themes. Before reinventing the wheel with JavaScript inserts, make sure that it doesn&#8217;t already appear within the growing documentation.</p><h3>A Growing Trend</h3><p><a
href="http://www.tumblr.com/themes/"><img
class="aligncenter" title="Tumblr Theme Garden" src="http://buildinternet.s3.amazonaws.com/images/tips-for-tumblr/tumblr-theme-garden.jpg" alt="Tumblr Theme Garden" width="600" height="323" /></a></p><p>These are just a few starting points for people starting out with Tumblr customization. The <a
title="Custom Theme Documentation" href="http://www.tumblr.com/docs/en/custom_themes">official theme documentation</a> has a more technical overview of possible theme routes, and it&#8217;s a great place to start with any questions. There&#8217;s still a learning curve (especially for the type of customization seen in the premium theme section) but like most things on the internet it just takes some time to get used to. The folks at <a
title="MetaLab" href="http://www.metalabdesign.com/">MetaLab</a> have done quite a few compelling designs for Tumblr, including a few of the<a
title="Simplefolio Theme" href="http://staff.tumblr.com/post/508317018/simplefolio-theme"> new premium options available in the Theme Garden</a>.</p><p>Based on Google searches, custom theme development is a topic that is only starting to get the coverage and tutorials it needs.  Nettuts recently published a full walk-through guide for its premium subscribers, but it was difficult to find many other widely available tutorials. Is this something you would like to see Build Internet focus on in upcoming posts? Let us know in the comments.</p><p>Related posts:<ol><li><a
href='http://buildinternet.com/2010/01/create-custom-option-panels-with-wordpress-2-9/' rel='bookmark' title='Permanent Link: Create Custom Option Panels with WordPress 2.9'>Create Custom Option Panels with WordPress 2.9</a> <small>WordPress is a powerful engine in itself, but sometimes themes...</small></li><li><a
href='http://buildinternet.com/2009/07/how-to-add-an-announcement-box-to-your-wordpress-theme/' rel='bookmark' title='Permanent Link: How to Add an Announcement Box to Your WordPress Theme'>How to Add an Announcement Box to Your WordPress Theme</a> <small>If you&#8217;ve been following this blog for over a month,...</small></li><li><a
href='http://buildinternet.com/2009/06/quick-tip-separate-page-templates-in-wordpress/' rel='bookmark' title='Permanent Link: Quick Tip &#8211; Separate Page Templates in WordPress'>Quick Tip &#8211; Separate Page Templates in WordPress</a> <small>Sometimes not every page on a blog can fit the...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=GbQ4VvlyP5c:lbigdHa7hG4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=GbQ4VvlyP5c:lbigdHa7hG4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=GbQ4VvlyP5c:lbigdHa7hG4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=GbQ4VvlyP5c:lbigdHa7hG4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=GbQ4VvlyP5c:lbigdHa7hG4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=GbQ4VvlyP5c:lbigdHa7hG4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=GbQ4VvlyP5c:lbigdHa7hG4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=GbQ4VvlyP5c:lbigdHa7hG4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=GbQ4VvlyP5c:lbigdHa7hG4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=GbQ4VvlyP5c:lbigdHa7hG4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/GbQ4VvlyP5c" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/04/things-to-know-about-custom-tumblr-theme-design/feed/</wfw:commentRss> <slash:comments>34</slash:comments> </item> <item><title>Adding MP3 Files to WordPress Themes</title><link>http://buildinternet.com/2010/04/adding-mp3-files-to-wordpress-themes/</link> <comments>http://buildinternet.com/2010/04/adding-mp3-files-to-wordpress-themes/#comments</comments> <pubDate>Fri, 23 Apr 2010 14:40:39 +0000</pubDate> <dc:creator>Joseph Hinson</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Embed]]></category> <category><![CDATA[MP3]]></category> <category><![CDATA[Theme Development]]></category> <category><![CDATA[Wordpress]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8700</guid> <description><![CDATA[This is a guest post from the talented Joseph Hinson. Interested in seeing your name up here too? Get in touch! In this post I’m going to talk about how to use WordPress’ attachment functionality to automatically detect and wrap mp3s in a player. If you want to your mp3s to automatically be wrapped in [...]Related posts:<ol><li><a
href='http://buildinternet.com/2010/04/automatically-shorten-url-on-page-load-in-wordpress/' rel='bookmark' title='Permanent Link: Automatically Shorten URL on Page Load in WordPress'>Automatically Shorten URL on Page Load in WordPress</a> <small>A few weeks back, we posted a tutorial using the...</small></li><li><a
href='http://buildinternet.com/2009/02/how-to-change-the-default-gravatar-in-wordpress/' rel='bookmark' title='Permanent Link: How to Change the Default Gravatar in WordPress'>How to Change the Default Gravatar in WordPress</a> <small>As much as I love seeing the mystery man appear...</small></li><li><a
href='http://buildinternet.com/2010/01/create-custom-option-panels-with-wordpress-2-9/' rel='bookmark' title='Permanent Link: Create Custom Option Panels with WordPress 2.9'>Create Custom Option Panels with WordPress 2.9</a> <small>WordPress is a powerful engine in itself, but sometimes themes...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/JNz1OfIUWwXEkKcSSgVybgxntr0/0/da"><img src="http://feedads.g.doubleclick.net/~a/JNz1OfIUWwXEkKcSSgVybgxntr0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/JNz1OfIUWwXEkKcSSgVybgxntr0/1/da"><img src="http://feedads.g.doubleclick.net/~a/JNz1OfIUWwXEkKcSSgVybgxntr0/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8700"></span><p
class="announcement">This is a guest post from the talented <a
href="http://www.geekoutwith.me/">Joseph Hinson</a>. Interested in seeing your name up here too? <a
href="mailto:hello@buildinternet.com">Get in touch</a>!</p><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><p>In this post I’m going to talk about how to use WordPress’ attachment functionality to automatically detect and wrap mp3s in a player.</p><p>If you want to your mp3s to automatically be wrapped in a player, you can incorporate that functionality into your theme by using the JW Player (or any other embeddable player) and WordPress’ <code>get_children()</code> function.</p><p>Before we get started, let me explain why this might be a better option than using a plugin:</p><ol><li>All you have to do is upload the mp3(s) and the theme takes care of the rest.</li><li>You get to learn more about <code>get_children(),</code> which you can do a lot with.</li><li>The JW Player can handle video and audio, so with a slight code modification, you&#8217;re in business for playing movies as well as music.</li><li>You don’t have to install a plugin that might break in a future version of WordPress.</li></ol><h3>The Player</h3><p><a
href="http://s3.amazonaws.com/buildinternet/live-tutorials/mp3-players/demo.html"><img
class="aligncenter" title="MP3 Players in Action" src="http://s3.amazonaws.com/buildinternet/images/mp3-players/players-sample-page.jpg" alt="MP3 Players in Action" width="600" height="300" /></a></p><div
class="livedownloadbtn"><a
class="livedemo" href="http://s3.amazonaws.com/buildinternet/live-tutorials/mp3-players/demo.html" target="_blank"></a><a
class="livedownload" href="http://s3.amazonaws.com/buildinternet/live-tutorials/mp3-players/embed-mp3-player.zip"></a></div><p>There are several embeddable mp3 players that you can use. I was using google reader&#8217;s player for awhile until I realized it doesn&#8217;t work well in IE, so I decided to go a different route here and use the jw-player. <a
href="http://www.longtailvideo.com/players/jw-flv-player/" target="_blank">Longtail Video&#8217;s JW Player</a> is free for non-commercial use and works in seemingly every browser.  It&#8217;s even got an easy setup wizard if you need help getting your embed code worked out. And though I use the term mp3 throughout this tutorial, <strong>the JW Player supports m4a as well</strong>.</p><p>The embed code for a single song looks like this:</p><pre class="html" name="code">&lt;object width='470' height='24' id='single2' name='single1'&gt;
	&lt;param name='movie' value='player.swf'&gt;
	&lt;param name='allowfullscreen' value='true'&gt;
	&lt;param name='allowscriptaccess' value='always'&gt;
	&lt;param name='wmode' value='transparent'&gt;
	&lt;param name='flashvars' value='file=PATH-TO-YOUR-MP3'&gt;
		&lt;embed
		  id='single2'
		  name='single2'
		  src='player.swf'
		  width='470'
		  height='24'
		  bgcolor='#ffffff'
		  allowscriptaccess='always'
		  allowfullscreen='true'
		  flashvars='file=PATH-TO-YOUR-MP3'
		/&gt;
&lt;/object&gt;</pre><h4>In Action</h4><p>The player looks like this:</p><p><object
id="single1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="470" height="24" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param
name="name" value="single1" /><param
name="allowfullscreen" value="true" /><param
name="allowscriptaccess" value="always" /><param
name="wmode" value="transparent" /><param
name="flashvars" value="file=http://s3.amazonaws.com/buildinternet/live-tutorials/mp3-players/jw-player/TTV-clip.mp3" /><param
name="src" value="http://s3.amazonaws.com/buildinternet/live-tutorials/mp3-players/jw-player/player.swf" /><param
name="bgcolor" value="#ffffff" /><embed
id="single1" type="application/x-shockwave-flash" width="470" height="24" src="http://s3.amazonaws.com/buildinternet/live-tutorials/mp3-players/jw-player/player.swf" bgcolor="#ffffff" flashvars="file=http://s3.amazonaws.com/buildinternet/live-tutorials/mp3-players/jw-player/TTV-clip.mp3" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" name="single1"></embed></object></p><p>I&#8217;m going to download the player and store all the files in a subdirectory of my theme called &#8220;jw&#8221;, so I&#8217;ll use the WordPress function <code>template_url</code> /jw/ to point to that directory. In reality, it&#8217;s http://my-site.com/wp-content/themes/my-theme/jw/.</p><h3>The Code</h3><p>In your template file (<code>index.php</code> or <code>single.php</code>), we’re gonna use the <a
href="http://codex.wordpress.org/Function_Reference/get_children">get_children() WordPress function</a> to get the attachments that match a specific <a
href="http://www.w3schools.com/media/media_mimeref.asp">mime type</a> (of audio &#8211; that will handle mp3s and m4as). The function returns an array that we’ll loop through using a PHP <code>foreach</code>. So, here’s what we’re gonna do:</p><ol><li>Store the array that’s generated from the function in a variable called $mp3s</li><li>Check to make sure the variable $mp3s isn’t empty (that an mp3 is present as an attachment)</li><li>Loop through the mp3s attached, showing each mp3 in the embedded player.</li></ol><p>The following code should take place inside the loop:</p><pre class="html" name="code">&lt;?php $mp3s = get_children( 'numberposts=-1&amp;post_type=attachment&amp;post_mime_type=audio&amp;post_parent='.$post-&gt;ID );

	if (!empty($mp3s)) : ?&gt;

		&lt;?php foreach($mp3s as $mp3) : ?&gt;
			&lt;object width='470' height='24' id='single&lt;?php echo $mp3-&gt;ID; ?&gt;' name='single&lt;?php echo $mp3-&gt;ID; ?&gt;'&gt;
				&lt;param name='movie' value='player.swf'&gt;
				&lt;param name='allowfullscreen' value='true'&gt;
				&lt;param name='allowscriptaccess' value='always'&gt;
				&lt;param name='wmode' value='transparent'&gt;
				&lt;param name='flashvars' value='file=&lt;?php echo $mp3-&gt;guid;?&gt;'&gt;
					&lt;embed
					  id='single&lt;?php echo $mp3-&gt;ID;?&gt;'
					  name='single&lt;?php echo $mp3-&gt;ID;?&gt;'
					  src='&lt;?php bloginfo('template_url'); ?&gt;/jw/player.swf'
					  width='470'
					  height='24'
					  bgcolor='#ffffff'
					  allowscriptaccess='always'
					  allowfullscreen='true'
					  flashvars='file=&lt;?php echo $mp3-&gt;guid; ?&gt;'
					/&gt;
			&lt;/object&gt;
		&lt;?php endforeach; ?&gt;

	&lt;?php endif; ?&gt;</pre><h4>A few things to notice here:</h4><ol><li> I&#8217;m passing a parameter to <code>get_children</code> of <code>post_parent = $post-&gt;ID</code>. This passes the ID of the page/post you&#8217;re on to the function. As long as you&#8217;re inside the loop, this will work, otherwise, you have to somehow get the ID then pass it in a different way.</li><li>The parameter numberposts is set to -1, which means it will show every uploaded attachment that matches the mime type of audio. You can change this to a number if you would like to limit the amount of songs that show.</li><li>I&#8217;m using <code>$mp3-&gt;ID</code> (the ID of the mp3 attachment itself) to make sure that each instance of the player has a unique ID, otherwise the players will break each other.</li></ol><h3>Once more, this time with Gusto!</h3><p>This works well for showing the players, but what about the title and description? You can also pull that info from the attachment. In the next example we’re going to wrap each mp3 that’s attached in an <code>li</code> with the attachment title and description also being shown.</p><pre class="html" name="code">&lt;?php $mp3s = get_children( 'numberposts=-1&amp;post_type=attachment&amp;post_mime_type=audio&amp;post_parent='.$post-&gt;ID );

	if (!empty($mp3s)) : ?&gt;

	&lt;ul&gt;

	&lt;?php foreach($mp3s as $mp3) : ?&gt;
		&lt;li&gt;
			&lt;?php if(!empty($mp3-&gt;post_title)) : //checking to make sure the post title isn't empty ?&gt;
				&lt;h4 class="title"&gt;&lt;?php echo $mp3-&gt;post_title; ?&gt;&lt;/h4&gt;
			&lt;?php endif; ?&gt;

			&lt;?php if(!empty($mp3-&gt;post_content)) : //checking to make sure something exists in post_content (description) ?&gt;
				&lt;p class="description"&gt;&lt;?php echo $mp3-&gt;post_content; ?&gt;&lt;/p&gt;
			&lt;?php endif; ?&gt;

			&lt;object width='470' height='24' id='single&lt;?php echo $mp3-&gt;ID; ?&gt;' name='single&lt;?php echo $mp3-&gt;ID; ?&gt;'&gt;
				&lt;param name='movie' value='player.swf'&gt;
				&lt;param name='allowfullscreen' value='true'&gt;
				&lt;param name='allowscriptaccess' value='always'&gt;
				&lt;param name='wmode' value='transparent'&gt;
				&lt;param name='flashvars' value='file=&lt;?php echo $mp3-&gt;guid;?&gt;'&gt;
					&lt;embed
					  id='single&lt;?php echo $mp3-&gt;ID;?&gt;'
					  name='single&lt;?php echo $mp3-&gt;ID;?&gt;'
					  src='&lt;?php bloginfo('template_url'); ?&gt;/jw/player.swf'
					  width='470'
					  height='24'
					  bgcolor='#ffffff'
					  allowscriptaccess='always'
					  allowfullscreen='true'
					  flashvars='file=&lt;?php echo $mp3-&gt;guid; ?&gt;'
					/&gt;
			&lt;/object&gt;
		&lt;/li&gt;

	&lt;?php endforeach; ?&gt;

	&lt;/ul&gt;

&lt;?php endif; ?&gt;</pre><h4>Take Note</h4><ul><li>I&#8217;ve wrapped the p and h4 tags in if statements that check to see if the values of the title and description actually have content before the elements are created. <em>If nothing is filled in for a description, the paragraph tag doesn&#8217;t get created.</em></li><li><strong>Helpful Tip:</strong> You can find out what is stored in any array by using the PHP function <code>print_r(the_array_name)</code>. It will print out a list of values stored in the array. It gets a little jumbled in the content, so view source for best results if you use this.</li></ul><h3>Done and Done. But don&#8217;t screw up now.</h3><p>Once you’ve inserted the code in your theme, all you have to do to to take advantage of your new found functionality, is upload an mp3 using the “Add Media” button through the WordPress Add Post page. Once you&#8217;ve uploaded your mp3, just click &#8220;Save All Changes&#8221; and close. <strong>Don&#8217;t click &#8220;Insert into post&#8221;. </strong>For some reason, the mp3 doesn&#8217;t get registered as an attachment if you insert it into a post.</p><p><img
src="http://s3.amazonaws.com/buildinternet/images/mp3-players/save-all-changes.jpg" alt="Save All Changes" width="600" height="563" /></p><p><em>Before you guys give me crap about liking Carrie Underwood, let me just disclaim that this is for my daughter&#8217;s blog.</em></p><p>I&#8217;ve tested this with mp3s and m4as. For some reason, my WordPress install gave me a bit of a fit when I tried m4ps, but I&#8217;m pretty sure the JW Player supports them.</p><p>Even if this functionality isn&#8217;t something you specifically need, it is still a good exercise to try this if you&#8217;ve never learned about <code>get_children()</code>. You can do a lot to enhance your theme with it.</p><p>What about you? Do you currently use <code>get_children()</code> or something similar to beef up your theme? If so, tell me about it.</p><h4>Further Reading</h4><ol><li><a
href="http://www.longtailvideo.com/players/">Longtail Video &#8211; Home of the JW Player</a></li><li><a
href="http://codex.wordpress.org/Function_Reference/get_children">WordPress Function Reference &#8211; get_children()</a></li><li><a
href="http://www.w3schools.com/media/media_mimeref.asp">More About Mime Types</a></li></ol><p>Related posts:<ol><li><a
href='http://buildinternet.com/2010/04/automatically-shorten-url-on-page-load-in-wordpress/' rel='bookmark' title='Permanent Link: Automatically Shorten URL on Page Load in WordPress'>Automatically Shorten URL on Page Load in WordPress</a> <small>A few weeks back, we posted a tutorial using the...</small></li><li><a
href='http://buildinternet.com/2009/02/how-to-change-the-default-gravatar-in-wordpress/' rel='bookmark' title='Permanent Link: How to Change the Default Gravatar in WordPress'>How to Change the Default Gravatar in WordPress</a> <small>As much as I love seeing the mystery man appear...</small></li><li><a
href='http://buildinternet.com/2010/01/create-custom-option-panels-with-wordpress-2-9/' rel='bookmark' title='Permanent Link: Create Custom Option Panels with WordPress 2.9'>Create Custom Option Panels with WordPress 2.9</a> <small>WordPress is a powerful engine in itself, but sometimes themes...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=SFu8Dyd5Voo:wjpDYNVNfMA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=SFu8Dyd5Voo:wjpDYNVNfMA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=SFu8Dyd5Voo:wjpDYNVNfMA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=SFu8Dyd5Voo:wjpDYNVNfMA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=SFu8Dyd5Voo:wjpDYNVNfMA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=SFu8Dyd5Voo:wjpDYNVNfMA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=SFu8Dyd5Voo:wjpDYNVNfMA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=SFu8Dyd5Voo:wjpDYNVNfMA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=SFu8Dyd5Voo:wjpDYNVNfMA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=SFu8Dyd5Voo:wjpDYNVNfMA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/SFu8Dyd5Voo" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/04/adding-mp3-files-to-wordpress-themes/feed/</wfw:commentRss> <slash:comments>36</slash:comments> <enclosure url="http://s3.amazonaws.com/buildinternet/live-tutorials/mp3-players/jw-player/TTV-clip.mp3" length="616917" type="audio/mpeg" /> </item> <item><title>Designing Without Gradients</title><link>http://buildinternet.com/2010/04/designing-without-gradients/</link> <comments>http://buildinternet.com/2010/04/designing-without-gradients/#comments</comments> <pubDate>Mon, 19 Apr 2010 04:29:07 +0000</pubDate> <dc:creator>Zach Dunn</dc:creator> <category><![CDATA[Articles]]></category> <category><![CDATA[Design Trend]]></category> <category><![CDATA[Gradient]]></category> <category><![CDATA[Interface Design]]></category> <category><![CDATA[Typography]]></category><guid isPermaLink="false">http://buildinternet.com/?p=8665</guid> <description><![CDATA[The gradient has become a universal crutch. Hypocrisy, we know, considering parts of this blog&#8217;s current design. Gradients have a habit of decorating since the design trends introduced by Web 2.0 gloss. The starburst badges and text reflections may have faded into obscurity, but the brash gradient stuck it out. Please don&#8217;t read this as [...]Related posts:<ol><li><a
href='http://buildinternet.com/2009/03/light-and-shadows-feathering-gradients-in-photoshop/' rel='bookmark' title='Permanent Link: Light and Shadows &#8211; Feathering Gradients in Photoshop'>Light and Shadows &#8211; Feathering Gradients in Photoshop</a> <small>The Overview The Basics of Feathering and Getting Started So...</small></li><li><a
href='http://buildinternet.com/2009/06/five-minute-upgrade-making-your-design-pop/' rel='bookmark' title='Permanent Link: Five Minute Upgrade &#8211; Making Your Design Pop'>Five Minute Upgrade &#8211; Making Your Design Pop</a> <small>// 1. Brighten Colors If you have a design that...</small></li><li><a
href='http://buildinternet.com/2009/03/five-minute-upgrade-variety-in-title-and-body-fonts/' rel='bookmark' title='Permanent Link: Five Minute Upgrade &#8211; Variety in Title and Body Fonts'>Five Minute Upgrade &#8211; Variety in Title and Body Fonts</a> <small>Are you a one font wonder? Contrary to what you...</small></li></ol>]]></description> <content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/GoJkCpd-kBJT0CZyXG_a93eJqvs/0/da"><img src="http://feedads.g.doubleclick.net/~a/GoJkCpd-kBJT0CZyXG_a93eJqvs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/GoJkCpd-kBJT0CZyXG_a93eJqvs/1/da"><img src="http://feedads.g.doubleclick.net/~a/GoJkCpd-kBJT0CZyXG_a93eJqvs/1/di" border="0" ismap="true"></img></a></p><p><span
id="more-8665"></span><div
class="ad-under-title-wrap"><script type="text/javascript">google_ad_client = "pub-8509777014645596";
	/* Under Post Title (Alt) */
	google_ad_slot = "9795724515";
	google_ad_width = 336;
	google_ad_height = 280;</script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></p><p>The gradient has become a universal crutch. Hypocrisy, we know, considering parts of this blog&#8217;s current design. Gradients have a habit of decorating since the design trends introduced by Web 2.0 gloss. The starburst badges and text reflections may have faded into obscurity, but the brash gradient stuck it out.</p><p>Please don&#8217;t read this as a &#8220;you&#8217;re doing it wrong&#8221; post, because there have been far too many of those in the design community lately. <strong>Consider this a demonstration of alternatives</strong> with a low risk invitation to try it out.</p><p>You don&#8217;t need to quit gradients completely. This is just a call to reconsider if they are necessary in each design. Rather than taking a bland design and making it more &#8220;exciting&#8221; with gradients, why not play with the typography? Adjust the page hierarchy! Bring in some rich photography!</p><h3>Learn to Leave Out</h3><p><img
class="aligncenter" title="Good Stuff and Everything Else" src="http://s3.amazonaws.com/buildinternet/images/designing-without-gradients/good-vs-everything-else.png" alt="Good Stuff and Everything Else" width="600" height="250" /></p><p>Many web design blogs periodically give tutorials guiding through the Photoshop process of page design. It&#8217;s given a weird impression that gradient-based designs are a universal way to making brilliant web pages. I&#8217;ll be the first to admit, we&#8217;re guilty of writing posts that ended up being read in the wrong way too.</p><p>The majority of bloggers are not trying to force conformity, but the posts leave often leave out the discussion of judgement. <a
title="One of our biggest misunderstandings" href="http://buildinternet.com/2009/06/five-minute-upgrade-making-your-design-pop/">In one of our &#8220;Five Minute Upgrade&#8221; series posts</a>, one of the biggest misunderstandings was from an assumption that all of the techniques presented should be used together. Web design is not a cookie cutter checklist of design trends to include, it&#8217;s also about learning what to leave out and arrange whatever remains. WeFunction had a great article about these marks of quality in their post &#8220;<a
title="Quality in Web Design" href="http://wefunction.com/2009/04/quality-within-web-design/">How to Spot Quality in Web Design</a>&#8220;.</p><p><strong>You&#8217;re not doing it wrong, but you can do it </strong><em><strong>differently</strong></em><strong>.</strong></p><h4>Fundamentals Stay in Style</h4><p>You don&#8217;t have to be an elite art school graduate in order to design well, but it does take some breaks from the typical &#8220;How to Design an Awesome Site in Photoshop&#8221; in order to learn the technical stuff. The technical aspects of design don&#8217;t go out of style. Font kerning and color theory are not trends that will look dated a year from now, but the average Photoshop tutorial will. Many of the <a
title="Old Photoshop Tutorials" href="http://www.good-tutorials.com/tutorials/all?page=1800&amp;s=date">trendy design techniques from a couple years ago</a> look laughable by today&#8217;s standards.</p><h3>Meaningful Design Elements</h3><p>What do designs <em>without</em> gradients focus on? These are the types of design that would shine in black and white. But even that&#8217;s vague, so what <em>specifically</em> can you focus on designing the hell out of? I&#8217;ve included a few points below that I think are important in distinguishing between decorating and design progress.</p><h4>Typography</h4><p>There are a limited number of web-safe fonts available, but typography is more than just <em>which</em> typeface – it&#8217;s about how that typeface is used. You could play with italics, uppercase, and bold versions of web fonts and get interesting mixes. If a design calls for more font diversity, you can always replace some headings with text as images or use <a
title="TypeKit Fonts" href="http://typekit.com/">JavaScript replacement options like TypeKit</a>.</p><h4>Visual Hierarchy</h4><p><img
class="aligncenter" title="Lead the Eye" src="http://s3.amazonaws.com/buildinternet/images/designing-without-gradients/your-eyes-here.png" alt="Lead the Eye" width="600" height="250" /></p><p>If a certain element is important, how do you let people know about it? Hierarchy can come in form of color, size, weight, or location. If text is large and at the top of the page, it&#8217;s likely an important piece. <strong>Decorators like gradients have a hard time expressing hierarchy without the help of other concrete design elements.</strong></p><h4>The Economy of Line</h4><p>This is an interesting concept I first learned about in Jason Beaird&#8217;s &#8220;<em><a
title="Concepts of Web Design" href="http://www.amazon.com/gp/product/0975841963?ie=UTF8&amp;tag=buiint-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0975841963">The Principles of Beautiful Web Design</a></em>&#8221; a few years back*. The concept is simple: If your design keeps its primary shape with only line tracing, it&#8217;s good to go. It&#8217;s a simple test for your design, and it helps identify layouts that rely on subtle changes in order to designate visual areas.</p><p>You can see a simple example of the test in action below on <a
title="Art in my Coffee" href="http://artinmycoffee.com/">Art In My Coffee</a>, a Tumblr run by <a
title="Jina Bolton" href="http://sushiandrobots.com">Jina Bolton</a> and <a
title="Meagan Fisher" href="http://owltastic.com/">Meagan Fisher</a>. Incidentally, both of them have site designs with typography to die for.</p><p><a
href="http://artinmycoffee.com/"><img
class="aligncenter" title="Economy of Line in Action" src="http://s3.amazonaws.com/buildinternet/images/designing-without-gradients/art-in-coffee-lines-comparison.jpg" alt="Economy of Line in Action" width="600" height="600" /></a></p><p><strong>Gradients alone are not a good way to differentiate between sections in a web layout</strong>. Because gradients do not have any rigid boundaries, they can reinforce existing design elements, but they shouldn&#8217;t be the primary indicator.</p><p><em>*If you haven&#8217;t read Jason&#8217;s book already and are interested in the type of formal design that most blog design tutorials gloss over, I highly recommend you get moving! It&#8217;s the type of gem that gives tangible concepts that carry across everything you design.</em></p><h3>Subtle is Powerful</h3><p>What if a gradient makes sense to include? Is there a more effective way to use them? Try practicing <em>subtlety</em>.</p><p>I believe that the best designs are those that take some time to figure out. This doesn&#8217;t mean in a &#8220;I&#8217;m confused&#8221; usability issue way, but rather a &#8220;This looks smooth, but I can&#8217;t quite figure out why&#8221; sense. <a
title="Soon to be Twitter" href="http://www.atebits.com/tweetie-iphone/">The atebits product page for Tweetie</a> (soon to be Twitter) is a good example of subtle gradients in action. The menu goes from a solid white of #FFFFFF and ends up at a slightly grayer tone of #E7E7E7. <strong>The transition is simple, subtle, and doesn&#8217;t demand extra attention.</strong></p><p><a
href="http://www.atebits.com/tweetie-iphone/"><img
class="aligncenter" title="Subtle Gradient Design" src="http://s3.amazonaws.com/buildinternet/images/designing-without-gradients/atebits-gradient-menu.jpg" alt="Subtle Gradient Design" width="600" height="200" /></a></p><p>We&#8217;ve reached a point with CSS3 where basic gradients can even be simulated without images. The button style Google uses in a number of its web applications is actually built using three different bands of solid colors. Doug Bowman did an <a
title="Recreating the Button" href="http://stopdesign.com/archive/2009/02/04/recreating-the-button.html">extensive writeup explaining the button design process</a> that&#8217;s well worth a read.</p><h3>Your Challenge from Here</h3><p>Your challenge (optional, of course) is to make a small sample of design without the use of gradients. <a
title="Dribbble Community" href="http://dribbble.com">Dribbble</a> has demonstrated how a small piece of design can speak volumes for the big picture. Even though we haven&#8217;t managed to land an invite yet (<a
title="We'll do you a favor." href="mailto:zach@buildinternet.com">subtle hint</a>), we can still take some inspiration for this exercise. Post a link to what you come up with in the comments below! We&#8217;d love to see what you can create.</p><p>Related posts:<ol><li><a
href='http://buildinternet.com/2009/03/light-and-shadows-feathering-gradients-in-photoshop/' rel='bookmark' title='Permanent Link: Light and Shadows &#8211; Feathering Gradients in Photoshop'>Light and Shadows &#8211; Feathering Gradients in Photoshop</a> <small>The Overview The Basics of Feathering and Getting Started So...</small></li><li><a
href='http://buildinternet.com/2009/06/five-minute-upgrade-making-your-design-pop/' rel='bookmark' title='Permanent Link: Five Minute Upgrade &#8211; Making Your Design Pop'>Five Minute Upgrade &#8211; Making Your Design Pop</a> <small>// 1. Brighten Colors If you have a design that...</small></li><li><a
href='http://buildinternet.com/2009/03/five-minute-upgrade-variety-in-title-and-body-fonts/' rel='bookmark' title='Permanent Link: Five Minute Upgrade &#8211; Variety in Title and Body Fonts'>Five Minute Upgrade &#8211; Variety in Title and Body Fonts</a> <small>Are you a one font wonder? Contrary to what you...</small></li></ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/buildinternet?a=NjchrhXMQvE:vx3h4kEQrE4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=NjchrhXMQvE:vx3h4kEQrE4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=NjchrhXMQvE:vx3h4kEQrE4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=NjchrhXMQvE:vx3h4kEQrE4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=NjchrhXMQvE:vx3h4kEQrE4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=NjchrhXMQvE:vx3h4kEQrE4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=NjchrhXMQvE:vx3h4kEQrE4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=NjchrhXMQvE:vx3h4kEQrE4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/buildinternet?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/buildinternet?a=NjchrhXMQvE:vx3h4kEQrE4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/buildinternet?i=NjchrhXMQvE:vx3h4kEQrE4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/buildinternet/~4/NjchrhXMQvE" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://buildinternet.com/2010/04/designing-without-gradients/feed/</wfw:commentRss> <slash:comments>56</slash:comments> </item> </channel> </rss><!--
This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 37/156 queries in 0.213 seconds using disk

Served from: cazzu.com @ 2010-07-20 19:55:55 -->
