Smiley button on the New Topic/Reply page? Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    Smiley button on the New Topic/Reply page?

    Wealh
    Wealh
    Forumember


    Posts : 69
    Reputation : 6
    Language : English

    In progress Smiley button on the New Topic/Reply page?

    Post by Wealh October 24th 2015, 10:02 am

    I want to add the smileys button on the New topic text editor. I don't want the smiley box outside the editor.

    http://boredom.iftopic.com/forum
    omarpop23
    omarpop23
    Forumember


    Male Posts : 182
    Reputation : 3
    Language : Arabic
    Location : Egypt

    In progress Re: Smiley button on the New Topic/Reply page?

    Post by omarpop23 October 24th 2015, 10:19 am

    Wealh
    Wealh
    Forumember


    Posts : 69
    Reputation : 6
    Language : English

    In progress Re: Smiley button on the New Topic/Reply page?

    Post by Wealh October 24th 2015, 10:40 am


    I want to add my website smileys, not those of Twitter, but thanks!
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Smiley button on the New Topic/Reply page?

    Post by Ange Tuteur October 24th 2015, 11:35 am

    Hi @Wealh,

    It's possible to do this by making a small modification to the editor. Go to Admin Panel > Modules > JavaScript codes management and create a new script with the following settings.

    Placement : In all the pages
    Code:
    (function() {
      document.write('<style type="text/css">div.posting-block{width:99%}</style>');

      $(function() {
        if (!document.getElementById('quick_reply') && $.sceditor && !/emoticon/.test(toolbar)) {
          var smile = document.getElementById('smiley-box');
          toolbar = toolbar.replace(/date/, 'emoticon,date');
       
          if (smile) smile.style.display = 'none';
        }
      });
    }());

    That should remove the box and add the button to the editor.