/shared/code/tce_functions_tcecode.php

Description

Functions to translate TCExam proprietary code into XHTML.

  • since: 2002-01-09
  • link: www.tecnick.com
  • copyright: Copyright © 2004-2006, Tecnick.com S.r.l. - Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
  • author: Nicola Asuni
Functions
F_decode_tcecode (line 38)

Returns XHTML code from text marked-up with TCExam Code Tags

string F_decode_tcecode (string $text_to_decode)
  • string $text_to_decode: text to convert
F_objects_callback (line 130)

Callback function for preg_replace_callback.

Returns replacement code by MIME type.

  • return: replacement string by file extension
string F_objects_callback (string $matches)
  • 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 155)

Returns the xhtml code needed to display the object by MIME type.

  • return: replacement string
string F_objects_replacement (string $name, string $extension, [int $width = 0], [int $height = 0], [string $alt = ""])
  • 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 224)

Returns specified string without tcecode mark-up tags

  • return: without tcecode markup tags
string F_remove_tcecode (string $str)
  • string $str: text to process
F_substrHTML (line 284)

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

void F_substrHTML (string $htmltext, [int $min_length = 100], [int $offset_length = 20])
  • 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 244)

Converts tcecode text to a single XHTML string removing some eobjects.

void F_tcecodeToLine (string $str)
  • string $str: text to process return string
F_tcecodeToTitle (line 266)

Converts tcecode text to simple string for XHTML title attribute.

void F_tcecodeToTitle (string $str)
  • string $str: text to process return string

Documentation generated on Fri, 24 Nov 2006 21:16:23 +0100 by phpDocumentor 1.3.0RC3