4
Creating Content that Drives Traffic

A site that is brilliantly optimized for search engines is folly if it’s shy on quality content that’s relevant to the target audience. As it turns out, your content is the best tool to generate traffic.

Although your audience may discover you via one of your many findability strategies, they stay on your site and return often only if your content is engaging. Findability and content have a very symbiotic relationship that is degraded if either is not pulling its weight.

Great content presented without consideration for findability is destined to remain on its undiscovered island in a sea of millions of websites. Conversely, poor content that is perfectly optimized to be findable may draw traffic but users are likely to leave immediately, never to return again, if they find nothing of use to them.

Content that Sucks (Users In)

Well-produced, valuable content on a website has a gravity that can suck users in with great force. When people find something on the Web that’s exciting, they love to be the first to introduce others to it. Perhaps it’s ego or maybe it’s altruism. Combine this fact of human nature with the inherent connectivity of the Web and you have a recipe to unite a large number of people around your website.

Let’s examine a scenario of an e-commerce site that provides a user with content that is exceptionally valuable.

The Story of Tom

A user named Tom wants to buy a home theater system but he’s unsure what equipment he’ll need and how to set it up properly. Naturally, he turns to the Web to find answers to his questions. Using one of the major search engines he types in the key phrase “home theater system advice” and runs across a site that matches his search criteria. The site is for a small retail chain that sells high quality home theater paraphernalia. Beyond the typical online store this website has expert- and user-authored reviews about equipment, and articles discussing the requirements and setup of a top-notch system. The site also provides links to other useful sites that cover home theater culture. The welcoming voice of the content makes Tom feel like this otherwise very complex task is achievable even for a novice. Links within the articles and reviews make it easy for Tom to connect his new knowledge to the various products the site sells.

Because Tom is able to learn all he needs to know from a site that also sells the products he needs, he makes all of his purchases for his home theater on this site. Once his order arrives at his home Tom returns to the website so he can get guidance on the setup process.

Because Tom’s experience was so positive, he recommends the site to his friends and family. He returns to the website again to write his own reviews of the products he’s purchased. Finally, Tom posts on his personal blog about the new home theater he’s so excited about and mentions the wonderful information he found on the site, providing a link.

All three of the goals of findability—help people find your site, help people find what they’re looking for within your site, encourage repeat traffic—were realized in this scenario because of the presence of quality content on the site.

Let’s examine more closely how the content served the goals of findability.

1. Keywords and phrases in the articles and reviews created a search engine referral.

2. The user was able to find the products he needed for his home theater through the links in the articles and reviews.

3. The user returned to the site multiple times to reread useful content and created more valuable content for the site in the form of user-generated product reviews.

4. The user was so satisfied he helped others find the site and created a link on his blog.

Not only was findability improved for Tom’s experience by including relevant, well-produced content on the site, it actually caused Tom to improve the findability of the site for future users. The great content turned Tom into an evangelist for the site. He told his friends and family, and created a link to the site from his blog. Tom actually generated more traffic himself! His inbound link to the site will also help boost search engine rankings because inbound links are an indicator of the trustworthiness of a site.

The product reviews that Tom wrote also increased the amount of useful content on the site that could turn other visitors into customers. Keywords within his reviews could help foster more search traffic referrals.

The moral of Tom’s story is that when you create quality content that serves the needs of your audience you will be rewarded. Your reward might be increased sales, better brand awareness, more user involvement, or simply more traffic on your site that could make any business or communication goal a reality. This story speaks to the beauty of the Web. If you solve a problem for people, provide something that’s useful, create something entertaining, or produce something unique, your good deeds come back to you.

Content Karma

As illustrated in the story of Tom, when you solve a problem or provide something useful for your users you improve the findability of your site. Users want to tell others about the great things they find on the Web.

Karma, an ancient Hindu concept of cause and effect, could be applied to the practice of content development. A very simplified explanation of karma is that our deeds create reciprocal returns.

When you create content that altruistically serves the needs of your audience you are likely to receive positive benefits in the form of inbound links to your site, more online sales, flattering blog posts about your site, improved brand awareness/perception, and more traffic. A site without quality content will have a hard time achieving these goals. To further illustrate the power of content karma let’s take a look at a real-world example of content good deeds that have generated huge findability returns.

Blueprint CSS Framework

Norwegian tech student Olav Frihagen Bjorkoy created an exceptionally useful CSS framework called Blueprint (http://code.google.com/p/blueprintcss/) that quickly became a huge sensation in the Web design world.

The secret to the success of Blueprint is that it adroitly addresses a pain point that many Web designers experience: The process of setting up page layouts and the extensive cross-browser testing that ensues can be tedious. Although many helpful articles and tools already exist to assist Web designers with their work, nothing actually unites theory and practice in a practical fashion. Olav’s Blueprint was the solution that many designers had been searching for, and word of it spread like wildfire.

When Blueprint was released many well-known Web designers like Khoi Vinh (http://subtraction.com), Jeff Croft (http://jeffcroft.com), and Mark Boulton (http://markboulton.co.uk) wrote posts on their blogs that broadcast word of Olav’s project to thousands of Web designers. Hundreds of blog posts from Web designers all over the world followed, singing Blueprint’s praises and providing inbound links to Olav’s site.

Within the first week of the release of his project Olav saw a giant traffic spike and a number of new subscriptions to his blog’s RSS feed.

“My blog went from about 300 visitors a day to just over 20,000 each day during the following week. The number of people subscribing to my feed went up from about 200 to 3000”

In about three weeks Blueprint had been downloaded more than 25,000 times. By watching the number of bookmarks stored at http://del.icio.us—a popular social bookmarking site—Olav was able to further gauge the success of the project.

“I also like to count how many people bookmark my articles at http://del.icio.us, as I think that gives a good clue of how many people actually plan on using this in the future. [The current number of individual bookmarks is] closing in on 6000 …”

Blueprint was not a marketing initiative. As Olav describes it himself in his 2007 interview with Khoi Vinh (http://www.subtraction.com/archives/2007/0807_the_framewor.php)

“Blueprint is an unknown, untested and unused framework from an unknown guy launched from a highly irregular blog. This should make it quite clear that the craving for a proper designer’s framework almost couldn’t be greater.”

Although part of the success of Blueprint can be attributed to the timing of its release, ultimately it was Olav’s desire to share with his community that made it the phenomenon that it is. By publishing a useful solution to a common problem Olav generated throngs of visits to his site. According to Google his site now has 22,500 inbound links.

Blueprint is an amazing example of a good deed returning huge findability benefits.

Open Content Generates Attribution

Often when people develop great content their first impulse is to prevent others from using or modifying it by creating copyright restrictions. There are certainly times when you need to employ a restrictive license on your work.

Google, for example, would not want to open up its search algorithm to the public, as it would be the downfall of its business. However, there are plenty of situations where large and small organizations alike can reap significant findability benefits by adopting a more open license that allows others to use and modify their content.

Image
“Open Content, Remix Culture, and the Sharing Economy: Rights, Ownership, and Getting Paid”

http://audio.sxsw.com/podcast/interactive/panel/2007/SXSW07.INT.20070312.OpenContentRemixCulture.mp3

As mentioned at the end of Chapter 2 in the sidebar “ Creative Commons Licensing,” Creative Commons (http://creativecommons.org) offers a free, legal means of simultaneously protecting and sharing content of all sorts. Rather than completely blocking usage and publication rights, a Creative Commons license outlines the ways people can share or remix your content into something new.

One popular Creative Commons license prevents commercial gain from your content while allowing users to remix it as long as they provide attribution to you and allows others to make further modifications under the same stipulations. When users create derivations of your works under this license they’ll be required to identify you and your site as the source of the original version. Their attribution is likely to create new inbound links to your site and generate more traffic for you.

Improvements that your users make on your content can also allow your ideas to become bigger than you might have been able to make them. Your good karma of sharing the original idea and letting it grow in a community will not go unnoticed. Open licensing can bolster your site’s reputation in ways that would have been impossible if you had opted for a closed approach.

Olav Frihagen Bjorkoy’s CSS framework is distributed under an open source MIT license (http://www.opensource.org/licenses/mit-license.php) that allows others to improve upon what he’s created. The openness of the project actually helped contribute to the excitement around it and the quality of the initial release, which incorporates other designers’ ideas as well.

The good karma of sharing your ideas and keeping them open can bolster the findability of your site. Good ideas tend to generate buzz and support, both of which lead to an increase in traffic on your site.

The Mark of Quality Content

Creating content can be a daunting task. Sometimes it’s hard to know where to begin. The secret to success is to simply know the traits of quality content.

Quality content…

Image is on topic

Image fills a niche

Image is authoritative and passionate

Image is trustworthy

Image is actionable, entertaining, or otherwise appeals to audience interests

Image is original

Image uses an appropriate voice for the audience

Each of these traits of quality in some way relates back to the relevance of your content to your audience. Beneath all of the technical complexities of the medium the Web is fundamentally about communication. Sending the wrong message, an irrelevant message, an untrustworthy message, or delivering the message in the wrong package can be the downfall of a website. Let’s examine each mark of quality in further detail to ensure your content serves your audience well.

Stay on Topic

When building your content identify a topic or small series of topics and stick to them religiously. We’ve probably all run across blogs that were at one point interesting, but then took a turn towards the irrelevant when the author began posting about his honeymoon. If your blog is the personal account of your life, then this content is entirely on target. If your readers are lured to your site by your brilliant posts about the history of design, then a post about off-topic personal matters may cost you a few readers. Staying on topic helps ensure your message is relevant to your audience.

Fill a Niche

A generalized topic like architecture is very difficult to do justice even with a whole team of content creators. Instead of targeting nebulous topics that could have many different meanings to many different people, find the niche that is not being addressed well or at all by other websites. Attempts at addressing very broad topics often result in content that is generic and meaningless to everyone. Broad topics also put you in the company of stiffer competition who may already have captured your audience’s loyalties.

A brilliant teacher of mine once told me, “Never say candy bar when you can say Snickers.” His advice speaks to the point that specificity makes your message more powerful and relevant to your audience than if you are generalizing.

A site about rural, vernacular architecture in 20th century Alabama will be exceptionally relevant to a very specific audience who is likely to be engaged because the topic focuses precisely on something that interests them but may not be addressed elsewhere.

Regardless of how obscure a niche you may be filling, there’s someone on the Web who will be interested. A niche audience is much more likely to be instantly loyal, visit regularly, create links to your site, and tell others about it as well. This is exactly the type of audience you want to build!

Be Passionate and Authoritative

Nothing inspires passion in an audience more than the passion of the speaker. Whatever your subject matter is, make sure it’s one that you believe in with gusto and let that shine through in the content of your site. Part of being passionate is wanting to know as much about a subject as possible. When you target a niche subject and address it in a very comprehensive way you become an authority that your audience will start to trust.

Sometimes being authoritative doesn’t require that you actually author all of the content yourself. Assembling a link library that outlines where all worthwhile knowledge on a subject can be located is exceptionally useful and relevant to your audience, making you an authority on the subject just by association. Such a resource would also generate repeat traffic, as many people would use it as a frequent reference. Taking the time to carefully compile a refined link library illustrates the passion you have for your subject, which your audience will appreciate.

We’ll be tackling this problem later in this chapter by building a link library of our own.

Be Trustworthy

In order to be seen as an authority on a subject, your audience must trust you. Once you’ve established trust you don’t want to do anything to jeopardize it as it doesn’t come easy, and is even more difficult to restore. Trust is perhaps the most crucial and complex mark of quality to understand, as it can be quickly undermined and the etiquette of preserving it can get fuzzy at times.

One thing that is not fuzzy about maintaining trust is that your audience will be more apt to trust your content if it is factually sound. Be sure to research where necessary to confirm that you are presenting content that is based on fact, not conjecture.

When you make a number of typos and spelling or grammar errors you erode audience trust in your authority. Be sure to proofread, and spell-check before presenting your copy. Production values of your content are just as important as the ideas within. It’s better to delay publication of your content than to post it with typos or spelling errors that will make you look like a knucklehead.

One thing you can count on is that you will make mistakes in your content at some point. Hey, to err is human! One of the great things about the Web is that you can quickly correct small errors and redistribute your content immediately.

If you make factual mistakes, though, be sure to transparently present your corrections indicating when and why you made the changes. Doing so indicates to your audience that you are not hiding your mistakes and you are genuinely concerned about the credibility of your content. HTML conveniently supports this practice with the <del> tag—indicating a deletion—and the <ins> tag—indicating an insertion. Here’s a simple example of how to correctly indicate a factual change in your content:

The second US president was <del cite="http://www.whitehouse.gov/ history/presidents/" datetime="20070818">Thomas Jefferson</del> <ins>John Adams</ins>.

As shown in FIGURE 4.1, browsers will by default display the deleted text with a strikethrough, and the correct inserted text will be displayed with an underline. Using the datetime and cite attributes you can provide further information in either <del> or <ins> to indicate when the correction was made, and provide a link to a document that indicates why the information was changed.

Figure 4.1 Using the <del> and <ins> tags you can correct your mistakes transparently.

Image

You may want to use a little CSS to change the default underline style of the <ins> to ensure that your users don’t mistake it for a text link. In this simple example I replace the underline with a bold font weight for emphasis

ins {text-decoration:none; font-weight:bold;}

TIP
You can learn more about <del> and <ins> at http://www.w3schools.com/tags/tag_del.asp

Audience trust in your content can also be degraded if you are not honest about affiliations that may impact your perspective on a subject. For example, if you write a glowing review on your personal blog of a product that is built by a company you work for, it’s probably a good idea to disclose this fact. As someone who may have a personal stake in the success of the product the perspective you are offering your audience on this product could be skewed, and therefore be perceived as a bit subversive. Disclosure to your readers of your affiliation with the company shows them that the information you are presenting is not trying to dupe them into buying it. They can either accept or reject your subjective recommendation. Either way, you are much better off letting your audience decide than run the risk of being perceived as having sneaky, ulterior motives.

Appeal to Your Audience’s Interests

People usually visit websites for very specific reasons. They want to solve a specific problem, learn about a subject, or be entertained. There are, of course, other reasons one might visit a site, but a user’s goals can often be placed in one of these categories. Knowing what your audience’s goals and interests are can help you identify what type of content you need to include on your site to encourage them to return.

If you are working in a team environment chances are an information architect has already researched your audience and outlined the type of content that will best serve their needs. If you are flying solo you’ll need to do a little research of your own. Although a complete discussion of user research is beyond the scope of this book, here are a few simple things you can do to help ensure your content is on target:

Image List the target audience groups identifying primary, secondary, and tertiary users.

Image List the goals and motivations of these users to identify what they would want from the site.

Image Thinking from your audience’s perspective, create a list of the types of content that you think would be desirable for your users.

Image If at all possible, speak to people in your target audience. Ask them if the type of content you plan on including in your site would be interesting.

Image After launching the site, solicit user feedback about the value of the content on your site.

Image Watch your traffic stats when the site is live to see what sections are the most popular and where users are browsing the longest.

Image
Norm Carr and Tim Meehan do a nice job of introducing the user research process in their article “What’s the Problem?” on A List Apart http://www.alistapart.com/articles/whatstheproblem.

When your content successfully addresses your users’ needs you increase the likelihood that they’ll come back again. Initial user research before planning and building your site is worth its weight in gold, as it will reveal the type of content you should include on your site.

Image
You’ll find a number of consistently brilliant articles on information architecture at http://informationarchitects.jp/.

Be Original

The Web is by nature a very competitive place. If your site offers similar things with the same approach as your competitors, then what motivation will users have to come to your site? Your content needs to be original in order to draw traffic and compel users to return. Originality is what will distinguish you among the crowds.

Ironically, originality doesn’t necessarily mean that your content or ideas are new to the world. You can present existing content in new ways to create an original perspective that people will enjoy.

Smashing Magazine (http://smashingmagazine.com) is a brilliant example of creating valuable, original content out of preexisting stuff—see FIGURE 4.2. As a Web design blog, Smashing Magazine often creates comprehensive lists of valuable resources that address a particular pain point in Web design. As the title suggests, the popular post “70 Expert Ideas for Better CSS Coding" provides a supremely comprehensive listing of CSS best coding practices culled from other sources. So what’s so original about that, if many of the ideas are from other places? No one else has assembled a solution so comprehensively and as well. Their originality is in how they identify a problem and then edit down a complete answer that only contains the best stuff. Sometimes that’s all it takes.

Figure 4.2 Smashing Magazine (http://smashingmagazine.com) provides its readers with unique content by creating comprehensive lists of valuable resources.

Image

Use an Appropriate Voice

The way you say something is often as important and what you are saying. Let’s revisit the earlier example of Tom shopping online for a home theater system. If the website that sold Tom his home theater equipment had provided its articles in a condescending tone, or had used too many technical terms that a novice wouldn’t understand, they would have probably lost his business.

You can find the appropriate voice for your content by considering the profile and needs of your target audience. Ask yourself these questions before writing your content:

Image What sort of reading level does my audience have?

Image Are they experts or novices on this subject?

Image Do users expect this site to be authoritative, or entertaining? Is it familiar or formal?

Image At what speed will my users be reading?

Image
“Writing Better” http://odeo.com/audio/11797773/play

As is often the case on the Web where users tend to read faster and in shorter bursts, the voice of your message may need to avoid flowery discourse and get to the point. Sometimes photos or illustrations can be the right voice rather than a paragraph that may not be read.

Keep It Coming

Once you’ve found your content niche be sure to publish often and on regular intervals. The frequency of publication depends on the type of content that you are providing. Articles about CSS techniques would need to be refreshed more often than a one page summary of a CSS property. Frequent updates where applicable will help bring users back to your website and build loyalty. Defining the update interval fosters planned visits to your site.

The hugely popular, homegrown cartoon site http://homestarrunner.com updates its content every Monday. Because its users know when to expect the next cartoon, each Monday 250,000 people return for some regularly scheduled entertainment. The underlying reason it draws so much traffic, though, is that its content is great!

A common myth in SEO is that search engines reward higher page ranking to sites that update their content often. This is untrue. A site that has not been updated since its original publication can rank equally as well as a site that is updated daily. Many factors can affect your search engine ranking but update frequency is not one of them.

All Roads Lead to Content

Once you’ve created great content you’ll want to make sure your users are finding it. Especially on large sites that have many subsections it’s important to create avenues into the areas where you want to funnel your traffic. The home page is a great place to create call outs that help users find the content you want to direct them towards.

FIGURE 4.3 shows a home page for photographer Stephen Grote (http://stephengrote.com) that draws the users’ attention to recently added photos and featured photography resources. Highlighting content updates makes the home page seem continually fresh while catering to repeat visitors who often search for what’s new on the site. The featured content directs users to various areas of the site that may otherwise have been overlooked.

Figure 4.3 On the left side of the home page of http://stephengrote.com recently added content is showcased to funnel traffic into various portions of the site that users may have otherwise missed.

Image

Happy Cog (http://happycog.com) also does a great job of directing traffic to all of the important places (see FIGURE 4.4). To educate new visitors about the company the home page provides a quick synopsis of who they are and what they do.

Figure 4.4 The Happy Cog website provides a number of quickly recognizable avenues into the content. The quick synopsis of the company at the top cleverly links to key sections where a user can learn more. Images in the center of the page capture attention and further funnel traffic to target areas.

Image

A site that doesn’t make the proper introductions to new visitors runs the risk of an increased bounce rate—the number of immediate exits from a site. The brief introduction acts like a “You Are Here” label on a map, providing users some orientation so they can confirm they’re in a place that may have what they’re looking for. When users stay on your site longer you increase the odds that they’ll do or learn something that achieves the goals of the site.

A solid home page design is a very powerful tool for pulling people into your content and making them stick around longer. Spend some time thinking about the hierarchy of the business and communication objectives for your website, and make sure your home page design reflects them.

NOTE
Derek Powazek provides further advice for your home page in his article entitled “Home Page Goals” on A List Apart http://www.alistapart.com/articles/homepagegoals.

Content of Many Flavors

The types of content you choose to add to your site all depend on the goals of your organization and the amount of time you’ll be able to dedicate to content production. Plans to add content can start with the best of intentions and end with a reality check when time and resources make content production difficult. Knowing a little about popular content types and the amount of production time required can help you define a content strategy that attracts your target audience without monopolizing your time.

Blogs

Blogs can be exceptionally effective content delivery platforms. They’re easy to set up, posts are often rich in keywords that attract search traffic, and they can be managed by a single person or an entire team of writers. Blog content is usually syndicated to other websites and platforms using a standardized form of XML called RSS or Really Simple Syndication. Users can subscribe to RSS feeds in aggregators such as Bloglines (http://bloglines.com), Netvibes (http://netvibes.com), or Google Reader (http://google.com/reader). These tools pull headlines from many sources and display them in a concise format so users can stay up to date with many sites without having to visit each one.

When content from your site is syndicated to other locations it increases readership and tends to improve repeat traffic. When users stay up to date on a site’s content changes they are more likely return.

Image
If you’re new to the concept of RSS you may want to watch the brilliantly simple video explanation of it provided by Common Craft http://www.commoncraft.com/rss_plain_english.

Most blog platforms automatically publish RSS feeds, allowing you to focus on your content rather than the technical aspects of publishing. We’ll explore blogs and their findability benefits in further detail in the following chapter.

Blogging should be avoided if your time and interest in creating new content is low. When blogs stagnate, users often stop returning to a site and will discontinue their subscription to the RSS feed. This creates a negative perception of your site that will deter traffic.

Team blogging makes keeping your content fresh much easier. Rather than resting all content production obligations on the shoulders of one person you can distribute them among many people. If you know you are going to be busy in the near future you can pre-author blog posts when your schedule is free and release them incrementally when your writing time is limited.

It’s a good idea to write about and link to other blog posts when possible. This will automatically publish an excerpt of your post as a comment on the other person’s blog. In addition to the excerpt a link to your site will be created from the site you are writing about. Inbound links to your site increase traffic and your page rank with search engines. This automatic publication between blogs is called a trackback and is a standard feature with most blogging platforms.

Although blogs are one of the most powerful content publication tools for generating traffic to your site they are also the most time-consuming. They require constant maintenance and a passion for your subject, but can provide huge traffic increases.

Articles, Case Studies, and White Papers

You may already have articles you’ve written, case studies on client projects, or white papers that provide a comprehensive explanation of a subject relevant to your audience. These are all valuable assets that can be published on your site with little or no modification. Assets like these are often already produced for clients and could potentially be shared with your audience who may be seeking advice on the same issues.

If possible, keep these assets in HTML format so search engines can easily index them. Search engines do index PDF files but HTML delivery offers better SEO opportunities.

Articles, case studies, and white papers tend to have a lot of keywords that can attract search engine traffic. Although they may take a long time to author if you are starting from scratch, they don’t require the maintenance that a blog does making them a practical solution if you are too busy to make regular content updates.

Writing articles for popular online publications is a great way to create exposure for your site while doing something positive for your online community.

Taking the time to write an article that shares a solution others may find useful not only builds your reputation among your audience but it also creates a very powerful inbound link to your site.

Online publications tend to have very high page rankings with search engines. A link from a site with a high page rank can exponentially build your page rank too. After the traffic spike that follows publication of an article your site will receive a lasting increase in search engine traffic.

Andy Rutledge, designer and principle of UNIT Interactive, regularly writes intelligent articles extolling the principles of design on his website (http://andyrutledge.com)—see FIGURE 4.5. His articles are read by about 3300 people daily, and have made a huge impact on his reputation in the industry.

Figure 4.5 Andy Rutledge’s site (http://andyrutledge.com) receives on average 3300 visitors a day because of his brilliant design articles.

Image

“… publishing articles on my site … is almost wholly responsible for my entire site traffic and is greatly responsible for my reputation in the industry. I find that the value of articles as demonstrations of my thinking, reasoning, insights, and approach to design-related issues is appreciated by both my peers and potential clients. I’d say that likely 70 percent of potential clients that contact me say that they decided to do so based on some article that I had published. This is not why I write or publish articles, but it is certainly a nice benefit.”

Andy’s also written for popular online publications like A List Apart, which has expanded awareness of his work in the industry. His 2007 article “Contrast and Meaning” (http://www.alistapart.com/articles/contrastandmeaning/) directed 1333 new visitors to his site in the first week of publication. By regularly sharing his ideas Andy Rutledge has not only built a loyal audience for his website, he’s also built a successful business.

Link Libraries

A link library is a collection of useful links to resources that your audience would find valuable. Rather than including every bookmark in your browser, a good link library should include only the most useful links that relate to a single theme or topic.

Link libraries require less maintenance and writing than many other content options. For someone with an exceptionally busy schedule a link library can be a practical content option that is feasible to maintain and is of great value to users. Good link libraries that contain a concise listing of resources tend to generate inbound links and blog posts that point new users to your site.

Later in this chapter we’ll see some practical code examples of how to build a link library using the popular bookmark management services Delicious (http://del.icio.us) and Magnolia (http://ma.gnolia.com).

Document Templates, Code Examples, and Other Tools

Publishing useful templates, code examples, and tools not only generate traffic to your site and buzz in the blogoshphere but also builds respect and a positive perception of your brand. These are assets that you may already have created for your personal use that could be shared with your audience.

Jonathan Snook’s color contrast checker (http://snook.ca/technical/colour_contrast/colour.html) is a handy little tool that compares the color of type to its background color in order to determine if it has enough contrast to be legible and accessible to users with color perception deficits (see FIGURE 4.6). Snook’s simple tool was created to serve his purposes and published to benefit his audience of Web designers.

Figure 4.6 Jonathan Snook’s color contrast checker is a useful tool that has generated a great deal of traffic for his site.

Image

According to Google, Snook’s color contrast checker has garnered around 300 inbound links to his site, which is a great reward for his efforts.

Reviews and Recommendations

Reviews and recommendations are another great way to provide your audience with relevant information that serves their needs and interests. The type of things you review will vary greatly depending on the goals of your site.

As we saw earlier in the story of Tom, e-commerce sites can improve sales and draw in more search traffic by providing expert reviews of products that help customers make informed purchases.

Sites that are focused on educating their audience might benefit by adding a book review section. Book reviews can supplement articles by providing further reading on a subject being discussed. They can also simply act as intriguing branches of secondary content that your audience can explore.

Terra Incognita (http://terraincognita.com)—an award-winning interactive narrative design firm in Austin, TX—provides book recommendations on their company website that relate to the various projects they’ve worked on and the principles that guide their work (see FIGURE 4.7). Their recommendations provide engaging secondary content that their audience enjoys browsing. They also embody the value system of the company, which produces educational content for clients such as National Geographic and the Smithsonian Museum.

Figure 4.7 Terra Incognita has included categorized book recommendations on their company website. The book recommendations serve their audience’s interests and embody the educational values of the firm.

Image

When you write reviews of anything on your site it’s a good idea to mark them up using the hReview microformat. As Chapter 2 pointed out in the section “More Microformats Worth Investigating,” reviews that employ hReview can be located using Technorati’s microformat search engine (http://kitchen.technorati.com/search/). The microformats site has a brilliant hReview creator (http://microformats.org/code/hreview/creator) that will build the markup for you as you type your content into a simple form. When you’ve posted your reviews to your server you can let Technorati know the location of your hReviews so users can easily find them. Just submit your URL to Pingerati (http://pingerati.net/) and you’re all set.

Syndicated Content (RSS)

RSS syndication of your content provides your users with a convenient way to stay up to date with your site. Any sort of content can be syndicated with RSS 2.0, including text, images, files, and audio.

Most blogs and content management systems publish RSS feeds automatically and even notify blog tracking services like Technorati when you publish. Blog tracking services then notify all subscribers to your RSS feed that new information is available for download. It’s a great way to keep users aware of your site and encourages repeat visits.

RSS also helps you to more widely distribute your content. RSS content can be displayed on many platforms and on many websites, all with links back to your site.

User-Generated Content (UGC)

User-generated content (UGC) is a powerful tool in the right situations. Most sites require some time to build an audience before UGC is a viable option. For UGC to work you’ll not only need a decent-sized audience, but you’ll also need a certain level of interest and loyalty that will change lurking users into content contributors.

In the best situations UGC is free content that generates search traffic and a great deal of buzz. At its worst UGC can be critical of the host site or organization or could absolutely fail by not generating any user contributions.

UGC comes in many shapes and sizes. Reviews, forums, media, and comments are just a few of the many options that can get your users involved on your site.

User-authored reviews of your products and services can help provide other users with some third-party validation of things you’re selling. Amazon does a brilliant job of letting users leave product feedback that may influence sales. Regardless of the positive or negative spin on a review, users reading it will greatly appreciate the added information that can help them make an informed purchase. As we saw in the previous story of Tom, providing users with useful information can promote sales and encourage repeat visits.

Forums are another popular platform for UGC. If your site is focused on providing users with information and solutions to common problems then a forum may be a good way to let users solve problems for one another. By watching hot topics on the forums you can decide the topic of your next article or blog post. Because posts tend to be keyword-rich, a thriving forum can be a huge attractor of search traffic.

Forums can be problematic, though. Spam is inevitably the bane of every forum moderator. You’ll need to make sure you use a forum platform that has sophisticated spam prevention if you want it to survive.

Forum moderation is important too and can be time-consuming. Every forum has some knucklehead who will say inappropriate or hurtful things. Although moderation can be time-consuming it is essential to making sure your users are comfortable enough to stick around.

Forums can also be an absolute flop if no one participates. Sometimes it just takes a few people asking some interesting questions to get the conversation started. If after a little prodding your forum doesn’t take off, then pull the plug, as a dormant forum speaks poorly of a site.

Look at your site traffic stats and blog comments before deciding to set up a forum. If your blog is getting only a few comments you can infer that a forum will probably not get the participation it needs.

TIP
If you are considering adding a forum to your site you may want to research some of the popular systems that are on the market. PHPBB (http://www.phpbb.com/) and vBulletin (http://www.vbulletin.com) are popular, feature-rich forums worth considering.

With the rise in popularity of UGC many organizations have jumped on the bandwagon before considering how appropriate it may be for their site. Lack of participation is not nearly as bad as what Chevy experienced in its contest to create the 2007 Tahoe video ad. Users submitted more than 30,000 videos, most of which actually promoted the Tahoe. But some of the ads subverted Chevy’s marketing goals by pointing out the poor fuel economy and impact the SUV has on the environment.

Although UGC can reduce the authoring time required to deliver good content, it’s not a cakewalk. Closely consider the ramifications and worst-case scenarios before jumping into something that could have a negative impact on your site and business.

NOTE
To learn more about the 2007 Chevy Tahoe user-generated ad campaign that went awry and view some of the controversial videos visit http://www.wired.com/wired/archive/14.12/tahoe.html.

Targeting Keywords in Your Content

In Chapter 2 we learned about the many places within your HTML documents where you can place keywords and phrases to generate more search referrals. Knowing where to place keywords is only half the battle. You’ll also need to know with which keywords you can be most successful.

Researching and Selecting Keywords

Blog posts, articles, reviews, and all of the other types of content previously mentioned would naturally be filled with keywords that will attract your target audience. But there are places on your site where it’s beneficial to include very targeted keywords in order to improve your placement on search results pages. These places include the title tag, meta description, headings, and copy for the home page. Targeted keywords in strategic areas of your HTML in conjunction with keyword-rich content can generate a lot of search traffic.

You may have a general idea of search terms to target, but sometimes our assumptions about keyword popularity don’t match reality. Rather than trying to guess which keywords will best match users’ search habits, you can get definitive answers through research.

One place to start your keyword research is on search engines themselves. Searching for the terms you think may be valuable will show you your competitors and potentially reveal additional terms that you may not have considered.

If you have an existing site you can learn a lot about the keywords your audience uses to locate it by searching social bookmarking sites like Delicious (http://del.icio.us) and Magnolia (http://ma.gnolia.com) for your URL (see FIGURE 4.8). The tags that people use on these sites to describe your content can reveal user search behaviors. If you see reoccurring tags then you may want to add those keywords to your list.

Figure 4.8 By searching for your URL on a social bookmarking site like Magnolia (http://ma.gnolia.com) you can identify what tags people are using to describe your content.

Image

Even if you don’t have an existing site or it’s not yet bookmarked in Magnolia or Delicious, you can still search social bookmarking systems for your initial keyword ideas to see what other keywords are related. With thousands of people bookmarking and tagging content daily Delicious and Magnolia can offer a wealth of knowledge about user search habits.

Wordtracker

To gain even more detailed keyword data you’ll need to consult tools built specifically for the task. Wordtracker (http://wordtracker.com) is a powerful tool used to identify which keywords have the most competition and how often users are searching for them. Wordtracker searches other websites that score well with search engines and shows you the keywords they use. It also gathers query statistics from the major search engines to help you determine what terms were recently popular, and which are likely to be popular in the future.

Wordtracker (see FIGURE 4.9) is a paid service, but it does have a free trial that allows you limited capabilities to see if the tool fits your needs. The costs are generally pretty reasonable and vary according to the duration of access to their tools.

Figure 4.9 Wordtracker is a handy tool to research the best keywords to target.

Image

Wordtracker’s lateral and thesaurus keyword search features can help you find terms that are similar to the one you’re searching for. Figure 4.9 illustrates a search for the keyword “espresso,” which produces synonyms like “coffee” and “latte” as well as lateral terms such as “coffee beans” and “barista.” Using Wordtracker you can discover many terms you’ve overlooked.

Once you find terms you can do a little further research to see how many users search for them and how many sites already target them. Broad terms that are searched for often such as “espresso” are much harder to successfully target because so many sites already compete for them. You’ll want to identify more niche terms that have fewer competitors but are still being searched for often.

When users search they tend to start with general terms and refine their search once they know more about the subject. It’s when users search for niche terms that they are most likely to make a purchase or take some other action on a website.

Wordtracker looks at the popularity of keywords and compares it to the amount of competition it has using a mathematical formula. The result of the formula is called a KEI or Keyword Effectiveness Index. Here’s how Wordtracker calculates the KEI of keywords.

KEI = (P2/C)

KEI: Keyword Effectiveness Index

P2: Popularity of Keyword Squared

C: Competitiveness (number of other sites optimized for that keyword)

A KEI between 10 and 100 is a good niche keyword or phrase to use as the balance between search frequency and competition for the term is good. Anything above 100 is even better but is very hard to find. See FIGURE 4.10.

Figure 4.10 Wordtracker’s data can help you determine which keywords will prove most successful.

Image

As you discover valuable keywords and phrases you can either perform further searches on them to identify more niche terms or you can add them to a keyword basket. The keyword basket is the final outcome of your research. It serves as the master list you’ll reference when building your site to target the search terms that will attract your target audience.

Other Keyword Research Services

If you’re not keen on forking out a few bucks to research your keywords with Wordtracker there are some free alternatives. Both Google and Yahoo! provide keyword research tools for current or prospective users of their text ad services. Both are absolutely free to use and do a nice job of providing lateral search terms and data on keyword popularity.

Google’s AdWords keyword tool (https://adwords.google.com/select/KeywordToolExternal) allows you to gather keyword data in two ways. If you are working on a new site you can enter a list of keywords to find related and synonymous terms. If you have an existing site you can enter the URL and the system will recommend keywords based on those it finds on your site.

In both situations the Google keyword research tool displays side-by-side bar charts that visually present the number of competitors and the number of searches for the term in the past month. Comparing the two charts makes it easy to identify the terms that will give you your best results.

It should be noted that the data Google displays is based on paid search competition for Google AdWords, not on the number of sites across the Web that prominently display the keywords. Because Google AdWords is a hugely popular advertising platform their data tends to closely parallel the competition for organic search terms, making the data still very relevant to your research. See FIGURE 4.11.

Figure 4.11 Google’s AdWords keyword research tool provides data about the frequency of searches for keywords and indicates how heavy the competition is for them. Their keyword research tool will even examine an existing site to identify recommended terms.

Image

NOTE
Organic search terms are those that sites feature in key areas of their markup to achieve prominent search engine rankings. Paid search terms are those that people bid on with search engines so their text ad will be featured above competitors.

Yahoo!’s keyword research tool provides similar data, but with less detail and fewer features than Google’s AdWords keyword tool. Enter a keyword into Yahoo!’s system and out pops a list of lateral and synonymous terms along with the number of times it was searched for in previous months.

The data tends to be a little older than Google’s and no information is provided about the competition for each keyword. Yahoo!’s keyword research tool is good but is perhaps best used as a supplement to confirm data from other sources. See FIGURE 4.12.

Figure 4.12 Yahoo!’s keyword research tool provides good lateral and synonymous keywords.

Image

TIP
You can find a few other interesting and useful keyword research tools as well as articles about keyword research at http://searchenginewatch.com/facts/article.php/2156041.

Placing Keywords in Your Content

Once you’ve identified the keywords that are most relevant to user search behaviors you’ll need to insert your keywords into your content and HTML. Chapter 2 identified a number of important areas in your documents to feature your keywords. Some of the most important areas include

image <title>

image heading tags, especially <h1>, <h2>, and <h3>

image <strong> and <em>

image link labels

image file names (logo image file name, external CSS file name)

image alt attributes

image title attributes

image table elements such as <th>, <caption>, and the summary attribute

image <acronym> and <abbr>

image first line of first paragraph of a page

image meta description

image within the URL

In addition to placing keywords in your HTML document be sure to add them to your content as well. It’s pretty easy to get caught up in a frenzy of keyword optimization and before you know it your content starts to read strangely.

Although keyword optimization can improve your search referral traffic, don’t sacrifice the quality of your content in the process. Your content should always be written for humans first, and search engines second!

When keywords appear in a page too often it will be conspicuous to search engines that you are trying to dishonestly stuff your pages in order to generate traffic. Search engines use a simple mathematical formula and some basic logic about language to determine if a page unnaturally features a word. This formula helps determine the density of a keyword in a page.

Keyword frequency / Total number of words in a page = Keyword density

Following this formula, if there were 50 instances of a keyword in a page that had a total of 500 words the keyword density would be 10 percent. By studying written language researchers have discovered that keyword density is typically not higher than 7 percent. A page that has a keyword density of 10 percent would look suspicious and could possibly receive a penalty in search engine rankings.

Search engines also look for the presence of other words around prominent keywords to see if they are naturally included in the content or are part of a list of terms aimed at dishonestly stuffing the page.

In order to do a good job of optimizing your pages for keywords without crossing the natural 7 percent keyword density threshold you’ll need a utility that can help you evaluate your work.

Evaluating Keyword Density

Evaluating your keyword density by counting words in your page would get old pretty quickly. Luckily there are some good, free utilities that will do the dirty work for you.

You’ll find one of the most full featured keyword density analyzers at http://www.ranks.nl/cgi-bin/ranksnl/spider/spider.cgi. In addition to analyzing keyword density this tool will also provide information about the prominence of keywords (see FIGURE 4.13). Keywords placed in <title> and heading tags receive higher prominence ratings than those featured in a paragraph. By evaluating both density and prominence simultaneously you can get a good idea of what keywords search engines will rank highest in your page.

Figure 4.13 The Ranks.nl keyword density and prominence evaluation tool provides information about single and multi-word phrases in your page so you can quickly identify how search engines will perceive your content.

Image

You’ll get loads of other information when you run your URLs through the Ranks.nl keyword analyzer. It indicates the Google PageRank for the page, shows the HTTP headers, provides links to discover what sites are linking to yours, and a host of other useful things. Adjacent to the keywords and phrases detected you’ll see a series of capital letters that indicate the places within your HTML that the term is featured. In Figure 4.13 the key phrase “user experience” appears eight times and is included in the <title>, the keywords meta tag, headings, bold and italic text.

If you find that any of your terms have a low density or prominence you can simply add instances of them in the page, targeting more of the strategic locations mentioned earlier in this chapter.

Content Development Strategies

You don’t always have to author every word on your site. With some fancy Web development techniques you can actually pull content into your site from other locations dynamically.

Earlier in this chapter in the section entitled “Syndicated Content (RSS)” you learned that RSS–Really Simple Syndication–is a standard XML format that many blogs and content management systems use to syndicate their content to other platforms and websites. There are thousands of websites that publish RSS feeds in order to reach more people in their audience. Just as TV stations air syndicated content from other channels to supplement their original programming, a website can display syndicated content from other sites.

Let’s take a look at some practical examples of how RSS can make your site more findable.

Displaying RSS Content on Your Site

Headlines and excerpts from blogs or other sites that provide content relating to yours can be displayed in the sidebar of a home page, or in a page of their own where your users can see the top news from many sites in a single location. All of the headlines can link back to the host site so users can read more of the syndicated story. The result is a symbiotic relationship that gives RSS content providers more traffic from your inbound links to their site and gives your site content relevant to your audience that can also draw traffic. Everybody wins!

Image
All of the source code for the following examples can be downloaded from this book’s companion website at http://buildingfindablewebsites.com.

Transforming RSS content into a usable HTML display is not very difficult. In the example that follows we’ll use a popular set of open source PHP classes called Magpie (http://magpierss.sourceforge.net/) to extract the content we want from the RSS files.

Before attempting to parse RSS it may help to see what a typical feed file looks like:

<?xml version="1.0,"  encoding="UTF-8"?>
<rss version="2.0"  xmlns:dc="http://purl.org/dc/elements/1.1/">
   <channel>
      <title>Crazy Monkey News</title>
      <link>http://www.crazymonkeynews.com/</link>
      <language>en-us</language>
      <description>The craziest news about monkeys</description>
      <item>
        <title>Rare Species of Blue Monkeys Discovered!</title>
        <description>A rare breed of blue monkeys was recently
discovered living in an ink pen factory. Scientists are still
baffled about what causes the azure skin color of the little
devils.</description>
        <pubDate>Fri, 10 Aug 2007 05:19:47 GMT</pubDate>
        <author>[email protected] (Simean Mandrake)</author>
        <guid isPermaLink="true">http://www.crazymonkeynews.com/
bluemonkeys</guid>
        <link>http://www.crazymonkeynews.com/bluemonkeys</link>
        <category>Monkey News</category>
    </item>
  </channel>
</rss>

RSS looks a bit like HTML and even shares some of the same tags. The tags that contain the information we’ll display include <channel>, which provides information about the site publishing the feed, and <item>, which contains information about a single blog post or other bit of content. There are usually many item tags–one for each blog post.

Let’s get an overview of how we’ll go about parsing and displaying RSS feeds. We’re going to have three main components in our system:

Image The Magpie RSS class that can be downloaded at http://magpierss.sourceforge.net/

Image A PHP script that uses Magpie to transform RSS into HTML

Image A page where the headlines will be displayed

We’ll be following these basic steps:

1. We’ll create a PHP file called parseRSS.php that connects to the Magpie RSS parsing engine. This file will contain a function we build to handle the conversion of RSS content into HTML by using the member functions of the Magpie class. The function will be aptly named parseRSS().

2. We’ll create a page called index.php that connects to the file containing the parseRSS() function. It will then call the function, defining which feeds to display and how many headlines to show.

We’ll get lots of mileage out of the parseRSS() function, as it will be used in later examples as well. Before getting started, see FIGURE 4.14 for the directory structure you’ll need to create.

Figure 4.14 To complete the RSS parsing example you’ll need to set up a directory structure as illustrated.

Image

Once you’ve downloaded Magpie and have set up a directory structure as shown in Figure 4.14, you’re ready to start.

1. Create a new file called parseRSS.php and save it in your “inc” (includes) folder.

2. Start the file by including Magpie’s RSS fetch class and defining the parseRSS() function.

// Include Magpie to do the RSS parsing
require_once('magpie/rss_fetch.inc'),

function parseRSS($url,$numHeadlines){

}

Notice that the parseRSS() function accepts two variables–called parameters when passed to a function. The first parameter defines the URL of the feed to be parsed and the second defines the number of headlines to be displayed.

The first task the parseRSS() function executes is a call to Magpie’s fetch_rss() function. We’ll store the parsed RSS that Magpie returns in a variable called $rss for easy use throughout the script.

function parseRSS($url,$numHeadlines){

      // Call Magpie's fetch_rss function to grab feed items
      $rss = @fetch_rss($url);

}

When the fetch_rss() function is called it returns the feed in the form of an object with a series of properties—also known as member variables. Each property represents a tag from the RSS feed and will contain the same text as the original tag.

Notice that the call to the fetch_rss() function is preceded with an @. This will suppress the display of error messages that might be returned. We’ll do a little error checking of our own to let users know when the process failed without the cryptic techno-babble that would otherwise be displayed.

Following the fetch_rss() function call, a simple conditional can be used to stop the process if there was some problem grabbing the feed. If it was fetched and parsed successfully we’ll remove any unwanted headlines, leaving just the number requested when the parseRSS() function is called.

// Does the $rss varaible have anything in it?
if($rss){
    // Get number of headlines defined by $numHeadlines
    $items = array_slice($rss->items, 0, $numHeadlines);
}else{
      return '<div class="error">
      Sorry! Couldn't retrieve RSS feed</div>';
      exit;
}

If the $rss variable does have something stored in it a new variable called $items is created to store just the number of headlines defined by the $numHeadlines parameter. We gain access to the parsed <items> content with $rss->items. There are often many <items> in an RSS feed so Magpie returns them as an array–a variable with many values. Using the PHP function array_slice() we can cut off all extra <items> in the array beyond the number of headlines that we want to display.

If something went awry in the fetching of the RSS feed we’ll send out an error inside a <div> that lets the user know the content couldn’t be retrieved. The class="error" in the <div> makes styling error messages using CSS easier.

With all of the basic preparation out of the way we’re now ready to convert the parsed RSS content into HTML. All of the HTML transformations we make will be collected in a variable called $feed. The HTML that the script builds will have a heading displaying the source of the headlines and link back to the original source followed by an unordered list of headlines. Let’s take a look at the retrieval of the channel information first.

  // Feed heading
  $feed .= '<h4><a href="' . $rss->channel['link'] . '"
target="_blank">' . $rss->channel['title'] . '</a></h4>'; // Link
to channel source

The <channel> tag has tags within it including <link> and <title>. The object that Magpie’s fetch_rss() function returned has placed these inside the channel property as an array so they can be easily accessed like this: $rss->channel['title'].

Building the unordered list of headlines requires a foreach loop because, like the channel property, the item property also has its nested tags stored in an array.

// Build feed list
$feed .= '<ul class="feed">';

foreach ($items as $item) {
     $href = strip_tags($item['link']);
     $title = strip_tags($item['title']);

    // truncate headlines if needed, comment out if not
    if(strlen($title) > 50){ $title = substr_replace($title,"…",
50); }

    $feed .= '
    <li><a href="'.$href.'" target="_blank" title="Read full post
in new window">'.$title.'</a></li>';

} // End loop

//Close feed list
$feed .= "</ul>";

The <ul> and </ul> are added to the $feed variable outside of the loop so we don’t end up with a bunch of lists with just one headline. Inside the loop the strip_tags() function built into PHP removes any rogue HTML tags added by the feed’s author to prevent accidental display explosions. When you’re pulling content from other sources it’s prudent to take such precautions as a random </div> in an RSS feed could make your page break into an unintended mess.

Like the <channel> tag, each <item> tag has tags nested within it that are also returned by the fetch_rss() function in an array. Each nested tag in <item> is accessed using $item['tagname'] where ‘tagname’ is the name of the tag.

Although this example doesn’t display the <description> text, it could be easily added using $item['description']. We’ll add it into the script in the link library example we’ll see shortly.

RSS content is often displayed in small spaces such as the sidebar of a home page. Long headlines could compromise the display by awkwardly occupying multiple lines. You can limit the number of characters to be included in the headlines–called truncation–with a simple condition and the strlen() function built into PHP.

This example limits headlines to 50 characters. Those that exceed this number will have an ellipsis (…) added to the end where excess characters have been trimmed.

With the feed successfully transformed into HTML all that’s left to do is return the HTML to the location where the function is called and close the function:

    return $feed;
}
?>

When we bring it all together, here’s what it looks like:

<?
// Include Magpie to do the RSS parsing
require_once('magpie/rss_fetch.inc'),

function parseRSS($url,$numHeadlines){

    // Call Magpie's fetch_rss function to grab feed items
    $rss = @fetch_rss($url);

    // Does the $rss varaible have anything in it?
    if($rss){
        // Get number of headlines defined by $numHeadlines
        $items = array_slice($rss->items, 0, $numHeadlines);
    }else{
        return '<div class="error">
        Sorry! Couldn't retrieve RSS feed</div>';
        exit;
    }

       // Feed heading
       $feed .= '<h4><a href="' . $rss->channel['link']. '"
target="_blank">' . $rss->channel['title'] . '</a></h4>'; // Link
to channel source

   // Build feed list
   $feed .= '<ul class="feed">';
   foreach ($items as $item) {
        $href = strip_tags($item['link']);
        $title = strip_tags($item['title']);

       // truncate headlines if needed, comment out if not
       if(strlen($title) > 50){ $title = substr_replace($title,".
..",50); }

       $feed .= '
       <li><a href="'.$href.'"  target="_blank"  title="Read full
post in new   window">'.$title.'</a></li>';

   } // End loop
  
  // Close feed list
  $feed .= "</ul>";
  
  return $feed;
}
?>

Once you have the parseRSS.php file built you’re ready to begin showing feed content anywhere on your site. There are two simple steps to displaying RSS content using parseRSS.php:

1. Include the parseRSS.php file into the page where you’ll be displaying feed content.

2. Call the parseRSS() function defining the feed URL and the number of headlines to be displayed.

With the tricky part out of the way, adding syndicated content to your site is a piece of cake. Here’s a simple example that demonstrates a feed display column being added to a page:

Image
See a variation on this RSS parsing example that uses Ajax to load feeds at DMXZone http://www.dmxzone.com/ShowDetail.asp?NewsId=12757.

<div id="feed-col">
    <? require_once('inc/parseRSS.php'), ?>
    <div class="feedbox">
        <?=parseRSS('http://feeds.feedburner.com/AarronWalter',5)?>
    </div>

    <div class="feedbox">
        <?=parseRSS('http://snook.ca/jonathan/index.rdf',5)?>
    </div>
</div>

Once you include the parseRSS.php file you can call the parseRSS() function wherever you want to show RSS content. It’s that simple. I’ve added a few <div> tags with classes and ids that will make layout and styling with CSS more convenient. FIGURE 4.15 illustrates what the feed output might look like in a styled page.

Figure 4.15 The latest headlines from sites that produce content related to yours can be displayed anywhere on your site with RSS and PHP.

Image

More RSS Parsing Opportunities

Headlines from blogs are just the beginning of the syndicated content opportunities your site could take advantage of. RSS is a low-hanging fruit that can provide relevant content your audience will enjoy and can attract more search traffic. Anytime new content is published the associated RSS feed is redistributed, automatically updating any site that displays it. Using RSS is a great way to keep your site’s content fresh without investing a lot of time.

Now that you know how to parse RSS you could display information from any of the following sites with ease.

Music: Last.fm

Last.fm (http://last.fm) is a social music site that provides you with tools to upload information about the music you’ve been listening to. It provides suggestions of music you may like based on your listening habits, and connects you with users who have similar tastes.

Last.fm publishes a wealth of interesting RSS feeds that you could tap into including a list of your recent tracks, your most-listened-to artists, and much more. Each track listing links back to the Last.fm site where more information is available about the artist and the album. Last.fm offers both paid and free services.

Photos: Flickr

Flickr (http://flickr.com) is a popular photo-sharing Web application. When users post photos they tag them with descriptive keywords so they can be easily located in broad searches. Flickr published RSS feeds–called photo streams–for each individual account, and all tags.

You could use Flickr’s RSS feeds to display photos you’ve recently taken, or photos anyone has tagged with a particular term.

Jobs: Authenticjobs.com

Cameron Moll’s job listing site Authentic Jobs (http://authenticjobs.com/) publishes information about design and development positions in the Web industry. All of the job listings are available via RSS in a single feed or separately by full-time, part-time, design, and development positions.

Many Web designers display these job listings on their site because it’s content that is relevant to their audience.

Events: Upcoming.org

Upcoming (http://upcoming.org), a Yahoo! property, publishes listings for events of all kinds around the world. Besides publishing generalized RSS feeds of different event categories, it also offers feeds for events taking place in a specific location.

Upcoming offers RSS feeds that could be used to display all events that pertain to a certain topic, events at a single venue, tour dates for a band, or just events happening in a local area.

Bookmarks: Del.icio.us and Ma.gnolia.com

The popular social bookmarking sites Delicious (http://del.icio.us) and Magnolia (http://ma.gnolia.com) both offer a similar feature set. Each allows users to store their bookmarks, tag them, work in teams to create larger bookmark groups, and share them with others. Both Delicious and Magnolia offer great RSS features that allow you to subscribe to anyone’s bookmarks or grab all bookmarks that have a shared tag.

As we’ll see shortly, using Delicious and Magnolia you can create a very useful link library that can generate traffic on your site.

Movies: Netflix.com

Netflix (http://netflix.com)–the online movie rental service–provides RSS feeds of new DVD releases, movie reviews, and most popular rentals. If you have an account with them you could use the RSS feeds of your recently viewed movies and your rental queue to publish your film interests.

Files: Box.net

Box.net (http://box.net) is an online file storage application that offers file sharing and collaboration services. Users with an account can grab their RSS feed to display links to files stored on the Box.net system.

Using the RSS Parsing System To Create a Link Library

Because Magnolia and Delicious both publish all bookmarks in their system via RSS it’s easy to use the parseRSS.php file we’ve already built to create a link library on your site. As we saw earlier in this chapter in the section entitled “Content of Many Flavors,” a well-constructed link library is a valuable resource that users are likely to return to often, and can increase search traffic.

The goal of a link library is to provide a series of top-notch resources that address a single topic. A good link library is not flooded with irrelevant links. Identify an important topic for your audience and create an authoritative library of all resources on the Web that can help your users solve a problem.

Using a bookmark management system like Magnolia or Delicious to build your link library will make keeping it updated very convenient. Both services offer bookmarklets you can use while browsing the Web to quickly save a link to your account. A bookmarklet is a little JavaScript link that you can drag into your browser’s bookmark toolbar. When clicked a bookmarklet performs a task like connecting to a site to record information.

Each time you save a bookmark to Delicious or Magnolia your link library page will automatically update because it pulls its information from your bookmark management system’s RSS feed. When you build a link library to be this easy to update it’s sure to stay fresh with relevant content for your users.

Image
You can find bookmarklets and handy browser extensions for Delicious at http://del.icio.us/help/.

If you’re not already using Delicious (http://del.icio.us) or Magnolia (http://ma.gnolia.com) you may want to visit both sites to try out their features and interface. Both are free to use so there’s really no risk in using both or changing your mind later on.

Image
Magnolia also has a number of good bookmarklets that you can grab at http://ma.gnolia.com/support/bookmarklets.

Delicious and Magnolia offer a JavaScript-based method for syndicating your bookmarks onto your site called a linkroll. Because linkrolls are dependent on JavaScript, search engines won’t see the links, which undermines the reason for including them. A server-side approach using PHP is preferable to make sure your link library is visible to all search engine spiders.

In order to use the parseRSS.php file to build our link library, we’ll make a couple simple modifications to the foreach loop to show the description information as well. I’ve highlighted the areas that have changed from the previous example.

foreach ($items as $item) {
    $href = strip_tags($item['link']);
    $title = strip_tags($item['title']);
    $desc = $item['description'];

    // truncate headlines if needed, comment out if not
    if(strlen($title) > 50){ $title = substr_replace($title,"…",
50); }
    if(strlen($desc) > 200){ $desc = substr_replace($desc,"…",20
0); }

    $feed .= '
    <li>
        <h4><a href="'.$href.'”  title="Read full
post in new window">'.$title.'</a></h4>
        '.$desc.'
    </li>
    ';

} // End loop

The script will now include the <description> information in the HTML output and can be optionally truncated to any number of characters if you like. Adding description text will be especially important when using Magnolia as it provides some unique features in its <description> tags. Notice that the description does not have tags stripped from its contents. This is because Magnolia includes some HTML in their <description> that is worth preserving.

Now that we have the necessary changes to parseRSS.php in place all we really need to know is how Delicious and Magnolia build their RSS URLs. Each provides very specific control to access a user’s entire library, a user’s bookmarks with a specific tag, or everyone’s bookmarks with a specific tag. Here’s how they work.

Delicious

Delicious has a rather simple approach to their RSS URL structure. Here are some basic examples of feed URLs you might use to display bookmarks from Delicious:

Image Grabbing all of a user’s bookmarks: http://del.icio.us/rss/username

Image Grabbing a user’s bookmarks with a specific tag: http://del.icio.us/rss/username/tagname

Image Grabbing every user’s bookmarks with a specific tag: http://del.icio.us/rss/tag/tagname

Choosing any of the above types of RSS information, simply include parseRSS.php into a page and call the parseRSS() function to see your link library come to life. In this example the 20 most recent bookmarks tagged with the term “seo” will be displayed. See FIGURE 4.16.

Figure 4.16 Twenty links from Delicious with the tag “seo” are displayed in this link library. Because this example draws from everyone’s bookmarks, anytime someone tags a new link with the term “seo” it will automatically show up on the page.

Image

<? require_once('inc/parseRSS.php'), ?>
<div id="library">
    <?=parseRSS('http://del.icio.us/rss/tag/seo,20)?>
</div>

Magnolia

Magnolia provides full and lite feed options to give you more control over what information is included in your RSS feeds. Full feeds include a text description of the link, tags, and thumbnail images for each bookmark. Lite feeds only include the title, description, and link for each bookmark. If you’re displaying your bookmarks in a sidebar of a blog or home page then the lite option is the best bet. For a full-page link library, use the full feed.

Here’s how Magnolia structures its feed URLs:

Image Grabbing all of a user’s bookmarks with all possible content: http://ma.gnolia.com/rss/full/people/aarron/

Image Grabbing a user’s bookmarks with a specific tag with all possible content: http://ma.gnolia.com/rss/full/people/aarron/tags/findability

Image Grabbing every user’s bookmarks with a specific tag with all possible content: http://ma.gnolia.com/rss/full/tags/findability

To grab the lite version, just replace the word “full” in the URL with “lite” and you’re all set.

The Magnolia link library works exactly the same as the Delicious example we just saw. This example (see FIGURE 4.17) uses the full feed in order to display thumbnails, tag links, and a link for users to say thanks for the information, which creates a much more compelling display than the one created by the plain text in a Delicious feed.

Figure 4.17 Using Magnolia’s full RSS feed option you can display thumbnails of the sites bookmarked. It also includes links to view other bookmarks on Magnolia with the same tag and a link for grateful users to say “thanks” for sharing the link.

Image

<? require_once('inc/parseRSS.php'), ?>
<div id="library">
    <?=parseRSS('http://ma.gnolia.com/rss/full/people/aarron',20)?>
</div>

Although link libraries from any of these feeds will add a lot of great content to your site, grabbing links with a single tag will keep your resource listing focused on one topic. You could always create a series of pages each displaying links with a different tag to provide some variety.

Users won’t like digging through a mountain of links to find the ones that are relevant to them, so narrowing it down using tags is preferable.

Good link libraries get referenced often and draw inbound links. If you keep your link library on topic and only include the best stuff you’ll certainly increase traffic on your site.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset