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.

How to put FM Chat or other CHAT on ALL pages

3 posters

Go down

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
PrcBby
PrcBby
Forumember

Posts : 43
Reputation : 1
Language : english

Back to top Go down

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);
  };
});
Draxion
Draxion
Helper
Helper

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

https://www.talesoftellene.com/

Back to top Go down

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

Back to top Go down

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.
PrcBby
PrcBby
Forumember

Posts : 43
Reputation : 1
Language : english

Back to top Go down

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 :
Draxion
Draxion
Helper
Helper

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

https://www.talesoftellene.com/

Back to top Go down

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.
PrcBby
PrcBby
Forumember

Posts : 43
Reputation : 1
Language : english

Back to top Go down

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
Draxion
Draxion
Helper
Helper

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

https://www.talesoftellene.com/

Back to top Go down

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.
PrcBby
PrcBby
Forumember

Posts : 43
Reputation : 1
Language : english

Back to top Go down

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?
Draxion
Draxion
Helper
Helper

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

https://www.talesoftellene.com/

Back to top Go down

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.
PrcBby
PrcBby
Forumember

Posts : 43
Reputation : 1
Language : english

Back to top Go down

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.
Draxion
Draxion
Helper
Helper

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

https://www.talesoftellene.com/

Back to top Go down

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
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

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
PrcBby
PrcBby
Forumember

Posts : 43
Reputation : 1
Language : english

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum