Skip to:
Content
Pages
Categories
Search
Top
Bottom

Post Topic Request


  • trentguillory
    Participant

    @trentguillory

    I’m working on an app that allows users to post new topics to my website forum. What POST request can I use to do this/is there some postTopic method I can call? What would be the best way to go about it because all I’ve seen so far looks very complex.

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

  • TKServer
    Participant

    @tkserver

    There are a couple of queries I’ve found are necessary for posts. First is the standard query which posts to the wp_posts and the second posts to wp_postmeta. They’re very dependent on other functions within bbpress. It’s a bit of a can of worms in my experience. You could create a set of custom queries to do both of these, or try to use all of bbpress’s queries and functionality. Either way, it is not simple.


    trentguillory
    Participant

    @trentguillory

    Hey TK, thanks for the reply. That’s a helpful for me to get started.

    Where’s a good place to look into the bbpress functions that are tied in with these wp functions?

    Also, are the posts in bbpress a custom post type like any other or is there more to it than that?

    Thanks again!

    Hi,
    posts are just custom post types (topic, reply) and have metadata attached. bbPress is following standard WordPress rules in the database.

    For bbPress functions and filters, I normally end up on http://hookr.io/plugins/bbpress/2.5.6/functions/

    Pascal.


    TKServer
    Participant

    @tkserver

    You can look at the functions.php files inside of topics and replies. They’ll give you some idea.

    I’ve just made live my beta page of a threaded view with new posts and new replies able to be posted outside of bbpress here: http://www.utehub.com/forum-threads/

    It’s beta, so lots to work on.


    trentguillory
    Participant

    @trentguillory

    TK, I’ve already extended an existing plugin of mine to post regular wordpress posts to the website using the wp_insert_post function. Is that the same function I need be using to post to bbpress, just with additional metadata?


    Pascal Casier
    Moderator

    @casiepa

    Hi Trent,

    For bbPress: both a topic and a reply are inserted in the ‘posts’ table. The thing that mainly changes is the ‘post_type’. Then the meta data (dates, parents, …) go into the ‘post_meta’ table. So the global idea is exactely like posts, yes.

    Pascal.


    trentguillory
    Participant

    @trentguillory

    Thanks for the clarification. At this point I feel pretty lost though, as I’ve never actually had to add functionality to WordPress.

    Do you know of any working examples or tutorials that show how to post a topic from an external app or client?


    TKServer
    Participant

    @tkserver

    I just finished all this. Total pain. I had to reverse engineer the DB posts, then look at the bbpress functions to see what ones I could use, or simply which queries etc I could utilize.


    TKServer
    Participant

    @tkserver

    Look in includes/topics/functions.php and includes/replies/functions.php for most of what you will need.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar