'', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', )); function widget_basic_theme_search() { echo "

Search

"; include (TEMPLATEPATH . '/searchform.php'); } if ( function_exists('register_sidebar_widget') ) register_sidebar_widget(__('Search'), 'widget_basic_theme_search'); function mdv_recent_comments($no_comments = 3, $comment_lenth = 10, $before = '
  • ', $after = '
  • ', $show_pass_post = false, $comment_style = 0) { global $wpdb; $request = "SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, post_title FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID=$wpdb->comments.comment_post_ID WHERE post_status IN ('publish','static') "; if(!$show_pass_post) $request .= "AND post_password ='' "; $request .= "AND comment_approved = '1' ORDER BY comment_ID DESC LIMIT $no_comments"; $comments = $wpdb->get_results($request); $output = ''; if ($comments) { foreach ($comments as $comment) { $comment_author = stripslashes($comment->comment_author); if ($comment_author == "") $comment_author = "anonymous"; $comment_content = strip_tags($comment->comment_content); $comment_content = stripslashes($comment_content); $words=split(" ",$comment_content); $comment_excerpt = join(" ",array_slice($words,0,$comment_lenth)); $permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID; if ($comment_style == 1) { $post_title = stripslashes($comment->post_title); $url = $comment->comment_author_url; if (empty($url)) $output .= $before . $comment_author . ' on ' . $post_title . '.' . $after; else $output .= $before . "$comment_author" . ' on ' . $post_title . '.' . $after; } else { $output .= $before . '' . $comment_excerpt.'...' . $comment_author . ' ' . $after; } } $output = convert_smilies($output); } else { $output .= $before . "None found" . $after; } echo $output; } ?>