AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Closed] Web Hooks for Creating New Posts?

3 Posts
2 Users
0 Reactions
1,903 Views
Posts: 2
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sleestak)
New Member
Joined: 6 years ago
[#13858]

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: 994
Moderator
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@martin)
Support Team
Joined: 10 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: 6 years ago

New Member
Posts: 2
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

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

 


Share: