Ejemplo n.º 1
0
function mystique_ip2c_comment_class($class)
{
    if (get_mystique_option('comment_author_country')) {
        $flag = @mystique_get_flag(get_comment_author_IP());
        if (!empty($flag['code'])) {
            $class[] = ' country-' . $flag['code'];
        }
    }
    return $class;
}
    /**
     * Custom column to render comment authors
     *
     * @param Object $comment Current comment
     */
    public function column_author($comment)
    {
        ?>
		<strong><?php 
        comment_author();
        ?>
</strong><br />
		<?php 
        $author_url = get_comment_author_url();
        if (preg_match('|^https?://$|', $author_url)) {
            $author_url = '';
        }
        // END if
        $author_url_display = preg_replace('|https?://(www\\.)?|i', '', $author_url);
        if (strlen($author_url_display) > 50) {
            $author_url_display = substr($author_url_display, 0, 49) . '&hellip;';
        }
        // END if
        if (!empty($author_url)) {
            ?>
			<a href="<?php 
            echo esc_url($author_url);
            ?>
" title="<?php 
            echo esc_url($author_url);
            ?>
"><?php 
            esc_html($author_url_display);
            ?>
</a>
			<?php 
        }
        // END if
        if ($this->user_can) {
            if (!empty($comment->comment_author_email)) {
                comment_author_email_link();
            }
            // END if
            $args = array('s' => get_comment_author_IP(), 'mode' => 'detail');
            ?>
			<br />
			<a href="<?php 
            echo esc_url(add_query_arg($args, admin_url('edit-comments.php')));
            ?>
"><?php 
            echo esc_html(get_comment_author_IP());
            ?>
</a>
			<?php 
        }
        // END if
    }
 /**
  *
  * @global string $comment_status
  *
  * @param object $comment
  */
 public function column_author($comment)
 {
     global $comment_status;
     $author_url = get_comment_author_url();
     if ('http://' == $author_url) {
         $author_url = '';
     }
     $author_url_display = preg_replace('|http://(www\\.)?|i', '', $author_url);
     if (strlen($author_url_display) > 50) {
         $author_url_display = substr($author_url_display, 0, 49) . '&hellip;';
     }
     echo "<strong>";
     comment_author();
     echo '</strong><br />';
     if (!empty($author_url)) {
         echo "<a title='{$author_url}' href='{$author_url}'>{$author_url_display}</a><br />";
     }
     if ($this->user_can) {
         if (!empty($comment->comment_author_email)) {
             comment_author_email_link();
             echo '<br />';
         }
         $author_ip = get_comment_author_IP();
         if ($author_ip) {
             $author_ip_url = add_query_arg(array('s' => $author_ip, 'mode' => 'detail'), 'edit-comments.php');
             if ('spam' == $comment_status) {
                 $author_ip_url = add_query_arg('comment_status', 'spam', $author_ip_url);
             }
             printf('<a href="%s">%s</a>', esc_url($author_ip_url), $author_ip);
         }
     }
 }
/* translators: comment type radio button */
_ex('Pending', 'adjective');
?>
</label><br />
<label class="spam"><input type="radio"<?php 
checked($comment->comment_approved, 'spam');
?>
 name="comment_status" value="spam" /><?php 
/* translators: comment type radio button */
_ex('Spam', 'adjective');
?>
</label>
</div>

<?php 
if ($ip = get_comment_author_IP()) {
    ?>
<div class="misc-pub-section misc-pub-comment-author-ip">
	<?php 
    _e('IP address:');
    ?>
 <strong><a href="<?php 
    echo esc_url(sprintf('http://whois.arin.net/rest/ip/%s', $ip));
    ?>
"><?php 
    echo esc_html($ip);
    ?>
</a></strong>
</div>
<?php 
}
Ejemplo n.º 5
0
 function get_recent_comments($pAllowedStatuses, $pCount)
 {
     if (!function_exists('get_comment_author_url')) {
         include_once WPINC . '/comment-template.php';
     }
     $allComments = array();
     foreach ($pAllowedStatuses as $status) {
         $params = array('status' => $status);
         if (0 !== $pCount) {
             $params['number'] = $pCount;
         }
         $comments = get_comments($params);
         if (is_array($comments)) {
             foreach ($comments as $comment) {
                 $post = get_post($comment->comment_post_ID);
                 $outComment = array();
                 $outComment['id'] = $comment->comment_ID;
                 $outComment['status'] = wp_get_comment_status($comment->comment_ID);
                 $outComment['author'] = $comment->comment_author;
                 $outComment['author_url'] = get_comment_author_url($comment->comment_ID);
                 $outComment['author_ip'] = get_comment_author_IP($comment->comment_ID);
                 $outComment['author_email'] = $email = apply_filters('comment_email', $comment->comment_author_email);
                 if (!empty($outComment['author_email']) && '@' !== $outComment['author_email']) {
                     $outComment['author_email'] = '<a href="mailto:' . $outComment['author_email'] . '">' . $outComment['author_email'] . '</a>';
                 }
                 $outComment['postId'] = $comment->comment_post_ID;
                 $outComment['postName'] = $post->post_title;
                 $outComment['comment_count'] = $post->comment_count;
                 $outComment['content'] = $comment->comment_content;
                 $outComment['dts'] = strtotime($comment->comment_date_gmt);
                 $allComments[] = $outComment;
             }
         }
     }
     return $allComments;
 }
Ejemplo n.º 6
0
function comment_author_ratings_filter($comment_text)
{
    global $comment, $comment_authors_ratings;
    $output = '';
    if (!is_feed() && !is_admin()) {
        if (get_comment_type() == 'comment') {
            $post_ratings_images = '';
            $ratings_image = get_option('postratings_image');
            $ratings_max = intval(get_option('postratings_max'));
            $ratings_custom = intval(get_option('postratings_customrating'));
            $comment_author = get_comment_author();
            $comment_author_rating = intval($comment_authors_ratings[$comment_author]);
            if ($comment_author_rating == 0) {
                $comment_author_rating = intval($comment_authors_ratings[get_comment_author_IP()]);
            }
            if ($comment_author_rating != 0) {
                // Display Rated Images
                if ($ratings_custom && $ratings_max == 2) {
                    if ($comment_author_rating > 0) {
                        $comment_author_rating = '+' . $comment_author_rating;
                    }
                }
                $image_alt = sprintf(__('%s gives a rating of %s', 'wp-postratings'), $comment_author, $comment_author_rating);
                $post_ratings_images = get_ratings_images_comment_author($ratings_custom, $ratings_max, $comment_author_rating, $ratings_image, $image_alt);
            }
            $output .= '<div class="post-ratings-comment-author">';
            if ($post_ratings_images != '') {
                $output .= get_comment_author() . ' ratings for this post: ' . $post_ratings_images;
            } else {
                $output .= get_comment_author() . ' did not rate this post.';
            }
            $output .= '</div>';
        }
    }
    return $comment_text . $output;
}
 /**
  * Comments page modification
  */
 public function comment_row_actions($actions, $comment_id)
 {
     $ip = get_comment_author_IP($comment_id);
     if (!empty($ip)) {
         $actions[] = '<a href="#ip=' . urlencode($ip) . '" class="w3tc_cloudflare_ip_check">CloudFlare IP score</a>';
     }
     return $actions;
 }
Ejemplo n.º 8
0
function CID_get_comment_flag_without_template()
{
    $ip = get_comment_author_IP();
    return CID_get_flag_without_template($ip);
}
/**
 * Display the IP address of the author of the current comment.
 *
 * @since 0.71
 *
 * @param int $comment_ID ID of the comment for which to print the author's IP
 *                        address. Default current comment.
 */
function comment_author_IP($comment_ID = 0)
{
    echo get_comment_author_IP($comment_ID);
}
Ejemplo n.º 10
0
function mytheme_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>
    <li <?php 
    comment_class();
    ?>
 id="li-comment-<?php 
    comment_ID();
    ?>
">
    <div id="comment-<?php 
    comment_ID();
    ?>
">
    <div class="comment-listCon">
        <div class="comment-info">
            <?php 
    echo get_avatar($comment, 48);
    //アバター画像
    ?>
            <?php 
    printf(__('<span class="admin">名前:<cite class="fn comment-author">%s</cite></span> '), get_comment_author_link());
    //投稿者の設定
    ?>
            <span class="comment-datetime">投稿日:<?php 
    printf(__('%1$s at %2$s'), get_comment_date('Y/m/d(D)'), get_comment_time('H:i:s'));
    //投稿日の設定
    ?>
</span>
            <span class="comment-id">
            ID:<?php 
    //IDっぽい文字列の表示(あくまでIDっぽいものです。)
    $ip01 = get_comment_author_IP();
    //書き込んだユーザーのIPアドレスを取得
    $ip02 = get_comment_date('jn');
    //今日の日付
    $ip03 = ip2long($ip01);
    //IPアドレスの数値化
    $ip04 = $ip02 * $ip03;
    //ip02とip03を掛け合わせる
    echo mb_substr(sha1($ip04), 2, 9);
    //sha1でハッシュ化、頭から9文字まで出力
    //echo mb_substr(base64_encode($ip04), 2, 9); //base64でエンコード、頭から9文字まで出力
    ?>
            </span>
            <span class="comment-reply">
              <?php 
    comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
    ?>
            </span>
            <span class="comment-edit"><?php 
    edit_comment_link(__('Edit'), '  ', '');
    //編集リンク
    ?>
</span>
        </div>
        <?php 
    if ($comment->comment_approved == '0') {
        ?>
            <em><?php 
        _e('Your comment is awaiting moderation.');
        ?>
</em>
        <?php 
    }
    ?>
        <div class="comment-text"></div>
        <?php 
    comment_text();
    //コメント本文
    ?>

        <?php 
    //返信機能は不要なので削除
    ?>
    </div>
</div>
<?php 
}
Ejemplo n.º 11
0
 /**
  * Returns reports table row
  *
  * @param object $item
  *
  * @return string
  */
 protected function row($item)
 {
     $author_info = html('strong', get_comment_author($item->get_id())) . '<br />';
     $author_email = get_comment_author_email($item->get_id());
     if (!empty($author_email)) {
         $author_info .= html_link('mailto:' . $author_email, $author_email) . '<br />';
     }
     $author_info .= get_comment_author_IP($item->get_id());
     $cells = array($author_info, get_comment_text($item->get_id()), get_comment_date('', $item->get_id()), '<span class="delete ui-icon ui-icon-circle-minus"></span>');
     return html('tr id="report-' . $item->get_id() . '"', array(), $this->cells($cells));
 }
Ejemplo n.º 12
0
function open_get_avatar($avatar, $id_or_email = '', $size = '80', $default = '')
{
    global $comment;
    $comment_ip = '';
    if ($id_or_email && is_object($id_or_email)) {
        $id_or_email = $id_or_email->user_id;
        if (is_user_logged_in() && current_user_can('manage_options')) {
            $comment_ip = get_comment_author_IP();
        }
    }
    if ($id_or_email) {
        $open_type = get_user_meta($id_or_email, 'open_type', true);
    }
    if ($id_or_email && $open_type) {
        $open_id = get_user_meta($id_or_email, 'open_id', true);
        if ($open_type == 'qq') {
            if (osop('QQ_AKEY')) {
                $out = 'http://q.qlogo.cn/qqapp/' . osop('QQ_AKEY') . '/' . $open_id . '/100';
            }
            //40
        } elseif ($open_type == 'sina') {
            $out = 'http://tp3.sinaimg.cn/' . $open_id . '/180/1.jpg';
            //50
        } elseif ($open_type == 'douban') {
            $out = 'http://img3.douban.com/icon/ul' . $open_id . '.jpg';
            //u
        } elseif ($open_type == 'xiaomi') {
            $out = 'http://avatar.bbs.miui.com/data/avatar/' . substr(strlen($open_id) <= 8 ? '0' . $open_id : $open_id, 0, -6) . '/' . substr($open_id, -6, -4) . '/' . substr($open_id, -4, -2) . '/' . substr($open_id, -2) . '_avatar_middle.jpg';
            //eggs broken
        } else {
            $out = get_user_meta($id_or_email, 'open_img', true);
        }
        if (isset($open_id) && isset($out)) {
            return "<img alt='' ip='{$comment_ip}' src='{$out}' class='avatar avatar-{$size}' width='{$size}' />";
        }
    }
    if (preg_match('/gravatar\\.com/', $avatar) && osop('extend_gravatar_disabled', 1)) {
        $default = plugins_url('/images/gravatar.png', __FILE__);
        $avatar = "<img alt='' ip='{$comment_ip}' src='{$default}?s={$size}' class='avatar avatar-{$size}' width='{$size}' />";
    }
    return $avatar;
}
Ejemplo n.º 13
0
<div id="preview-action">
<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
</div>
<div class="clear"></div>
</div>

<div id="misc-publishing-actions">

<fieldset class="misc-pub-section misc-pub-comment-status" id="comment-status-radio">
<legend class="screen-reader-text"><?php _e( 'Comment status' ); ?></legend>
<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php /* translators: comment type radio button */ _ex('Approved', 'adjective') ?></label><br />
<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php /* translators: comment type radio button */ _ex('Pending', 'adjective') ?></label><br />
<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php /* translators: comment type radio button */ _ex('Spam', 'adjective'); ?></label>
</fieldset>

<?php if ( $ip = get_comment_author_IP() ) : ?>
<div class="misc-pub-section misc-pub-comment-author-ip">
	<span aria-hidden="true"><?php _e( 'IP address:' ); ?></span> <strong><a href="<?php echo esc_url( sprintf( 'http://whois.arin.net/rest/ip/%s', $ip ) ); ?>"> <span class="screen-reader-text"><?php _e( 'IP address:' ); ?> </span><?php echo esc_html( $ip ); ?></a></strong>
</div>
<?php endif; ?>

<div class="misc-pub-section curtime misc-pub-curtime">
<?php
/* translators: Publish box date format, see http://php.net/date */
$datef = __( 'M j, Y @ H:i' );
$stamp = __('Submitted on: <b>%1$s</b>');
$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
?>
<span id="timestamp"><?php printf( $stamp, $date ); ?></span>
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0); ?></div>
Ejemplo n.º 14
0
function fs_add_comment_flag($link)
{
    $FS_PATH = fs_get_firestats_path();
    if (!$FS_PATH) {
        return;
    }
    require_once $FS_PATH . '/php/ip2country.php';
    $ip = get_comment_author_IP();
    $code = fs_ip2c($ip);
    if (!$code) {
        return $link;
    }
    return $link . ' ' . fs_get_country_flag_url($code);
}
Ejemplo n.º 15
0
function comment_author_IP()
{
    echo get_comment_author_IP();
}
Ejemplo n.º 16
0
function show_user_rating()
{
    global $txt_product_rating;
    /*
        Show rating of comment author
    */
    //global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
    global $wpdb, $post, $user_ID, $ratings_image;
    $out = " - " . $txt_product_rating . ': ';
    $cdate = get_comment_date();
    $cip = get_comment_author_IP($comment->comment_ID);
    //echo "Post:  - UserID: $user_ID - IP: $cip - Date: $cdate<br>";
    $pid = get_the_ID();
    $postratings_where = "AND rating_postid = {$pid}";
    //$postratings_logs = $wpdb->get_results("SELECT * FROM $wpdb->ratings WHERE 1=1 $postratings_where ORDER BY $postratings_sortby $postratings_sortorder LIMIT $offset, $postratings_log_perpage");
    $postratings_logs = $wpdb->get_results("SELECT * FROM {$wpdb->ratings} WHERE 1=1 {$postratings_where}");
    //print "HIER";
    //print_r($wpdb);
    if ($postratings_logs) {
        foreach ($postratings_logs as $postratings_log) {
            $postratings_date = mysql2date(sprintf(__('%s', 'wp-postratings'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $postratings_log->rating_timestamp));
            $postratings_rating = intval($postratings_log->rating_rating);
            $postratings_ip = $postratings_log->rating_ip;
            if ($postratings_date == $cdate) {
                if ($postratings_ip == $cip) {
                    /*
                    echo "Found!<br>";
                            	                        echo "<p>
                                    	                PRD: $postratings_date<br>";
                                            	        echo "Rating: $postratings_rating<br>
                                                    	IP: $postratings_ip<br> -<br>";
                    */
                    $ratings_max = 5;
                    for ($j = 1; $j <= $ratings_max; $j++) {
                        if ($j <= $postratings_rating) {
                            $out .= '<img src="' . plugins_url('wp-postratings/images/stars_crystal/rating_on.' . RATINGS_IMG_EXT) . '" alt="' . sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating) . __(' Out Of ', 'wp-postratings') . $ratings_max . '" title="' . sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating) . __(' Out Of ', 'wp-postratings') . $ratings_max . '" class="post-ratings-image" />';
                        } else {
                            $out .= '<img src="' . plugins_url('wp-postratings/images/stars_crystal/rating_off.' . RATINGS_IMG_EXT) . '" alt="' . sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating) . __(' Out Of ', 'wp-postratings') . $ratings_max . '" title="' . sprintf(_n('User Rate This Post %s Star', 'User Rate This Post %s Stars', $postratings_rating, 'wp-postratings'), $postratings_rating) . __(' Out Of ', 'wp-postratings') . $ratings_max . '" class="post-ratings-image" />';
                        }
                    }
                    $found = 1;
                }
            }
            if ($found == 1) {
                return $out;
            }
        }
    }
}
Ejemplo n.º 17
0
/**
 * Display the IP address of the author of the current comment.
 *
 * @since 0.71
 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
 *
 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's IP address.
 *									 Default current comment.
 */
function comment_author_IP($comment_ID = 0)
{
    echo esc_html(get_comment_author_IP($comment_ID));
}
Ejemplo n.º 18
0
function get_rating_id($comment_id)
{
    $found_id = 0;
    /*
        get rating-id of comment author
    */
    //global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
    global $wpdb, $post, $user_ID;
    $cdate = get_comment_date('', $comment_id);
    $cip = get_comment_author_IP($comment_id);
    //echo "Post:  - UserID: $user_ID - IP: $cip - Date: $cdate<br>";
    $pid = get_the_ID();
    $postratings_where = "AND rating_postid = {$pid}";
    //$postratings_logs = $wpdb->get_results("SELECT * FROM $wpdb->ratings WHERE 1=1 $postratings_where ORDER BY $postratings_sortby $postratings_sortorder LIMIT $offset, $postratings_log_perpage");
    $postratings_logs = $wpdb->get_results("SELECT * FROM {$wpdb->ratings} WHERE 1=1 {$postratings_where}");
    //print "HIER";
    //print_r($wpdb);
    if ($postratings_logs) {
        $found = 0;
        foreach ($postratings_logs as $postratings_log) {
            if ($found == 0) {
                $postratings_date = mysql2date(sprintf(__('%s', 'wp-postratings'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $postratings_log->rating_timestamp));
                $postratings_rating = intval($postratings_log->rating_rating);
                $postratings_ip = $postratings_log->rating_ip;
                $postratings_id = $postratings_log->rating_id;
                if ($postratings_date == $cdate) {
                    if ($postratings_ip == $cip) {
                        /*echo "Found!<br>";
                          echo "<p>
                          PRD: $postratings_date<br>";
                          echo "Rating: $postratings_rating<br>
                                 ID:  $postratings_id<br>
                                 IP:  $postratings_ip<br> -<br>";
                                 */
                        $found_id = $postratings_id;
                        $found = 1;
                    }
                }
            }
        }
    }
    return $found_id;
}
 /**
  *
  * @global string $comment_status
  *
  * @param object $comment
  */
 public function column_author($comment)
 {
     global $comment_status;
     $author_url = get_comment_author_url($comment);
     $author_url_display = untrailingslashit(preg_replace('|^http(s)?://(www\\.)?|i', '', $author_url));
     if (strlen($author_url_display) > 50) {
         $author_url_display = wp_html_excerpt($author_url_display, 49, '&hellip;');
     }
     echo "<strong>";
     comment_author($comment);
     echo '</strong><br />';
     if (!empty($author_url_display)) {
         printf('<a href="%s">%s</a><br />', esc_url($author_url), esc_html($author_url_display));
     }
     if ($this->user_can) {
         if (!empty($comment->comment_author_email)) {
             /* This filter is documented in wp-includes/comment-template.php */
             $email = apply_filters('comment_email', $comment->comment_author_email, $comment);
             if (!empty($email) && '@' !== $email) {
                 printf('<a href=\'mailto:%1$s\'>%1$s</a><br />', $email);
             }
         }
         $author_ip = get_comment_author_IP($comment);
         if ($author_ip) {
             $author_ip_url = add_query_arg(array('s' => $author_ip, 'mode' => 'detail'), 'edit-comments.php');
             if ('spam' == $comment_status) {
                 $author_ip_url = add_query_arg('comment_status', 'spam', $author_ip_url);
             }
             printf('<a href="%s">%s</a>', esc_url($author_ip_url), $author_ip);
         }
     }
 }
Ejemplo n.º 20
0
 function body_cell($key, $value, $i)
 {
     global $comment, $lg_gallery;
     // set global $comment so we can use WordPress functions
     $comment = $this->items[$i];
     $comment_ID = $comment->comment_ID;
     // in this table we only shows approved comments
     $comment_status = 'approve';
     $pending_comments = 0;
     switch ($key) {
         case 'author':
             $author_url = get_comment_author_url();
             $cell = '<td class="author column-author">';
             $cell .= sprintf('<strong> %s %s </strong><br />', get_avatar($comment, 32), get_comment_author($comment));
             if (current_user_can('moderate_comments')) {
                 if (!empty($comment->comment_author_email)) {
                     $cell .= get_comment_author_email_link() . '<br />';
                 }
                 $cell .= sprintf('<a href="edit-comments.php?s=%s&amp;mode=detail">%s</a>', get_comment_author_IP($comment), get_comment_author_IP($comment));
             }
             $cell .= '</td>';
             break;
         case 'comment':
             $approve_nonce = esc_html('_wpnonce=' . wp_create_nonce("approve-comment_{$comment_ID}"));
             $del_nonce = esc_html('_wpnonce=' . wp_create_nonce("delete-comment_{$comment_ID}"));
             $postID = $lg_gallery->get_option('gallery_id');
             $cell = '<td class="comment column-comment">';
             $filevar = isset($comment->filevar) ? $comment->filevar : '';
             $uri = trailingslashit($lg_gallery->get_option('gallery_prev'));
             if ('TRUE' != $lg_gallery->get_option('use_permalinks')) {
                 $comment_url = add_query_arg('file', $filevar, $uri);
             } else {
                 $comment_url = trailingslashit($uri . $filevar);
             }
             $comment_url .= '#comment-' . $comment_ID;
             $cell .= '<div class="submitted-on">';
             $cell .= sprintf(__('Submitted on <a href="%1$s">%2$s - %3$s</a>'), esc_url($comment_url), get_comment_date(get_option('date_format')), get_comment_date(get_option('time_format')));
             $cell .= sprintf('<p>%s</p>', apply_filters('comment_text', get_comment_text($comment), $comment));
             if (current_user_can('moderate_comments')) {
                 $cell .= '<div class="row-actions">';
                 $cell .= sprintf('<span class="unapprove"><a href="%s" class="delete:the-comment-list:comment-%s:e7e7d3:action=dim-comment&amp;new=unapproved vim-u vim-destructive" title="%s">%s</a> | </span>', esc_url("comment.php?action=unapprovecomment&p={$postID}&c={$comment_ID}&{$approve_nonce}"), $comment_ID, esc_attr__('Unapprove this comment'), __('Unapprove'));
                 $cell .= sprintf('<span class="edit"><a href="comment.php?action=editcomment&amp;c=%s" title="%s">%s</a> | </span>', $comment_ID, esc_attr__('Edit comment'), __('Edit'));
                 $cell .= sprintf('<span class="spam"><a href="%s" class="delete:the-comment-list:comment-%s::spam=1 vim-s vim-destructive" title="%s">%s</a> | </span>', esc_url("comment.php?action=spamcomment&p={$postID}&c={$comment_ID}&{$del_nonce}"), $comment_ID, esc_attr__('Mark this comment as spam'), _x('Spam', 'verb'));
                 $cell .= sprintf('<span class="trash"><a href="%s" class="delete:the-comment-list:%s::trash=1 delete vim-d vim-destructive" title="%s">%s</a></span>', esc_url("comment.php?action=trashcomment&p={$postID}&c={$comment_ID}&{$del_nonce}"), $comment_ID, esc_attr__('Move this comment to the trash'), _x('Trash', 'verb'));
             }
             $cell .= '</td>';
             break;
         case 'response':
             $cell = '<td class="response column-response">';
             $edit_title = esc_html__('Gallery', 'lazyest-gallery');
             $edit_url = admin_url('admin.php?page=lazyest-filemanager&folder=');
             $filevar = isset($comment->filevar) ? stripslashes(rawurldecode($comment->filevar)) : $lg_gallery->commentor->get_file_by_comment_id($comment_ID);
             $preview = $lg_gallery->get_option('gallery_prev');
             $class = 'alignright';
             $img_src = trailingslashit($lg_gallery->plugin_url) . 'images/folders.png';
             $img_alt = __('Icon', 'lazyest-gallery');
             $img_title = __('Click to View', 'lazyest-gallery');
             $img_id = 0;
             $img_class = 'lg';
             if ('' !== $filevar) {
                 $edit_url .= $lg_gallery->is_folder($filevar) ? lg_nice_link($filevar) : lg_nice_link(dirname($filevar));
                 if ($lg_gallery->is_folder($filevar)) {
                     $folder = new LazyestFolder($filevar);
                     $folder->open();
                     $edit_title = $folder->title();
                     $preview = $folder->uri();
                     $img_src = trailingslashit($lg_gallery->plugin_url) . 'images/folder-icon.png';
                     $img_id = $folder->id;
                 }
                 if ($lg_gallery->is_image($filevar)) {
                     $folder = new LazyestFolder(dirname($filevar));
                     $image = $folder->single_image(basename($filevar), 'thumbs');
                     $edit_url .= '#' . $image->form_name();
                     $edit_title = $image->title();
                     $onclick = $image->on_click();
                     $preview = $onclick['href'];
                     $class .= ' ' . $onclick['class'];
                     $img_src = $image->src();
                     if ('TRUE' == $lg_gallery->get_option('async_cache') && !file_exists($image->loc())) {
                         $img_class = 'lg_ajax';
                     }
                     $img_alt = $image->alt();
                     $img_id = $image->id;
                 }
             }
             $cell .= '<div class="response-links"><span class="post-com-count-wrapper">';
             $cell .= sprintf('<a href="%s">%s</a><br />', $edit_url, $edit_title);
             $cell .= sprintf('<a href="admin.php?page=lazyest-filemanager&edit=comments&file=%s" title="%s" class="post-com-count"><span class="comment-count">%s</span></a>', $filevar, esc_attr(__('0 pending')), $lg_gallery->commentor->count_comments($img_id));
             $cell .= '</div>';
             $cell .= sprintf('<a target="_blank" href="%s" class="alignright"><img width="32" height="32" src="%s" alt="%s"  title="%s" class="%s" /></a>', $preview, $img_src, $img_alt, $img_title, $img_class);
             $cell .= "</td>\n";
             break;
     }
     return $cell;
 }