tce_functions_tcecode.php

tce_functions_tcecode.php source file reference

Package: com\tecnick\tcexam\shared

Tags

  • file: Functions to translate TCExam proprietary code into XHTML. The TCExam code is compatible to the common BBCode.
  • author: Nicola Asuni
  • since: 2002-01-09

Functions

F_decode_tcecode()

File: tce_functions_tcecode.php line 31

F_decode_tcecode(mixed $text_to_decode) : string

Parameters

  • $text_to_decode : mixed: (string) text to convert

Return values

string —

XHTML code

F_bbcode_to_tcecode()

File: tce_functions_tcecode.php line 109

F_bbcode_to_tcecode(mixed $text) : string

Parameters

  • $text : mixed

Return values

string

F_tcecode_url()

File: tce_functions_tcecode.php line 124

F_tcecode_url(mixed $text) : string

Parameters

  • $text : mixed

Return values

string

F_tcecode_tag()

File: tce_functions_tcecode.php line 162

F_tcecode_tag(mixed $text) : string

Parameters

  • $text : mixed

Return values

string

F_tcecode_tag_arg()

File: tce_functions_tcecode.php line 199

F_tcecode_tag_arg(mixed $text) : string

Parameters

  • $text : mixed

Return values

string

F_latex_callback()

File: tce_functions_tcecode.php line 236

F_latex_callback(mixed $matches) : string

Returns replacement image for LaTeX code.

Parameters

  • $matches : mixed: (string) array containing matches: $matches[0] is the complete match, $matches[1] the match for the first subpattern enclosed in ‘(…)’ (the LaTeX code)

Return values

string —

replacement HTML code string to include the equivalent LaTeX image.

F_mathml_callback()

File: tce_functions_tcecode.php line 364

F_mathml_callback(mixed $matches) : string

Returns replacement code for MathML code.

Parameters

  • $matches : mixed: (string) array containing matches: $matches[0] is the complete match, $matches[1] the match for the first subpattern enclosed in ‘(…)’ (the MathML code)

Return values

string —

MathML code.

F_objects_callback()

File: tce_functions_tcecode.php line 389

F_objects_callback(mixed $matches) : string

Returns replacement code by MIME type.

Parameters

  • $matches : mixed: (string) array containing matches: $matches[0] is the complete match, $matches[1] the match for the first subpattern enclosed in ‘(…)’ and so on

Return values

string —

replacement string by file extension

F_objects_replacement()

File: tce_functions_tcecode.php line 420

F_objects_replacement(mixed $name, mixed $extension[, mixed $width = 0 ][, mixed $height = 0 ][, mixed $alt = '' ][, mixed &$maxwidth = 0 ][, mixed &$maxheight = 0 ]) : string

Parameters

  • $name : mixed: (string) object path excluded extension
  • $extension : mixed: (string) object extension (e.g.: gif, jpg, swf, …)
  • $width : mixed = 0: (int) object width
  • $height : mixed = 0: (int) object height
  • $alt : mixed = ‘’: (string) alternative content
  • $maxwidth : mixed = 0: (int) object max or default width
  • $maxheight : mixed = 0: (int) object max or default height

Return values

string —

replacement string

F_remove_tcecode()

File: tce_functions_tcecode.php line 545

F_remove_tcecode(mixed $str) : string

Parameters

  • $str : mixed: (string) text to process

Return values

string —

without tcecode markup tags

F_tcecodeToLine()

File: tce_functions_tcecode.php line 575

F_tcecodeToLine(mixed $str) : mixed

Parameters

  • $str : mixed: (string) text to process return string

F_tcecodeToTitle()

File: tce_functions_tcecode.php line 601

F_tcecodeToTitle(mixed $str) : mixed

Parameters

  • $str : mixed: (string) text to process return string

F_substrHTML()

File: tce_functions_tcecode.php line 618

F_substrHTML(mixed $htmltext[, mixed $min_length = 100 ][, mixed $offset_length = 20 ]) : mixed

It also prevents chopping while a tag is still open. this function is based on a public-domain script posted on www.php.net by fox@conskript.server and mr@bbp.biz

Parameters

  • $htmltext : mixed: (string)
  • $min_length : mixed = 100: (int) (default=100) the approximate length you want the concatenated text to be
  • $offset_length : mixed = 20: (int) (default=20) the max variation in how long the text can be