Ignore Smilies

Ignore Smilies

deur Farzana Khandia -
Getal antwoorde: 3
Can anybody tell me how to ignore smilies in dialogue please. eg i want to write a colon and right angle bracket glimlag but this is automatically converted to a smilie!
Gemiddeld van beoordelings: -
In antwoord op Farzana Khandia

Re: Ignore Smilies

deur Helen Foster -
Prentjie van Core developers Prentjie van Documentation writers Prentjie van Moodle HQ Prentjie van Particularly helpful Moodlers Prentjie van Plugin developers Prentjie van Testers Prentjie van Translators
Please try replacing the symbols with html entities i.e. replace < with &lt; and > with &gt;

If you come across any more symbols, or combinations of symbols, that won't display as you would wish, please check the W3Schools HTML 4.01 Entities Reference and HTML 7-BIT ASCII Reference.
Gemiddeld van beoordelings: -
In antwoord op Helen Foster

Re: Ignore Smilies

deur Farzana Khandia -

Thank you, but is there no simpler way? this could become quite cumbersome.

Gemiddeld van beoordelings: -
In antwoord op Farzana Khandia

Re: Ignore Smilies

deur Bill Burgos -
Hi Farzana,

I am not aware of a way to disable the smilies through the web interface. However, there is a code hack that seems to work. It will affect the whole Moodle installation.

I make no promises or guarantees about this. Try this at your own risk.

You need to access the weblib.php file under /moodle/lib/

Using an editor, you can look for around line 1469 text that reads:

/// this is the meat of the code - this is run every time
$text = str_replace($e, $img, $text);

Comment out the next line so that it reads:

/// this is the meat of the code - this is run every time
// $text = str_replace($e, $img, $text);

This will disable the smilies that will appear if you use a colon and closing parenthesis. It will not disable the smilies appearing in the HTML editor, so you can still put them in if you want. If you want the function to return, just uncomment out that line.

I am sure there there might be a more elegant way to do this, just an option.
Gemiddeld van beoordelings: -