Index: trunk/wp-content/plugins/xpressme/include/custom_functions.php
===================================================================
--- trunk/wp-content/plugins/xpressme/include/custom_functions.php	(revision 149)
+++ trunk/wp-content/plugins/xpressme/include/custom_functions.php	(revision 150)
@@ -1,6 +1,6 @@
 <?php
 	
-function xpress_list_pings($comment, $args, $depth) {
-       $GLOBALS['comment'] = $comment;
+function xpress_list_pings($trackback, $args, $depth) {
+       $GLOBALS['comment'] = $trackback;
         echo '<li id="comment-<?php comment_ID(); ?>">';
         comment_author_link();
@@ -374,3 +374,85 @@
 }
 
+function xpress_pings_list($show = false){
+	
+	$trackbacks = xpress_get_pings();
+	$output = '<ol id="xpress_pingslist"> ';
+
+	foreach ($trackbacks as $trackback){
+		$list = date(get_settings('date_format'),$trackback['date']) . ' <a target="_blank" href="' . $trackback['site_url'] . '" rel="external nofollow">' . sprintf(__('From %1$s on site %2$s','xpressme'),$trackback['title'],$trackback['site_name']) . "</a>\n" ;
+
+		$output .=  '<li>';
+		$output .=  $list ;
+		$output .=  '</li>';
+
+	}
+	$output .= '</ol>' ;
+	if ($show) echo $output; else return $output;
+}
+
+function xpress_pings_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
+	$pings = xpress_get_pings();
+	if (empty($pings)){
+		$number = 0;
+	}else {
+		$number = count($pings);
+	}
+	if ( $number > 1 )
+		$output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% TrackBack/Pingback', 'xpressme') : $more);
+	elseif ( $number == 0 )
+		$output = ( false === $zero ) ? __('No Trackback/Pingback', 'xpressme') : $zero;
+	else // must be one
+		$output = ( false === $one ) ? __('One Trackback/Pingback', 'xpressme') : $one;
+
+	echo $output;
+}
+
+
+function xpress_get_pings()
+{
+	global $withcomments, $post, $wpdb, $id, $trackback, $user_login, $user_ID, $user_identity;
+
+	if ( ! (is_single() || is_page() || $withcomments) )
+		return;
+
+	/** @todo Use API instead of SELECTs. */
+	if ( $user_ID) {
+		$trackbacks = $wpdb->get_results(sprintf("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID, $user_ID));
+	} else if ( empty($trackback_author) ) {
+		$trackbacks = $wpdb->get_results(sprintf("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID));
+	} else {
+		$trackbacks = $wpdb->get_results(sprintf("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID, $trackback_author, $trackback_author_email));
+	}
+
+	if ($trackbacks){
+		$ret = array();
+		foreach ($trackbacks as $trackback){
+
+			$pattern = '<strong>(.*)<\/strong>(.*)';
+			if ( preg_match ( "/".$pattern."/i", $trackback->comment_content , $match ) ){
+				$title = $match[1];
+				$content = $match[2];
+			}
+			if (empty($title)) $title = $trackback->comment_author;
+
+
+			$row_data = array(
+				'ID'		=> $trackback->comment_ID ,
+				'post_ID'	=> $trackback->comment_post_ID ,
+				'site_name' => $trackback->comment_author ,
+				'site_url' => $trackback->comment_author_url ,
+				'title' => $title ,
+				'content' => $content ,
+				'date'		=> $trackback->comment_date ,
+				'date_gmt'		=> $trackback->comment_date_gmt ,
+				'agent'		=> $trackback->comment_agent ,
+				'type'		=> $trackback->comment_type ,
+				'IP'		=> $trackback->comment_author_IP ,
+			);
+			array_push($ret,$row_data);
+		}
+		return $ret;
+	}
+			return false;
+}
 ?>
Index: trunk/wp-content/plugins/xpressme/language/xpressme-ja.po
===================================================================
--- trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 149)
+++ trunk/wp-content/plugins/xpressme/language/xpressme-ja.po	(revision 150)
@@ -3,5 +3,5 @@
 "Project-Id-Version: XPressME Plugin\n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2009-04-01 16:42+0900\n"
+"PO-Revision-Date: 2009-04-02 14:04+0900\n"
 "Last-Translator: toemon <toychee@toemon.com>\n"
 "Language-Team: \n"
@@ -342,4 +342,22 @@
 msgstr "&#8216;%s&#8217; の検索結果"
 
+#: include/custom_functions.php:382
+#, php-format
+msgid "From %1$s on site %2$s"
+msgstr "サイト %2$s の %1$s より"
+
+#: include/custom_functions.php:398
+#, fuzzy
+msgid "% TrackBack/Pingback"
+msgstr "トラックバック・ピンバック % 件"
+
+#: include/custom_functions.php:400
+msgid "No Trackback/Pingback"
+msgstr "トラックバック・ピンバックはありません"
+
+#: include/custom_functions.php:402
+msgid "One Trackback/Pingback"
+msgstr "トラックバック・ピンバック 1 件"
+
 #: include/xpress_common_functions.php:202
 msgid "Themes"
