Permalink
Browse files

ellipsis bullshit

  • Loading branch information...
1 parent d94bb00 commit 2fa6fd3c23cac69bf886c253fe25c4e8a8a4e9b7 @dan-crimmins dan-crimmins committed Nov 14, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 views/recent-activities.php
@@ -31,7 +31,7 @@
$is_reply = true;
$act_type_text = ($activity->comment_parent_author[0]->comment_type == 'answer') ? 'answer' : 'comment';
$act_text = return_screenname_link($activity->author) . ' Replied to ' . return_screenname_link($activity->comment_parent_author[0]->user_id) .'\'s ' . $act_type_text . ':';
- $parent_excerpt = strlen($activity->comment_parent_author[0]->comment_content) > 200 ? truncated_text(sanitize_text($activity->comment_parent_author[0]->comment_content), $recent_trunc_chars) : truncated_text(sanitize_text($activity->comment_parent_author[0]->comment_content), $recent_trunc_chars);
+ $parent_excerpt = strlen($activity->comment_parent_author[0]->comment_content) > $recent_trunc_chars ? truncated_text(sanitize_text(strip_tags($activity->comment_parent_author[0]->comment_content)), $recent_trunc_chars) : truncated_text(sanitize_text(strip_tags($activity->comment_parent_author[0]->comment_content)), $recent_trunc_chars);
} else {
@@ -42,7 +42,7 @@
}
- $excerpt = '<li class="recent-activity_excerpt">' . ( strlen( $activity->content ) > $recent_trunc_chars ? truncated_text(sanitize_text($activity->content), $recent_trunc_chars) : truncated_text(sanitize_text($activity->content), $recent_trunc_chars)) . '</li>';
+ $excerpt = '<li class="recent-activity_excerpt">' . ( strlen( $activity->content ) > $recent_trunc_chars ? truncated_text(sanitize_text(strip_tags($activity->content)), $recent_trunc_chars) : truncated_text(sanitize_text(strip_tags($activity->content)), $recent_trunc_chars)) . '</li>';
$time_options = array(
"timestamp" => strtotime( $activity->date ),
@@ -63,8 +63,8 @@
<?php get_partial( 'parts/space_date_time', $time_options ); ?>
<a href="<?php echo (in_array($activity->type, $recent->comment_types)) ? ((count($activity->post->category)) ? get_term_link($activity->post->category[0]) : null) : ((count($activity->category)) ? get_term_link($activity->category[0]) : null) ;?>" class="category"><?php echo (in_array($activity->type, $recent->comment_types)) ? ((count($activity->post->category)) ? $activity->post->category[0]->cat_name : 'Uncategorized') : ((count($activity->category)) ? $activity->category[0]->cat_name : 'Uncategorized') ;?></a>
</li>
- <li class="recent-activity_title"><a href="<?php echo (in_array($activity->type, $recent->comment_types) || $activity->type == '') ? get_permalink($activity->post->ID) : get_permalink($activity->ID) ;?>"><?php echo (in_array($activity->type, $recent->comment_types) || $activity->type == '') ? (($is_reply) ? '"' . strip_tags($parent_excerpt) . '"' : truncated_text(sanitize_text(strip_tags($activity->post->post_title)), $recent_trunc_chars)) : truncated_text(sanitize_text(strip_tags($activity->title)), $recent_trunc_chars);?></a></li>
- <?php if (in_array($activity->type, $recent->comment_types) || $activity->type == '') {echo strip_tags($excerpt);} ?>
+ <li class="recent-activity_title"><a href="<?php echo (in_array($activity->type, $recent->comment_types) || $activity->type == '') ? get_permalink($activity->post->ID) : get_permalink($activity->ID);?>"><?php echo (in_array($activity->type, $recent->comment_types) || $activity->type == '') ? (($is_reply) ? '"' . $parent_excerpt . '"' : truncated_text(sanitize_text(strip_tags($activity->post->post_title)), $recent_trunc_chars)) : truncated_text(sanitize_text(strip_tags($activity->title)), $recent_trunc_chars);?></a></li>
+ <?php if (in_array($activity->type, $recent->comment_types) || $activity->type == '') {echo $excerpt;} ?>
</ul>
</div>

0 comments on commit 2fa6fd3

Please sign in to comment.