urgent !!!! need a hook which is called during click og comment button urgent!
-
need a hook which is called during click of comment button
i want to call my custom function during click of post button of comment section of buddypress?
please can anyone help me out there???
-
@ajaysingh-1
man – there is post_comment, post_update – and a bunch of others on the hookr io page
http://hookr.io/plugins/buddypress/#index=anot sure what you mean post button comment section..
hmm.. section on the site-wide activity page?
via private message emails / replies?hmm.. group replies?
I don’t know anything about the functions and code actually – but hopefully the hookr info will help ya, or this comment will help you detail what exactly you are looking for – so if someone does know about this code they will know more about what you mean..
thanks @djsteveb for replying
i am looking for a do_action hook so that i hook my customize function during the post button is clicked when user reply or comment on any post
actually i am placing a captcha in buddypress comment which is done
look what i do here…//action hook to display captcha in comments.
add_action(“bp_activity_entry_comments”,”function_for_display_captcha”);but i need hook for validation of that captcha.
i hope you are not confused this…
“when user reply or comment on any post” – when I hear that I think of replying to a post in wordpress language, which is a chrono blog post, and not a ‘static “page” ‘ – however I am going to assume you mean replying in the various comment reply places all throughout buddypress; like activity comments, group updates, etc.
I am confused by what you are saying, but it’s only becuase I have no clue about how any of these things work. I’m still trying to learn php and then going to try to learn how wp and bp actually works – and that looks like it’s gonna take a long time.
However now that you have provided some details I am sure one of the much smarter people around here will be able to guide you in the right direction.
The
bp_activity_comment_posted
hook fires near the end of an activity comment posting, before the returning of the comment ID.thanks @henrywright
a little bit of confusion is still in my mind is that
do we have to passed argument along with that hook…
bp_activity_comment_posted
do we have to passed argument along with that hook…
It isn’t mandatory but you can if you want to.
$comment_id
,$r
and$activity
can be passed to your custom function.Ref:
@param int $comment_id ID of the newly posted activity comment. @param array $r Array of parsed comment arguments. @param int $activity ID of the activity item being commented on.
thanks @henrywright
thanks @danbp@henrywright could you please give me the hook for
create group form
same as you given me for the comment in your previous replyI’m not sure what you mean by
create group form
?@henrywright i mean when you first create the group and first step appear there is a button in bottom which is
save and continue
i need a hook which call on click of this button…If that particular step creates a group, then the same hook (that I provided earlier) will fire.
@henrywright are you sure?
becausebp_activity_comment_posted
not working actually…
sorry for bothering you …
thanks in advance@henrywright i used the following hooks for display captcha and validate captcha …
add_action(“bp_after_group_details_creation_step”,”custom_function_display”);
add_action(“bp_activity_comment_posted”,”custom_function_validate”);That should be the hook to use. See here for it in context:
https://github.com/buddypress/BuddyPress/blob/master/src/bp-activity/bp-activity-functions.php#L2180
sorry man
not what i’m looking for
i said i need a hook which fire whencreate group and continue
button is clickedI doubt there is a WP hook for that event; instead, you should use JavaScript for that.
using javascript?
really how?
could you please give me some example regarding this?
@henrywrightHTML
<button id="me">Click this button</button>
JavaScript
document.getElementById('me').addEventListener('click', function() { alert('Hello'); }, false);
It’s fairly straightforward to do. See this demo. You could also use jQuery if you wanted instead.
- The topic ‘urgent !!!! need a hook which is called during click og comment button urgent!’ is closed to new replies.