Procedural File: tce_functions_tcecode.php
Source Location: /shared/code/tce_functions_tcecode.php
Page Details:
Functions to translate TCExam proprietary code into XHTML.
The TCExam code is compatible to the common BBCode.
Tags:
F_decode_tcecode [line 60]
string F_decode_tcecode(
string $text_to_decode)
|
|
Returns XHTML code from text marked-up with TCExam Code Tags
Tags:
Parameters
string |
$text_to_decode |
text to convert |
F_latex_callback [line 201]
string F_latex_callback(
string $matches)
|
|
Callback function for preg_replace_callback (LaTeX replacement). Returns replacement image for LaTeX code.
Tags:
Parameters
string |
$matches |
array containing matches: $matches[0] is the complete match, $matches[1] the match for the first subpattern enclosed in '(...)' (the LaTeX code) |
F_objects_callback [line 228]
string F_objects_callback(
string $matches)
|
|
Callback function for preg_replace_callback. Returns replacement code by MIME type.
Tags:
Parameters
string |
$matches |
array containing matches: $matches[0] is the complete match, $matches[1] the match for the first subpattern enclosed in '(...)' and so on |
F_objects_replacement [line 253]
string F_objects_replacement(
string $name, string $extension, [int $width = 0], [int $height = 0], [string $alt = ''])
|
|
Returns the xhtml code needed to display the object by MIME type.
Tags:
Parameters
string |
$name |
object path excluded extension |
string |
$extension |
object extension (e.g.: gif, jpg, swf, ...) |
int |
$width |
object width |
int |
$height |
object height |
string |
$alt |
alternative content |
F_remove_tcecode [line 321]
string F_remove_tcecode(
string $str)
|
|
Returns specified string without tcecode mark-up tags
Tags:
Parameters
string |
$str |
text to process |
F_substrHTML [line 391]
void F_substrHTML(
string $htmltext, [int $min_length = 100], [int $offset_length = 20])
|
|
Return a substring of XHTML code while making sure no html tags are chopped. 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
string |
$htmltext |
|
int |
$min_length |
(default=100) the approximate length you want the concatenated text to be |
int |
$offset_length |
(default=20) the max variation in how long the text can be |
F_tcecodeToLine [line 350]
void F_tcecodeToLine(
string $str)
|
|
Converts tcecode text to a single XHTML string removing some objects.
Parameters
string |
$str |
text to process return string |
F_tcecodeToTitle [line 374]
void F_tcecodeToTitle(
string $str)
|
|
Converts tcecode text to simple string for XHTML title attribute.
Parameters
string |
$str |
text to process return string |
|