How to put FM Chat or other CHAT on ALL pages 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

    How to put FM Chat or other CHAT on ALL pages

    PrcBby
    PrcBby
    Forumember


    Posts : 43
    Reputation : 1
    Language : english

    How to put FM Chat or other CHAT on ALL pages Empty How to put FM Chat or other CHAT on ALL pages

    Post by PrcBby September 28th 2019, 6:16 pm

    I know this was addressed in other topics that are locked, but the proposed solutions aren't working for me. Maybe they are too old and don't work with forumotion's current coding?

    I would like to put the Chat Box or another chat on top of ALL the pages of my forum so when people are browsing through the forum posts, they can still participate on chat. I have been trying for several years to remedy this.

    www.dinardaily.net
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by Draxion September 28th 2019, 6:23 pm

    Hi there, this should do the trick.

    ACP(Admin Control Panel) > Modules > HTML & JAVASCRIPT > Javascript codes management > Javascript Codes

    Title: Popup Chatbox
    Placement: All pages
    Code:
    $(function() {
      if (_userdata.session_logged_in == 0) return;
      var chat = document.createElement('IFRAME'), bouton = document.createElement('DIV'), frame;
      chat.src = '/chatbox/index.forum';
      chat.setAttribute('style','width:700px;height:350px;display:none;border:1px solid #666;position:fixed;bottom:40px;right:0;z-index:99999;');
      bouton.innerHTML = 'Chat (0)';
      bouton.setAttribute('style','cursor:pointer;position:fixed;bottom:0;right:0;padding:5px 10px;border:1px solid #666;background:#333;color:#FFF;z-index:99999;');
      document.body.appendChild(bouton);
      document.body.appendChild(chat);
     
      bouton.onclick = function() {
        if (/none/.test(chat.style.display)) chat.style.display = 'block';
        else chat.style.display = 'none';
      };
      chat.onload = function() {   
        if (chat.contentDocument) frame = chat.contentDocument;
        else if (chat.contentWindow) frame = chat.contentWindow.document;
        var memb_thn = frame.getElementById('chatbox_members').getElementsByTagName('LI').length, memb_now = memb_thn, a = frame.getElementsByTagName('A');
        bouton.innerHTML = 'Chat ('+memb_thn+')';
        for (i=0; i<a.length; i++) if (/archives/.test(a[i].href)) a[i].onclick = function() { window.clearInterval(_refresh) };
        _refresh = window.setInterval(function() {memb_now = frame.getElementById('chatbox_members').getElementsByTagName('LI').length;if (memb_now > memb_thn || memb_now < memb_thn) {memb_thn = memb_now;bouton.innerHTML = 'Chat ('+memb_now+')'}},1);
      };
    });
    PrcBby
    PrcBby
    Forumember


    Posts : 43
    Reputation : 1
    Language : english

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by PrcBby September 28th 2019, 6:24 pm

    WOW ! That was a FAST Reply - I will go try it now
    PrcBby
    PrcBby
    Forumember


    Posts : 43
    Reputation : 1
    Language : english

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by PrcBby September 28th 2019, 6:31 pm

    No, I am sorry. That didn't work.
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by Draxion September 28th 2019, 6:31 pm

    PrcBby wrote:No, I am sorry.  That didn't work.  

    Did you be sure the JavaScripts are enabled?

    ACP(Admin Control Panel) > Modules >  HTML & JAVASCRIPT > Javascript codes management > Javascript Codes > Enable Javascript code management :
    PrcBby
    PrcBby
    Forumember


    Posts : 43
    Reputation : 1
    Language : english

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by PrcBby September 28th 2019, 6:36 pm

    Yes, I did.
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by Draxion September 28th 2019, 6:38 pm

    Hmm, that may be outdated for your forum version. You could try this as well. It adds the chatbox to the toolbar.

    https://help.forumotion.com/t143414-add-the-chatbox-to-your-toolbar?highlight=chatbox
    PrcBby
    PrcBby
    Forumember


    Posts : 43
    Reputation : 1
    Language : english

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by PrcBby September 28th 2019, 6:42 pm

    No, that isn't quite what I am looking for. I want an always open Chat Box on Top that stays on each page.
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by Draxion September 28th 2019, 6:44 pm

    PrcBby wrote:No, that isn't quite what I am looking for.  I want an always open Chat Box on Top that stays on each page.

    So you don't want a chatbox that collapses, basically hides and is visible upon being clicked on?
    PrcBby
    PrcBby
    Forumember


    Posts : 43
    Reputation : 1
    Language : english

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by PrcBby September 28th 2019, 6:45 pm

    No, not really.
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by Draxion September 28th 2019, 6:47 pm

    PrcBby wrote:No, not really.

    Alright, I have an idea. Give me a moment to develop it.
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15383
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by skouliki September 28th 2019, 7:17 pm

    PrcBby wrote:WOW ! That was a FAST Reply - I will go try it now

    PrcBby wrote:No, I am sorry.  That didn't work.  

    Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!
    Please read our forum rules:  ESF General Rules

    PrcBby
    PrcBby
    Forumember


    Posts : 43
    Reputation : 1
    Language : english

    How to put FM Chat or other CHAT on ALL pages Empty Re: How to put FM Chat or other CHAT on ALL pages

    Post by PrcBby October 2nd 2019, 9:39 pm

    Hello @Draxion. I was wondering how that code was going to embed the forumotion chatbox on ALL PAGES. Smile Smile