Ticket #137 (closed defect: fixed)

Opened 2 months ago

Last modified 7 weeks ago

To work activity for universal languages

Reported by: iprashant Owned by:
Priority: major Milestone:
Version: 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') );

2. 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

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

Change History

Changed 2 months ago by iprashant

patch for activity to work with local languages

Changed 7 weeks ago by apeatling

  • status changed from new to closed
  • resolution set to fixed

Fixed, thanks.

Note: See TracTickets for help on using tickets.