(Edit: I could not see anything in the RFI forum for some strange reason, so I have no idea if these functions have been discussed
![](https://xoops.org/uploads/smil42e7a3ff4ceee.gif)
)
Xoops ate my session, so this is going to be a lot more abbreviated than before. After looking through the class files, the forum, the news, and other modules, I have tried to put together a helpful reference on using the Text Sanitizer. If some other people in the mod community can verify these, it would be a huge help both to the mods and to the wiki. I do believe though that these functions (as used now) are marked "depreciated" in CVS, but I couldn't for the life of me find the new revised function names.
Get the instance of the MyText Sanitizer
Must do this first.
$myts =& MyTextsanitizer::getInstance();
Sanitize Data to save in a DB
$myts->makeTboxData4Save($text)
Prepare Data from DB to display on page
second option is to show smilies or not (optional)
$myts->makeTboxData4Show($text, 0)
Prepare data from DB to put back into a textbox
$myts->makeTboxData4Edit($text)
Prepare data from DB to put into a "preview" section
second option is to show smilies or not (optional)
$myts->makeTboxData4Preview($text, 0)
Prepare data from DB to put into a "preview" section that is contained in a form? (anyone actually use this?)
$myts->makeTboxData4PreviewInForm($text)
Sanitize Text Area Data to save in a DB
$myts->makeTareaData4Save($text)
Prepare Data from DB to display on page
1st option: convert html code (optional)
2nd option: convert smilies (optional)
3rd option: convert XOOPS code (optional)
$myts->&makeTareaData4Show(&$text, 1, 1, 1)
Prepare Data from DB to put back into a text area
$myts->makeTareaData4Edit($text)
Prepare Data from DB to display in a Preview
1st option: convert html code (optional)
2nd option: convert smilies (optional)
3rd option: convert XOOPS code (optional)
$myts->&makeTareaData4Preview(&$text, 1, 1, 1)
Prepare Data from DB to display in a Preview and that preview is contained in a form? (anyone actually use this?)
$myts->makeTareaData4PreviewInForm($text)
Prepare Data from DB to display in a "quote" format? (anyone actually use this?)
$myts->makeTareaData4InsideQuotes($text)