1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Anyway to exclude specific text from smiley replacements?

Discussion in 'XenForo Questions and Support' started by Kevin, Sep 20, 2016.

  1. Kevin

    Kevin Well-Known Member

    Even if I have to change some hard-coding, is there a way of excluding specific text from being picked up by the smiley replacements?

    In particular, every time I try to write ST:DS9 it comes out as ST:DS9. D'oh! Rather than change the default 'big grin' replacement I'd rather jury rig it to skip that one particular text.
  2. Mike

    Mike XenForo Developer Staff Member

    I was going to say you could use plain tags, but you actually did that in your post... :)

    That's really the only option. There isn't anything automatic.
  3. Kevin

    Kevin Well-Known Member

    Mike, thanks. Any chance of there being a quick & dirty hard-coded edit I could do to exclude a specific string from being replaced?
  4. James

    James Well-Known Member

    Wondering if you could change the smiley regex to whole words only?
  5. Chris D

    Chris D XenForo Developer Staff Member

    I've got a cheat for you.

    Use the Censoring system.



    In the replacement, the ∶ character is a colon, but it's a slightly different colon - it's used in ratios. Somewhat indistinguishable but essentially the censoring happens before the smilie replacement so it prevents it from being rendered as a smilie.
    Kevin and Brogan like this.
  6. Kevin

    Kevin Well-Known Member

    Nice! I just tried it out and that works perfectly, thank you. :D
    Chris D likes this.

Share This Page