chat body
Reguli forum
Aveti o problema si vreti sa primiti ajutor? Click aici ! Nu uitati si de regulamentul forumului !
Aveti o problema si vreti sa primiti ajutor? Click aici ! Nu uitati si de regulamentul forumului !
- Anișor
- Mesaje: 2988
- Membru din: 08-Aug-2012, 20:46:05
- Versiune: 4.0.0-a1
- Ext: Da
- Server: UNIX/Linux
- Nivel phpBB: Experimentat
- Nivel php: Mediu
- Localitate: Arbroath, Angus
- Contact:
Re: chat body
Acela este Ajax chat.
Totul tine de html si css.
Totul tine de html si css.
Nu ofer ajutor prin intermediul mesageriei private.
Vă rog să postați toate problemele în forumuri.
Vă rog să postați toate problemele în forumuri.
-
- Utilizator înregistrat
- Mesaje: 103
- Membru din: 10-Dec-2012, 00:08:14
- Versiune: 3.0.5
- Ext: Nu
- Server: Windows
- Nivel phpBB: Mediu
- Nivel php: Mediu
Re: chat body
da eu stiu ca e ajax chat,dar eu anume vreau acel model daca puteti,ca eu nu ma ispravesk sa-l fac asa.multumesc
- Anișor
- Mesaje: 2988
- Membru din: 08-Aug-2012, 20:46:05
- Versiune: 4.0.0-a1
- Ext: Da
- Server: UNIX/Linux
- Nivel phpBB: Experimentat
- Nivel php: Mediu
- Localitate: Arbroath, Angus
- Contact:
Re: chat body
Pai macar ai incercat ? arata ce ai reusit pana acum.
Nu ofer ajutor prin intermediul mesageriei private.
Vă rog să postați toate problemele în forumuri.
Vă rog să postați toate problemele în forumuri.
-
- Utilizator înregistrat
- Mesaje: 103
- Membru din: 10-Dec-2012, 00:08:14
- Versiune: 3.0.5
- Ext: Nu
- Server: Windows
- Nivel phpBB: Mediu
- Nivel php: Mediu
Re: chat body
desigur ca am incercat dar nu se primeste
Cod: Selectaţi tot
<script type="text/javascript">
// <![CDATA[
var form_name = 'postform';
var text_name = 'message';
var fieldname = 'chat';
var last_time = 0;
var xmlHttp = http_object();
var last_id = 3221;
var type = 'receive';
var post_time = 1375674356;
var read_interval = 15000;
var interval = setInterval('handle_send("read", last_id);', read_interval);
function handle_send(mode, f)
{
if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)
{
indicator_switch('on');
type = 'receive';
param = 'mode=' + mode;
param += '&last_id=' + last_id;
param += '&last_time=' + last_time;
param += '&last_post=' + post_time;
param += '&read_interval=' + read_interval;
if (mode == 'add' && document.postform.message.value != '')
{
type = 'send';
for(var i = 0; i < f.elements.length; i++)
{
elem = f.elements[i];
param += '&' + elem.name + '=' + encodeURIComponent(elem.value);
}
document.postform.message.value = '';
}
else if (mode == 'delete')
{
type = 'delete';
param += '&chat_id=' + f;
}
xmlHttp.open("POST", './chat.php?sid=049e252e5c33602e3dec46755960bfa5', true);
xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttp.onreadystatechange = handle_return;
xmlHttp.send(param);
}
}
function handle_return()
{
if (xmlHttp.readyState == 4)
{
if (type != 'delete')
{
results = xmlHttp.responseText.split('--!--');
if (results[1])
{
if (last_id == 0)
{
document.getElementById(fieldname).innerHTML = results[0];
}
else
{
document.getElementById(fieldname).innerHTML = results[0] + document.getElementById(fieldname).innerHTML;
}
last_id = results[1];
if (results[2])
{
document.getElementById('whois_online').innerHTML = results[2];
last_time = results[3];
if (results[4] != read_interval * 1000)
{
window.clearInterval(interval);
read_interval = results[4] * 1000;
interval = setInterval('handle_send("read", last_id);', read_interval);
document.getElementById('update_seconds').innerHTML = results[4];
}
post_time = results[5];
}
}
}
indicator_switch('off');
}
}
function delete_post(chatid)
{
document.getElementById('p' + chatid).style.display = 'none';
handle_send('delete', chatid);
}
function indicator_switch(mode)
{
if(document.getElementById("act_indicator"))
{
var img = document.getElementById("act_indicator");
if(img.style.visibility == "hidden" && mode == 'on')
{
img.style.visibility = "visible";
}
else if (mode == 'off')
{
img.style.visibility = "hidden"
}
}
}
function http_object()
{
if (window.XMLHttpRequest)
{
return new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
return new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
document.getElementById('p_status').innerHTML = 'Status: Cound not create XmlHttpRequest Object. Consider upgrading your browser.';
}
}
function addText(instext)
{
var mess = document.getElementById('message');
//IE support
if (document.selection)
{
mess.focus();
sel = document.selection.createRange();
sel.text = instext;
document.message.focus();
}
//MOZILLA/NETSCAPE support
else if (mess.selectionStart || mess.selectionStart == "0")
{
var startPos = mess.selectionStart;
var endPos = mess.selectionEnd;
var chaine = mess.value;
mess.value = chaine.substring(0, startPos) + instext + chaine.substring(endPos, chaine.length);
mess.selectionStart = startPos + instext.length;
mess.selectionEnd = endPos + instext.length;
mess.focus();
}
else
{
mess.value += instext;
mess.focus();
}
}
// ]]>
</script>
<style type="text/css">
<!--
.box
{
width: 100%;
margin-left: auto;
margin-right: auto;
}
.shouts {
width: 100%;
height:250px;
overflow:auto;
}
#chat {
width: 99%;
text-align:left;
}
#message {
width: 65%;
}
#whois_online{
vertical-align:text-top;
text-align:left;
}
.online_img {
vertical-align:middle;
}
#act_indicator {
visibility:hidden;
}
.chatinput {
width:95% !important; margin-left:auto; margin-right:auto; height:50px;
}
-->
</style>
<div class="box">
<div class="inner">
<div class="titlebar">HeKer.Eu # Chat</div>
<div class="contents-no">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="75%" class="titlebar-chat" valign="top" style="height:150px;">
<div class="shouts">
<div id="chat">
</div>
</div>
</div>
</td>
<td width="25%" class="titlebarg" valign="top">
<form name="postform" id="postform" method="post" action="javascript:void(0);" onsubmit="handle_send('add', this)" autocomplete="off">
<input type="text" tabindex="1" name="message" id="message" class="inputbox chatinput" />
<br /><br />
<center>
<input class="button1" type="submit" name="submit" value="Trimite" />
<br /><br />
</center>
</form>
<br />
<br />
<br />
<br />
<div id="anunt">
*Nu folositi un limbaj vulgar pe chat.<br />
*Nu cereti ajutor pe chat.<br />
*Nu aveti voie sa faceti reclama pe chat.</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<br />
<br />
- Anișor
- Mesaje: 2988
- Membru din: 08-Aug-2012, 20:46:05
- Versiune: 4.0.0-a1
- Ext: Da
- Server: UNIX/Linux
- Nivel phpBB: Experimentat
- Nivel php: Mediu
- Localitate: Arbroath, Angus
- Contact:
Re: chat body
Puteai sa ne lasi un demo ...
Nu ofer ajutor prin intermediul mesageriei private.
Vă rog să postați toate problemele în forumuri.
Vă rog să postați toate problemele în forumuri.
-
- Utilizator înregistrat
- Mesaje: 103
- Membru din: 10-Dec-2012, 00:08:14
- Versiune: 3.0.5
- Ext: Nu
- Server: Windows
- Nivel phpBB: Mediu
- Nivel php: Mediu
Re: chat body
pai nu stiu cum sa fac un demo...
- Anișor
- Mesaje: 2988
- Membru din: 08-Aug-2012, 20:46:05
- Versiune: 4.0.0-a1
- Ext: Da
- Server: UNIX/Linux
- Nivel phpBB: Experimentat
- Nivel php: Mediu
- Localitate: Arbroath, Angus
- Contact:
Re: chat body
Link forum adica
si un cont de test.

Nu ofer ajutor prin intermediul mesageriei private.
Vă rog să postați toate problemele în forumuri.
Vă rog să postați toate problemele în forumuri.
-
- Utilizator înregistrat
- Mesaje: 103
- Membru din: 10-Dec-2012, 00:08:14
- Versiune: 3.0.5
- Ext: Nu
- Server: Windows
- Nivel phpBB: Mediu
- Nivel php: Mediu
Re: chat body
up cineva?
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 1 vizitator