cs_abcode_inhtml
Die cs_abcode_inhtml()-Funktion ist gedacht, um ... noch zu ergänzen ...
Inhaltsverzeichnis [verbergen]
Deutsche Version
Infos zur Funktion
Funktion: cs_abcode_inhtml()Eingeführt von: hajo
Eingeführt am: 14.05.2009
Info-Thread: Forum: 10519
Beschreibung
Muss noch übersetzt werdenBentzung
cs_abcode_inhtml ( $string, $mode = 0 )$string ist der String, der gecheckt werden werden soll und geändert wird (für In- oder Output)
$mode hat drei mögliche Typen (Modes):
- 'add' -> wenn es noch nicht geschehen ist, wird der String in ABCode HTML-Tag eingeschlossen
- 'del' -> Der HTML-Tag wird entfernt, if one encloses the string
- empty -> gibt TRUE (richtig) oder FALSE (falsch) zurück, ob der String enclosed von dem HTML-ABCode-Tag ist oder nicht. Dieser Mode ist hauptsächlich für Debugging und Testing gedacht, aber sehr nützlich. Dies ist der Standard-Mode und kann weggelassen werden.
Beispiele
Beispiele noch ergänzenEnglish Version
Infos
Function: cs_abcode_inhtml()Introduced by: hajo
Introduced on the: 14.05.2009
Info-Thread: Forum: 10519
Description
since fckeditor needs to be rescued from nl2br() its output has to be inserted in html-tags again like it was in 2008.2.1 and earlier releases. this provides the best solution to handle the newline-problem within html-code and the activation of html / wysiwyg in news and even other modules.the following function is going to check and handle the html tag in total:
cs_abcode_inhtml ( $string, $mode = 0 )
Using
cs_abcode_inhtml ( $string, $mode = 0 )$string is the string that needs to be checked / changed for input or output
$mode has three available modes:
- 'add' -> if not already provided the string will be enclosed in the abcode html tag
- 'del' -> html tag will be removed if one encloses the string
- empty -> returns TRUE or FALSE wether the string is enclosed by the html abcode tag or not, mainly for debugging and testing issues, but very helpful. this is also the default mode and can therefore be left