Archive

Ubuntu’s Lost Identity

Ubuntu boot splash screen — old (left) and new

Ubuntu has a new logo and identity brand, and I really don’t like. Why through away the legendary friendly circle icon and replace it with a badly kerned wordmark?

/ 1 comment, add yours

Notes on the 2010 WordPress Theme

Here are some of my random thoughts after going through the files of the new TwentyTen (2010) theme which will be introduced in WordPress 3.0.

header.php isn’t poetry at all

The content of the <title> should be generated within functions.php by using the wp_title filter, so that plugins and users can overwrite it. In header.php we would have only:

<title><?php wp_title('|', true, 'right'); ?></title>

and in functions.php something like:

add_filter('wp_title', 'twentyten_title', 10, 2);

function twentyten_title($title, $sep) {
	global $post;

	$title = wptexturize($title);
	$page_no = get_query_var('paged');

	if (is_front_page())
		$title = get_bloginfo('title') . ' ' . $sep . ' ' . get_bloginfo('description');
	elseif (!is_feed())
		$title .= ' ' . get_bloginfo('title');

	if ($page_no > 1)
		$title .= ' (page ' . $page_no . ')';

	return $title;
}

Theme’s stylesheet style.css should be loaded after the wp_head() call, so that users can overwrite styles added by the plugins. Read more »

Remove index.html from the URL

Some servers seem to automatically append index.html to all HTTP requests, which you can remove by placing this at the beginning of .htaccess:

RewriteEngine On # remove this, if you have it already

RewriteCond %{REQUEST_URI} index\.html
RewriteRule ^(.*)index\.html$ /$1/ [R=301,L]

I used this technique for a site that I built — ichomesforsale.com which is hosted at Godaddy.

/ 4 comments, add yours

The Magic of Software (Licensing)

Henry Birdseye: “Is it getting to the point where the software is going to cost as much as the machine?”

Unknown: “I think it will get to that, yes.”

Birdseye: “So, if something like that can cost so much. Why not just make your copy?”

Bill Gates: “If you don’t get a legitimate copy, you won’t be… came aware of the improvements, and… overall the impact that type of ripoff is going to have is that people won’t write quality packages.”

Unknown: “It takes time to write software. We haven’t found any way to really reduce that time. It takes time to define the problem. It takes time to write the software.”

Henry Birdseye: “But increasingly, as you begin to (medal?) with the prepackaged things and get a little experience, you just can’t resist the temptation to do some of your own programming. And people are gonna be doing that.”

Bill Gates: “There’s a lot of people who are forcasting that there’ll be software stores just like there are record stores today and that there’ll be thousands and thousands of those, and I think I have to agree with that.”

And yet, 86-DOS — the operating system which Bill Gates, Steve Ballmer and Paul Allen pitched and later licensed to IBM — was actually written by Tim Paterson and called QDOS (Quick and Dirty Operating System). Read more »

The Unspoken Heroes of Web Design

While playing with the typography of this blog, I couldn’t appreciate enough the simplicity and elegance of Tahoma, it’s wider sister Verdana and beauty serif Georgia. All of those fonts were designed by one guy — Matthew Carter, English type designer born 1937, living in Cambridge, Massachusetts, US.

Portrait of Matthew Carter

Matthew Carter

Thomas Rickner

While you have probably heard of Matthew Carter, it’s unlikely that you’ll know Tom Rickner who hinted these fonts making them so easy to read at sizes with very few ink dots available to form their shape and guide the eye.

In the summer of 1994 Microsoft commissioned Carter and Rickner to design a new system font for Windows 95 which we now know as Tahoma. Here is the story of Verdana.

Once you’ll discover where the names of those fonts come from, you’ll never look at them the same way.

/ Add a Comment

Sunday with Beethoven

/ Add a Comment

Egīls Pārups (parups.com) running a child theme of Portfolio Racer

Parups.com is the very first website running a child theme of Portfolio Racer. The following plugins are helping out behind the scenes — Google XML Sitemaps, Infinite Scroll, Page Menu Editor, postMash (Filter), Top Level Categories, Widget Context and WP Super Cache.

Open source rocks!

/ Add a Comment

Smarter Cleaner Gallery

Justin Tadlock’s Cleaner Gallery plugin fixes the semantics of the WordPress built-in gallery feature by placing all of the gallery related CSS in an external file instead of the inline CSS produced by WordPress core.

However, the problem is that this CSS file is loaded on every page request. Therefore, until WordPress supports combining all CSS files into one, here is a quick way to hide this CSS file on all pages that don’t contain a gallery (line 128 of cleaner-gallery.php):

Note: this will add cleaner-gallery.css only on single post and page views (not indexes or archives).

add_action('wp_head', 'cleaner_gallery_head', 0);
function cleaner_gallery_head() {
	global $post;
	if (strstr($post->post_content, '[gallery'))
		wp_enqueue_style( 'cleaner-gallery', CLEANER_GALLERY_URL . '/cleaner-gallery.css', false, 0.7, 'all' );
}

Hopefully, Justin can incorporate this into the next release of this handy plugin.

/ 8 comments, add yours

Google humor: page speed suggestion

Google's suggestions to Google

/ 1 comment, add yours

Web Infinity

Web has that enormous feeling of infinity — every word and though never lost or erased once it’s up there on the web. Incredible, isn’t it, that feeling of never loosing something you hold dear.

/ 1 comment, add yours

Automatically Escape HTML Entities of Code Fragments in Comments

Update: Ryan has made this into a plugin — Code Comments.

Add this to your theme’s functions.php to allow readers post fragments of code in their comments (wrapped in <code>...</code>) which are automatically encoded (think of < and &lt;)

add_filter('pre_comment_content', 'encode_code_in_comment');

function encode_code_in_comment($source) {
  $encoded = preg_replace_callback('/<code>(.*?)<\/code>/ims',
  create_function(
    '$matches',
    '$matches[1] = preg_replace(
        array("/^[\r|\n]+/i", "/[\r|\n]+$/i"), "",
        $matches[1]);
      return "<code>" . htmlentities($matches[1]) . "</code>";'
  ),
  $source);

  if ($encoded)
    return $encoded;
  else
    return $source;
}

Worth noting:

  • Everything wrapped in <code>...</code> is encoded.
  • Line breaks after opening <code> and before closing </code> are removed in order to avoid unnecessary <br /> tags.

/ 7 comments, add yours

Semantics of Article Headline and Byline

Can you think of any reason why placing article credits before the headline, like this:

<p>August 18, 2009 by Author Name</p>
<h1>Title of the Post</h1>
<p>Post body goes here.</p>

is semantically worse than moving credits after the title:

<h1>Title of the Post</h1>
<p>August 18, 2009 by Author Name</p>
<p>Post body goes here.</p>

/ 2 comments, add yours

Tabbed Widgets 0.83

Tabbed Widgets plugin has been updated — fixed default javascript variables.

/ Add a Comment

Tabbed Widgets Updated for WordPress 2.8

I found the time to update one of my most popular plugins — Tabbed Widgets. Test it (version 0.81) and report your findings at WordPress support forum.

Your support and donations are much appreciated and encourage further updates and development.

/ 3 comments, add yours

Pāri jumtiem lido kaijas

by Ainars Mielavs.

/ Add a Comment

Multiple Galleries per Post/Page

Ever wanted to have multiple galleries on the same post or page? Currently most of the solutions require you to manually edit gallery shortcode and add something like include="img_id_1 img_id2". Luckily, WordPress 2.9 will have this include/exclude feature built in core, but you still don’t have an easy way to select images which to include or to insert multiple galleries.

Therefore, I created a plugin called Multiple Galleries which adds checkboxes next to images in the Insert Gallery window which makes selecting images to be included in galleries fast and easy. If no checkbox is selected, all images are included.

Select images which to include in gallery

I created this plugin because I am designing a new WordPress theme for designers, artists, architects and all of the creative types where the ability to have multiple galleries per portfolio entry is very important.

/ 12 comments, add yours

The Pricey GPL Thought Experiment

Let’s create the most expensive GPL licensed WordPress plugin and call it the Pricey GPL. It is offered as a free download from WordPress.org and by default it displays a random paragraph from the most downloaded book at Project Gutenberg in the WordPress dashboard. Of course, there is a widget available, too.

However, to enjoy the real value of the Pricey GPL, you have to purchase a monthly subscription to the PriceyGPL.com service (an API key) which displays a random paragraph from one of the GPL licenses. Read more »

Basic Math of GPL

Khoi Vinh together with Allan Cole have released (a rather noisy) grid based WordPress theme called Basic Math.

They say it’s GPL, while the price tag reads: Single-site License (Limited time only) $45″, which clearly violates one of the main freedoms protected by GPLthe freedom to run the program, for any purpose (freedom 0).

Update: Basic Math is now fully GPL.

/ 2 comments, add yours

Automatic Updates for Developer Hosted Themes

I just realized that the automatic update thing also works for themes hosted outside of wordpress.org.

/ Add a Comment

Enable Automatic Updates for Plugins Hosted by Developers

Currently WordPress doesn’t offer an easy way for plugins which are not hosted on wordpress.org to use its built-in automatic update feature.

Fortunately, I have found a quick and simple way to add this functionality to any plugin and allow plugin authors to take a complete control over when and how the updates are released. Read more »

Es vienmēr tevi mīlēšu, Sirsniņ!