Notifications
Clear all

wpForo 1.x.x [Closed] Web Hooks for Creating New Posts?

3 Posts
2 Users
0 Likes
844 Views
Posts: 2
Topic starter
(@sleestak)
New Member
Joined: 4 years ago

I am currently searching for a forum plugin that would allow our developers to hook in and create new posts from a dashboard app that is separate from our Wordpress site. This would include the option of adding an image file as well.

Is this something that can be accomplished with wpforo?

2 Replies
Posts: 986
Moderator
(@martin)
Support Team
Joined: 8 years ago

Hi @sleestak,

I think you need to call core function. There is no hook to add new topic or posts, the hooks are designed to do something during some function. For example, you can change some data in topic/posts when a new topic/post is created. But you can't initiate creation of topic/post via hook.

The core functions which can be called are the following, you should check core files to understand how they work and what parameters you need to pass:

//Create new topic
WPF()->topic->add($topic);

//Create new post:
WPF()->post->add($post);

 

The files you should check are:

  • /wpforo/wpf-includes/class-topics.php
  • /wpforo/wpf-includes/class-posts.php

 

1 Reply
(@sleestak)
Joined: 4 years ago

New Member
Posts: 2

@martin Thank you for the response, I greatly appreciate it. I'll poke around there today and talk with our devs. We basically have a separate dashboard app that we have built in laravel and want to take a snapshot and create posts in the wordpress portion of our site. Sounds like this might do the trick.