'Right sidebar','before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); register_sidebar(array('name'=>'Left sidebar','before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); register_sidebar(array('name'=>'Page left sidebar','before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); register_sidebar(array('name'=>'Page right sidebar','before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); } // Shows the page title function show_title() { if ( is_404() ) { $title = 'page not found'; } elseif ( is_search() ) { $title = 'search results'; } elseif ( is_date() ) { if ( is_month() ) { $title = single_month_title(" ", false); } else { $title = wp_title('',0); } } elseif ( is_category() ) { $title = single_cat_title("", false); } elseif ( is_tag() ) { $title = single_tag_title("", false); } if ($title) { echo '

' . $title . '

'; } } // Shows the search bar. function show_searchbar() { global $searchwidget; if ( ( $searchwidget==false ) && ( !is_single() || is_search() || is_404() ) && !( is_page() && comments_open() ) ) { echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; } } // Shows the colophon. function show_colophon() { global $colophon; if ( is_front_page() && !is_paged() ) { echo '' . $colophon . ''; } } // Shows the proper message when a page or a search result is not found function show_searchwarning() { $noresult = '

Sorry, no posts matched your criteria.

'; $notfound = '

The page you requested was not found.
It may have been removed, had its name changed, or is temporarily unavailable.
Please check the address you entered.

'; if ( is_404() ) { echo $notfound; } else { echo $noresult; } } // Shows the tag list, if defined. function show_tags() { if ( get_the_tag_list() ) { echo get_the_tag_list('
Tags : ', '  ', '
'); } } // Shows the custom fields defined by the author. function show_meta() { global $showcustomfields; if ( $showcustomfields=='true' ) { if ( $keys = get_post_custom_keys() ) { foreach ( $keys as $key ) { if ( (strpos($key, '_') !== false) || ($key == 'enclosure') ) continue; $values = array_map( 'trim', get_post_custom_values($key) ); $value = implode($values,', '); if ( strpos($value, '{') !== false ) continue; $metastring .= '' . $key . ': ' . $value . '' . "\n"; } if ( $metastring ) { echo '
' . "\n" . $metastring .'
'; } } } } // Shows "required" above the input field if comment author must fill out name and e-mail. function ask_name() { if ( get_option('require_name_email') ) { echo ' (required)'; } } // Custom 'Search' widget. function widget_search($args) { global $searchwidget; $searchwidget = true; extract($args); echo $before_widget; echo '

Search

'; echo '
'; echo $after_widget; } register_sidebar_widget('Search', 'widget_search'); // Custom 'Akismet' widget. function akismet_count($args) { extract($args); $count = number_format_i18n(get_option('akismet_spam_count')); echo $before_widget; echo '

Akismet

'; echo $count . ' comments blocked'; echo $after_widget; } register_sidebar_widget('Akismet counter', 'akismet_count'); ?>