Please help me how to make the function
Chat System> 19:29am
methos enterd
who know how to add this function ??
special example from
Started on the old forum in February 2008 · view the original in the archive · old links redirect here
Please help me how to make the function
Chat System> 19:29am
methos enterd
who know how to add this function ??
special example from
Easy! When u enter in chat room click SAY then type "Silence enter in the room" and click SUBMIT! and there u have...lol
haha alesh .. you make me laugh External image (may be gone) ..
urm amy ..
you have the function ??
can teach me how ?
edit this part in core in the add to chat function
$res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'");
if($res)
{
$msg = getnick_uid($uid)."enter the room"; mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', userid='0', text='".$msg."'");
}
else
{
//just update the chonline list
}
dont remember if time sent is the correct field name anyways after doing that ....in the chat room when fetching the items from ibwf_chat
eg $sql = mysql_query("SELECT userid,timesent,text FROM ibwf_chat");
while($item = mysql_fetch_array($sql))
{
if($item[0]=='0')
{
$item[0]="chat_system";
echo $item[0].$item[1].$item[2];
}
else
{
//print the items
}
that work a 100 percent when i use to use the lava script
PHP Adovocate B)
$res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); if($res) { $msg = getnick_uid($uid)."enter the room"; mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', userid='0', text='".$msg."'"); } else { //just update the chonline list }
you mean what code to put
//just update the chonline list
??
can give the example ??
and
$sql = mysql_query("SELECT userid,timesent,text FROM ibwf_chat"); while($item = mysql_fetch_array($sql)) { if($item[0]=='0') { $item[0]="chat_system"; echo $item[0].$item[1].$item[2]; } else { //print the items }
put where ?
here my addtochat
function addtochat($uid, $rid) { $timeto = 120; $timenw = time(); $timeout = $timenw - $timeto; $exec = mysql_query("DELETE FROM ibwf_chonline WHERE lton<'".$timeout."'"); $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); if(!$res) { mysql_query("UPDATE ibwf_chonline SET lton='".time()."', rid='".$rid."' WHERE uid='".$uid."'"); } }
function addtochat($uid, $rid) { $timeto = 120; $timenw = time(); $timeout = $timenw - $timeto; $exec = mysql_query("DELETE FROM ibwf_chonline WHERE lton<'".$timeout."'"); $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); if($res) { $msg = getnick_uid($uid)."enter the room"; mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', userid='0', text='".$msg."'"); } }
mate is nt working wen i ryt cht msg its hide
no its working, u can check it here http://bdfun.co.cc/wap
This topic gave me many new ideas! External image (may be gone) Now you can also add "user left chatroom!" kinda stuff. And even you can add "user is trashed" "user is banned" Oh and my favorite function "user has been kicked" And now you can add, Invite user option. ANd can also Add invite user to private chat option. And maybe you can also add a function like mig33, where users can Vote to kick a user out of the chatroom! lol why am i sharing all these ideas hehe
please tell me code to put the chatroom title on the chat.php of rw? it dont show room name in the title after u enter the chatroom External image (may be gone)
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
so where is the solution??u all r talking rubbish..!!
Solution like code has been posted here by mckeny very very nicely,but as you are a copier and paster and shit in coding, you cant see the solution where the solution is wandering around you. External image (may be gone)
External image (may be gone) whats the point ? nobody write the corect code ... write it ... and dont be so rude ..dude... External image (may be gone)
hmmm rukiya has done what i said and its working at his site
options , refresh
Inbox(1 /1)
chat_system » 20.58.52
mc_keny enters the room
Who's Inside(1)
Chatrooms
Home
the vote to kick user is easy... after a person start the kick i insert the user in a table call mc_kick and set kick time to 1 then check in the table WHERE useR has been kicked once if yes the chat system says a kick war has been started by mc_keny need 4 more vote,...untill its equal to 5 .. chat system says learner has been kicked out the room...php is so easy if you got interest and is determin to
learn ...pride is what thought me php i got so many pride i hate the idea of asking for help....i prefer stay a hour on the one error untill i solve it .. External image (may be gone) now i code anything as long as its possible.
.
PHP Adovocate B)
where is the code?this? :
$res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); if($res) { $msg = getnick_uid($uid)."enter the room"; mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', userid='0', text='".$msg."'"); } else { //just update the chonline list } dont remember if time sent is the correct field name anyways after doing that ....in the chat room when fetching the items from ibwf_chat eg $sql = mysql_query("SELECT userid,timesent,text FROM ibwf_chat"); while($item = mysql_fetch_array($sql)) { if($item[0]=='0') { $item[0]="chat_system"; echo $item[0].$item[1].$item[2]; } else { //print the items }
i have put in my addtochat function :
function addtochat($uid, $rid) { $timeto = 120; $timenw = time(); $timeout = $timenw - $timeto; $exec = mysql_query("DELETE FROM ibwf_chonline WHERE lton<'".$timeout."'"); $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'");
if(!$res) { mysql_query("UPDATE ibwf_chonline SET lton='".time()."', rid='".$rid."' WHERE uid='".$uid."'"); } }
become this :
function addtochat($uid, $rid) { $timeto = 120; $timenw = time(); $timeout = $timenw - $timeto; $exec = mysql_query("DELETE FROM ibwf_chonline WHERE lton<'".$timeout."'"); $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'"); $res = mysql_query("INSERT INTO ibwf_chonline SET lton='".time()."', uid='".$uid."', rid='".$rid."'");
if($res) { $msg = getnick_uid($uid)."enter the room"; mysql_query("INSERT INTO ibwf_chat SET timesent='".time()."', userid='0', text='".$msg."'"); } else { //just update the chonline list } dont remember if time sent is the correct field name anyways after doing that ....in the chat room when fetching the items from ibwf_chat eg $sql = mysql_query("SELECT userid,timesent,text FROM ibwf_chat"); while($item = mysql_fetch_array($sql)) { if($item[0]=='0') { $item[0]="chat_system"; echo $item[0].$item[1].$item[2]; } else { //print the items }
and i got this!!
Parse error: syntax error, unexpected T_STRING in /home/xxxxxx/public_html/web/core.php on line 713