hello,
At the moment I am making a website with a homepage that has smf integrated. I included ssi.php.
Now i was wondering if it is possible to create a forum topic from the main site?
Thank you,
Nuva ;)
You can use createpost() (http://support.simplemachines.org/function_db/index.php?action=view_function;id=323) to create topics or replies :)
Works great after some time of trying :P :D
Thanks!
Glad that did what you wanted :)
Is there a function to send a pm as well?
sendpm() (http://support.simplemachines.org/function_db/index.php?action=view_function;id=315) :). Be sure to checkout all the other functions on the main Function DB (http://support.simplemachines.org/function_db) page :)
Quote from: H on December 22, 2009, 06:45:18 AM
Be sure to checkout all the other functions on the main Function DB (http://support.simplemachines.org/function_db) page :)
Sorry, it has been a long time since i visited this forum O:)
edit:
I used the following code:
<?php
include_once("forum/SSI.php");
require_once($sourcedir . '/Post.php');
require_once($sourcedir . '/Subs-Post.php');
$msgOptions = array(
'bbc' => array(),
'to' => array('nuva'),
);
$subject = "test";
$message = "test";
$outbox_store = false;
$from = array(
'id' => 1,
'name' => 'nuva',
'username' => 'nuva',
);
$result = sendpm(array $recipients, string $subject, string $message, bool $outbox_store[, array $from])
?>
And i get the following error, though I don't seem to find why...
Parse error: parse error, expecting `'('' in C:\wamp\www\nuva\pmtest.php on line 21
Line 21 is the line where the sendpm function is called.
sorry, my bad.
I found out.
Thanks, works great ;D
edit:
Just one more question ::)
Can i make a link redirect to the pm page with $to, $subject and $message already filled in?
Sorry for the delayed response. As far as one specific link, I don't think so.
nuva I'm interested on this too! Can you post the right code for the one 3 posts ago? Thanks!!