Show in room

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kiLLeR-eyEd_14
    replied
    Originally posted by capofret View Post
    Is it something like *user enters room*?
    That code is already posted here
    create a file named chat_enter.php and put this code:
    PHP Code:
    <?php
    include("config.php");
    include(
    "core.php");
    if(!
    connectdb())
    {
    header("Location: database-error");
    exit();
    }
    if((isset(
    $_SESSION['sid'])) && (!empty($_SESSION['sid'])))
    {
    $sid = $_SESSION['sid'];
    }else{
    $sid = $_COOKIE['sid'];
    }
    $ubr = $_SERVER['HTTP_USER_AGENT'];
    $uip = getrealip();
    $uid = getuid_sid($sid);
    $rid = $_GET["rid"];
    if((!
    islogged($sid)) OR ($uid==0) OR ($uid==""))
    {
    header("Location: session-error");
    exit();
    }
    if(
    isipbanned($uid,$uip,$ubr))
    {
    header("Location: ipbanned");
    exit();
    }
    if(
    isbanned($uid))
    {
    header("Location: banned");
    exit();
    }
    $entercount = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chat WHERE msgtext='1entersdroom' AND chatter='".$uid."' AND rid='".$rid."'"));
    $onlinecount = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$rid."' and uid='".$uid."'"));
    if((
    $entercount[0]==0) && ($onlinecount[0]==0))
    {
      
    $enter = mysql_query("INSERT INTO ibwf_chat SET chatter='".$uid."', who='0', timesent='".time()."', msgtext='1entersdroom', rid='".$rid."'");
    }
    header("Location: chatroom-$rid");
    exit();
    ?>
    then in chat.php, put this code between if isspam and any..just use your head, ok?
    PHP Code:
    else if($chat[3]=="1entersdroom")
    {
      
    $chnick = getnick_uid($chat[0]);
      echo 
    "<b>Chat system</b>» $chnick entered the room!!!<br/>";
    } 
    just edit it according to your script..to make it work, put a link with chat_enter.php?rid=$rid
    Last edited by kiLLeR-eyEd_14; 09.09.09, 11:55.

    Leave a comment:


  • Ponick
    replied
    Originally posted by capofret View Post
    Is it something like *user enters room*?
    That code is already posted here
    yeh yeh yeh .. . . . You are right :D . Im tired to finding it but cant find . Please please kindly give me the code . . . .Please

    Leave a comment:


  • capofret
    replied
    Originally posted by Ponick View Post
    we are talking about a code which will display who recently entered in the chat room .
    Do you know about this code ?
    Is it something like *user enters room*?
    That code is already posted here

    Leave a comment:


  • Ponick
    replied
    Originally posted by kiLLeR-eyEd_14 View Post
    i can't understand what you're talking..please make it clearer for me..
    we are talking about a code which will display who recently entered in the chat room .
    Do you know about this code ?

    Leave a comment:


  • kiLLeR-eyEd_14
    replied
    Originally posted by Ponick View Post
    How to show a txt in room onece that can see everybody
    like welcome $nick or $nick connected
    is it possible ? Please i need yours help
    i can't understand what you're talking..please make it clearer for me..

    Leave a comment:


  • honkytonkman
    replied
    i think possible is possible..but ain't easy to do..

    Leave a comment:


  • Ponick
    started a topic Show in room

    Show in room

    How to show a txt in room onece that can see everybody
    like welcome $nick or $nick connected
    is it possible ? Please i need yours help
    Last edited by Ponick; 07.09.09, 12:28.
Working...
X