PHP Class parse_message

Inheritance: extends bbcode_firstpass
显示文件 Open project: phpbb/phpbb Class Usage Examples

Public Properties

Property Type Description
$allow_flash_bbcode
$allow_img_bbcode
$allow_quote_bbcode
$allow_url_bbcode
$attachment_data
$filename_data
$message_status Helps ironing out user error
$mode

Protected Properties

Property Type Description
$mimetype_guesser phpbb\mimetype\guesser The mimetype guesser object used for attachment mimetypes
$plupload phpbb\plupload\plupload The plupload object used for dealing with attachments

Public Methods

Method Description
decode_message ( $custom_bbcode_uid = '', $update_this_message = true ) Decode message to be placed back into form box
format_display ( $allow_bbcode, $allow_magic_url, $allow_smilies, $update_this_message = true ) Formatting text for display
get_submitted_attachment_data ( $check_user_id = false ) Get Attachment Data
magic_url ( $server_url ) Replace magic urls of form http://xxx.xxx., www.xxx. and [email protected].
parse ( $allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post' ) Parse Message
parse_attachments ( $form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false ) Parse Attachments
parse_message ( $message = '' ) Init - give message here or manually
parse_poll ( &$poll ) Parse Poll
remove_nested_quotes ( integer $max_depth ) : null Remove nested quotes at given depth in current parsed message
set_mimetype_guesser ( phpbb\mimetype\guesser $mimetype_guesser ) : null Setter function for passing the mimetype_guesser object
set_plupload ( phpbb\plupload\plupload $plupload ) : null Setter function for passing the plupload object
smilies ( $max_smilies ) Parse Smilies
validate_bbcode_by_extension ( ) : mixed Function to perform custom bbcode validation by extensions can be used in bbcode_init() to assign regexp replacement Example: 'regexp' => array('#\b\\[/b\]#uise' => "\$this->validate_bbcode_by_extension('\$1')")

Method Details

decode_message() public method

Decode message to be placed back into form box
public decode_message ( $custom_bbcode_uid = '', $update_this_message = true )

format_display() public method

Formatting text for display
public format_display ( $allow_bbcode, $allow_magic_url, $allow_smilies, $update_this_message = true )

get_submitted_attachment_data() public method

Get Attachment Data
public get_submitted_attachment_data ( $check_user_id = false )

magic_url() public method

Cuts down displayed size of link if over 50 chars, turns absolute links into relative versions when the server/script path matches the link
public magic_url ( $server_url )

parse() public method

Parse Message
public parse ( $allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post' )

parse_attachments() public method

Parse Attachments
public parse_attachments ( $form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false )

parse_message() public method

Init - give message here or manually
public parse_message ( $message = '' )

parse_poll() public method

Parse Poll
public parse_poll ( &$poll )

remove_nested_quotes() public method

Remove nested quotes at given depth in current parsed message
public remove_nested_quotes ( integer $max_depth ) : null
$max_depth integer Depth limit
return null

set_mimetype_guesser() public method

Setter function for passing the mimetype_guesser object
public set_mimetype_guesser ( phpbb\mimetype\guesser $mimetype_guesser ) : null
$mimetype_guesser phpbb\mimetype\guesser The mimetype_guesser object
return null

set_plupload() public method

Setter function for passing the plupload object
public set_plupload ( phpbb\plupload\plupload $plupload ) : null
$plupload phpbb\plupload\plupload The plupload object
return null

smilies() public method

Parse Smilies
public smilies ( $max_smilies )

validate_bbcode_by_extension() public method

Accepts variable number of parameters
public validate_bbcode_by_extension ( ) : mixed
return mixed Validation result

Property Details

$allow_flash_bbcode public_oe property

public $allow_flash_bbcode

$allow_img_bbcode public_oe property

public $allow_img_bbcode

$allow_quote_bbcode public_oe property

public $allow_quote_bbcode

$allow_url_bbcode public_oe property

public $allow_url_bbcode

$attachment_data public_oe property

public $attachment_data

$filename_data public_oe property

public $filename_data

$message_status public_oe property

Helps ironing out user error
public $message_status

$mimetype_guesser protected_oe property

The mimetype guesser object used for attachment mimetypes
protected guesser,phpbb\mimetype $mimetype_guesser
return phpbb\mimetype\guesser

$mode public_oe property

public $mode

$plupload protected_oe property

The plupload object used for dealing with attachments
protected plupload,phpbb\plupload $plupload
return phpbb\plupload\plupload