by Alex Vanden Bosch.
Sorry for being a pain, but I'm having a little bit of trouble actually writing the code correctly.
Where would I put the code you put in your example above?
I tried this, but it didn't work:
<?php
class filter_helloworld extends moodle_text_filter {
public function filter($strings = array();
$strings['colour'] = 'color';
$strings['centre'] = 'center';) {
foreach ($strings as $string1 => $string2) {
$text = str_replace($string1, $string2, $text);
}
}
?>