Palkkaa minut!
Twitter
Flickr
RSS

Bokeh

According to Wikipedia:

…bokeh is the blur, or the aesthetic quality of the blur, in out-of-focus areas of an image, or “the way the lens renders out-of-focus points of light.”

‘Bokeh’ can be seen in two ways: some think that bokeh is only the round shaped out-of-focus spots but some think that all out-of-focus (blurry) areas are bokeh. In this article I’m referring to the round shaped spots when I mention bokeh.

Bokeh can be good or bad. Lens’ aperture size and shape affect to the quality and look of the bokeh. Some lenses are good or great bokeh lenses while other are worse. For example, the bokeh of my modernish Nikkor 50mm f/1.8D lens is usually swirly and chaotic but the bokeh of my old Nikon Series E 50mm f/1.8 AI-S lens from the 1980s is usually round and pretty (or at least rounder and prettier).

Usually there are the in-focus areas and the out-of-focus areas in a photo. The more the area is out-of-focus, the stronger the blur is. Bokeh is formed if there are lighter or glowing spots in the out-of-focus area. The further away the spots are from the in-focus area, the stronger the bokeh is.

Yesterday I went for a short walk and intentionally took a few out-of-focus photos. The photos below are taken with the Nikon Series E 50mm f/1.8 AI-S lens (wide open) and they have not been post-processed in any way except for the resizing. To create effects like in the photos below you just need to manually focus to the front of the light sources. The more you focus forward, the bigger the bokeh circles are.

Low saturated bokeh

Christmas lights (21 / 365 of Project 365)

Colorful bokeh

Colorful Christmas lights

Lights by the road

Lights by the road

Ovi Maps Is Free

Nokia Ovi Maps

Nokia announced yesterday that Nokia Ovi Maps will be free from now on. At first Ovi Maps will be freely available in ten Symbian powered phones with built-in GPS, and in March the service will be included with every new GPS phone. The currently supported devices are Nokia X6, Nokia N97 mini, E72, E55, E52, Nokia 6730 classic, Nokia 6710 Navigator, Nokia 5800 Xpressmusic, Nokia 5800 Navigation Edition and Nokia 5230.

I just bought a new phone in December and back then I made a decision between Nokia 5800, Nokia 5230 and Nokia 5530 and ended up purchasing the latter one, the only one without GPS support. I made my decision based on the fact that I would not ever pay for GPS navigation in a phone. Only if I had a crystal ball…

Credits: Screen shot from Nokia’s Ovi Maps site.

Making Author's Comments To Pop

Difficulty: Easy

Modern WordPress content management system offers several built-in tools for modifying the look of your comments. The features have been there for awhile now and in 2.8 they added also the threaded commenting. At the moment the newest version of WordPress is 2.9.1.

One of the easiest ways to modify the comment list is to make the post author’s comments to stand out. Another easy way is to adjust even and odd comments to look different. Modifying the look of comment list and individual comments is not difficult but it requires that you understand how CSS (Cascading Style Sheets) syntax flows and how (X)HTML ((Extensible) Hypertext Markup Language) selectors work.

Below is an example of comment list where all the comments look exactly the same. Of course gravatars and names help to identify the comment writers but if there are dozens of comments, it may be difficult or at least slow to find the post author’s comments which usually are replies to other comments.

Comments

In the second example I’ve used different background color in the post author’s comment so that it can be spotted quickly. This is just a simple example and of course the author’s comment could be modified in any way CSS allows.

Author's comment

The WordPress function that prints the post or page comments is (specification):

<?php wp_list_comments(); ?>

This function displays the comments inside <li></li> elements by default and therefore it’s recommended to wrap the function with <ul></ul> or <ol></ul> if the default output is used. I’m not going to talk about modifying the structure of the comment list in this post but if you are interested you can find an example in WordPress Codex.

The small bit which we need to about the wp_list_comments() function is that in the default mode it embeds a lot of (X)HTML selectors into the <li></li> tags. We can use these selectors (classes to be more exact) to direct CSS styling into specific comments. If you are building your custom output you can use the following function to print the same selectors:

<?php comment_class(); ?>

Each comment (li element by default) will get comment class but there will be a bunch of other useful selectors too:

even / odd
thread-even / thread-odd
depth-1 / depth-2 / ... / depth-x
byuser
comment-author-name
bypostauthor

Okay, so you have your style sheet ready but how to make modifications to the post author’s comments? Now that we have the selectors in the list above, we can pick the correct one and use .bypostauthor in the style sheet to direct the style changes into specific comments, the post author’s comments. In the example only the background color is changed so we need to add the following into our style sheet:

.bypostauthor {
background-color: #284d39;
color: #cccccc;
}

The second line is not necessary to make the background green but it is necessary if you want to write valid CSS code. Valid CSS requires that if a background color is defined, also the text color must be defined, and vice versa. Now you will have free hands if you want to make more detailed changes. By the way, the even / odd class can be used to make even and odd comments to look different!

I’m going to introduce more built-in WordPress features in the future too. Plug-ins are useful but it’s always better to get the same features implemented in the WordPress core so that they are properly specified and the compatibility can be guaranteed. You can make suggestions for short tutorials in the comments.

Credits: The background texture in the example pictures is made using one of the brushes from KeReN-R’s Grunge Brushes 3 set.