Skip to:
Content
Pages
Categories
Search
Top
Bottom

urgent !!!! need a hook which is called during click og comment button urgent!


  • developer
    Participant

    @ajaysingh-1

    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???

Viewing 19 replies - 1 through 19 (of 19 total)

  • djsteveb
    Participant

    @djsteveb

    @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=a

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


    developer
    Participant

    @ajaysingh-1

    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…


    djsteveb
    Participant

    @djsteveb

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


    Henry Wright
    Moderator

    @henrywright

    The bp_activity_comment_posted hook fires near the end of an activity comment posting, before the returning of the comment ID.


    developer
    Participant

    @ajaysingh-1

    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


    danbp
    Participant

    @danbp

    @ajaysingh-1,

    see from here if it helps you:

    bp_activity_comment_posted


    Henry Wright
    Moderator

    @henrywright

    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.
    

    developer
    Participant

    @ajaysingh-1

    thanks @henrywright
    thanks @danbp


    developer
    Participant

    @ajaysingh-1

    @henrywright could you please give me the hook for create group form
    same as you given me for the comment in your previous reply


    Henry Wright
    Moderator

    @henrywright

    I’m not sure what you mean by create group form?


    developer
    Participant

    @ajaysingh-1

    @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…


    Henry Wright
    Moderator

    @henrywright

    If that particular step creates a group, then the same hook (that I provided earlier) will fire.


    developer
    Participant

    @ajaysingh-1

    buddypress group creation first step


    @henrywright
    are you sure?
    because bp_activity_comment_posted not working actually…
    sorry for bothering you …
    thanks in advance


    developer
    Participant

    @ajaysingh-1

    @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”);


    Henry Wright
    Moderator

    @henrywright


    developer
    Participant

    @ajaysingh-1

    sorry man
    not what i’m looking for
    i said i need a hook which fire when create group and continue button is clicked


    Henry Wright
    Moderator

    @henrywright

    I doubt there is a WP hook for that event; instead, you should use JavaScript for that.


    developer
    Participant

    @ajaysingh-1

    using javascript?
    really how?
    could you please give me some example regarding this?

    @henrywright


    Henry Wright
    Moderator

    @henrywright

    HTML

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

Viewing 19 replies - 1 through 19 (of 19 total)
  • The topic ‘urgent !!!! need a hook which is called during click og comment button urgent!’ is closed to new replies.
Skip to toolbar