Class XFParser

Description

XFParser takes care of text processing, tag management and some more

Located in /class.parser.php (line 28)


	
			
Class Constant Summary
 PARSER_ALLOW_SCHEME = 'http,https,ftp,ftps'
Method Summary
static mixed calculate_age (integer $a, [boolean $astext = true])
static array calendar (integer $min, integer $max)
static string clear_query_string (string $a)
static integer get_reply_count (array $a, string $b)
static boolean is_posting_read (integer $topicid, integer $last)
static integer limit_rating (string $a)
static string message (string $a)
static string parser_code (string $a, [string $b = ''])
static string parser_emoticon ( &$a, string $a)
static string parser_enhanced_format (string $a)
static string parser_references (string $input)
static string parser_simple_format (string $a)
static mixed resolve_tags (array $a)
static boolean tag_management (string $postid, string $tags, [string $flags = ''])
static true tag_query ([array $a = ''])
static boolean user_calculations ([integer $a = 0])
Methods
static method calculate_age (line 470)

calculate the age of a timestamp

  • since: 1.0.0
  • access: public
static mixed calculate_age (integer $a, [boolean $astext = true])
  • integer $a: timestamp, should be GMT
  • boolean $astext: return it as text or array?
static method calendar (line 533)

create a calendar

  • since: 1.0.0
  • access: public
static array calendar (integer $min, integer $max)
  • integer $min: beginning year
  • integer $max: ending year
static method clear_query_string (line 269)

clears a uri (query string) from unencoded chars

  • since: 1.0.0
  • access: public
static string clear_query_string (string $a)
  • string $a: query string
static method get_reply_count (line 439)

calculate reply count

  • since: 1.0.0
  • access: public
static integer get_reply_count (array $a, string $b)
  • array $a: 'tree' from XFCache::topic()
  • string $b: fetch unapproved '-' or approved '+' posts
static method is_posting_read (line 509)

check whether a posting has been read before during session

  • since: 1.0.0
  • access: public
static boolean is_posting_read (integer $topicid, integer $last)
  • integer $topicid: topic id
  • integer $last: timestamp of last posting in topic
static method limit_rating (line 454)

limit any rating values to multiples of ten

  • since: 1.0.0
  • access: public
static integer limit_rating (string $a)
  • string $a: rating value
static method message (line 56)

parse a text by several routines for output (usually used on posting text)

  • since: 1.0.0
  • access: public
static string message (string $a)
  • string $a: input stream
static method parser_code (line 234)

parse code blocks

  • since: 1.0.0
  • access: protected
static string parser_code (string $a, [string $b = ''])
  • string $a: input stream
  • string $b: description of block
static method parser_emoticon (line 254)

parse emoticon strings to images

  • since: 1.0.0
  • access: protected
static string parser_emoticon ( &$a, string $a)
  • string $a: input stream
  • &$a
static method parser_enhanced_format (line 121)

parse special formatting

  • since: 1.0.0
  • access: protected
static string parser_enhanced_format (string $a)
  • string $a: input stream
static method parser_references (line 154)

parse references like images and links

  • since: 1.0.0
  • access: protected
static string parser_references (string $input)
  • string $input: input stream
static method parser_simple_format (line 91)

parse simple tags like bold, italic etc.

  • since: 1.0.0
  • access: protected
static string parser_simple_format (string $a)
  • string $a: input stream
static method resolve_tags (line 338)

resolve any tags to their id and return them

  • since: 1.0.0
  • access: protected
static mixed resolve_tags (array $a)
  • array $a: tag name, multiple allowed
static method tag_management (line 369)

manage the tags of a posting

  • since: 1.0.0
  • access: public
static boolean tag_management (string $postid, string $tags, [string $flags = ''])
  • string $postid: post id
  • string $tags: tags (names separated by comma)
  • string $flags: 'skip_check' does not check for posting existence
static method tag_query (line 286)

query tags and put them to local cache for further operations

  • since: 1.0.0
  • access: public
static true tag_query ([array $a = ''])
  • array $a: tag id or a name, multiple allowed
static method user_calculations (line 553)

do some calulations on an user account. currently it computes 'rating_bonus'.

  • since: 1.0.0
  • access: public
static boolean user_calculations ([integer $a = 0])
  • integer $a: user id
Class Constants
MAX_RATE_BONUS = 10 (line 32)
  • var: what is the maximum bonus for rating a posting
PARSER_ALLOW_IMG = true (line 40)
  • var: should the text parser for forum postings allow external images?
PARSER_ALLOW_MAIL = true (line 44)
  • var: should the text parser for forum postings allow e-mail addresses?
PARSER_ALLOW_SCHEME = 'http,https,ftp,ftps' (line 48)
  • var: which protocols should be allowed to link to in forum postings?
PARSER_ALLOW_URI = true (line 36)
  • var: should the text parser for forum postings allow external uri?

Documentation generated on Tue, 21 Oct 2008 20:58:10 +0200 by phpDocumentor 1.4.1