[ Index ]

PHP Cross Reference of MyBB

title

Body

[close]

/inc/ -> functions_posting.php (summary)

MyBB 1.6 Copyright 2010 MyBB Group, All Rights Reserved Website: http://mybb.com License: http://mybb.com/about/license

File Size: 218 lines (6 kb)
Included or required: 2 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]

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

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.

param: array quoted post info, taken from the DB (requires the 'message', 'username', 'pid' and 'dateline' entries to be set; will use 'userusername' if present)
param: boolean whether to call remove_message_quotes() on the quoted message
return: string the cleaned up message, wrapped in a quote tag



Generated: Tue Oct 8 19:19:50 2013 Cross-referenced by PHPXref 0.7.1