Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 16 years ago

#137 closed defect (bug) (fixed)

To work activity for universal languages

Reported by: iprashant's profile iprashant Owned by:
Milestone: Priority: major
Severity: Version:
Component: Keywords: activity patch for local languages to work
Cc:

Description

I wanted activity should display in local languages also.
So i have updated

  1. /bp-activity/bp-activity-templatetags.php
  2. wp_bp_activity_sitewide table

Updates are as follows.

1.
here because of local language when we create post, url getting converted to utf so its long text with stings and special chars. In the formation of site wide activity string, sprintf is used so it is not allowing big utf type url.

In function bp_activity_content_filter
I commented $content[0] .= '%s';

and in function bp_activity_insert_time_since
return sprintf( $content, ' ' . bp_core_time_since( strtotime( $date ) ) . ' ' . ('ago', 'buddypress') );

replaced with

return $content . sprintf( "%s", ' ' . bp_core_time_since( strtotime( $date ) ) . ' ' . ('ago', 'buddypress') );

  1. In "wp_bp_activity_sitewide" table updated "content" field to "utf8_general_ci"

This is for site wide activity to work with local languages.To work activity on profile page make changes with related table to user_activities. For getting it work on profile page change char type of tables

wp_user_1_activity_cached
wp_user_1_friends_activity_cached
wp_user_2_activity_cached
wp_user_2_friends_activity_cached
wp_user_3_activity_cached
wp_user_3_friends_activity_cached

for all above tables common column is "content" change it to utf8_general_ci to work with other languages.

Attachments (1)

bp-activity-templatetags.php (5.4 KB) - added by iprashant 16 years ago.
patch for activity to work with local languages

Download all attachments as: .zip

Change History (2)

@iprashant
16 years ago

patch for activity to work with local languages

#1 @apeatling
16 years ago

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

Fixed, thanks.

Note: See TracTickets for help on using tickets.