• Page 1 of 1
  • 1
Forum moderator: Eriko  
Ok
New mini chat
lanh
Posts: 136
Reputation: 0

Message # 1 | 0:56 AM



A very practical, fast, good looking mini-chat at the bottom right of your site.

Features:

- Located in the lower right corner and very practical
- A nice look
- Fine opening / closing
- Send message by pressing Enter
- Sound notification for new entry
- VKontakte-like scrollbar
- Built-in emoticons
- Fast and easy moderation of messages

INSTALLATION GUIDE:

1. Upload the folders in the archive into your storage. For this I recommend FTP.

2. Control Panel >> Chat Box >> Module Setting. Allow Custom field 1 and Custom field 2.



3. Replace the Appearance of entries template for the Chat Box module with this:

Code
<?if($CUSTOM2$='active')?>  
<div class="msg">  
<div class="sb$PARITY$ comm_id$USER_ID$">  
<table cellspacing="0" cellpadding="0">  
<tr>  
<td id="av$USER_ID$" valign="top" width="36"><div class="av"><div>  
<a href="$PROFILE_URL$"><img src="$CUSTOM1$" alt="$USERNAME$" /></a></div></td>  
<td id="ms$USER_ID$" valign="top">  
<div class="us"><div class="pdvr"><span class="l_it"><a href="javascript:otbet('$USERNAME$')" class="otbv">Answer</a> |</span> <span title="$DATE$">$TIME$</span></div>  
<a href="$PROFILE_URL$">$USERNAME$</a></div>  
<div style="width:222px;overflow:hidden;margin-bottom:2px"<?if($NUMBER$='1')?> id="c_one"<?endif?>>$MESSAGE$</div>  
</td>  
</tr>  
</table>  
</div>  
</div>  
<?endif?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17


4. Replace the template content in the Form for adding new messages of Chat box module for this:
Code
<?if(!$USER_LOGGED_IN$)?>  
<?else?>  
<input type="hidden" name="custom1" class="mchat" id="mchatC1F" value="/images/noavatar.gif" />  
<input type="hidden" name="custom2" value="active" />  
<div align="left"><input type="text" name="mcmessage" class="mchat" id="mchatMsgF" maxlength="500" value="" /></div>  
<input type="submit" onclick="messages();setTimeout(function(){messages()},500)" value="Send" class="mchat2" id="mchatBtn" />  
<input type="hidden" name="email" value="bigblog@into.hu">  
<input style="display:none;" id="mchatAjax" type="button" value="Send" class="mchat2" disabled />  
<?endif?>
1
2
3
4
5
6
7


5. At the bottom part of the Website template, put the following code:
Code
<!--chat-->  
<script type="text/javascript" src="/chat_files/cookies.js"></script>  
<style type="text/css">  
#c_one_clon, #c_tell {position:absolute;top:-1500px}  
.chat_over {position:fixed;padding:5px;padding-top:0;z-index:9999;bottom:-202px;right:20px;text-align:center;background:rgba(0,0,0,0.6); border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;font-size:13px}  
#setting_chat {float:right;margin:5px;width:16px;height:16px;overflow:hidden}  
#setting_chat a {width:16px;height:16px;overflow:hidden;display:inline-block;background:url('/chat_files/cog_chat.png') 2px 2px no-repeat}  
#online_counter {float:right;color:#FFF;padding:5px;padding-left:16px;background:url('/chat_files/user_16.png') 0px 9px no-repeat;cursor: pointer}  
#bottom_chat {text-align:left;display:none;padding:5px;color:#FFFFFF;cursor: pointer}  
#top_chat {text-align:left;padding:5px;color:#FFFFFF;cursor: pointer}  
.ngd {cursor:default; background:#FFF; padding:5px; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}  
.pdvr {float:right}  
.clkg {width:288px;padding:5px;padding-bottom:6px;border:1px solid #EAEAEA;background:#EAEAEA;color:#000;text-align:left;border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}  
#wrapper2 .comm {margin-top:0;margin-left:0px;}  
.sb1, .sb2 {margin-bottom:5px;padding:4px;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;}  
.cs2 {margin-top:3px;color:#E32F17;font-size:10px}  
.cs1 {margin-top:3px;color:#2B2B2B;font-size:10px}  
.chtt iframe {display:none}  
.mchat {width:250px}  
.chtt {margin-top:5px}  
#mchatMsgF {margin:0;width:300px;padding:5px;padding-right:53px;border:1px solid #FFFFFF;background:#FFFFFF; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}  
#mchatBtn {position:absolute;top:-1200px}  
#mchatAjax {background:#646464;position:absolute;right:-200px}  
.ch_sml {z-index:9;display:none;margin-top:-106px;margin-left:128px;position:absolute;padding:5px;background:rgba(0,0,0,0.7);border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}  
.ch_smlin {width:157px;height:91px;background:#FFFFFF;overflow:hidden;text-align:left;border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}  
.ch_smlin img {padding-left:3px;padding-top:3px;float:left;cursor:pointer;transition: all linear .2s; -moz-transition: all linear .2s; -webkit-transition: all linear .2s; -o-transition: all linear .2s;}  
.ch_smlin img:hover { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter: alpha(opacity=70); -moz-opacity: 0.7; -khtml-opacity: 0.7; opacity: 0.7; }  
.smile_in {cursor:pointer;width:19px;height:19px;overflow:hidden;background:url('/chat_files/smile_open.gif');z-index:3;position:absolute;margin-left:276px;margin-top:8px;transition: all linear .2s;-moz-transition: all linear .2s; -webkit-transition: all linear .2s; -o-transition: all linear .2s}  
.smile_in:hover {-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter: alpha(opacity=70); -moz-opacity: 0.7; -khtml-opacity: 0.7; opacity: 0.7; }  
.otbv, .otbv:hover {color:#6A6A6A}  
.sound_on {margin-top:9px;margin-left:252px;width:19px;height:19px;background:url('/chat_files/sound_on.gif');position:absolute;cursor:pointer}  
.sound_off {margin-top:9px;margin-left:252px;width:19px;height:19px;background:url('/chat_files/sound_off.gif');display:none;position:absolute;cursor:pointer}  
.precat {float:right;margin-left:10px;margin-bottom:10px}  
#wrapper2 {background:#FFF;width: 290px;height: 200px;overflow: auto;}  
#scroller {text-align:left; width:270px; padding:0}  
.comm {margin-left:6px;margin-top:10px}  
.comm .us {color:#646464;font-size:10px;margin-top:-2px;padding:0}  
.comm .av {margin-right:10px;width:28px;height:28px;overflow:hidden;background:#666666}  
.comm .av img {width:28px}  

/* jscrollpane */  

.jspContainer{overflow: hidden;position: relative;}  
.jspPane {position: absolute}  
.jspVerticalBar {position: absolute; top: 0; right: 0; width: 8px; height: 100%; background:rgba(255,255,255,0);}  
.jspHorizontalBar{position: absolute; bottom: 0; left: 0; width: 100%; height: 8px;background:rgba(255,255,255,0)}  
.jspVerticalBar *, .jspHorizontalBar * {margin: 0;padding: 0}  
.jspCap {display: none;}  
.jspHorizontalBar .jspCap {float: left;}  
.jspTrack {background:rgba(255,255,255,0); position: relative;}  
.jspDrag {background:rgba(0,0,0,0.4);position: relative; top: 0;left: 0;cursor: pointer; border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;transition: all linear .2s; -moz-transition: all linear .2s;-webkit-transition: all linear .2s; -o-transition: all linear .2s;}  
.jspDrag:hover {background:rgba(0,0,0,0.6);}  
.jspDrag:active {background:rgba(0,0,0,0.8);}  
.jspHorizontalBar .jspTrack, .jspHorizontalBar .jspDrag {float: left;height: 100%;}  
.jspArrow {background: #50506d; text-indent: -20000px; display: block; cursor: pointer;}  
.jspArrow.jspDisabled{cursor: default;background: #80808d}  
.jspVerticalBar .jspArrow {height: 16px;}  
.jspHorizontalBar .jspArrow {width: 16px; float: left; height: 100%;}  
.jspVerticalBar .jspArrow:focus{outline: none;}  
.jspCorner{background: #eeeef4;float: left;height: 100%}  
* html .jspCorner {margin: 0 -3px 0 0}  
</style>  

<script type="text/javascript" src="/chat_files/jquery.jscrollpane.js"></script>  
<script type="text/javascript" src="/chat_files/jquery.mousewheel.js"></script>  

<script type="text/javascript">jQuery(function() {jQuery('#wrapper2').jScrollPane({hideFocus:true});})</script>  

<div class="chat_over"<?if($USER_AGENT_PDA$)?> style="display:none"<?endif?>>  
<?if($GROUP_ID$="4" or $GROUP_ID$="3")?><div id="setting_chat"><a href="javascript://" rel="nofollow" onclick="window.open('/mchat/0-1','mchatCtrl','scrollbars=1,width=550,height=550,left=0,top=0');return false;" title="Setting"></a></div><?endif?>  
<?if($MODULE_ID$!='forum')?><div id="online_counter" onclick="open_oline_list()"><?substr($ONLINE_COUNTER$, 48, strrpos($ONLINE_COUNTER$,"onl2")-48-36)?></div><?endif?>  
<div id="bottom_chat" onclick="hide_chat()">Hide chat</div><div id="top_chat" onclick="show_chat()">Open chat</div>  
<div id="cht" onclick="show_chat()"><div class="ngd"><div id="wrapper2" class="scroll-pane"><div id="scroller" class="comm"></div></div></div>  

<?if($USER_LOGGED_IN$)?>  
<div class="ch_sml">  
<div class="ch_smlin">  
<img src="http://yraaa.ru/smiles/smile.gif" onclick="smiles(':)')" alt="" />  
<img src="http://yraaa.ru/smiles/wink.gif" onclick="smiles(';)')" alt="" />  
<img src="http://yraaa.ru/smiles/laugh.gif" onclick="smiles(':D')" alt="" />  
<img src="http://yraaa.ru/smiles/cool.gif" onclick="smiles('B)')" alt="" />  
<img src="http://yraaa.ru/smiles/sad.gif" onclick="smiles(':(')" alt="" />  
<img src="http://yraaa.ru/smiles/cry.gif" onclick="smiles(':cry:')" alt="" />  
<img src="http://yraaa.ru/smiles/care.gif" onclick="smiles('^_^')" alt="" />  
<img src="http://yraaa.ru/smiles/tease.gif" onclick="smiles(':p')" alt="" />  
<img src="http://yraaa.ru/smiles/shock.gif" onclick="smiles('%)')" alt="" />  
<img src="http://yraaa.ru/smiles/angel.gif" onclick="smiles('0:)')" alt="" />  
<img src="http://yraaa.ru/smiles/kiss.gif" onclick="smiles(':*')" alt="" />  
<img src="http://yraaa.ru/smiles/angry.gif" onclick="smiles('>(')" alt="" />  
<img src="http://yraaa.ru/smiles/fools.gif" onclick="smiles(':fools:')" alt="" />  
<img src="http://yraaa.ru/smiles/geek.gif" onclick="smiles(':geek:')" alt="" />  
<img src="http://yraaa.ru/smiles/hay.gif" onclick="smiles(':hay:')" alt="" />  
<img src="http://yraaa.ru/smiles/love.gif" onclick="smiles(':love:')" alt="" />  
<img src="http://yraaa.ru/smiles/meow.gif" onclick="smiles(':meow:')" alt="" />  
<img src="http://yraaa.ru/smiles/notguilty.gif" onclick="smiles(':notguilty:')" alt="" />  
<img src="http://yraaa.ru/smiles/oh.gif" onclick="smiles(':oh:')" alt="" />  
<img src="http://yraaa.ru/smiles/please.gif" onclick="smiles(':please:')" alt="" />  
<img src="http://yraaa.ru/smiles/ill.gif" onclick="smiles(':ill:')" alt="" />  
<img src="http://yraaa.ru/smiles/gift.gif" onclick="smiles(':gift:')" alt="" />  
<img src="http://yraaa.ru/smiles/ball.gif" onclick="smiles(':ball:')" alt="" />  
<img src="http://yraaa.ru/smiles/heart.gif" onclick="smiles(':heart:')" alt="" />  
<img src="http://yraaa.ru/smiles/like.gif" onclick="smiles(':like:')" alt="" />  
<img src="http://yraaa.ru/smiles/computer.gif" onclick="smiles(':comp:')" alt="" />  
<img src="http://yraaa.ru/smiles/phone.gif" onclick="smiles(':phone:')" alt="" />  
<img src="http://yraaa.ru/smiles/mail.gif" onclick="smiles(':mail:')" alt="" />  
</div></div>  
<?if($GROUP_ID$='1_000' || $GROUP_ID$='2_000' || $GROUP_ID$='255_000')?><?else?>  
<div class="smile_in" onclick="opnsml()"> </div>  
<div class="sound_on" onclick="sound_off()" title="Sound off"> </div><div class="sound_off" onclick="sound_on()" title="Sound on"> </div>  
<?endif?>  
<?endif?>  
<div class="chtt"><?if(!$USER_LOGGED_IN$)?><div class="clkg">Please log in or register</div><?else?>$CHAT_BOX$<?endif?></div></div>  
<div id="c_one_clon">0</div><div id="c_tell"></div>  
</div>  

<script type="text/javascript">  
function open_oline_list() {new _uWnd('UserList','Online',240, 152,{autosize:0,resize:0,notaskbar:1,fadetype:2,fadespeed:500,fadeclosetype:1,fadeclosespeed:500,align:'left'},'<fieldset class="sortUserlist"><legend>List:</legend><div>$ONLINE_COUNTER$</div></fieldset>');}  
function otbet(xt) {$('#mchatMsgF').val(''+xt+', ');$('#mchatMsgF').focus()}  
function opnsml() {$('.ch_sml').slideToggle(200)}  
function smiles(tx) {  
$('#mchatMsgF').val($('#mchatMsgF').val()+' '+tx+' ')  
$('#mchatMsgF').focus()  
$('.ch_sml').slideToggle(200)  
}  
function show_chat() {  
$('.chat_over').animate({bottom:'20px'},200)  
$('#top_chat').fadeOut(200,function(){$('#bottom_chat').fadeIn(200)})  
setCookie('chat', '1', 10, "/")}  
function hide_chat() {  
$('.chat_over').animate({bottom:'-203px'},200)  
$('#bottom_chat').fadeOut(200,function(){$('#top_chat').fadeIn(200)})  
setCookie('chat', '0', 10, "/")}  
function show_profile(nmm) {  
document.location.href='/index/8-'+nmm  
}  

function sound_on() {  
$('.sound_off').fadeOut(200, function(){$('.sound_on').fadeIn(200)});setCookie('musics', 'on', 10, "/")  
}  

function sound_off() {  
$('.sound_on').fadeOut(200, function(){$('.sound_off').fadeIn(200)});setCookie('musics', 'off', 10, "/")  
}  

musics = getCookie('musics')  
if(musics == 'off') {$('.sound_off').show();$('.sound_on').hide()}  

function messages() {  
$.get('/mchat/', function(dt){  
<?if($USER_LOGGED_IN$)?><?if($GROUP_ID$!='1_000' || $GROUP_ID$!='2_000' || $GROUP_ID$!='255_000')?>if($('#c_one_clon').html() != $('#c_one', dt).html() && $('#c_one_clon').html() != '0' && $('#c_one_clon').html() != '' && getCookie('musics') != 'off') {$('#c_tell').html('<embed src="/chat_files/audioplayer.swf" flashvars="file=/chat_files/n.mp3&startplay=true" wmode="opaque" width="90" height="8"></embed>');setTimeout(function(){$('#c_tell').html('')},2000)}<?endif?><?endif?>  
setTimeout(function(){$('#c_one_clon').html($('#c_one', dt).html())},2100)  
$('#scroller').html($('div.msg', dt).after());  
setTimeout(function(){$('#wrapper2').fadeIn(200);jQuery('#wrapper2').jScrollPane()},200)  
$('.comm_id$USER_ID$').css('background','#ecf2f6');$('.comm_id$USER_ID$ .l_it').hide();  
});  
$('#mchatC1F').val('<?if($USER_AVATAR_URL$)?>$USER_AVATAR_URL$<?else?>/chat_files/noavatar.gif<?endif?>');  
setTimeout(function(){messages()},20000);  
}  
messages();  
chtcc = getCookie('chat');  
if(chtcc == '1') {$('.chat_over').css('bottom', '20px');$('#top_chat').hide();$('#bottom_chat').show()}  
</script>  
<!--/chat-->
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189


OPTIONAL: SETUP OF SOUND LIST.

The following are the parameters (file name - emoticon):
Code
- smile.gif - <img src="http://s32.ucoz.net/sm/10/smile.gif" border="0" align="absmiddle" alt="smile" />  
  - wink.gif - <img src="http://s32.ucoz.net/sm/10/wink.gif" border="0" align="absmiddle" alt="wink" />  
  - laugh.gif - <img src="http://s32.ucoz.net/sm/10/biggrin.gif" border="0" align="absmiddle" alt="biggrin" />  
  - cool.gif - <img src="http://s32.ucoz.net/sm/10/cool.gif" border="0" align="absmiddle" alt="cool" />  
  - sad.gif - <img src="http://s32.ucoz.net/sm/10/sad.gif" border="0" align="absmiddle" alt="sad" />  
  - cry.gif - ;'(  
  - care.gif - <img src="http://s32.ucoz.net/sm/10/happy.gif" border="0" align="absmiddle" alt="happy" />  
  - tease.gif - <img src="http://s32.ucoz.net/sm/10/tongue.gif" border="0" align="absmiddle" alt="tongue" />  
  - shock.gif - <img src="http://s32.ucoz.net/sm/10/wacko.gif" border="0" align="absmiddle" alt="wacko" />  
  - angel.gif - 0:)  
  - kiss.gif - :*  
  - angry.gif - <img src="http://s32.ucoz.net/sm/10/angry.gif" border="0" align="absmiddle" alt="angry" />  
  - fools.gif - :fools:  
  - geek.gif - :geek:  
  - hay.gif - :hay:  
  - love.gif - :love:  
  - meow.gif - :meow:  
  - notguilty.gif - :notguilty:  
  - oh.gif - :oh:  
  - please.gif - :please:  
  - ill.gif - :ill:  
  - gift.gif - :gift:  
  - ball.gif - :ball:  
  - heart.gif - :heart:  
  - like.gif - :like:  
  - computer.gif - :computer:  
  - phone.gif - :phone:  
  - mail.gif - :mail:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27


This post is translated from here: http://ucoztaska.hu/szkriptek/alulrol-nyilo-stilusos-mini-chat
Language in Chat is also translated to English.

Post edited by lanh - Wednesday, 2017-11-08, 1:04 AM
Staryte
Posts: 55
Reputation: 0

Message # 2 | 3:58 PM
Very nice one although I need help in the following please:

In mobile I dont see the chat box.. how can I implement this?
Post edited by Staryte - Saturday, 2017-11-11, 4:32 PM
lanh
Posts: 136
Reputation: 0

Message # 3 | 6:55 AM
This script is not created by me but as I know this script does not work on mobile phone.
joexyz
JOE-vascript
Posts: 1768
Reputation: 78

Message # 4 | 9:36 AM
thank you for your contribution to translating this!

here's an improved version of the chat: http://ucoztaska.hu/szkriptek/vadonatuj-mini-chat

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
Ok
  • Page 1 of 1
  • 1
Search:
Support
Need help? Contact our support team via the contact form or email us at support@ucoz.com.
This site uses cookies for better user experience. By continuing to browse the site you agree to the Cookie Policy.