Skip to:
Content
Pages
Categories
Search
Top
Bottom

Getting the notification link for Activities?


  • godavid33
    Participant

    @godavid33

    I have some custom front-end displays for notifications set up (i.e. a dropdown menu item). I notice when I get a message (assuming it is just a single message) the link will take me to the message itself. I get the notifications using bp_core_get_notifications_for_user($uid, ‘object’). I added a custom notification insert for comments on activity replies using bp_core_add_notification(). I want these notifications to have the same behavior as those of single messages. How do message notifications pass a link to the get_notifications function? How would I do the same for bp_core_add_notification()? Do I need to pass it in that function itself, or is the url to the individual activity inherent in the notification whether you pass it or not? Currently my custom notifications take me to the users activity stream, but don’t go to the activity that was commented on.

    P.S. Bonus points if the link just scrolls down to the appropriate activity on the stream as opposed to going to the individual activity url – either works though at this point

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

  • godavid33
    Participant

    @godavid33

    Hopefully it is alright to bump this.


    julianprice
    Participant

    @julianprice

    @godavid33 Just thought I would comment because you bumped your post. What I understanding bumping a post shows topics have been respond too.

    Unfortunately, I am unable to help you because completely out of beginner knowledge but I did go back & look at all your post on the forum. I am trying to understand the logic in all the customization when BuddyPress natively provides notifications.


    godavid33
    Participant

    @godavid33

    Bumping is usually when a topic has not been solved, but an answer is still needed (at least that has been my experience in every forum I’ve ever been in).

    Yes, buddypress natively produces notifications for most things. I have never natively gotten a notification for activity comments/replies, and this is what I’m trying to accomplish (as well as notifications for favorites), and I can add the notification but I need to know how to add a URL with it as well.


    BuddyBoss
    Participant

    @buddyboss


    godavid33
    Participant

    @godavid33

    I appreciate the promotion of the plugin, and I assume you are in no way affiliated with them, but I am more inclined to custom code something as A.) it is cheaper B.) I will likely end up having to customize the plugin more anyways.


    Henry Wright
    Moderator

    @henrywright

    @godavid33 that plugin is actually free. Maybe tear open the code to see if a solution jumps out at you? Just an idea.

    Regarding your problem, I came across the issue a few months back when 1.9 was rolled out. You need to capture the item’s ID when adding a notification. See here for some related discussion

    https://buddypress.trac.wordpress.org/ticket/5389


    godavid33
    Participant

    @godavid33

    Ooooooh duh, the support is what costs. I actually will probably try and use that plugin in that case and then just customize from there. Thank’s y’all! Will post back with concise results.


    godavid33
    Participant

    @godavid33

    @buddyboss AHHHHHHH THANK YOU! Does exactly what I want, so lovely.

    So many hours and lines of code wasted… haha

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Getting the notification link for Activities?’ is closed to new replies.
Skip to toolbar