Opened 16 years ago
Closed 16 years ago
#137 closed defect (bug) (fixed)
To work activity for universal languages
Reported by: | 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
- /bp-activity/bp-activity-templatetags.php
- 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') );
- 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.
patch for activity to work with local languages