Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="t4b-latest-activities"><?php echo t4b_get_related_author_posts(); ?>
- <div id="t4b-latest-tune">
- <?php
- global $wpdb;
- $userID = get_the_author_meta('ID');
- $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
- comment_post_ID, user_id, comment_approved, comment_date_gmt,
- comment_type, SUBSTRING(comment_content,1,30) AS com_excerpt
- FROM $wpdb->comments
- LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
- $wpdb->posts.ID)
- WHERE comment_approved = '1' AND comment_type = '' AND
- post_password = '' AND user_id = '".$userID."'
- ORDER BY comment_date_gmt DESC LIMIT 1";
- $comments = $wpdb->get_results($sql);
- if ($comments) :
- echo '<div class="comment-real"></div>';
- foreach ($comments as $comment) :
- echo '<h4><a href="'.get_permalink($comment->ID).'#comment-'.$comment->comment_ID.'">“'.strip_tags($comment->com_excerpt).'…” </h4></a>';
- echo '<p>' . mysql2date('M j, Y g:i:s a', $comment->comment_date_gmt) . ' ( ' . get_date_time_count($comment->comment_date_gmt) . ' আগে )</p>';
- endforeach;
- else :
- echo '<div class="comment-real"></div>';
- echo '<h4>আপনি সাম্প্রতিককালে কোন মন্তব্য করেননি।</h4>';
- endif;
- ?>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement