The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

how to add a chatbox so you can open it if your viewing a topic

View previous topic View next topic Go down

Solved how to add a chatbox so you can open it if your viewing a topic

Post by Kite Trojan on December 4th 2013, 3:34 am

So, how do you add a chatbox like on the bottom corner to a forum/ the right middle?







Last edited by Xnomejx on December 4th 2013, 10:48 pm; edited 1 time in total

Kite Trojan
Forumember

Male Posts : 823
Reputation : 19
Language : English

http://galacticda.forumotion.com/

Back to top Go down

Solved Re: how to add a chatbox so you can open it if your viewing a topic

Post by SLGray on December 4th 2013, 5:10 am



When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36701
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: how to add a chatbox so you can open it if your viewing a topic

Post by Kite Trojan on December 4th 2013, 5:24 am

I already tried this post, but after the Javascript part,it said it should appear, but it doesnt. I even placed it on the top of my CSS Stylesheet.

Kite Trojan
Forumember

Male Posts : 823
Reputation : 19
Language : English

http://galacticda.forumotion.com/

Back to top Go down

Solved Re: how to add a chatbox so you can open it if your viewing a topic

Post by Ange Tuteur on December 4th 2013, 7:03 am

Xnomejx wrote:I already tried this post, but after the Javascript part,it said it should appear, but it doesnt. I even placed it on the top of my CSS Stylesheet.
You placed the CSS within the stylesheet :
AP > Display > Colors > Stylesheet
Code:
/*Chatbox*/
  #chatButton{
  box-shadow:0px 10px 6px rgba(255,255,255, 0.2) inset, 0px -10px 6px rgba(0,0,0, 0.2) inset;
  padding:10px 20px 10px 20px;
  background-color:#257;
  border:1px solid #146;
  font-weight:bold;
  font-size:10px;
  z-index:999;
  color:#fff;
  }
  #chatButton:hover{
  cursor:pointer;
  color:#ff8;
  background-color:#368;
  }
  #chatBox iframe{
  z-index:999;
  border:none;
  height:50%;
  width:65%;
  }
and created a new script :
AP > Modules > Javascript codes management > create a new script
Code:
jQuery(document).ready(function(){
  jQuery('body').append('<span id="chatButton" title="Open/Close Chatbox">Open Chat</span><div id="chatBox"><iframe src="/chatbox/index.forum"></iframe></div>');
  jQuery('#chatBox').hide();
  jQuery('#chatButton').css('position', 'fixed').css('right', '0px').css('bottom', '0px');
  jQuery('#chatBox iframe').css('position', 'fixed').css('right', '10px').css('bottom', '45px');
  if(!document.getElementById('logout')){
  jQuery('#chatButton').hide();
  jQuery('#chatBox').hide();}
  jQuery('#chatButton').click(function(){
  jQuery('#chatBox').fadeToggle();
  });
  });
Name it, place it in all pages, save.

It should display unless you made a minor mistake?

Without the CSS it will still display, it is merely for dressing the texts up and a few other style changes.


Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: how to add a chatbox so you can open it if your viewing a topic

Post by Kite Trojan on December 4th 2013, 10:45 pm

NVM I just got it. Topic is locked.Smile

Kite Trojan
Forumember

Male Posts : 823
Reputation : 19
Language : English

http://galacticda.forumotion.com/

Back to top Go down

Solved Re: how to add a chatbox so you can open it if your viewing a topic

Post by SLGray on December 4th 2013, 11:34 pm

Topic Solved & Locked


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36701
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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