I created a forum for my Shop History so everyone can now see who's tried to do what and they can reply and carry on in that area. They can't create NEW topics though (using advanced permissions that you can turn on in SMF).
Anyway, add this code to whatever item you want to post a message for in the onuse function :
Make sure these are part of that function's GLOBAL declaration:
$ID_MEMBER, $sourcedir
This example is from the KARMA BOOST item:
require_once($sourcedir . '/Subs-Post.php');
$topicOptions['board'] = 98; //SHOP history forum Mine is #98 You need to create this then use it's ID number
$topicOptions['id']=0; //NEW topic
$msgOptions['subject'] = "I just boosted ".$_POST['bashwho']; //Subject
$msgOptions['body'] = "I just boosted ".$_POST['bashwho']; //Message area
$posterOptions['id']=$ID_MEMBER; //Current user's ID
createPost(&$msgOptions, &$topicOptions, &$posterOptions); //create the post using the SMF posting function