[Req] Phpbb integration

clover 13 Feb, 2009
A nice new feature would be having the form content posted in a phpbb forum chosen by the administrator. It could be done using either a guest session or a pre-added bot user. This adds more flexibility to the component, and allows a community to have access to the forms' content.

I've tried adding the code to the form under the On Submit code section, but it won't work due to eval().

Hopefully the code could be added to the component itself in the future.
Max_admin 13 Feb, 2009
Hi Clover,

Please show me the code you tried to add in the onsubmit, it should work fine there!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
clover 14 Feb, 2009
Thank you for the quick reply. I really appreciate the help.🙂

I have to say, I'm loving chronoforms so far. The email feature is working nicely, and the wizard makes creating forms a breeze. I'm using version 3.0 stable.

This is the code I'm using.

<?PHP

define('IN_PHPBB', true);
$phpbb_root_path = '.distribution/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);


include($phpbb_root_path . 'config.php');
include($phpbb_root_path . 'common.php');
include($phpbb_root_path . 'includes/functions_posting.php');
echo "Files included.";


$user->session_begin();
$auth->acl($user->data);
echo "User session initialized.";

$my_subject = "Application form";
$my_text   = "Hello world!";
$my_subject   = utf8_normalize_nfc('my_subject');
$my_text   = utf8_normalize_nfc('my_text');

$poll = $uid = $bitfield = $options = '';
generate_text_for_storage($my_subject, $uid, $bitfield, $options, false, false, false);
generate_text_for_storage($my_text, $uid, $bitfield, $options, true, true, true);
echo "Ready to post data.";

$data = array(
   'forum_id'      => 11,
   'icon_id'      => false,

   'enable_bbcode'      => true,
   'enable_smilies'   => true,
   'enable_urls'      => true,
   'enable_sig'      => true,

   'message'      => $my_text,
   'message_md5'   => md5($my_text),
           
   'bbcode_bitfield'   => $bitfield,
   'bbcode_uid'      => $uid,

   'post_edit_locked'   => 0,
   'topic_title'      => $my_subject,
   'notify_set'      => false,
   'notify'         => false,
   'post_time'       => time(),
   'enable_indexing'   => true,
);

submit_post('post', $my_subject, '', POST_NORMAL, $poll, $data);
echo "Message succesfully posted.";
?>


At first, I had a Config.php(533) eval()'ed error, so it wouldn't include common.php. Somehow that's not happening anymore -I did a clean forum re-install-.

Sorry about the echo commands, but since I have no means to view the execution, that's the only way I came up with to know up to where the code runs.

Currently it's not getting past the includes. Execution seems to freeze at $user->session_begin(). No further echo since "Files included."

UPDATE: Found an error in the code. Turns out the files weren't being included after all. When they are, I get the Config(533) eval()'d error stated above.

Line changed (new line):
$phpbb_root_path ='./distribution/';


The exact error I'm getting is "The config.php(533) : eval()'d code file could not be found."
Max_admin 16 Feb, 2009
Hi Clover,

Sorry but I have been very busy with the new forms release! you should try it if you like the wizard!

Indeed, I wouldn't do it this way, first, do you have the rokbridge installed ? I worked with it a while ago and I was able to do anything to phpBB through Joomla and vice versa, you will only need the SQL code to insert the new post! and if you need some phpBB function then this will be easy to do too I think.

btw, I can't see the error you get!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.