Stud.IP
5.4
|
Functions | |
htmlReady ($what, $trim=TRUE, $br=FALSE, $double_encode=true) | |
wysiwygReady ($what, $trim=TRUE, $br=FALSE, $double_encode=true) | |
jsReady ($what, $target= 'script-single') | |
quotes_encode ($text, $author= '') | |
formatReady ($text, $trim=true) | |
formatLinks ($text, $nl2br=true) | |
wikiReady ($text, $trim=TRUE) | |
blubberReady ($text, $trim=TRUE) | |
transformBeforeSave ($text) | |
decodeHTML ($string) | |
Variables | |
const | FORMATTED_CONTENT_WRAPPER '<div class="formatted-content">%s</div>' |
blubberReady | ( | $text, | |
$trim = TRUE |
|||
) |
Special version of formatReady for blubber, which includes hashtags
public
string | $what | Marked-up text. |
string | $trim | Trim leading and trailing whitespace, if TRUE. |
decodeHTML | ( | $string | ) |
decodes html entities to normal characters
public
string |
formatLinks | ( | $text, | |
$nl2br = true |
|||
) |
Simplified version of formatReady that handles link formatting only.
string | $text | Marked-up text. |
bool | $nl2br | Convert newlines to . |
formatReady | ( | $text, | |
$trim = true |
|||
) |
Common function to get all special Stud.IP formattings.
public
string | $text | Marked-up text. |
boolean | $trim | Trim leading and trailing whitespace, if TRUE. |
htmlReady | ( | $what, | |
$trim = TRUE , |
|||
$br = FALSE , |
|||
$double_encode = true |
|||
) |
jsReady | ( | $what, | |
$target = 'script-single' |
|||
) |
quotes_encode | ( | $text, | |
$author = '' |
|||
) |
Quote a piece of text, optionally include the author's name.
Applies Stud.IP-Markup if WYSIWYG/HTML is disabled and HTML if it is enabled.
string | $text | Text that is to be quoted. |
string | $author | Name of the text's author (optional). |
transformBeforeSave | ( | $text | ) |
Obsolete function for compatibility, returns text unchanged.
string | $text | Marked-up text. |
wikiReady | ( | $text, | |
$trim = TRUE |
|||
) |
Special version of formatReady for wiki-webs.
public
string | $what | Marked-up text. |
string | $trim | Trim leading and trailing whitespace, if TRUE. |
wysiwygReady | ( | $what, | |
$trim = TRUE , |
|||
$br = FALSE , |
|||
$double_encode = true |
|||
) |
Prepare text for wysiwyg (if enabled), otherwise convert special characters using htmlReady.
string | $text | The text. |
boolean | $trim | Trim text before applying markup rules, if TRUE. |
boolean | $br | Replace newlines by , if TRUE and wysiwyg editor disabled. |
boolean | $double_encode | Encode existing HTML entities, if TRUE and wysiwyg editor disabled. |
const FORMATTED_CONTENT_WRAPPER '<div class="formatted-content">%s</div>' |