Ajax Workshops 2 and 3

Andrew has been hard at work getting two more Ajax Workshops up at AjaxLessons.com.

Tabbed ContentAjax Workshop 2 focuses on building tabbed content, a user interface design that is even featured within Yahoo’s UI Design Patterns. This method of displaying content is great when you are limited on space and Ajax allows you to eliminate a page refresh - a good idea in this case.

Ajax Workshop 3 runs through the process of creating a drag and drop shopping cart using the Script.aculo.us library. This is example is often displayed within library demos, although I have yet to see many people take an active approach in incorporating it into their websites. This is definitely a topic I will be discussing in the future.

Pluck Launches Blogburst

BlogburstPluck has launched Blogburst, a “middle-man” between bloggers and mainstream print media. The Blogburst editing team takes content from pre-approved bloggers and provides it to publishers for republication. Unfortunately, bloggers do not earn any sort of revenue from this service, although the content you provide will include a byline and link back to the blog. This byline seems adequate to me, the inbound traffic you can receive from being features within a major publication is a definite plus.

Currently, Blogburst has a few top publishers waiting for content, including the SF Chronicle, Washington Post, and Houston Chronicle.

Blogburst is currently “invite-only,” although you can submit your information and the Blogburst editors will look over your content and contact you. The submission process was easy, thanks to automatic feed detection, and you simply need to provide a little background info on yourself and your blog.

Dynamic Technorati Tags

TechnoratiOne of the things I wanted to accomplish with the Betaflow redesign was a better way to manage my Technorati tags. Previously I had been using a combination of plugins that, albeit worked, didn’t work the way I wanted them to.

For this redesign I set aside a portion of each post dedicated to Technorati Tags (see the bottom of the post, “Tags:”). This article will discuss a small piece of code I have added to my index.php to support the addition of Technorati tags via the custom fields portion of each post.

Once you have determined an area on screen for your Technorati Tags you need to first initiate a check to determine if the current post has any tags associated with it. For Betaflow I am using a custom field named “tags,” but you can use whatever you want. Wordpress has made it easy to check custom fields with the get_post_meta function, so we use it to check for a tags field and if one does not exist echo “N/A.”

<?php
if (get_post_meta($post->ID, ‘tags’, true)) {
} else {
echo “N/A”;
}
?>

The get_post_meta() function simply asks for a post ID, the name of the field, and a boolean as to whether you want the value returned as a string (true) or array (false).

Now that we’re determining which posts have Technorati Tags, all we have to do is display those tags for each post. We do so by adding the following portion of code:

<?php
if (get_post_meta($post->ID, ‘tags’, true)) {
echo get_post_meta($post->ID, ‘tags’, true);
} else {
echo “N/A”;
}
?>

Simple, but not really effective (since Technorati looks for the rel=”tag” statement within anchor tags). We need to explode our string of comma-delimited tags, add in the anchor tags for each, and then put it all back together and echo it back out.

Since our field (named “tags”) is a comma delimited list, we can explode that string by the characters “, ” (a comma, then a space). This will create an array with nothing but our tags as each value. Then, we need to iterate through each value and add the opening anchor tag before the value and a closing anchor tag after the value. We’re also going to put a “, ” (a commaa, then a space) after each closing anchor tag, for aesthetics.

Finally, we’ll need to echo that new string back out to the page so our visitors (and more importantly Technorati’s spider) see those tags. Here’s the final bit of code, to complete the whole process:

<?php
if (get_post_meta($post->ID, ‘tags’, true)) {
$tags_field = get_post_meta($post->ID, ‘tags’, true);
$tags = explode(”, “, $tags_field);
foreach ($tags as $tag) {
$tag_link .= “<a href=\”http://www.technorati.com/tag/” . $tag . “\” rel=\”tag\”>” . $tag . “</a>, “;
}
echo substr($tag_link, 0, strlen($tag_link) - 2);
} else {
echo “N/A”;
}
?>

You might be asking why our echo is using the substr() function. This is because we are adding a “, ” (a comma, then a space) after every field of our exploded array - including the last one. We need to pop the last two characters off of the end of our string for aesthetic appeal, otherwise we’ll be looking at a list that looks like this: tag, tag2, tag3,

This is very simple to add to your very own Wordpress blog and allows for more control over how your Technorati Tags are displayed on page than many of the plugins that have been released thus far. If you have any questions, comments, or ways to optimize this code a bit - feel free to leave a comment.

AJAX Powered Forum

k4 Bulletin Boardk4 Bulletin Board is a forum system, similar to other popular products in this category, with one major twist: AJAX, and lots of it. k4BB uses AJAX in an intuitive manner to benefit the primary functions of the forum system. Beyond the normal features found in forum software, such as an administration panel, template system, BBCode, and emoticons; k4BB provides inline polling, inline moderation (such as locking topics, editing topics) and a true quick reply function.

k4BB runs on PHP4/PHP5 and currently supports MySQL, MySQLi, SQLite, and PostgreSQL databases. Check out the live demo on the k4BB website.

37Signals Starts a Fire

37Signals: Campfire37Signals has released their group chat for businesses software, Campfire, today. 37Signals’ releases have always proved to be useful and innovative to small business, and Campfire delivers. 37Signals has a page describing why Campfire’s method of communication is better than what is currently out on the market. These bullets definitely prove their point:

  • Campfire chats have permanent URLs - no more confusing invites or losing chat logs when you’ve closed the window.
  • Campfire is universal - no more trying to figure out which network everyone is on and determining compatibility issues.
  • Campfire automatically logs conversations - you can come back to a discussions days, weeks, even months later, and start right where you left off.

Learn Ajax: Quick and Easy

AjaxLessons.comOn February 11, Ajaxlessons.com was launched. Andrew’s done a great job on the site so far (nice modifications to the Hemingway), with some nice Ajax tutorials and a Discussion Board.

Update: Seems like I issued my praise a bit to early - Andrew’s hosting provider has suspended his account, more than likely bandwidth usage. Hopefully, AjaxLessons will come back up soon.

Blogging Enquirer

Blogging EnquirerWhen Valleywag launched I thought of it much the same as I think of InTouch and other magazines that report on celebrity lifestyles as news (”interesting, but is this really news?”). Unfortunately, Valleywag must be scraping from the bottom of the barrel as they clearly are starting to report lies and falsities.

In TechCrunch Stock Watch, Valleywag insinuates that TechCrunch’s Mike Arrington is holding out on his reporting to watch his AlexaDex profile gain footing, without competition from the rest of the players. Unfortunately, Mike reported on Ning.com’s new features two days ago, giving AlexaDex players two days to prepare their Ning.com stock purchases. Valleywag even linked to Mike’s post in the same article they accuse him of not speaking up!

Valleywag’s an interesting read when you are bored, but just like the National Enquirer - don’t buy a copy, just read the copy left on the crapper.

« Previous Entries  Next Entries »