Skip to content

fix error on media comment while activity stream is disabled #1028 #1030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 19, 2018
Merged

fix error on media comment while activity stream is disabled #1028 #1030

merged 13 commits into from
Mar 19, 2018

Conversation

thrijith
Copy link
Contributor

fix fatal error on media comment while activity stream is disabled #1028

when activity stream is disabled bp_activity_add and bp_activity_delete will not work so added condition to check if the function is available to solve the fatal error.

Copy link
Contributor

@BhargavBhandari90 BhargavBhandari90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thrijith Do minor change

if ( ! bp_is_active( 'activity' ) ) {
?>
<script>
jQuery( '#rtmedia-bp-enable-activity' ).prop( "disabled", true ).next().css( 'background', 'grey' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use hexcode instead of grey.

jQuery( '#rtmedia-bp-enable-activity' ).prop( "disabled", true ).next().css( 'background-color', '#808080' );
jQuery( '#rtmedia-activity-feed-limit' ).prop( "disabled", true );
jQuery( '#rtmedia-enable-like-activity' ).prop( "disabled", true ).next().css( 'background-color', '#808080' );
jQuery( '#rtmedia-enable-comment-activity' ).prop( "disabled", true ).next().css( 'background-color', '#808080' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make this one lined
jQuery( '#rtmedia-bp-enable-activity, #rtmedia-enable-like-activity, #rtmedia-enable-comment-activity' ).prop( "disabled", true ).next().css( 'background-color', '#808080' );

Sorry for not pointing out in previous review

Copy link
Contributor

@BhargavBhandari90 BhargavBhandari90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

if BuddyPress User Groups is disabled
$render_options['rtmedia-activity-feed-limit']['args']['desc'] =
$render_options['rtmedia-enable-like-activity']['args']['desc'] =
$render_options['rtmedia-enable-comment-activity']['args']['desc'] =
'Please Enable BuddyPress Activity Streams to update option';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this translatable

$render_options = apply_filters( 'rtmedia_album_control_setting', $render_options, $rtmedia->options );
if ( ! bp_is_active( 'groups' ) ) {
$render_options['rtmedia-enable-on-group']['args']['desc'] =
'Please Enable BuddyPress User Groups to update option';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this translatable

juhi123 added a commit to juhi123/rtMedia that referenced this pull request Jan 10, 2018
juhi123 added a commit to juhi123/rtMedia that referenced this pull request Jan 10, 2018
juhi123 added a commit to juhi123/rtMedia that referenced this pull request Jan 10, 2018
juhi123 added a commit to juhi123/rtMedia that referenced this pull request Jan 10, 2018
thrijith added a commit that referenced this pull request Mar 15, 2018
@thrijith thrijith merged commit 934d51f into rtCamp:develop Mar 19, 2018
@thrijith thrijith changed the title fix fatal error on media comment while activity stream is disabled #1028 fix error on media comment while activity stream is disabled #1028 Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants