HTML
Table of Contents
Functions
- filterHTML() : string
- Filter HTML in fields destined for the search_ tables
- filterHTMLLinks() : string
- Filter HTML links for LISTCOMMON output
- escape() : mixed
- Escape strings inserted in HTML
- escapeHTMLTemp() : mixed
- Temporarily escape HTML entities
- _inlineHtmlAttribute() : string
- Build a string for insertion of an HTML tag attribute.
- h() : string
- <Hx> heading element
- div() : string
- <DIV> element
- divScrollable() : string
- Scrollable <DIV> element
- iframe() : string
- <IFRAME> element
- p() : string
- <P> element
- pBrowse() : string
- <P> element
- pre() : string
- <PRE> element
- ul() : string
- <UL> element
- ol() : string
- <OL> element
- li() : string
- <LI> element
- hr() : string
- <HR> element
- mark() : string
- <mark> element
- object() : string
- <OBJECT> element For display attachment previews
- span() : string
- <SPAN> element
- color() : string
- <SPAN color> element
- strong() : string
- <STRONG> element (Semantic equivalent of <B>)
- em() : string
- <EM> element (Semantic equivalent of <I>)
- u() : string
- <U> element
- img() : string
- <IMG> element
- anchor() : string
- <A> element used as internal anchor
- a() : string
- <A> element used as hyperlink
- aBrowse() : string
- <A> element used as hyperlink
- tableStart() : string
- Start a <TABLE> tag
- tableEnd() : string
- Close a <TABLE> tag
- tableCaption() : string
- provide a table <caption>
- tbodyStart() : string
- Provide a <tbody> tag
- tbodyEnd() : string
- Provide a </tbody> tag
- theadStart() : string
- Provde a <thead> tag
- theadEnd() : string
- Provide a </thead> tag
- tfootStart() : string
- Provide a <tfoot> tag
- tfootEnd() : string
- Provide a </tfoot> tag
- trStart() : string
- Provide a <tr> tag
- trEnd() : string
- Provide a </tr> tag
- tdStart() : string
- Provide a <td> tag without closing it or encapsulating data
- tdEnd() : string
- Provide a </td> tag
- td() : string
- Provide a <td>...</td> tag
- thStart() : string
- Provide a <th> tag without closing it or encapsulating data
- thEnd() : string
- Provide a </th> tag
- th() : string
- Provide a <th>...</th> tag
- cssInlineExternal() : string
- Insert a call to an external CSS file
- jsInline() : string
- Inlining JavaScript code
- jsInlineExternal() : string
- Insert a call to an external javascript file
- successToast() : string
- Format a text as a HTML success toast message (temporary info)
- errorToast() : string
- Format a text as a HTML error toast message (temporary info)
- nlToHtml() : string
- replace newlines and carriage returns with appropriate HTML code.
- htmlToNl() : string
- replace HTML newlines and carriage returns with appropriate ANSI code.
- removeNl() : string
- remove all newlines.
- stripHtml() : string
- Strip HTML from string
- clearSortField() : string
- Strip HTML from string
Functions
filterHTML()
Filter HTML in fields destined for the search_ tables
filterHTML(string $html) : string
Parameters
- $html : string
Return values
stringfilterHTMLLinks()
Filter HTML links for LISTCOMMON output
filterHTMLLinks(string $html) : string
This function is used only to remove links from a formatted resource when it is displayed inside a link because nested links are not supported by HTML.
Parameters
- $html : string
Return values
stringescape()
Escape strings inserted in HTML
escape(mixed $value[, bool $force = FALSE ]) : mixed
If $value is not a string, return $value unchanged
NB: This function ignores the special case of backticks as attribute delimiters. IE is no longer supported.
Parameters
- $value : mixed
- $force : bool = FALSE
-
If true force escaping of allready escaped entities (Default if FALSE)
escapeHTMLTemp()
Temporarily escape HTML entities
escapeHTMLTemp(bool $protect, mixed $value) : mixed
If $value is not a string, return $value unchanged
This function is usually called twice. The first time ($protect = TRUE) will convert HTML entities. Presumably something is then done with the returned string, after which the function can be called with $protect = FALSE. The intention is to allow operations on a string that might interfere with or be interfered by any HTML entities in the string that are of type &...;
Parameters
- $protect : bool
- $value : mixed
_inlineHtmlAttribute()
Build a string for insertion of an HTML tag attribute.
_inlineHtmlAttribute([string $name = '' ][, string $value = '' ]) : string
Ensures that the attribute value is never empty (incorrect syntax)
Parameters
- $name : string = ''
-
Default is ''
- $value : string = ''
-
Default is ''
Return values
stringh()
<Hx> heading element
h([string $data = '' ][, string $class = '' ][, int $level = 4 ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
- $level : int = 4
-
Default is 4
Return values
stringdiv()
<DIV> element
div(int $id[, string $data = '' ][, string $class = '' ]) : string
If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element
Parameters
- $id : int
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringdivScrollable()
Scrollable <DIV> element
divScrollable(int $id[, string $data = '' ][, string $class = '' ][, int $width = 500 ][, int $height = 200 ]) : string
If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element
Parameters
- $id : int
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
- $width : int = 500
-
Default is 500px
- $height : int = 200
-
Default is 200px
Return values
stringiframe()
<IFRAME> element
iframe(int $id[, string $data = '' ][, string $class = '' ]) : string
If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element
Parameters
- $id : int
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringp()
<P> element
p([string $data = '' ][, string $class = '' ][, string $align = 'left' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
- $align : string = 'left'
-
Default is 'left'
Return values
stringpBrowse()
<P> element
pBrowse([string $data = '' ][, string $class = '' ]) : string
for browsing creators, collections etc. (tag colour) where a background colour needs to be specified
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringpre()
<PRE> element
pre(mixed $data[, string $class = '' ]) : string
Parameters
- $data : mixed
- $class : string = ''
-
Default is ''
Return values
stringul()
<UL> element
ul([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringol()
<OL> element
ol([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringli()
<LI> element
li([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringhr()
<HR> element
hr([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
Return values
stringmark()
<mark> element
mark(string $data) : string
Parameters
- $data : string
Return values
stringobject()
<OBJECT> element For display attachment previews
object(string $data, string $type, int $width, int $height) : string
Parameters
- $data : string
- $type : string
- $width : int
- $height : int
Return values
stringspan()
<SPAN> element
span([string $data = '' ][, string $class = '' ][, string $title = '' ][, string $js = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
- $title : string = ''
-
Default is ''
- $js : string = ''
-
Default is ''
Return values
stringcolor()
<SPAN color> element
color([string $data = '' ][, string $class = 'blackText' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = 'blackText'
-
Default is 'blackText'
Return values
stringstrong()
<STRONG> element (Semantic equivalent of <B>)
strong([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringem()
<EM> element (Semantic equivalent of <I>)
em([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringu()
<U> element
u(string $data[, string $class = '' ]) : string
Parameters
- $data : string
- $class : string = ''
-
Default is ''
Return values
stringimg()
<IMG> element
img(string $src, int $width, int $height[, string $title = '' ][, string $alt = '' ][, string $js = '' ]) : string
Parameters
- $src : string
- $width : int
- $height : int
- $title : string = ''
-
Default is ''
- $alt : string = ''
-
Default is ''
- $js : string = ''
-
Default is ''
Return values
stringanchor()
<A> element used as internal anchor
anchor(string $name[, string $data = '' ][, string $title = '' ]) : string
Parameters
- $name : string
- $data : string = ''
-
Default is ''
- $title : string = ''
-
Default is ''
Return values
stringa()
<A> element used as hyperlink
a(string $class, string $label, string $link[, string $target = '' ][, string $title = '' ]) : string
Parameters
- $class : string
- $label : string
- $link : string
- $target : string = ''
-
Default is ''
- $title : string = ''
-
Default is ''
Return values
stringaBrowse()
<A> element used as hyperlink
aBrowse([string $color = '#000' ][, string $size = '1em' ][, string $label = '' ][, string $link = '' ][, string $target = '' ][, string $title = '' ][, string $js = '' ]) : string
Hyperlinks for browsing creators, collections etc. (tag clouds) where the text colour and size is provided by the scripts to indicate frequency
Parameters
- $color : string = '#000'
-
Default is '#000'
- $size : string = '1em'
-
Default is '1em'
- $label : string = ''
-
Default is ''
- $link : string = ''
-
Default is ''
- $target : string = ''
-
Default is ''
- $title : string = ''
-
Default is ''
- $js : string = ''
-
Default is ''
Return values
stringtableStart()
Start a <TABLE> tag
tableStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
Return values
stringtableEnd()
Close a <TABLE> tag
tableEnd() : string
Return values
stringtableCaption()
provide a table <caption>
tableCaption([string $caption = '' ][, string $class = '' ]) : string
Parameters
- $caption : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
Return values
stringtbodyStart()
Provide a <tbody> tag
tbodyStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
Return values
stringtbodyEnd()
Provide a </tbody> tag
tbodyEnd() : string
Return values
stringtheadStart()
Provde a <thead> tag
theadStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
Return values
stringtheadEnd()
Provide a </thead> tag
theadEnd() : string
Return values
stringtfootStart()
Provide a <tfoot> tag
tfootStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
Return values
stringtfootEnd()
Provide a </tfoot> tag
tfootEnd() : string
Return values
stringtrStart()
Provide a <tr> tag
trStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
Return values
stringtrEnd()
Provide a </tr> tag
trEnd() : string
Return values
stringtdStart()
Provide a <td> tag without closing it or encapsulating data
tdStart([string $class = '' ][, string $colspan = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
- $colspan : string = ''
-
Default is ''
Return values
stringtdEnd()
Provide a </td> tag
tdEnd() : string
Return values
stringtd()
Provide a <td>...</td> tag
td([string $data = '' ][, string $class = '' ][, string $colspan = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
- $colspan : string = ''
-
Default is ''
Return values
stringthStart()
Provide a <th> tag without closing it or encapsulating data
thStart([string $class = '' ][, string $colspan = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
- $colspan : string = ''
-
Default is ''
Return values
stringthEnd()
Provide a </th> tag
thEnd() : string
Return values
stringth()
Provide a <th>...</th> tag
th([string $data = '' ][, string $class = '' ][, string $colspan = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
- $colspan : string = ''
-
Default is ''
Return values
stringcssInlineExternal()
Insert a call to an external CSS file
cssInlineExternal(string $url[, string $media = "all" ]) : string
Parameters
- $url : string
- $media : string = "all"
-
Default is 'all' (can be 'all' for all media, 'print' for printing, 'screen' for screens)
Tags
Return values
stringjsInline()
Inlining JavaScript code
jsInline(string $jsCode[, string $execMode = "sync" ][, string $type = "" ]) : string
Parameters
- $jsCode : string
- $execMode : string = "sync"
-
When the script should be executed? Default is 'sync'
- $type : string = ""
-
Script type? Default is ''
Tags
Return values
stringjsInlineExternal()
Insert a call to an external javascript file
jsInlineExternal(string $url[, string $execMode = "sync" ][, string $type = "" ]) : string
Parameters
- $url : string
- $execMode : string = "sync"
- $type : string = ""
-
Script type? Default is ''
Tags
Return values
stringsuccessToast()
Format a text as a HTML success toast message (temporary info)
successToast(string $string) : string
Parameters
- $string : string
Return values
stringerrorToast()
Format a text as a HTML error toast message (temporary info)
errorToast(string $string) : string
Parameters
- $string : string
Return values
stringnlToHtml()
replace newlines and carriage returns with appropriate HTML code.
nlToHtml(string $string) : string
first multiples then singles. Used for display back from DB table
Parameters
- $string : string
Return values
stringhtmlToNl()
replace HTML newlines and carriage returns with appropriate ANSI code.
htmlToNl(string $string) : string
first multiples then singles. Used for display back from DB table
Parameters
- $string : string
Return values
stringremoveNl()
remove all newlines.
removeNl(string $string) : string
For cases when user cut 'n' pastes multiple lines into single-line text box Used before writing to DB table
Parameters
- $string : string
Return values
stringstripHtml()
Strip HTML from string
stripHtml(string $string) : string
Parameters
- $string : string
Return values
stringclearSortField()
Strip HTML from string
clearSortField(string $string) : string
Parameters
- $string : string