mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 00:54:49 +02:00
Plugins: e_parse can now also hook into toDB() to modify content before it is stored in the database
This commit is contained in:
@@ -32,6 +32,7 @@ class _blank_parse
|
||||
|
||||
|
||||
/**
|
||||
* Process a string before it is sent to the browser as html.
|
||||
* @param string $text html/text to be processed.
|
||||
* @param string $context Current context ie. OLDDEFAULT | BODY | TITLE | SUMMARY | DESCRIPTION | WYSIWYG etc.
|
||||
* @return string
|
||||
@@ -44,6 +45,22 @@ class _blank_parse
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Process a string before it is saved to the database.
|
||||
* @param string $text html/text to be processed.
|
||||
* @param array $param nostrip, noencode etc.
|
||||
* @return string
|
||||
*/
|
||||
function toDB($text, $param=array())
|
||||
{
|
||||
$text = str_replace('<hr />', '****', $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user