[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch




/includes/ -> message_parser.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 2061 lines (61 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

bbcode_firstpass:: (20 methods):

parse_message:: (13 methods):

Class: bbcode_firstpass  - X-Ref

BBCODE first pass class (functions for parsing messages for db storage)

parse_bbcode()   X-Ref
Parse BBCode

prepare_bbcodes()   X-Ref
Prepare some bbcodes for better parsing

bbcode_init($allow_custom_bbcode = true)   X-Ref
Init bbcode data for later parsing

check_bbcode($bbcode, &$in)   X-Ref
Making some pre-checks for bbcodes as well as increasing the number of parsed items

bbcode_specialchars($text)   X-Ref
Transform some characters in valid bbcodes

bbcode_size($stx, $in)   X-Ref
Parse size tag

bbcode_color($stx, $in)   X-Ref
Parse color tag

bbcode_underline($in)   X-Ref
Parse u tag

bbcode_strong($in)   X-Ref
Parse b tag

bbcode_italic($in)   X-Ref
Parse i tag

bbcode_img($in)   X-Ref
Parse img tag

bbcode_flash($width, $height, $in)   X-Ref
Parse flash tag

bbcode_attachment($stx, $in)   X-Ref
Parse inline attachments [ia]

bbcode_parse_code($stx, &$code)   X-Ref
Parse code text from code tag

bbcode_code($stx, $in)   X-Ref
Parse code tag
Expects the argument to start right after the opening [code] tag and to end with [/code]

bbcode_parse_list($in)   X-Ref
Parse list bbcode
Expects the argument to start with a tag

bbcode_quote($in)   X-Ref
Parse quote bbcode
Expects the argument to start with a tag

validate_email($var1, $var2)   X-Ref
Validate email

validate_url($var1, $var2)   X-Ref
Validate url

param: string $var1 optional url parameter for url bbcode: [url(=$var1)]$var2[/url]
param: string $var2 url bbcode content: [url(=$var1)]$var2[/url]

path_in_domain($url)   X-Ref
Check if url is pointing to this domain/script_path/php-file

param: string $url the url to check
return: true if the url is pointing to this domain/script_path/php-file, false if not

Class: parse_message  - X-Ref

Main message parser for posting, pm, etc. takes raw message
and parses it for attachments, bbcode and smilies

__construct($message = '')   X-Ref
Init - give message here or manually

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')   X-Ref
Parse Message

format_display($allow_bbcode, $allow_magic_url, $allow_smilies, $update_this_message = true)   X-Ref
Formatting text for display

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

magic_url($server_url)   X-Ref
Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
Cuts down displayed size of link if over 50 chars, turns absolute links
into relative versions when the server/script path matches the link

smilies($max_smilies = 0)   X-Ref
Parse Smilies

check_attachment_form_token(\phpbb\language\language $language, \phpbb\request\request_interface $request, $form_name)   X-Ref
Check attachment form token depending on submit type

param: \phpbb\language\language $language Language
param: \phpbb\request\request_interface $request Request
param: string $form_name Form name for checking form key
return: bool True if form token is not needed or valid, false if needed and invalid

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

get_submitted_attachment_data($check_user_id = false)   X-Ref
Get Attachment Data

parse_poll(&$poll)   X-Ref
Parse Poll

remove_nested_quotes($max_depth)   X-Ref
Remove nested quotes at given depth in current parsed message

param: integer $max_depth Depth limit
return: null

set_plupload(\phpbb\plupload\plupload $plupload)   X-Ref
Setter function for passing the plupload object

param: \phpbb\plupload\plupload $plupload The plupload object
return: null

validate_bbcode_by_extension()   X-Ref
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')")

Accepts variable number of parameters

return: mixed Validation result

Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1