', $comment_lenth = 200, $show_pass_post = false) {
global $wpdb, $tablecomments, $tableposts;
$request = "SELECT ID, comment_ID, comment_content, comment_author, comment_author_email FROM $tableposts, $tablecomments WHERE $tableposts.ID=$tablecomments.comment_post_ID AND post_status = 'publish' ";
if(!$show_pass_post) { $request .= "AND post_password ='' "; }
$request .= "AND comment_approved = '1' ORDER BY $tablecomments.comment_date DESC LIMIT $no_comments";
$comments = $wpdb->get_results($request);
foreach ($comments as $comment) {
$comment_id = $comment->comment_ID;
$comment_content = strip_tags($comment->comment_content);
$comment_excerpt = mb_substr($comment_content, 0, $comment_lenth)."";
$permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID;
$mal = get_the_title($comment->ID);
$comment_author_email = $comment->comment_author_email;
echo '
';
if (function_exists('get_avatar')) {
if ('' == $comment->comment_type) {
echo get_avatar($comment->comment_author_email, 40);
} elseif ( ('trackback' == $comment->comment_type) || ('pingback' == $comment->comment_type) ) {
echo get_avatar($comment->comment_author_url, 40);
}
} elseif (function_exists('gravatar')) {
echo "

comment_type) {
echo gravatar($comment->comment_author_email);
} elseif ( ('trackback' == $comment->comment_type) || ('pingback' == $comment->comment_type) ) {
echo gravatar($comment->comment_author_url);
}
echo "\" alt=\"\" />";
}
echo '
' ; echo '
' ;
echo '';
}
}
?>...Read more.', $text); }
add_filter('the_excerpt', 'excerpt_ellipse');
function mytheme_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
id="li-comment-">
'sidebar',
'before_widget' => '',
'before_title' => '',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer 1',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '
',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer 2',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '
',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer 3',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '
',
));
function mytheme_add_admin() {
global $themename, $shortname, $options;
if ( $_GET['page'] == basename(__FILE__) ) {
if ( 'save' == $_REQUEST['action'] ) {
foreach ($options as $value) {
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } }
header("Location: themes.php?page=functions.php&saved=true");
die;
}
else if( 'reset' == $_REQUEST['action'] ) {
foreach ($options as $value) {
delete_option( $value['id'] ); }
header("Location: themes.php?page=functions.php&reset=true");
die;
}
}
add_theme_page($themename." Options", "".$themename." Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}
function mytheme_admin() {
global $themename, $shortname, $options;
if ( $_REQUEST['saved'] ) echo ''.$themename.' settings saved.
';
if ( $_REQUEST['reset'] ) echo ''.$themename.' settings reset.
';
?>
%s says:'), comment_author()) ?>
comment_approved == '0') : ?>