Sivel.net: Happy π Day

March 14th, 2010

I’ve gotten into this bad habit of not writing about anything except WordPress on this site. It’s quite sad in a way that I have this great publishing platform and I only write about WordPress, and I do so very little.

Many years ago, I don’t remember how many exactly, I was challenged by my High School math teacher, that if I could memorize all the digits of π that were on the poster (86) above the white board, that I would get an ‘A’ on the final without having to take it. I spent a week or two, I even wrote a program for the TI-83 to help me learn it. In the end I learned somewhere around 280 digits of π and got that ‘A’.

From then until now, I have always held a special place in my heart for this number of numbers. I own the movie π, I own the book a history of π and I have spent the last eleven to twelve years incredibly interested in this number. Back in 1998 or so I actually ran a site dedicated to π on geocities that is now long gone and forgotten.

So in keeping with the color scheme of that old site I used to run, which I now realize was very Matrix-esque, have a happy π day!

π

Happy π day!

PS: From my days as an astrophysics major, I was taught that really only the first 42 digits of π are useful for computational purposes. But what fun is that!? Keep learning and cranking out those digits of π!


WordPress.com News: OMG WordPress BBQ at SxSW

March 13th, 2010

OMG WordPress BBQ logoThis weekend, thousands of WordPress users and fans (including many hosted here on WordPress.com) are among the people attending the South by Southwest (SxSW) Interactive conference in Austin, TX. To celebrate this, we’re throwing a WordPress BBQ at SxSW tomorrow so that there’s a place for us all to get together.

If you’re a WordPress.com user attending SxSW (or you just happen to be in Austin), please join us for lunch after 12pm* tomorrow, Sunday March 14. Come, eat, meet some of the WordPress.com team, talk about the cool things you’re doing with WordPress on your site, let us know what we can do better, talk about some of the new features and themes you’ve been seeing here lately, etc. Think of it like a WordCamp without presentations. See how many WordPress.com staff you can spot chowing down on Matt’s favorite meal. :)

Location: Conjunctured coworking space, 1309 East 7th St., Austin, TX 78702. From the convention center, walk up to 7th Street, hang a right, and walk until you get to #1309. If you’re tired of walking, taking a cab is a decent option. Note that this is on the other side of I-35 from the convention center.


View Larger Map

* We’ll keep serving until we run out of food, so probably until around 2 or 3? We’ll have a hundred pounds of bbq meat, a bunch of sides, and dozens of gallons of iced tea, so come hungry.



aaron.jorb.in: More Twitter Shortcodes for WordPress

March 12th, 2010

Building on my WordPress Shortcode How To, here are two more Twitter shortcodes. I’ve also added a new project on google code to track all of my shortcodes.

The first new shortcode is for twitter search. It’s logically enough

 [twitter-search phrase='#haikufriday']

Like my last twitter shortcode, it caches the results for two minutes. It also includes some other options. You can specify the number of tweets using the number attribute. There is a default of 20. You can also specify a max and min tweet id using max_id and since_id . Finally, you can specify the language with the lang attribute. This defaults to English.

function jorbin_firestream_search($atts){
	extract(shortcode_atts(array(
	'phrase' => false,
	'lang' => 'en',
	'max_id' => false,
	'since_id' => false,
	'number' => '20'
	), $atts));
	if ('phrase' == false){
		return false;
	}
	//*/ Build our search url and transient name
	$transient = 'tweet-'. esc_sql($phrase) . '&l=' . esc_sql($lang);
	$url = 'http://search.twitter.com/search.json?q='. urlencode($phrase) . '&show_user=true〈='. urlencode($lang) .'&rpp=' . $number;
 
	if ($max_id != false){
		$url .= '&max_id=' . (int) $max_id;
		$transient .= '&m=' . (int) $max_id;
	}
	if ($since_id != false){
		$url .= '&since_id=' . (int) $since_id;
		$transient .= '&s=' . (int) $since_id;
	}
	var_dump($transient);
 
	if ( $tweet_display = get_transient($transient) ){
		// It's allready been brought
	}
	else {
 
		$search = wp_remote_get( $url );
		$results = json_decode($search['body']);
 
		ob_start();
			$tweets = $results->results;
			 //*/
			foreach ( (array) $tweets as $tweet){
				$tweetcontent = $tweet->text;
				$newcontent = preg_replace('%@([^\s]*)%', "<a href="http://twitter.com/\\1">@\\1</a>", $tweetcontent);
				echo "
<div class="twitter_shortcode">
 
				<img class="twitter_shortcode_image" src="&quot;.esc_url($tweet-&gt;profile_image_url).&quot;" alt="" /><span class="twitter_shotcode_username"><a href="http://twitter.com/&quot;.$tweet-&gt;from_user.&quot;">".$tweet-&gt;from_user."</a> — </span>$newcontent</div>
";
 
			}
		$tweet_display = ob_get_clean();
		set_transient($transient, $tweet_display, 120);
		}
	return $tweet_display;
}
 
add_shortcode('twitter-search', 'jorbin_firestream_search');

Like before, there are some classes for you to work with that should make it easy for you to theme these shortcodes. If you want for me to add more, comment below.

The second shortcode allows you to get and display a list of the most recent trends on twitter using the shortcode:

[twitter-trends]

This one doesn’t have any attribute. The output is in an unordered list with the class of twitter-trends.

function jorbin_twitter_trends(){
 
	$transient='twitter-trends';
	$url = 'http://search.twitter.com/trends.json';
 
	if ( $tweet_display = get_transient($transient) ){
 
	}
	else{
		$search = wp_remote_get( $url );
 
		$results = json_decode($search['body']);
		$trends = $results-&gt;trends;
		ob_start();
			echo "
<ul class="twitter-trends">";
			foreach ($trends as $trend){
				echo '
	<li><a href="' . esc_url($trend-&gt;url) . '"> '. esc_html($trend-&gt;name) . '</a></li>
';
			}
			echo "</ul>
";
		$tweet_display = ob_get_clean();
		set_transient($transient, $tweet_display, 120);
	}
	return $tweet_display;
}
 
add_shortcode('twitter-trends', 'jorbin_twitter_trends');

If you use any of these, let me know. If there are any improvements or more you want to see, comment below.


Il Filosofo: New WordPress Plugin: Custom Image Sizes

March 11th, 2010

I make a lot of WordPress themes, and frequently clients want to associate a particular size of image with a post. You can do this easily with WordPress by using add_image_size() to define an image and then by calling wp_get_attachment_image() later to print the markup for that image.

So for example, if I have an attachment image of ID number 123, I might do something like the following:


add_image_size( 'my-custom-size', 220, 180, true );
...
echo wp_get_attachment_image( 123, 'my-custom-size' );

Here, add_image_size() defines the custom thumbnail (in this example the arguments tell add_image_size() to make it 220 pixels wide, 180 high, and cropped), and

echo wp_get_attachment_image()

prints the markup of the image itself, <img> element and everything.

The Problem

This works great; WordPress even creates thumbnails in this size from now on. The problem is that it doesn’t apply to pre-existing thumbnails. And if people change their minds about what sizes they want their thumbnails to be (clients sometimes change their minds) you’re stuck with existing thumbnails of the wrong size.

In addition, if you call wp_get_attachment_image( 123, 'my-custom-size' ); and that size doesn’t exist, WordPress just scales down the larger-sized original image, which might cause some performance issues.

Solution: Custom Image Sizes

My solution is the Custom Image Sizes plugin. You activate it, and if you call wp_get_attachment_image() and related functions for an attachment that doesn’t have that size, WordPress will create it on demand.

As a bonus, if you pass a width and height of the desired image to wp_get_attachment_image() (and related functions), you can create any size image. So for example I could create a thumbnail 50 pixels wide by 40 high of attachment 123 with the following code, where '50x40' is '[width]x[height]':


echo wp_get_attachment_image( 123, '50x40' );

Download

You can download the Custom Image Sizes plugin here.


WordPress TavernWordPress-org: WordPress Dev Chat For 3-11-10

March 11th, 2010

wordpresslogoStatus check up first
The UI group is tackling a few design things while Jane is performing some testing at South By South West. After the testing is completed, all lingering UI will be done for WordPress 3.0. Ryan Boren stated that themes needed to be finished in the GUI, land the big menu patch and tidy off custom background and header stuff. The UI group will soon have comps on the background/header stuff. Ptah Dunbar has been doing a good job tackling the menu items and they are almost there.

Mark Jaquith will try to sneak in additional post thumbnail support for WordPress 3.0.

Tickets That Were Discussed In Depth
The next part of the meeting focused on specific tickets that were brought up for discussion. I’m just going to link to the tickets and let you read the log file for in depth discussion on these items.

wpmuguru: http://core.trac.wordpress.org/ticket/12357 high, blocker, 3.0, nacin->nbachiyski, new, Strings we need to hard code and WP_I18N prefix

miqrogroove: http://core.trac.wordpress.org/ticket/9591 high, normal, 3.0, Denis-de-Bernardy->ryan, reopened, sanitize_title_with_dashes() and remove_accents() improvements for i18n permalinks

westi: http://core.trac.wordpress.org/ticket/4739 high, major, future, einare->westi, closed, Some icelandic/Norwegian/Danish letters do not work in page slugs

miqrogroove: http://core.trac.wordpress.org/ticket/10041 high, normal, 3.0, miau_jp->Unassigned, reopened, like_escape() should escape backslashes too

miqrogroove: http://core.trac.wordpress.org/ticket/10607 normal, normal, 3.0, UnderWordPressure->westi, reopened, return variable $new_array in wp-includes/wp-db.php is not initialized

miqrogroove: http://core.trac.wordpress.org/ticket/11711 normal, normal, 3.0, miqrogroove->ryan, new, tag_id Doesn’t Work in WP_Query

miqrogroove: http://core.trac.wordpress.org/ticket/11845 normal, normal, 3.0, miqrogroove->Unassigned, new, mod_rewrite Should Not Be Used to Check Existence of index.php

miqrogroove: http://core.trac.wordpress.org/ticket/12136 normal, normal, 3.0, nacin->wpmuguru, reopened, Improve MS rewrite rules

nacin: http://core.trac.wordpress.org/ticket/12416 high, blocker, 3.0, Denis-de-Bernardy->ryan, new, “*_option(), *_transient() and *_meta() functions should all expect unslashed data.”

I also asked about the email that will be sent out to plugin authors in order to get a heads up on the changes which may effect compatibility. The email will be sent out before the release of WordPress 3.0 but the text of that email will also be announced on the WordPress developer blog.

To read the log file associated with this meeting, click here and scroll up.

How To Participate:

If you want to suggest a development oriented topic to be discussed at the next meeting, you can by visiting the WordPress development updates blog. If you would like to participate in the chat next week, install IRC or an IRC compatible client and connect to the following IRC server.

chat.freenode.net or any random server on the Freenode network and then join this channel at 3:30PM Eastern time or 20:30 UTC Thursdays. #wordpress-dev.

Related posts:

  1. WordPress Dev Chat For 2-18-10
  2. WordPress Dev Chat For 2-04-10
  3. WordPress Dev Chat For 10-22-09


aaron.jorb.in: Portland WordPress User Group Presentation Upcoming

March 10th, 2010

I’m going to be speaking at the March Portland WordPress User Group Meeting on March 18th at 6:00pm at Webtrends and demonstrating some of the features that are coming up in 3.0. I’m aiming for this to be beneficial for both users and developers.

Right now, I plan on covering:

  • What the Multisite features mean to both users and developers
  • How to enable Multisite once you’ve upgraded
  • How to add and customize custom menus on your site
  • How to add a custom post type

If there is anything else that you would like for me to cover, please comment on the post there. I hope to see you there!


WordPress Community Podcast: BuddyPress Social Networking

March 9th, 2010

This weeks guest was Andy Peatling of the BuddyPress.org Project. BuddyPress is a social networking plugin for WordPress which ads many of the features found on sites like Facebook to WordPress blogs in as few as 10 minutes. We discussed how BuddyPress came about, some of the ways its used, some tips on getting started, customizing it and most importantly the features it provides. In news, there were a few nice plugin releases/updates and as always quick update on the WordCamp schedule.


W-Shadow.com: Showing Different Ads To Different Visitors

March 9th, 2010

Just today, I decided to run an impromptu experiment to test if visitors who come from search engines are really more likely to click on ads. It’s considered  ”common knowledge” by many bloggers who advise everyone to only show ads to search engine visitors (as a quick Google search will illustrate), but my own AdSense stats made me doubt that particular piece of advice. Hence the experiment.

So how does one show different ads to different visitors? Normally you could use the excellent Who Sees Ads plugin, but that doesn’t work for my site. I’m using the WP-SuperCache caching plugin which is incompatible with Who Sees Ads.

Instead, I wrote a JavaScript function that can analyse the HTTP referrer to distinguish between four types of visitors :

  • People who accessed your page directly, e.g. by typing in the URL (no referrer).
  • People who clicked an internal link to access the page (referrer from the same domain).
  • Search engine visitors; people who arrived via Google or Yahoo! (referrer matches one of the most popular search engines).
  • External visitors. This is basically a catch-all category for everyone who found your link on a third-party site that’s not a search engine. For example, this would include external forums and web directories.

Here’s the script :

function get_referrer_type(){
	var ref = document.referrer;
 
	if ( ref.length == 0 ){
		return 'none';
	}
 
	function getHostname(str) {
		var re = /^(?:f|ht)tp(?:s)?\:\/\/([^\/]+)/im;
		var matches = str.match( re );
		if ( matches ){
			return matches[1].toString();
		}
		return '';
	}
	if ( getHostname(ref) == document.location.host ){
		return 'internal';
	}
 
	var SE = ['/search?', '.google.', 'web.info.com', 'search.', 
		'del.icio.us/search', 'soso.com', '/search/', '.yahoo.',
		'.ask.'];
	for ( var source in SE){
		if (ref.indexOf(SE[source]) !=-1) {
			return 'search';
		}
	}
 
	return 'external';
}

The function get_referrer_type() returns one of “none”, “internal”, “search” or “external” based on the referrer info.

And here’s the script that I used to show different  AdSense ads to different people :

function get_top_adsense_ad(){
	var default_slot = '1111111111';
	var code = '<'+'script type="text/javascript"><!--\ngoogle_ad_client = "pub-0000000000000000";google_ad_slot = "%ad_slot%";google_ad_width = 336;google_ad_height = 280;\n//--><'+'/script><'+'script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></'+'script>';
	var slots = {
		'none' : '2222222222',
		'internal' : '3333333333',
		'external' : '4444444444',
		'search' : '5555555555',
	};
 
	var ref_type = get_referrer_type();
	if ( typeof(slots[ref_type]) != 'undefined' ){
		code = code.replace('%ad_slot%', slots[ref_type]);
	} else {
		code = code.replace('%ad_slot%', default_slot);
	}
 
	return code;
}
 
document.write(get_top_adsense_ad());

Unlike get_referrer_type(), this script is optimized for my site/AdSense account. Don’t try using it without modification ;) If you want to use it, replace “pub-XXXXXXXX”, the ad slot IDs and ad width/height settings with your own values (you can find them in your AdSense ad code).

As for the experiment, I’ll post the results sometime next week.


Copyright © 2010 W-Shadow.com. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@w-shadow.com so we can take legal action immediately.

WordPress.com News: New Theme: Titan

March 9th, 2010

Titan is a fantastic theme, now available on WordPress.com. It’s a highly readable, clean theme, with lots of options: four widget areas, a customizable header, and more.

Behold Titan!

An enticing color scheme and loads of customization make Titan a wonderful theme for you blog. To start things off the header has some nice social networking and RSS links, making it easy for users to keep up with your blog.

Right below the title is a highly customizable header. There are options to turn on and off categories and pages, allowing you to choose how users navigate your blog.

Titan's Header Options

Aiding in even more customization are four widget areas, including a nice footer widget area.

Titan's Footer Widget Area

Titan was designed by Drew Strojny and is available in the WordPress.org Themes Directory. You can check out Titan for yourself at http://titandemo.wordpress.com



Viper007Bond.com: Automattic

March 8th, 2010

As of today, I am officially a fulltime Automattic employee! I’ve been contracting with Automattic for a few months now but didn’t want to talk about it for fear of cursing it. It really is a dream job for me as I’m working with some of the best people in the business and the WordPress community and I couldn’t be happier. I want to thank Matt and everyone else at Automattic for giving me this great opportunity.

Automatticians In Quebec, October 2009

(I’m 4th from the right in the back row.)

No related posts.


WordPress TavernWordPress-org: WordPress GSoC 2010 Program Under Way

March 7th, 2010

The 2010 Google Summer Of Code program for WordPress is just about ready for prime time. The Google Summer of Code is a global program that offers student developers stipends to write code for various open source software projects. It was created in 2005 and continues to this day. Thanks to some willing students in 2009, we saw the creation of a new search API, and a theme framework in Elastic. When comparing the projects list from 2010 to 2009, they haven’t changed much although bbPress has been added to the list this year.

One of the project ideas that caught my eye was Template Versioning.

WordPress saves post revisions, but changes to theme files are not recorded, though the presentation layer is sometimes just as important. Build a versioning system for template files within the theme editor.

I wonder if any willing student will snatch up this project. This project idea also confirms that the built in theme editor isn’t going anywhere anytime soon.

For any students who want to participate in the WordPress GSoC project, you’re encouraged to review the application template from 2008 as well as the ideas from last year. However, the best way to increase your chances of being selected is to start learning the WordPress code base right now and submit a few patches so the mentors can get a basic idea of your abilities.

Good luck to any student who pursues one of the listed project ideas.

Related posts:

  1. It’s That Time Of Year Again
  2. A Theme Called 2010
  3. WPTavern in 2010


YoastArchives - Yoast - Tweaking Websites: WordCamp Ireland: having a blast!

March 7th, 2010

So I'm in Kilkenny, Ireland for WordCamp Ireland, and I'm having a complete blast, thanks in large part to the great organization done by Sabrina Dent and Katherine Nolan. The tech track is absolutely blowing my mind: it's really techy!

The people here are great: I met a lot of awesome people, basically to be separated in two groups. Group one are the Automattic people: Donncha, Jane Wells, Sheri Bigelow, Hanni RossJohn Godley. Some of the other people worth mentioning because they did cool stuff: Daryl Koopersmith gave a great talk on WordPress themes, Andrea Trasatti did another superb presentation on WordPress mobile plugins and themes (and got me to actually work on yoast.com and get me a decent mobile plugin going). Thank you, all!

Lastly, I'm always amazed that even though I mostly live in a Google world (actually, I had lunch with Fili Wiese and colleagues in Google's EMEA HQ last friday and Luisella Mazza from Google is here on WordCamp Ireland too), the people from Microsoft I meet on these conferences almost always turn out to be absolutely awesome people: Josh Holmes and Martha Rotter: you rock!

So I gave a presentation myself on saturday, which has been filmed and will probably appear on WordPress.tv, but these are the slides:

WordCamp Ireland: having a blast! is a post from Joost de Valk's Yoast - Tweaking Websites.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on WordPress hosting!


Holy Shmoly!: First Day at #WCIRL

March 6th, 2010

So, day one of WordCamp Ireland draws to a close, there is a dinner tonight but the talks and sessions are over for the day.

I briefly helped John Handelaar during his talk on WordPress MU, but my main talk was on WP Super Cache. Thank you Hanni, Jane and Sheri for recording the talk. Hopefully it’ll be available online next week. In the meantime here’s the OpenOffice slides of my talk.

I must extend a big thank you to Sabrina Dent and Katherine Nolan for organising a great day and to the sponsors who made the weekend possible.

Looking forward to the dinner tonight, and the rest of the conference tomorrow.

Update! I’ve added a few photos from Day 2. I was shattered tired though as I was up until 1.30am chatting with Donnacha!

Update 2! Sabrina has written a thoughtful post about WordCamp Ireland. I for one had a great time there and so did everyone I spoke to. I totally agree with her about child minding facilities. My son Adam had a whale of a time, and is still talking about it. (and for an almost three year old, that’s a very good sign!)

Oh, more photos on Pix.ie!

Related Posts

  • No related posts


scribu: Smarter Navigation: Version 1.2

March 6th, 2010

This version requires PHP 5. If you’re getting an error on activation, it means you’re running PHP 4.

Two template tags have been added:

If you have posts in multiple categories, you can use get_referrer_category() to retrieve the category object, based on the referrer url.

get_referrer_url() returns the full URL of the referrer.

Also, there are two extra arguments for previous_post_smart() and next_post_smart(): $in_same_cat and $excluded_categories.

This is how the function prototype looks like:

previous_post_smart(
	$format = '&laquo; %link',
	$title = '%title',
	$fallback = true,
	$in_same_cat = false,
	$excluded_categories = ''
);

WordCast: Commit: The Story of Writing a WordPress Patch | aaron.jorb.in

March 6th, 2010

boot stepping on WordPressRecently, Aaron Jorb wrote “Commit: The Story of Writing a WordPress Patch” about a the process of submitted code to the core development of WordPress.

Hanging out in the #WordPress irc channel or on the wp-hackers mailing list, a question that comes up from time to time is “How do I get a bug patched”. I recently had a patch committed, so I thought I would detail the process from start to finish to help others get an idea of the process…

The process for me started by seeing a post by Jane Wells talking about a few UX enhancements she wanted to see handled during the recent patch sprint. One that I noticed hadn’t received any attention was showing the status of an admin attempts an e-mail change under the new multisite configuration. I took a quick look at the relevent code and figured this was something I could patch.

The step-by-step documented process shows a three to four step process from idea and submission to final approval, however it also proves how easy it is to get involved and help WordPress improve.

According to Aaron, it took four people along the way to make this happen, dispelling the confusion and complexity many presume about the WordPress development process.

The development team is working hard to improve the process and make it easier for people to not just report bugs but to see their fix through to the end, so why not jump in and help WordPress grow.

Related Articles on WordCast:


WordCast: WordCast Recap: 3/1/10

March 5th, 2010

It’s Friday once again! The WordCast network has been bringing you the best WordPress, blogging and social media news, tips, tricks, reviews and how-tos all week long, and we’re bringing the best of the best to you. From some important security details to the THEME TEAM!, look no further for the complete wrap-up of this week in blogging, WordPress and social media.

February 1 – 5, 2010

WordPress Hack Cloakes Itself to All But Search Engines

Automattic Hires Theme Developer Ian Stewart, Forms “Theme Team”

Donate to Your Favorite WordPress Project: Support a WordPress Developer Day

Learn to Write WordPress Plugins in 20 Minutes (video)

Around the WordPress Community: Dynamic Copyrights, Moving WordPress, Microformats, and Twitter to Blog

WordCast Conversations 7: WordPress and Blogging for Musicians and Bands

Our newest show, Plugin Picks premiered this week with Plugin Picks 1: Audio Player and Plugin Picks 2: Google Analyticator

Got comments, questions, ideas or suggestions? We live off your feedback. Call us up at 1-888-525-BLOG or send an email over to mail@wordcastnet.com. You can also chime in on our Twitter, @WordCast, or in the WordCast Forums.

Have a great weekend, and we’ll see you on Monday!

Related Articles on WordCast:


WordCast: WordPress Hack Cloakes Itself to All But Search Engines

March 5th, 2010

ThemeLab is reporting that a new WordPress hack is making the rounds, potentially to your own blog. Like most security breaches, the worm links to all sorts of spam sites from your blog. However, what makes this little guy unique is the fact that he only shows himself to Google IP addresses.

Also unique to this attack is the fact that it seems to only be targeting blogs hosted on MediaTemple servers. The popular hosting company published a page on the issue on Tuesday, and have since updated it stating that all malicious content has been removed.

However, some bloggers have still found some rogue files, and it can’t hurt to check your self-hosted WordPress blog, just to make sure you’re clean.

According to ThemeLab’s blog post, MediaTemple’s page and a forum post from our friends at WPTavern, here’s what we know at this point:

  1. Affected servers will often have PHP files with random names (examples given in the MediaTemple post include xkehy.php and xfami.php) in the document root (the HTML directory). These files can be removed with no detriment to your blog. Some say that some files designed to look like WordPress core files could be hiding in various folders as well.
  2. Altered pages are only visible to spiders used by search engines such as Google, Bing and Yahoo.
  3. If people visit the links themselves from other (non search engine) IP addresses, they are redirected to a CNN RSS Feed.
  4. If you click through to any URLs from a search engine, you are sent to a malware site.

If you have any further information about this WordPress hack, please post a comment below or join the discussion in the WordCast Forums.

Related Articles on WordCast:


WordCast: Automattic Hires Theme Developer Ian Stewart, Forms “Theme Team”

March 5th, 2010

Yesterday, highly respected WordPress theme developer Ian Stewart announced on his personal blog that he has been hired by Automattic as a Theme Wrangler.

Ian informed readers that his once premium-only themes are now available for free (possibly due to employment agreements with the company):

He then dropped the information that will be most intriguing to members of the WordPress and blogging community: his blog, ThemeShaper, is also joining Automattic, as a front-end to what he calls a “theme team” being formed at the company.

ThemeShaper will become a public-facing blog for the Theme Team now assembling at Automattic. A place where we can help provide the best possible experience for everyone involved in WordPress theming; from the noobiest of beginners to the most powerful of WordPress wizards.

Because the founder of the WordPress project, Matt Mullenweg, is also the founder of Automattic, the company has always had a fair amount of influence on the WordPress community. However, up until this point, its’ role in the development and extensibility area of WordPress has always been extremely limited. How much will the new ThemeShaper shape the world of WordPress themes?

Ian’s description of the new blog and team in his post is fairly ambiguous. The Theme Team could be a support team, a community dedicated to helping theme developers innovate. Perhaps they will work on innovations in WordPress themes, developing components and coding features for other theme developers to use, or perhaps they’ll even be working on themes of their own.

What are your hopes for Automattic’s new foray into themes? Is it worthwhile, a waste of time, or could you care less? Post a comment below or join the discussion in the WordCast Forums.

Related Articles on WordCast:


BloggingPro Plugins: WordPress Plugin Recommendation: Zen, Distraction Free Writing Environment

March 5th, 2010

One of the both better and more annoying factors of WordPress is the huge amount of core features. Of course it is great to work with a platform which makes almost everything possible but this can also take away from your focus.

I am a big fan of taking out clutter, focusing on what really matters and love to simplify both life and working environment. The WordPress dashboard is well thought out, and popular, but I am the first one to launch an external writing application such as OmmWriter or WriteRoom, helping me focus just on content, especially when writing longer entries. For many smaller projects I am involved in, I prefer ’simpler’ platforms than WordPress, platforms focusing more on blogging rather than on being the awesomest, most complete or extendable platform.

Enter Zen, a distraction free writing environment for WordPress by Mohammad Jangda.

If you’re a fan of ‘anti-clutter’ plugins such as simple email notifications, you’ll love Zen for WordPress. More even, if you would have been on the verge of switching to a more writing focused platform such as Habari but on could not decide to ditch WP yet, Zen might be what you are looking for.

If you’re a fan of WriteRoom, OmmWriter, or similar tools that help you focus on your words instead of the tools you’re using, this plugin will soon make your wildest dreams come true (and give you a simple clean environment within WordPress to write to your heart’s content)! While Zen does not replace the existing Edit Post/Page screen, it provides a layer on top that will help you focus more on the quality of your words and less on the distracting fine-tuning of minuscule details.

Zen does not replace your editor or change the look of your dashboard but in the post editor you now can activate Zen with one click and call up the new layer. You can even set ‘Always write in Zen mode’ as standard (in Your Profile).

Zen comes with several themes (which can be selected in Your Profile) making Zen a little more noisy again but you don’t have to use these.

All in all Zen’s a nice and agreeable addition to WordPress and a new recommended plugin for me. Download Zen from the plugins directory or install it within WordPress (search the plugins repo for Zen).


WordCast: Do We Really Know What the Future of Blogging Will Be?

March 4th, 2010

blogging-in-eye representing the futureWebWorkerDaily wrote an editorial, “The Future of Blogging” which stats that the recent Pew Research on the future of blogging on the younger generation implies that there is too much on the web that it dull and boring, and people are losing interest in the same old same old blogs.

A recent Pew survey revealed that the popularity of blogging among teens and young adults has declined dramatically from 28 percent to 14 percent from 2006 to 2009. While this wasn’t an exhaustive scientific study, it does reveal a trend that clearly shows that blogging is losing its luster with today’s younger generation. There are many factors that could have contributed to this drastic decline, such as the plethora of real-time communication platforms like social networks, the explosion of gaming platforms (Wii, Playstation, Xbox) and 24/7 access to instant entertainment such as Netflix and Hulu. Regardless of the reasons, the bottom line is that young people are getting bored of traditional blogging.

The editorial goes on to blame much of it on dull and boring web designs and the “shrinking down” of the web to smaller and smaller mobile devices. Research reports like this challenge those of us in the blogging industry to re-examine where we’ve been and where we are going to go, and which changes to embrace and which to shove aside.

The traditional media is moving quickly now into the blogging industry, leaving print and television practices behind, shrinking down reporting and film crews to those good with hand cams and ear mics, and moving their news and editorials out into the virtual world. For those who have been in the virtual publishing industry for years, big media is now our competition. Are we up for the fight? Can we hold out against their onslaught?

Blogging began as online diaries and moved slowly into the professional world. The social web created by these revealing “transparent” blogs embraced faster methods of sharing content and thoughts with the development of social media tools to amp up the social interchange through various networks like Digg, Twitter, StumbleUpon, Technorati, and other peer-to-peer driven “sharing” sites. The blog didn’t die, it just got busier, and so did the bloggers as they spread their ideas beyond their blogs.

What’s the next step? What is the future of blogging? Have you been watching the trends? Where is blogging going?

Related Articles on WordCast:


WordCast: Around the WordPress Community: Dynamic Copyrights, Moving WordPress, Microformats, and Twitter to Blog

March 4th, 2010

In this week’s Around the WordPress Community, I’ve dug far and wide to bring you a patchwork quilt of great WordPress tips and techniques.

Related Articles on WordCast:


WordPress for Beginners » Tutorials: Most Wanted Twitter Hacks and Plugins for WordPress

March 3rd, 2010

Twitter has grown exponentially over the past year, and it is one of the fastest growing social networks at the moment. It is an extremely powerful marketing and promotion tool that no active blogger can ignore. Twitter has the power to make your articles go viral, and the “Twitter Effect” is something that most bloggers want. In this article, we will share some of the most wanted and extremely useful twitter hacks and plugins that will allow you to maximize your benefits from twitter.

Note: These hacks are for all user levels. Some knowledge of PHP / HTML will be required for some of the hacks. We will try to provide alternative plugins for each hack that we share to make it easy for beginners.

Display a Retweet Button with a Counter

Display a Retweet Button wit ha Counter

If you have visited an active blog, then you have seen a retweet button on their site. Majority of the time, it will be from a service known as Tweetmeme.

Snippet

One way to get this button on your site is by placing the following code in your single.php template (At a location where you want to put it).

<script type="text/javascript">
tweetmeme_source = 'wpbeginner';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"> </script>

The above code will output a big button like you see on the left hand side of this post. Make sure that you change the source to your twitter account. It is essential that you do this because it will help you get more exposure.

If you do not like the big retweet button, you can display a compact twitter button, which you can see at the end of this post. Simply paste the following code:

<script type='text/javascript'>
tweetmeme_style = "compact";
tweetmeme_source = 'wpbeginner';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"> </script>

Note: Don’t forget to change the source from wpbeginner to your username in the above code.

Plugin

Tweetmeme also offers a plugin that you can download. The plugin will allow you display these buttons within your posts. You will have an option to pick:

  • The display size (compact or large)
  • Pick the Source of this tweet (Your Username)
  • Where you want to place the button in the post

Display Twitter Follower Count as Text

There are users who absolutely hate buttons like Feedburner buttons or Twittercounter buttons. Are you one of them? Do you want to display your twitter count as text, so it blends in to your new custom design? Well then this hack is just for you.

Snippet

Paste the following code any where you want to display the count:

<?php
$tw = get_option("twitterfollowerscount");
if ($tw['lastcheck'] < ( mktime() – 3600 ) )
{
$xml=file_get_contents('http://twitter.com/users/show.xml?screen_name=wpbeginner');
if (preg_match('/followers_count>(.*)</',$xml,$match)!=0) {
$tw['count'] = $match[1];
}
$tw['lastcheck'] = mktime();
update_option("twitterfollowerscount",$tw);
}
echo $tw['count'];
?>

Make sure to replace wpbeginner with your twitter name.

Explanation of this code: This code will open the XML file for the username that you specify. It will look for the node followers_count, and then it will display that count on your site. Best part about this code is that it will display cached results, so it will keep the load time to the minimum.

This code was written by Rarst (@rarst)

Plugin

For those users who do not feel comfortable modifying the theme files, you can use a plugin called “Subscribers Text Counter“. This plugin will let you display the follower count in widgets, or on posts/pages. This plugin also utilizes the caching system, so it is a good solution.

Display Your Recent Tweets

Display Your Recent Tweets

It is great to give a community sense to a site by displaying recent tweets in the sidebar or on a separate page. Many blogs often display their most recent tweets in their site. This section will show you various different ways to display your recent Tweets.

Snippet

There are numerous codes on the web that will let you display recent tweets from your twitter account without a plugin. Almost all of those codes have some shortfall. Below we will share one of the snippets that will allow you to display your recent tweets with caching.

Paste the codes below, wherever you like to display the recent tweets:

Download the Code File

You must change the username from “wpbeginner” to your username. You can find this towards the very end of this code where it reads parse_cache_feed(wpbeginner, 1). The number in front represents the number of tweets that will be displayed. You can change the number to the amount that you like, but we recommend that you keep it to a minimum because this code is utilizing the Search API.

Known Issues: This snippet is using the Search API, so if your account is removed from twitter search (ofcourse by twitter), then this snippet will not display any results. Also the search API only displays tweets that were posted within the last 7 days.

For those users who are flagged from the search by twitter, we recommend that you contact them and ask why that is the case. In the meantime, you may use a JavaScript solution that will display your tweets from your feed.

Place the following code in your footer.php right above </body> tag.

<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/wpbeginner.json?callback=twitterCallback2&count=5"></script>

Remember to change the username from wpbeginner to your username. Also you can change the count from 5 to whatever you like.

Then add the following HTML tags any where you want to display the recent tweets.

<div id="twitter_div"><ul id="twitter_update_list"><li>&nbsp;</li></ul></div>

You would need to edit the CSS file for proper styling.

Known Issues: This plugin does not have caching, so the scripts will be loaded every time the page loads.

Source: Twitter

Plugin

If you are one of the users who do not want to modify their theme files, there is an alternative plugin that you can use.

Alex King’s Twitter Tool

This plugin will let you display recent tweets from your account. It will store your tweets in the database to limit the API queries. Tweets are archived every 10 minutes.

Note: there are way too many plugins that do this, to list them all here.

Display Recent Tweets from Multiple Accounts

Display Recent Tweets from Multiple Accounts

Display recent tweets from Multiple accounts come can be useful to increase community interaction when you have a multi-author blog. You can spend hours on the web trying to find a good solution, but below are two best solutions that we found.

Tweet!

Tweet is an unobtrusive JavaScript plugin for jQuery that lets you put twitter on your website. This is a great snippet that loads the tweets using JSON. For the download and directions, you should visit the official page.

Known Issues: This script utilizes the Search API which has it’s limits. Your search query has a character limit set to 140 characters. So in short, you will be able to get a maximum of 6 – 8 users depending on the length of their username.

Tweet Blender

Tweet Blender Screenshot

Tweet Blender plugin allows you to display multiple user’s tweet. This plugin actually displays the tweets from user’s feeds, so it does not rely on the Search API. But the more names you put, the longer it will take to load.

Known Issues: None that we know of.

Integrate Twitter Conversations About Your Posts

People are talking about your posts, and their convesation is not limited to the comments in your post. A lot of that conversation is happening on Twitter. Why not bring this conversation right back to your blog?

Tweetback plugin imports those tweets about your posts as comments. You can display them in between the other comments on your blog, or display them separately.

You can also add widgets to your site that shows the “Most Tweeted Posts” and “Recently Tweeted Posts” with the use of a plugin called Tweet Stats . You must have the plugin (Tweetback that we mentioned above in order for this plugin to work).

Tweet Stat Widget Screenshot

Take your Blog communication to Twitter

Above we showed you how you can integrate twitter conversations about your blog posts into your comments. In this trick, you will give the user an ability to post the comment on your site, and then also have their conversation on twitter.

Commentwitter

This plugin will add a twitter login area below the comments, so users have an option to post their comment to twitter.

Post blog comments to Twitter

Display a Special Welcome Message for Your Twitter Users

Special Welcome Message for Your Twitter Users

There are some sites that display a special welcome message to their twitter users. This increase their chances of getting more followers and more retweets for that post.

Simply place the following code in your single.php file where you want the welcome message to be displayed.

<?php
if (strpos("twitter.com",$_SERVER[HTTP_REFERER])==0) {
echo "Welcome, Twitter User! If you enjoy this post, don't hesitate to retweet it to your followers";
}
?>

Display Your Twitter Friends on Your Site

Display Your Twitter Friends

You have seen the Facebook Fan page widget, Google Connect widget, and Mybloglog widget. All three of these display the friends/fans pictures. You can do that with twitter as well.

Twitter Friends Widget

This plugin displays your Twitter friends/followers in your sidebar in the same way that they appear on your Twitter homepage.

Twitter Profile Field in Comments

Twitter Field in Comments

Top tech sites are already doing this. If you go to Mashable or Tech Crunch, then you will see that they have an additional field below the Website URL for Twitter profile. There is a plugin that will let you do that fairly easily.

Twitter Link Comments

This plugin will add an extra field to your comment form so a user can add their Twitter username. A user configured ‘follow me’ link is then displayed along with their details on all their comments. The extra field and ‘follow me’ link can be configured using the settings page without ever needing to modify any template files. (unless you want to)

While these are some of the Most Wanted Twitter Hacks and Plugins, this list is definitely not the end of what you can do with twitter and WordPress. Infact there are 662 Results in the WordPress Plugin Directory when one runs the query for Twitter. There is also a list that we used as our source 107 Twitter Plugins for WordPress.

If you liked this post, then please retweet it, so others can also take advantage of this useful article. Also don’t forget to follow us on twitter.

Most Wanted Twitter Hacks and Plugins for WordPress is a post from: WPBeginner which is not allowed to be copied on other sites.

Related posts:

  1. How to Auto Publish Your Twitter Tweets as WordPress Posts
  2. 10 Most Wanted Category Hacks and Plugins for WordPress
  3. Displaying the Total Number of Twitter Followers as Text on WordPress


WordCast: WordPress.com Pushes PuSH PubSubHubbub

March 3rd, 2010

In “Rub-a-Dub-Dub in the PubSubHubbub,” announced the addition of a faster feed update service to the free blog hosting service features.

From the tongue twisting name department we welcome PubSubHubbub, or as some people have shortened it to: PuSH. Like rssCloud, PuSH is a way for services that subscribe to updates from your blog (think Google Reader, Bloglines or Netvibes) to get updates even faster. In a nutshell, instead of having to periodically ask your blog if there are any updates they can now register to automatically receive updates each time you publish new content. In most cases these updates are sent out with in a second or two of when you hit the publish button.

The announcement includes the PuSHPress WordPress Plugin, for self-hosted WordPress blogs. For WordPress.com blogs, there is nothing to do. It works under the hood.

So what is it?

All WordPress blogs have a variety of RSS feed types built-in through the core programming. Many bloggers add Feedburner and other feed services as an addition to or as a replacement for their built-in feeds. The feed choices can stay the same, but the technology behind the process is changing, and speeding up.

The address for the feed is stored in the feed reader of the user’s choice, and each one “polls” or pings the site’s feed looking for updates. Instead of a direct link, push technology works through hubs, and the “subscriber can then avoid lame, repeated polling of the URL and can instead register with the feed’s hub(s) and subscribe to updates” speeding up the process and taking the load off. It’s efficient, faster and works without a company overseeing the process, plus it’s decentralized and free.

A feed subscriber can subscribe to the topic URL of their choice from the declared hub(s) and when the blogger updates that topic URL, the publishing software pings the hub with news of an update. According to the pubsubhubbub Project Hosting on Google Code, “Parties (servers) speaking the PubSubHubbub protocol can get near-instant notifications (via webhook callbacks) when a topic (feed URL) they’re interested in is updated…Anybody can run a hub, or anybody can ping (publish) or subscribe using open hubs.”

For the typical user, all of this is invisible and they will be able to subscribe in the traditional manor, and may not notice the improvements. Those involved with the code and tracking their server and feed loads will appreciate the changes.

Joseph Scott goes into greater detail on the code workings behind this new PuSH feature in PuSHPress: A PubSubHubbub Plugin For WordPress.

Related Articles on WordCast:


WordCast: Learn to Write WordPress Plugins in 20 Minutes (video)

March 3rd, 2010

At WordCamp Phoenix 2009, John Hawkins shared with users a simple way to get started with a task that’s daunting to most WordPress users: writing a WordPress plugin. In just under 20 minutes, John walked through all the basics of putting plugin files together, the basic structure of a plugin, and their power. While you probably won’t be making huge developmental masterpieces after watching this video, it might be a good kick-start to help you get going.

John Hawkins: Building a WordPress Plugin [WordPress.TV]

John is no stranger to the WordCast network. Hear him on WordCast Conversations 3: Blog Productivity.

Related Articles on WordCast:


Holy Shmoly!: WordPress MU 2.9.2

March 3rd, 2010

WordPress MU 2.9.2 has just been released and is mostly a security and bugfix release based on WordPress 2.9.2. Grab it from the download page.

As well as the security fix mentioned above, this version also fixes a few bugs, makes the blog signup process much faster and adds a new “Global Terms” Site Admin page.

The “Global Terms” page is one I should have added years ago. Currently it’s fairly bare, but hopefully in future versions of WordPress it will be expanded. It allows the Site Admin to “fix” the terms (tags and categories) used in MU blogs. These terms are normally synced with the “sitecategories” table but sometimes they go astray. This can happen if you “import” a blog using PHPMyAdmin without going through the WordPress importer, or if a plugin manipulates the terms table directly.
WordPress MU forces the “slug” used by terms to be a sanitized version of the “name”, which isn’t the case in WordPress. This page can optionally rename the terms so they match the slug. It doesn’t do the opposite because that would break public facing URLs on the site. (I must extend a big thank you to Deanna for helping debug that page)

Enjoy!

Related Posts