Skip to:
Content

BuddyPress.org

Opened 3 years ago

Closed 3 years ago

#7839 closed defect (bug) (fixed)

Alternative to 'bp_activity_entry_comments' action in bp nouveau

Reported by: sbrajesh Owned by: imath
Milestone: 3.1.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Templates Keywords: has-patch commit
Cc: sbrajesh

Description

The legacy uses "bp_activity_entry_comments" action to allow adding extra fields into the comment form, In BP Nouveau there are no alternative action.

The action 'bp_activity_entry_comments' is present but it add the extra data outside the form.

We need extra actions to allow injecting in the activity comment form.

Attachments (1)

7839.patch​ (3.7 KB) - added by imath 3 years ago.

Download all attachments as: .zip

Change History (11)

#1 @DJPaul
3 years ago

  • Milestone changed from Awaiting Review to 3.0.1

Let’s use the old action name in the same place in Nouveau β€” and add a new action to replace where that action currently is in Nouveau.

#2 @imath
3 years ago

  • Keywords needs-patch added

Hi @sbrajesh it looks like this hook was just before the nonce field, do you think we could adapt and use bp_nouveau_submit_button in this part ? Do not hesitate to suggest a patch 😊

#3 @sbrajesh
3 years ago

Thank you.

It seems to me that using the button in action name might not be good as the action appears in the outside container.

I am unable to think a good name, but something in the form of
`

<?php do_action( 'bp_nouveau_after_new_activity_comment_content' )?>

`
seems more meaningful and appropriate but seems too long.

#4 @DJPaul
3 years ago

  • Milestone changed from 3.0.1 to 3.1.0

Milestone renamed

@imath
3 years ago

#5 @imath
3 years ago

  • Keywords has-patch reporter-feedback added; needs-patch removed

7839.patch should fix the issue without adding hooks inside the template part.

@sbrajesh can you confirm (ps: the hook name is the same than before: bp_activity_entry_comments) ?

#6 @sbrajesh
3 years ago

  • Keywords reporter-feedback removed

Hi @imath
I can confirm that this works as expected.

Thank you.

#7 @imath
3 years ago

  • Keywords commit added
  • Owner set to imath
  • Status changed from new to assigned

Thanks a lot for your feedback @sbrajesh I'll commit this in a few hours.

#8 @sbrajesh
3 years ago

Thank you.

#9 @imath
3 years ago

In 12148:

BP Nouveau Activity comment form: allow inputs to be added to the form

In BP Legacy, the hook bp_activity_entry_comments is fired inside the activity comment form, letting plugin developers inject custom inputs into this form. The same hook is also available in BP Nouveau but was misplaced out of the comment form.

To adapt to one of this Nouveau principle: try to avoid adding hooks directly into templates using existing template tags or specific wrappers and preserve the same level of customization plugin developers need, we will use the bp_nouveau_submit_button() template tag to wrap and fire this hook into its output.

Props sbrajesh

See #7839 (Trunk)

#10 @imath
3 years ago

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

In 12149:

BP Nouveau Activity comment form: allow inputs to be added to the form

In BP Legacy, the hook bp_activity_entry_comments is fired inside the activity comment form, letting plugin developers inject custom inputs into this form. The same hook is also available in BP Nouveau but was misplaced out of the comment form.

To adapt to one of this Nouveau principle: try to avoid adding hooks directly into templates using existing template tags or specific wrappers and preserve the same level of customization plugin developers need, we will use the bp_nouveau_submit_button() template tag to wrap and fire this hook into its output.

Props sbrajesh

Fixes #7839 (Branch 3.0)

Note: See TracTickets for help on using tickets.