Hi
I am trying to use phpBB3 and Drupal 5.0 together. So, what I want to achieve is for my node module I want to have a phpBB3 forum topic inserted at the same time as when a node is created using my module
I have tried to implement this code within hook_insert in my module BUT I get this error message: Fatal error: Call to a member function sql_query() on a non-object in D:\localhost\phpBB3\includes\cache.php on line 50
define('IN_PHPBB', true);
$phpbb_root_path = 'file:///D:/localhost/phpBB3/';
$phpEx = 'php';
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
// PHPBB
// note that multibyte support is enabled here
$my_subject = $node->title;
$my_text = $node->body;
// variables to hold the parameters for submit_post
$poll = $uid = $bitfield = $options = '';
$data = array(
'forum_id' => 2,
'icon_id' => 0,
'enable_bbcode' => true,
'enable_smilies' => true,
'enable_urls' => true,
'enable_sig' => true,
'message' => $my_text,
'message_md5' => md5($my_text),
'bbcode_bitfield' => $bitfield,