HTML.php
Table of Contents
- _inlineHtmlAttribute() : string
- Build a string for insertion of an HTML tag attribute.
- h() : string
- <Hx> heading element
- div() : string
- <DIV> element
- iframe() : string
- <IFRAME> element
- p() : string
- <P> element
- pBrowse() : string
- <P> element
- ul() : string
- <UL> element
- ol() : string
- <OL> element
- li() : string
- <LI> element
- hr() : string
- <HR> element
- 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
- aName() : 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
- jsInline() : string
- Inlining JavaScript code
- jsInlineExternal() : string
- Insert a call to an external javascript
- 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.
- dbToFormTidy() : string
- Format text grabbed from database for printing to form elements.
- dbToHtmlTidy() : string
- Format text grabbed from database for printing to HTML (should be just where the original input was from text input elements).
- dbToHtmlPopupTidy() : string
- Format text grabbed from database for printing to HTML popups.
- stripHtml() : string
- Strip HTML from string
- dbToTinyMCE() : string
- Format text grabbed from database for printing to tinyMCE form elements.
Functions
_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 ''
h()
<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
div()
<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 ''
iframe()
<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 ''
p()
<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'
pBrowse()
<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 ''
ul()
<UL> element
ul([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
ol()
<OL> element
ol([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
li()
<LI> element
li([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
hr()
<HR> element
hr([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
span()
<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 ''
color()
<SPAN color> element
color([string $data = '' ][, string $class = 'blackText' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = 'blackText'
-
Default is 'blackText'
strong()
<STRONG> element (Semantic equivalent of <B>)
strong([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
em()
<EM> element (Semantic equivalent of <I>)
em([string $data = '' ][, string $class = '' ]) : string
Parameters
- $data : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
u()
<U> element
u(string $data[, string $class = '' ]) : string
Parameters
- $data : string
- $class : string = ''
-
Default is ''
img()
<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 ''
aName()
<A> element used as internal anchor
aName([string $name = '' ][, string $data = '' ][, string $title = '' ]) : string
Parameters
- $name : string = ''
-
Default is ''
- $data : string = ''
-
Default is ''
- $title : string = ''
-
Default is ''
a()
<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 ''
aBrowse()
<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 ''
tableStart()
Start a <TABLE> tag
tableStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
tableEnd()
Close a <TABLE> tag
tableEnd() : string
tableCaption()
provide a table <caption>
tableCaption([string $caption = '' ][, string $class = '' ]) : string
Parameters
- $caption : string = ''
-
Default is ''
- $class : string = ''
-
Default is ''
tbodyStart()
Provide a <tbody> tag
tbodyStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
tbodyEnd()
Provide a </tbody> tag
tbodyEnd() : string
theadStart()
Provde a <thead> tag
theadStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
theadEnd()
Provide a </thead> tag
theadEnd() : string
tfootStart()
Provide a <tfoot> tag
tfootStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
tfootEnd()
Provide a </tfoot> tag
tfootEnd() : string
trStart()
Provide a <tr> tag
trStart([string $class = '' ]) : string
Parameters
- $class : string = ''
-
Default is ''
trEnd()
Provide a </tr> tag
trEnd() : string
tdStart()
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 ''
tdEnd()
Provide a </td> tag
tdEnd() : string
td()
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 ''
thStart()
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 ''
thEnd()
Provide a </th> tag
thEnd() : string
th()
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 ''
jsInline()
Inlining JavaScript code
jsInline([string $function = '' ]) : string
Parameters
- $function : string = ''
-
Default is ''
jsInlineExternal()
Insert a call to an external javascript
jsInlineExternal([string $src = '' ]) : string
Parameters
- $src : string = ''
-
Default is ''
nlToHtml()
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
htmlToNl()
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
removeNl()
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
dbToFormTidy()
Format text grabbed from database for printing to form elements.
dbToFormTidy(string $string[, bool $stripHtml = FALSE ]) : string
Parameters
- $string : string
- $stripHtml : bool = FALSE
-
Default is FALSE
dbToHtmlTidy()
Format text grabbed from database for printing to HTML (should be just where the original input was from text input elements).
dbToHtmlTidy(string $string) : string
Parameters
- $string : string
dbToHtmlPopupTidy()
Format text grabbed from database for printing to HTML popups.
dbToHtmlPopupTidy(string $string) : string
Parameters
- $string : string
stripHtml()
Strip HTML from string
stripHtml(string $string) : string
Parameters
- $string : string
dbToTinyMCE()
Format text grabbed from database for printing to tinyMCE form elements.
dbToTinyMCE(string $string) : string
Parameters
- $string : string