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

XF 1.3 Can the strike-through button be moved back to being a button on the main toolbar?

Discussion in 'XenForo Questions and Support' started by CyclingTribe, Mar 17, 2014.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    After upgrading to XF 1.3 members are immediately complaining about the strike-through button being "hidden" - can it be put back as a single button in the toolbar (pre-1.3)?

    Thanks,
    Shaun
     
    Last edited: Mar 17, 2014
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You would have to edit the core files or have an add-on developed.
     
  3. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks. I don't suppose you know which core files need editing do you?
     
  4. CyclingTribe

    CyclingTribe Well-Known Member

    It seems C├ędric's add-on cannot make the strike-through (delete) button independent either; so if it can be done by editing a file or two then I'd be interested to know how to do it (@Mike)? ;)

    Thanks,
    Shaun :D
     
  5. Chris D

    Chris D XenForo Developer Staff Member

    Easiest way is to turn on uncompressed JavaScript in Admin CP > Options > Debug Options (requires debug mode to be enabled).

    upload_2014-3-17_16-32-45.png

    Then edit js/xenforo/full/bb_code_edit.js.

    Find:
    Code:
    buttons.push(['bold', 'italic', 'underline']);
    Replace:
    Code:
    buttons.push(['bold', 'italic', 'underline', 'deleted']);
    That adds the button back in addition to the existing button in the dropdown.

    It's possibly feasible with a small add-on too, but I haven't looked into it yet.

    You could also create it as a Custom BB Code using a different tag name. But the button won't be near the original location and it may cause confusion having multiple tags doing a similar thing.
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    Ah, actually, don't turn on debug and don't edit the full file.

    Instead edit js/xenforo/bb_code_edit.js.

    Find:
    Code:
    c.push(["bold","italic","underline"])
    Replace:
    Code:
    c.push(["bold","italic","underline","deleted"])
    And this is all assuming that I have remembered correctly that the strike through used to be next to B I U...
     
    Martok, CyclingTribe and Brogan like this.
  7. CyclingTribe

    CyclingTribe Well-Known Member


    Thanks @Chris D - I'll have a go at that later as I suspect that will satisy my members (it won't be an issue having it in the drop-down too). (y)
     
  8. CyclingTribe

    CyclingTribe Well-Known Member

    Yup: upload_2014-3-17_16-39-42.png (y)
     
  9. CyclingTribe

    CyclingTribe Well-Known Member

    Perfect - works a treat. Thanks Chris. (y)
     
  10. Martok

    Martok Well-Known Member

  11. Chris D

    Chris D XenForo Developer Staff Member

  12. Brogan

    Brogan XenForo Moderator Staff Member

    Real word.
     
    Amaury and Chris D like this.
  13. CyclingTribe

    CyclingTribe Well-Known Member

Share This Page