'.__('404 Not Found','basic2col') .'
'. __('Whatever you were looking for can not be found','basic2col') .'
';
return apply_filters('basic2col_404_message', $message);
}
/*This filter let you change the welcome message if you use a page on front*/
function basic2col_welcome_message() {
$message = ''.__('Welcome to ','basic2col') . get_bloginfo('name') .'';
return apply_filters('basic2col_welcome_message', $message);
}
/*This filter let you change the doctype*/
function basic2col_doctype() {
$doctype = '';
return apply_filters('basic2col_doctype', $doctype);
}
/*This filter let you change the awaiting moderation message*/
function basic2col_moderation_message() {
$message = ''.__('Your comment is awaiting moderation','basic2col').'';
return apply_filters('basic2col_moderation_message', $message);
}
/*Blix archive http://rmarsh.com/plugins/blix-archive/*/
function basic2col_archive($show_comment_count=false, $before='', $after='
', $listclass='postspermonth') {
$result = false;
// if the Plugin Output Cache is installed we can cheat...
if (defined('POC_CACHE')) {
$key = 'b_a'.$before.$after.$listclass;
$cache = new POC_Cache();
$cache->timer_start();
$result = $cache->fetch($key);
if ($result) $cache_time = sprintf('', $cache->timer_stop());
}
// ... otherwise we do it the hard way
if (false === $result) {
$result = get_basic2col_archive($show_comment_count, $before, $after, $listclass);
if (defined('POC_CACHE')) $cache->store($key, $result);
}
echo $result;
if (defined('POC_CACHE')) echo $cache_time;
}
/********************************************************************************************************
Stuff below this point is not meant to be used directly
*********************************************************************************************************/
function get_basic2col_archive($show_comment_count, $before, $after, $listclass) {
global $month, $wpdb, $wp_version;
$result = '';
$below21 = version_compare($wp_version, '2.1','<');
// WP 2.1 changed the way post_status and post_type fields work
if ($below21) {
$now = current_time('mysql');
$arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM " . $wpdb->posts . " WHERE post_date <'" . $now . "' AND post_status='publish' AND post_password='' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC");
} else {
$arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM " . $wpdb->posts . " WHERE post_type='post' AND post_status='publish' AND post_password='' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC");
}
if ($arcresults) {
foreach ($arcresults as $arcresult) {
$url = get_month_link($arcresult->year, $arcresult->month);
$text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year);
$result .= get_archives_link($url, $text, '', $before, $after);
$thismonth = zeroise($arcresult->month,2);
$thisyear = $arcresult->year;
if ($below21) {
$arcresults2 = $wpdb->get_results("SELECT ID, post_date, post_title, comment_status FROM " . $wpdb->posts . " WHERE post_date LIKE '$thisyear-$thismonth-%' AND post_status='publish' AND post_password='' ORDER BY post_date DESC");
} else {
$arcresults2 = $wpdb->get_results("SELECT ID, post_date, post_title, comment_status FROM " . $wpdb->posts . " WHERE post_date LIKE '$thisyear-$thismonth-%' AND post_status='publish' AND post_type='post' AND post_password='' ORDER BY post_date DESC");
}
if ($arcresults2) {
$result .= "\n";
foreach ($arcresults2 as $arcresult2) {
if ($arcresult2->post_date != '0000-00-00 00:00:00') {
$url = get_permalink($arcresult2->ID);
$arc_title = $arcresult2->post_title;
if ($arc_title) $text = strip_tags($arc_title);
else $text = $arcresult2->ID;
$result .= "- ".get_archives_link($url, $text, '');
if ($show_comment_count) {
$comments = mysql_query("SELECT comment_ID FROM " . $wpdb->comments . " WHERE comment_post_ID=" . $arcresult2->ID);
$comments_count = mysql_num_rows($comments);
if ($arcresult2->comment_status == "open" OR $comments_count > 0) $result .= ' ('.$comments_count.')';
}
$result .= "
\n";
}
}
$result .= "
\n";
}
}
}
return $result;
}
/*register sidebars*/
if ( function_exists('register_sidebars') )
register_sidebars(2, array(
'before_title' => '',
'after_title' => '
',
));
/*basic2col widgets*/
function widget_basic2col_search() { ?>