[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/inc/ -> functions_posting.php (summary)

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 235 lines (7 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 1 file
 inc/class_parser.php

Defines 2 functions

  remove_message_quotes()
  parse_quoted_message()

Functions
Functions that are not part of a class:

remove_message_quotes(&$text, $rmdepth=null)   X-Ref
Selectively removes quote tags from a message, depending on its nested depth.  This is to be used with reply with quote functions.
For malformed quote tag structures, will try to simulate how MyBB's parser handles the issue, but is slightly inaccurate.
Examples, with a cutoff depth of 2:
#1. INPUT:  [quote]a[quote=me]b[quote]c[/quote][/quote][/quote]
OUTPUT:  [quote]a[quote=me]b[/quote][/quote]
#2. INPUT:  [quote=a][quote=b][quote=c][quote=d][/quote][quote=e][/quote][/quote][quote=f][/quote][/quote]
OUTPUT:  [quote=a][quote=b][/quote][quote=f][/quote][/quote]

return: string the original message passed in $text, but with quote tags selectively removed
param: string $text the message from which quotes are to be removed
param: integer $rmdepth nested depth at which quotes should be removed; if none supplied, will use MyBB's default; must be at least 0

parse_quoted_message(&$quoted_post, $remove_message_quotes=true)   X-Ref
Performs cleanup of a quoted message, such as replacing /me commands, before presenting quoted post to the user.
return: string the cleaned up message, wrapped in a quote tag
param: array $quoted_post quoted post info, taken from the DB (requires the 'message', 'username', 'pid' and 'dateline' entries to be set; will use 'userusername' if present. requires 'quote_is_pm' if quote message is from a private message)
param: boolean $remove_message_quotes whether to call remove_message_quotes() on the quoted message



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref