How to suppress smiley conversion (once!)

How to suppress smiley conversion (once!)

by Howard Miller -
Number of replies: 16
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm typing in some text and add ( h ) (buth without the spaces) and, of course, I get heart. I don't want to heart though... I want the "h" in brackets.

How?

I tried a variety of things, including replacing the brackets with entities. However, with the HTML editor on anyway, entities don't seem to work. Any offers?

EDIT:
Oooh... does everybody see the interesting bug? There's an anchor tag instead of an img tag!!
Average of ratings: -
In reply to Howard Miller

Re: How to suppress smiley conversion (once!)

by Marc Grober -
You want the editor NOT to interpret the emoticon but without editing the htmleditor table from Site Admin? One thing you might try..... use an international keyboard to insert an h something where the something does not appear or is a bit off, like a :-Ðinstead of big grin

Frankly, Howard, why dont you just change the emoticons ?
In reply to Howard Miller

Re: How to suppress smiley conversion (once!)

by Mauno Korpelainen -

Filter bug ...:

Yes , No and heart

$$($$y$$)$$ , $$($$n$$)$$ and $$($$h$$)$$

$ $ ( $ $ n $ $ ) $ $ ,  $ $ ( $ $ n $ $ ) $ $ and  $ $ ( $ $ h $ $ ) $ $

yes  , no and heart

In reply to Mauno Korpelainen

Re: How to suppress smiley conversion (once!)

by Marc Grober -
I had a similar thought, but assumed that Howard, as a techie, might be using tex or asciimathml in his writing.... and trying to implement such a solution could become mind bending in that case..... so I turned to alternate characters for (, ), or h.... but it really comes back to the same point.... why do acrobatics trying to retain emoticons as installed as opposed to either turning them off completely or altering the codes. In my Moodles I change thumbsup to (yy) which one is not likely to see anywhere, though my son actually suggested (ja) und (nein). (yy), (nn) and (hh) are all easier then replacing than the copntortions required to avoid same (and one could hack the code to exclude a specific font from interpretation as an emoticon.... wouldnt that be dandy - LOL')
In reply to Mauno Korpelainen

Re: How to suppress smiley conversion (once!)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Marc and Mauno,

Thanks for the thoughts guys, but this is all insane. There *should* be some way to suppress emoticon conversion without turning it off completely. It's a strange omission.
In reply to Howard Miller

Re: How to suppress smiley conversion (once!)

by Marc Grober -
Howard,

What you will see here is a smiley face, but I entered the colin paren in html so the editor did not insert the image tag and when I look at the markup in html the image tag is not there, but it was displayed as smiley face nonetheless

smile

Compare that to this situation, where the smiley face is added with the htmlarea gui

evil



In reply to Marc Grober

Re: How to suppress smiley conversion (once!)

by Julian Ridden -
Sorry, was just trilling an idea. It didn't work and thus I now have nothing I can add to this conversation.
In reply to Howard Miller

Re: How to suppress smiley conversion (once!)

by Mauno Korpelainen -

Peter Jipsen and David Lippman have used in their asciimathml editor plugins http://www.imathas.com/editordemo/demo.html ( I will try to get the modified moodle 2.0 version ready before Christmas) a smart way to show different content according to span tags AM and AMedit and we have also Nolink button in HTMLArea that adds <span class="nolink"> to prevent IE creating automatic links to addresses.

It may get too complex to build similar spans to moodle just for single text smileys - to be able to suppress single smiley tags like $$($$y$$)$$ instead of yes but it is possible...

In reply to Howard Miller

Re: How to suppress smiley conversion (once!)

by Robin Mullins -

Ladies & Gents,

I'm "just a user" creating a couse.  Can someone tell me how to turn smileys off course wide.  They cause me nothing but trouble.

Robin-

In reply to Robin Mullins

Re: How to suppress smiley conversion (once!)

by Mauno Korpelainen -

That's one part of this problem - you can't do it. You can change them anyway site wide from

Administration -> Appearance -> HTML editor

In reply to Mauno Korpelainen

Re: How to suppress smiley conversion (once!)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That should be easy enough:

http://tracker.moodle.org/browse/MDL-17324
In reply to Howard Miller

Re: How to suppress smiley conversion (once!)

by Mauno Korpelainen -

I voted for it - most people seem to like editors and can use image smiley plugins.

Attachment smiley17.gif
In reply to Howard Miller

Re: How to suppress smiley conversion (once!)

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The "designed" way is to use Moodle plain text format (you'll need to switch the editor off to see that menu though) because that format is not subject to filtering and re-formatting.:

  :-)  :-D  (y) (n) (h)

In reply to Martin Dougiamas

Re: How to suppress smiley conversion (once!)

by Mauno Korpelainen -
It helps on forums but plain text format is not available in labels and most other activities that get always filtered...mixed
In reply to Mauno Korpelainen

Re: How to suppress smiley conversion (once!)

by Mauno Korpelainen -
It's really hard to use them at the same time. If you select "When editing text - Use standard web forms" from your profile, start a new post (or edit old post), select Plain text format you get smileys as (y), (n) and (h) and can enter maths etc but can't use images because they are shown as tags like this:

<img title="smile" alt="smile" src="http://moodle.org/pix/s/smiley.gif" />

Using only image smileys from plugin and changing text smileys from administration menu help too but to be able to use text smileys you should know them (heart), (martin), () egg, xx-P dead ...

Smileys like :) - (n) - () - (y) - (h) cause a lot of trouble if you try to write mathematical equations and I have also changed most default smileys from administration menu.
In reply to Martin Dougiamas

Re: How to suppress smiley conversion (once!)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The bit of information I forgot to mention was this is actually in Feedback. You only get a basic text box to add the question text (no options). That must be filtered when displayed. Maybe it's simply a matter for Feedback, but I'm surprised that there is no way of escaping these. Even if it's arcane it would be there if you needed it.
In reply to Howard Miller

Re: How to suppress smiley conversion (once!)

by Mauno Korpelainen -

One possible solution (and maybe easier to create than spans) could be a simple filter that would actually output the opposite than smiley filters

For example writing //(y//) could do the job...

Edit: ... or is <span class="nofilters"> better - to output always plain text inside selected span tags and to avoid smiley, tex etc filters when editor & html format is used ??? Even <pre>...</pre> fail to avoid smiley conversion.