Check if guest posting is enabled?

Discussion forum for MOD Writers regarding MOD Development.
Locked
clinton4
Registered User
Posts: 12
Joined: Sat Nov 24, 2007 7:36 am

Check if guest posting is enabled?

Post by clinton4 » Mon Oct 01, 2012 9:38 pm

Hi,

I'am working on a spam blocking script for my phpbb 3 forum and have a question.

In posting.php, is there any variable that can tell my if guest posting is enable or not for the current forum/topic?

I have looked at $config['enable_post_confirm'], but that always give me 1.

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Check if guest posting is enabled?

Post by A_Jelly_Doughnut » Tue Oct 02, 2012 1:06 am

The best way to do this is to read the current forum's permissions for the ANONYMOUS user.

e.g. $auth->acl_get_list(ANONYMOUS, array('f_post', 'f_reply'), $forum_id);
This will return an array with the information you want contained within. See docs/auth_api.html in your phpBB download for more information.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

Locked

Return to “[3.0.x] MOD Writers Discussion”