Modify the display of live stream widget

I need some help modifying the below section of code from live stream widget. What I want is for the widget only to display the post names (and the avatars). The snippet below is the text wrapper. I don't want all the stuff about the user name, site name and timestamp.

I tried commenting out the lines I don't want, but that broke the if/else statements. Can someone help streamline this for me so that it only displays the post name link?

/* Begine text container wrapper */
		$item_output .= '<div class="live-stream-text">';

			/* Show the User Name */
			if (isset($user_data['display_name']))
				$item_output .= $author_anchor_begin . $user_data['display_name'] . $author_anchor_end ." ";

			if ($item->post_type == "comment") {
				$item_output .= __(" commented on ", LIVE_STREAM_I18N_DOMAIN); ;

				/* Show the Post Title */
				if (isset($blogs[$item->blog_id])) {
					$post_anchor_begin 	= '<a href="'. $item->post_permalink .'#comment-'. $item->comment_id .'">';
					$post_anchor_end 	= '</a>';

				} else {
					$post_anchor_begin 	= '';
					$post_anchor_end 	= '';
				}

				$item_output .= $post_anchor_begin . $item->post_title . $post_anchor_end ." ";

			} else {
				$item_output .= " ". __('published', LIVE_STREAM_I18N_DOMAIN) ." ";

				/* Show the Post Title */
				$item_output .= '<a href="'. $item->post_permalink .'">'. $item->post_title ."</a> ";
			}

			/* Show the Blog domain */
			if ((isset($instance['show_users_content'])) && ($instance['show_users_content'] != "local")) {
				if (isset($blog->siteurl)) {
					$site_anchor_begin = '<a href="'. $blog->siteurl .'">';
					$site_anchor_end	= '</a>';
					$item_output .= "on ". $site_anchor_begin . $blog->blogname . $site_anchor_end ." ";
				}
			}

			/* Show the Post/Comment human time */
			$item_output .= '<div class="live-stream-text-footer">';
			$item_output .= '<span class="live-stream-text-footer-date">'. sprintf( __( '%s ago ', LIVE_STREAM_I18N_DOMAIN ),
				human_time_diff( $item->post_published_stamp ) ) .'</span>';
			$item_output .= ' &middot; ';

			//$item_output .= $item->post_published_stamp ." ". date('Y-m-d H:i:s', $item->post_published_stamp);
			//$item_output .= ' &middot; ';			

			$item_output .= '<a class="live-stream-text-footer-date" href="'. $item->post_permalink .'">'. __('visit', LIVE_STREAM_I18N_DOMAIN) .'</a>';
			$item_output .= '</div>';

		/* Closing the item text wrapper */
  • Paul
    • The Green Incsub

    @Saunt Valerian, I can help with this. But I need to ask some clarification questions.

    1. You want the avatar, yes
    2. You want the post title. Do you want the post title linked?
    3. You don't want item human readable date information, correct?

    You should just need to top portion of the code. Might be easier to read on github https://gist.github.com/3799385

    $item_output .= '<div class="live-stream-text">';
    
    	/* Show the User Name */
    	if (isset($user_data['display_name']))
    		$item_output .= $author_anchor_begin . $user_data['display_name'] . $author_anchor_end ." ";
    
    	if ($item->post_type == "comment") {
    		$item_output .= __(" commented on ", LIVE_STREAM_I18N_DOMAIN); ;
    
    		/* Show the Post Title */
    		if (isset($blogs[$item->blog_id])) {
    			$post_anchor_begin 	= '<a href="'. $item->post_permalink .'#comment-'. $item->comment_id .'">';
    			$post_anchor_end 	= '</a>';
    
    		} else {
    			$post_anchor_begin 	= '';
    			$post_anchor_end 	= '';
    		}
    
    		$item_output .= $post_anchor_begin . $item->post_title . $post_anchor_end ." ";
    
    	} else {
    		$item_output .= " ". __('published', LIVE_STREAM_I18N_DOMAIN) ." ";
    
    		/* Show the Post Title */
    		$item_output .= '<a href="'. $item->post_permalink .'">'. $item->post_title ."</a> ";
    	}
    
    $item_output .= '</div>';
    /* Closing the item text wrapper */

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.