tags:

views:

16

answers:

1

I have a phpBB forum and would like to write an external class which can be used to send private messages to some of the users of the forum.

Also, I'd like to automate the process of sending a post on the forum since some automatic notifications can thus be included in it.

Something along the lines:

PhpbbControl::sendPM(Integer $from_user, Array $to_users, String $content);
// ^ sends a new private message, returns false on failure

PhpbbControl::newPost(Integer $forum_id, Integer $from_user, String $content);
// ^ creates a new post on a given forum, returns false on failure

Any ideas or known MODs to provide that?

Thanks

+1  A: 

In a MOD I wrote I needed to send a PM. Dualfusion (another phpBB MODder), wrote a function to do just that. You can find it Here (Lines 48 - 147).

I don't have any knowledge of a newPost function (I left the MODding scene a while ago), but It shouldn't be too hard to write one up. You can model it on the PM function, and figure out the tables you need to edit.

Tyler Smith
Collector