BRotondi
09-03-2009, 07:21 PM
Hello!
I want to replace e.g. every xxx to yyy - but only in the HTML-Output. This means: If someone posts "We show you xxx." then the browser will show "We show you yyy.", but if he presses "Edit post" the Editor (WYSIWYG and Text) will still give him "We show you xxx."
I tried different things, e.g. a Plug-In for bbcode_parse_complete:
$text = str_replace('xxx', 'yyy', $text);But this will change also the text for the editor.
How can I do this correct?
=> I don't need a plugin! This is a study for a more complex problem: Replace </br>-breaks with <p>-paragraphs which needs much more programming, since every [ code]...[ /code] needs his <p>...</p> etc.
Of course, if there exists allready a br-to-p-solution I'm even happier :).
Thanks for any help!
Bruno
I want to replace e.g. every xxx to yyy - but only in the HTML-Output. This means: If someone posts "We show you xxx." then the browser will show "We show you yyy.", but if he presses "Edit post" the Editor (WYSIWYG and Text) will still give him "We show you xxx."
I tried different things, e.g. a Plug-In for bbcode_parse_complete:
$text = str_replace('xxx', 'yyy', $text);But this will change also the text for the editor.
How can I do this correct?
=> I don't need a plugin! This is a study for a more complex problem: Replace </br>-breaks with <p>-paragraphs which needs much more programming, since every [ code]...[ /code] needs his <p>...</p> etc.
Of course, if there exists allready a br-to-p-solution I'm even happier :).
Thanks for any help!
Bruno