phpBB

Development Wiki

Difference between revisions of "Function.submit post"

From phpBB Development Wiki

m (Parameters)
(Parameters)
Line 17: Line 17:
 
|-
 
|-
 
| '''username'''
 
| '''username'''
| Username of the poster
+
| Username of the poster.  Only valid for guest posters.
 
|-
 
|-
 
| '''topic_type'''
 
| '''topic_type'''
| The topic type
+
| One of the phpBB3 topic type constants.  POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL
 
|-
 
|-
 
| '''poll'''
 
| '''poll'''

Revision as of 21:18, 8 April 2009

submit_post –– Posts a topic or post to the forum with the information supplied

Description

  1. mixed submit_post ( $mode,  $subject,  $username,  $topic_type,  &$poll,  &$data, [ $update_message = true])

To post a new message to the forums use the submit_post function. It handles all necessary changes. On success it returns the URL of the post, otherwise it returns false.

Parameters

Parameter Usage
mode Determines what type of posting should be done. Can be post, edit, reply, or delete.
subject The subject of the message.
username Username of the poster. Only valid for guest posters.
topic_type One of the phpBB3 topic type constants. POST_NORMAL, POST_STICKY, POST_ANNOUNCE, POST_GLOBAL
poll Poll data
data The post data in an array.
update_message (optional, default is true)