Latest topics
» [GAME] Count to 999 using odd numbers Van-Helsing Edition
by Van-Helsing Today at 16:03

» [GAME] Count to 1000 using even numbers Van-Helsing Edition
by Van-Helsing Today at 16:03

» [GAME] Count to One Million!
by Van-Helsing Today at 16:02

» [GAME] Count to 30 - Ange Edition
by Van-Helsing Today at 16:01

» Is there any new update for ForumActif Edge?
by Van-Helsing Today at 16:01

» Add a login popup for the toolbar
by Ape Yesterday at 17:26

» [GAME] Post a random picture
by SLGray Fri 22 Sep 2017, 19:23

» Topic'It
by Ange Tuteur Fri 22 Sep 2017, 10:06

» Topic'It
by SLGray Thu 21 Sep 2017, 15:52

» FM Themes
by SLGray Thu 21 Sep 2017, 15:51

» User - Made Creations
by SLGray Thu 21 Sep 2017, 15:50

» IconSkouliki
by skouliki Sun 17 Sep 2017, 11:05

» Awards
by Mr_Grande Sun 17 Sep 2017, 08:52

» Modify Category Tabs lead to a desired position and auto scroll click
by djblah Fri 15 Sep 2017, 14:56

» Display a preview of the user profile on hover
by Eiki Thu 14 Sep 2017, 02:38

Recent Tutorials
Who is online?
In total there are 14 users online :: 2 Registered, 0 Hidden and 12 Guests :: 1 Bot

djblah, Eslam Love

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

ForuMotion Popup ChatBox

View previous topic View next topic Go down

avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4688
Points : 9737
Reputation : 2332
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Tue 12 Nov 2013, 03:40

Hello forumers,

This tutorial will help you achieve a popup chatbox for the default ForuMotion ChatBox.

Installing

To start you must make sure that you have the default chatbox enabled so navigate to..
Administration Panel > Modules > Chatbox > Configuration

Activate the chatbox : yes and then click validate.

Now that the chatbox is activated we should apply the CSS for the basic style, so please navigate to..
Administration Panel > Display > Pictures and colors > Colors > CSS stylesheet

Paste the code below in your sheet and submit.
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:500px;
width:700px;
}
To adjust the colors of the button simply edit the background-color of #chatButton. To adjust the height and width modify the height and width properties of #chatBox iframe.

Now that you know how to modify the style you should be ready to edit when you're ready. Let's move on and apply the script for our chatbox.

navigate to..
Administration Panel > Modules > HTML & JAVASCRIPT > Javascript codes management > Create a new script

Title: Popup ChatBox
Placement: In all the pages (If you want the chatbox everywhere)
Javascript Code:
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();
});
});
When you're finished save the script and your chatbox should be available at the click of a button!

The result:

Clicking the 'Open Chat' button will show/hide the chatbox. If you want to modify the wording, say to another language all you need to do is edit this line:
Code:
jQuery('body').append('<span id="chatButton" title="Open/Close Chatbox">Open Chat</span><div id="chatBox"><iframe src="/chatbox/index.forum"></iframe></div>');

Lastly to modify the positioning edit this line:
Code:
jQuery('#chatButton').css('position', 'fixed').css('right', '0px').css('bottom', '0px');
jQuery('#chatBox iframe').css('position', 'fixed').css('right', '10px').css('bottom', '45px');
If you wish you can take the above out and use your CSS stylesheet to modify the positioning. This is to prevent users who forget to add CSS from messing up their forums layout, so the positioning is done within the script.

Thank you for reading, if you have any questions or comments please feel free to leave them. Enjoy!


Notice
Tutorial written by Ange Tuteur.
Reproduction not permitted without consent from the author.
avatar
SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 44
Posts : 2432
Points : 4689
Reputation : 286
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Sat 24 Dec 2016, 22:32

Even if you pick the do not show option, a link is added to the who's online content.

If you want to hide that link, you can add this to your CSS stylesheet.
Code:
 #wio_chatters {
    display: none;
  }

This is for #phpBB3 forums.

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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