He encontrado un script en el cual me permite meter la noticia cuando elijo una categoria, pero cuando son dos y más ahi esta el problema.
Haber si me pueden iluminar . xD
Dejo el codigo en cuestion.
Código PHP:
define('IN_PHPBB', true);
$phpbb_root_path = '../forums/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'config.' . $phpEx);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
//include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$user->data['user_id'] = 2;
$user->data['user_type'] = '';
$user->data['group_id'] = '';
$user->data['user_ip'] = '';
$user->data['user_regdate'] = '';
$user->data['username'] = 'theprincex';
$user->data['username_clean'] = 'theprincex ';
$user->data['user_email'] = '';
$user->data['user_email_hash'] = '';
$user->data['user_birthday'] = '';
$user->data['user_lastvisit'] = '';
$user->data['user_lastmark'] = '';
$user->data['user_lastpost_time'] = '';
$user->data['user_lastpage'] = '';
$user->data['user_last_confirm_key'] = '';
$user->data['user_last_search'] = '';
$user->data['user_warnings'] = '';
$user->data['user_last_warning'] = '';
$user->data['user_login_attempts'] = '';
$user->data['user_inactive_reason'] = '';
$user->data['user_inactive_time'] = '';
$user->data['user_posts'] = '';
$user->data['user_lang'] = '';
$user->data['user_timezone'] = '';
$user->data['user_dateformat'] = '';
$user->data['user_style'] = '';
$user->data['user_rank'] = '';
$user->data['user_colour'] = '';
$user->data['user_message_rules'] = '';
$user->data['user_full_folder'] = '';
$user->data['user_emailtime'] = '';
$user->data['user_topic_show_days'] = '';
$user->data['user_topic_sortby_type'] = '';
$user->data['user_topic_sortby_dir'] = '';
$user->data['user_post_show_days'] = '';
$user->data['user_post_sortby_type'] = '';
$user->data['user_post_sortby_dir'] = '';
$user->data['user_notify'] = '';
$user->data['user_notify_pm'] = '';
$user->data['user_notify_type'] = '';
$user->data['user_allow_pm'] = '';
$user->data['user_allow_viewonline'] = '';
$user->data['user_allow_viewemail'] = '';
$user->data['user_allow_massemail'] = '';
$user->data['user_options'] = '';
$user->data['user_avatar'] = '';
$user->data['user_avatar_type'] = '';
$user->data['user_avatar_width'] = '';
$user->data['user_avatar_height'] = '';
$user->data['user_sig'] = '';
$user->data['user_sig_bbcode_uid'] = '';
$user->data['user_sig_bbcode_bitfield'] = '';
$user->data['user_from'] = '';
$user->data['user_icq'] = '';
$user->data['user_aim'] = '';
$user->data['user_yim'] = '';
$user->data['user_msnm' ] = '';
$user->data['user_jabber'] = '';
$user->data['user_website'] = '';
$user->data['user_occ'] = '';
$user->data['user_interests'] = '';
$user->data['user_actkey'] = '';
$user->data['user_newpasswd'] = '';
$user->data['is_registered'] = true;
$user->data['is_bot'] = '';
$user->data['session_admin'] = '';
$user->data['session_page'] = '';
$poll = $uid = $bitfield = $options = '';
$articleTitleNormalized = utf8_normalize_nfc($title);
$articleMessageNormalized = utf8_normalize_nfc($descripcion);
generate_text_for_storage($articleTitleNormalized, $uid, $bitfield, $options, false, false, false);
generate_text_for_storage($articleMessageNormalized, $uid, $bitfield, $options, true, true, true);
$data = array(
'forum_id' => $cat,
'icon_id' => false,
'enable_bbcode' => true,
'enable_smilies' => true,
'enable_urls' => true,
'enable_sig' => true,
'message' => $articleMessageNormalized,
'message_md5' => md5($articleMessageNormalized),
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'post_edit_locked' => 0,
'topic_title' => $articleTitleNormalized,
'notify_set' => false,
'notify' => false,
'post_time' => 0,
'forum_name' => '',
'enable_indexing' => true,
'post_approved' => 1,
);
submit_post('post', $articleTitleNormalized, 'CommentBot', POST_NORMAL, $poll, $data);