Skip to content

Threaded replies #25

Open
Open

Description

@ePascalC

Currently all replies come in a flat list.
Check out the bbp_walker_reply to have the threaded list to see the replies to replies in a structured way.

As a first, add the 'reply_to' in the JSON output.

Activity

  1. ePascalC commented on Jul 20, 2017

    @ePascalC
    OwnerAuthor

    reply_to added in v1.0.14

  2. renatonascalves commented on Jul 20, 2017

    @renatonascalves

    Hey man! Why aren't you commiting and closing in git for better history?

  3. ePascalC commented on Jul 20, 2017

    @ePascalC
    OwnerAuthor

    @renatonascalves I'm so used to svn on w.org, I have my test environment linked to trunk there, so I never invested time to look here how add GitHub in the loop of my current way of working. I just update the files when I have a new version but indeed there is no link between the specific Issue and the specific commit for it. Any help on how to proceed, not breaking too much my current way of working is accepted :-)

  4. renatonascalves commented on Jul 20, 2017

    @renatonascalves

    @ePascalC I can help with that! Gonna talk to you on Slack as this is not related to the issue here. :)

  5. tkserver commented on Sep 14, 2017

    @tkserver

    I'm thinking of starting up on threaded replies now. Have you looked at this idea recently? I may be able to use my own walker class to create a threaded API for topics/replies.

  6. tkserver commented on Sep 16, 2017

    @tkserver

    Hey @renatonascalves if you want a challenge try threaded replies here. The bbp api returns replies flat, not threaded. IF the replies were embedded within their parent, a walker or recursion could be used to make a threaded view. Otherwise there would have to be a ton of logic to make it happen, and paging won't work. I've started to look at this, but not sure I can/want to dedicate the time to do it right now.

  7. renatonascalves commented on Sep 16, 2017

    @renatonascalves

    @tkserver Let me see if I get this correctly. You have a topic. This topic has replies. And some of those replies have other replies in it. You want to fetch the replies and their replies in it.

    Something like this:

    {
        "id": 8523,
        "title": "Responder a: Never let me down",
        "permalink": "http://b.dev/sala/resposta/8523/",
        "topic_id": 7612,
        "topic_title": "Never let me down",
        "forum_id": 6153,
        "tags": "",
        "content": "<p>Thanks! 😀</p>\n",
        "reply_to": "id of reply or list of ids with replies"
    }
    
  8. renatonascalves commented on Sep 16, 2017

    @renatonascalves

    By the way, I think wp-json/bbp-api/v1/replies/ is not working correctly. It's not returning the replies even though there are replies to return.

    I still need to confirm that.

  9. tkserver commented on Sep 16, 2017

    @tkserver

    Have a look at this home page to see how the threading would work: https://www.utehub.com

    I hacked up the bbpress walker to create this.

  10. renatonascalves commented on Sep 16, 2017

    @renatonascalves

    I tried here: https://www.utehub.com/wp-json/bbp-api/v1/replies/

    Nothing! Am I getting in the wrong slug/namespace?

  11. tkserver commented on Sep 16, 2017

    @tkserver

    I don't use the replies endpoint since replies are embedded in the topics. But I think the way it works is replies to replies:
    https://www.utehub.com/wp-json/bbp-api/v1/replies/41220

  12. tkserver commented on Sep 16, 2017

    @tkserver

    Have you looked at how the posts and replies look on the www version I posted?

  13. renatonascalves commented on Sep 16, 2017

    @renatonascalves

    In the front-page of your website there is a reply: 412010.

    I don't the replies of the replies in the output. :/

  14. tkserver commented on Sep 16, 2017

    @tkserver

    Yeah, it only seems to be replies to replies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions