Topic: Creating topics from external applications

Greetings,

I am new to PunBB, and very satisfied with it so far. I already noticed there is extern.php for syncing content to the outside, but is there something similar or any API for creating topics/posts from external applications?

For a project I need to insert topics into a forum, and was wondering if this will need to be done via SQL or if there are any functions for that?

WkR,
Daniel

kogito  -  nerds available for awesome projects

Re: Creating topics from external applications

Just grepped my way to the solution and found the add_topic function. Gonna use that, and see how it goes.

kogito  -  nerds available for awesome projects

Re: Creating topics from external applications

There is no special API for this. In the file "<FORUM_ROOT>/include/functions.php" there is a function "add_topic", which adds new topics to a DB. The first argument of this function is an array with information about the new topic. You can see an example of adding a new topic in the file "<FORUM_ROOT>/post.php" (lines 221-237).

4 (edited by marenkay 2009-09-03 13:01)

Re: Creating topics from external applications

Just tried it. Works. Successfully converted 3.5k of news posts from an old system to nicely formatted forum threads smile

kogito  -  nerds available for awesome projects