Skip to:

Opened 9 years ago

Closed 9 years ago

#2237 closed enhancement (fixed)

Use BP built-in function for truncating topics/replies rather than calling bp_create_excerpt on activity integration

Reported by: will_c Owned by:
Milestone: 2.3 Priority: normal
Severity: minor Version: trunk
Component: Extend - BuddyPress Keywords: dev-feedback ux-feedback needs-patch


Using BP 1.7 and bbP 2.2.4, when a user submits a topic or reply the content is filtered using bp_create_excerpt before being saved to the wp_bp_activity table. This creates an excerpt followed by an [...]. I believe it would be better to let BP handle the excerpt creation on the way out of the wp_bp_activity table during the activity loop because bp_create_excerpt is already called in the bp_activity_truncate_entry function in buddypress/bp-activity/bp-activity-filters.php.

The advantage of letting BP handle the excerpt is that the bp_activity_truncate_entry function checks whether the entry is longer than the cut off and if so adds a [Read More] link that will fetch the entire activity content if the user wants to read more. In my opinion this creates a more consistent experience in the activity stream and reduces the need for users to click on the reply/topic link to view longer forum posts.

My suggested solution would be to simply remove the bp_create_excerpt call from both the 'bbp_activity_reply_create_excerpt' and 'bbp_activity_topic_create_excerpt' filters on lines 616 and 466 respectively. This will allow BP to handle excerpt creation, but will also allow developers to override this functionality if desired.

I don't have time to create a patch at the moment, but will update with a patch when I get a chance.

Change History (2)

#1 @johnjamesjacoby
9 years ago

  • Milestone changed from Awaiting Review to 2.3

#2 @johnjamesjacoby
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4789]) Pass complete content into activity stream items. Create excerpt on output rather than input. Fixes #2237.

Note: See TracTickets for help on using tickets.