Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Postby icebrain » Wed Feb 04, 2009 10:29 am
Hi, sorry for bumping an old thread but I I'm having the exact same problem, when I create a post using submit_post it stays hidden 'till a mod approves it. I have posted manually in the same place so I know I have permissions. How did you solve this?
Thanks.
-
icebrain
- Registered User
-
- Posts: 2
- Joined: Wed Feb 04, 2009 10:24 am
Postby A_Jelly_Doughnut » Wed Feb 04, 2009 3:51 pm
icebrain: Normally that means $auth->acl() has not been run, or has been run for the a user who does not have posting without approval permissions in the given forum.
A_Jelly_Doughnut
-

A_Jelly_Doughnut
- MOD Team

-
- Posts: 1753
- Joined: Wed Jun 04, 2003 4:23 pm
Postby kalukee » Thu Sep 24, 2009 12:16 am
A_Jelly_Doughnut wrote:icebrain: Normally that means $auth->acl() has not been run, or has been run for the a user who does not have posting without approval permissions in the given forum.
"$auth->acl() has not been run" - what does that mean?
I cannot figure out how to get it to post with approval. I am posting with an admin account and it allways needs aproval. I know i have the forum permissions to post
- Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$auth->login('AdminUserName','AdminPassword');
$my_subject = utf8_normalize_nfc('Topic Subject Line');
$my_text = utf8_normalize_nfc('
Body
shown as
you want to see it.
');
$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);
$data = array(
'forum_id' => 82,
'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' => 0,
'forum_name' => '',
'enable_indexing' => true,
);
submit_post('post', $my_subject, '', POST_NORMAL, $poll, $data);
?>
Thanks
-
kalukee
- Registered User
-
- Posts: 1
- Joined: Tue Apr 21, 2009 12:16 am
Postby xorzizten » Sat May 14, 2011 4:00 pm
I had the same problem, but i solved this by adding
- Code: Select all
'force_approved_state' => true,
at the very end in the $data array.
This posts everything, even in forums with admin only access, as guest if submit_post() is run with no user logged in.
-
xorzizten
- Registered User
-
- Posts: 1
- Joined: Sat May 14, 2011 3:55 pm
Download all attachments:
Return to [3.0/Olympus] Discussion
Who is online
Users browsing this forum: No registered users and 11 guests