Chat on Byethost??

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

    Chat on Byethost??

    I find solution for those who have free hosting on byethost server,its a good host but on free account do not allow a chat becouse of spaming provably.this will be helpful to those who have a lavalair script like me.
    below is a ziped sobe.php file whit which you will replace yours chat.php
    This file is for lava html becouse i dont use wml..
    And this you wil copy in index.php instead of
    PHP Code:
    (action==chat) 
    
    on the bottom of index
    THIS IS THE REPLACMENT
    PHP Code:
    else if ($action=="sobe")           {
    
      $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    
            addonline(getuid_sid($sid),"chat sobe ($mmsg)","index.php?action=sobe");
    
            echo "<head>";
    
            echo "<title>Chat</title>";
    
            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    
            echo "</head>";
    
            echo "<body>";
    
            //echo "<div><img src=\"../images/chat.gif\" alt=\"\"/></div>";
    
            echo popup($sid);
    
            echo "<p align=\"center\">";
    
            $rooms = mysql_query("SELECT id, name, perms, mage, chposts FROM ibwf_rooms WHERE static='1' AND clubid='0'");
    
            while ($room= mysql_fetch_array($rooms))
    
            {
    
              
    
              /*if(canenter($room[0], $sid))
    
              {*/
    
                $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$room[0]."'"));
    
                echo "<a href=\"sobe.php?sid=$sid&amp;rid=$room[0]\">$room[1]($noi[0])</a><br/>";
    
              /*}*/
    
              
    
            }
    
            echo "<br/>";
    
            echo "<b>5 </b><a accesskey=\"5\" href=\"index.php?action=uchat&amp;sid=$sid\">Private Rooms</a><br/>";
    
            echo "<b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    
            echo "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a><br/>";
    
            echo "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=chat&amp;sid=$sid\">Chatrooms</a><br/>";
    
            echo forumlink($sid,9);
    
    
    
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    
            echo "</p>";
    
            echo "</body>";
    
                                               }
    
    else if ($action=="uchat")           {
    
      $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    
    addonline(getuid_sid($sid),"Chat Menu ($mmsg)","");
    
        echo "<head>";
    
        echo "<title>Chat Menu</title>";
    
        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    
        echo "</head>";
    
        echo "<body>";
    
            echo "<p align=\"center\">";
    
            echo "<img src=\"../images/chat.gif\" alt=\"*\"/><br/>";
    
            echo "</p>";
    
    echo "<p align=\"center\">";
    
         echo "<br/>";
    
            echo "<b>1 </b><a accesskey=\"1\" href=\"index.php?action=sobe&amp;sid=$sid\">Public Rooms</a><br/>";
    
            echo "<b>2 </b><a accesskey=\"2\" href=\"index.php?action=mkroom&amp;sid=$sid\">Create Room</a><br/><br/>";
    
            $rooms = mysql_query("SELECT id, name, pass FROM ibwf_rooms WHERE static='0'");
    
            $co=0;
    
            while ($room= mysql_fetch_array($rooms))
    
            {
    
                $co++;
    
              if(canenter($room[0], $sid))
    
              {
    
                $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$room[0]."'"));
    
                if($room[2]=="")
    
                {
    
                echo "<a href=\"sobe.php?sid=$sid&amp;rid=$room[0]\">".htmlspecialchars($room[1])."($noi[0])</a><br/>";
    
                }else{
    
    echo htmlspecialchars($room[1]);
    
                  //echo "($noi[0])";
    
    echo "<form action=\"sobe.php\" method=\"get\">";
    
                  echo "<br/><input format=\"*x\" name=\"rpw\" maxlength=\"10\"/><br/>";
    
    echo "<input type=\"submit\" value=\"GO\"/>";
    
                  echo "<input type=\"hidden\" name=\"rid\" value=\"$room[0]\"/>";
    
                  echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
    
                  echo "</form>";
    
                }
    
              }
    
            }
    
            echo "<br/><br/><b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    
            echo "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a><br/>";
    
            echo "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=sobe&amp;sid=$sid\">Chatrooms</a><br/>";
    
            echo forumlink($sid,9);
    
    
    
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    
            echo "</p>";
    
            echo "</body>";
    
                                               }
    
    else if($action=="mkroom")
    
    {
    
      $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
    
        addonline(getuid_sid($sid),"Creating Chatroom ($mmsg)","");
    
        echo "<head>";
    
        echo "<title>Create Room</title>";
    
        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    
        echo "</head>";
    
        echo "<body>";
    
            echo "<p>";
    
            echo "<small><img src=\"../images/point.gif\" alt=\"!\"/>Leave password empty if you dont want to lock the room</small><br/>";
    
            echo "<small><img src=\"../images/point.gif\" alt=\"!\"/>Don't make the password too personal, it's visible in the database</small><br/><br/>";
    
            echo "<form action=\"genproc.php?action=mkroom&amp;sid=$sid\" method=\"post\">";
    
            echo "Room Name: <input name=\"rname\" maxlength=\"30\"><br/>";
    
            echo "Password: <input name=\"rpass\" style=\"-wap-input-format: '*x'\" maxlength=\"10\"><br/>";
    
            echo "<input type=\"Submit\" name=\"Create\" Value=\"Create\"></form>";
    
            echo "</p>";
    
            echo "<p align=\"center\">";
    
            echo "<b>6 </b><a accesskey=\"6\" href=\"inbox.php?action=main&amp;sid=$sid\">Inbox</a><br/>";
    
            echo "<b>7 </b><a accesskey=\"7\" href=\"lists.php?action=buds&amp;sid=$sid\">BuddyList</a><br/>";
    
            echo "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=sobe&amp;sid=$sid\">Chatrooms</a><br/>";
    
            echo forumlink($sid,9);
    
    
    
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    
            echo "</p>";
    
            echo "</body>";
    
    } 
    
    Regards from Croatia...

    Added after 6 minutes:

    One more thing if anybody know how to place mobile videos on lava script let me know,i need that.sory for lausy english and we will see you when I finish a wall like facebook but coded for lava by myself.that wall is inovation and will be uploaded here when im done....
    Attached Files
    Last edited by pegass; 29.10.10, 22:51.
Working...
X