Chat maked for PhpRetro and PhoenixPHP

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    Make a wish .::Arjan::. is offline
    MemberRank
    Jan 2012 Join Date
    the NetherlandsLocation
    504Posts

    Chat maked for PhpRetro and PhoenixPHP

    Hello Ragezone, i have make a chatbox with the old Habbomotion chat.
    Screen:


    Live demo;
    http://pastehtml.com/view/c3x3ghu4f.html
    (There you can not chat)

    Download:
    PhpRetro chat - Retroplace.nl.zip

    If you have PhoenixPHP change Chat.php with this:
    Code:
    <?php
        define('USERNAME_REQUIRED', TRUE);
        define('ACCOUNT_REQUIRED', TRUE);
        include('global.php');
        define("THIS_SCRIPT", 'me');
        $username = $core->EscapeString($_SESSION['username']);
        ?>
    
        <html>
        <head>
        <title>Drabbo: Chat</title>
        <style type="text/css">
        body {
        font-family: Verdana;
        font-size: 11px;
        color: black;
        margin: 0 auto;
        }
    
        input {
        font-family: Verdana;
        font-size: 11px;
        color: black;
        }
    
        div#container {
        width: 548px;
        margin: 0 auto;
        }
    
        div#top {
        background-image: url('/web-gallery/chat/achtergrond.png');
        height: 228px;
        width: 523px;
        margin: 10px 0 0 0;
        padding: 13px 5px 5px 20px;
        }
    
        div#speech {
        background-image: url('/web-gallery/chat/chatbubbel.png');
        height: 62px;
        width: 548px;
        }
    
        input#chat-msg {
        margin: 22px 0 0 65px;
        background-color: transparent;
        width: 465px;
        border: 0;
        }
        </style>
        </head>
    
        <body>
        <div id="container">
        <?php
        if($_POST['chat-msg']){
        $msg = strip_tags(mysql_real_escape_string($_POST['chat-msg']));
        if(!$msg){
        echo 'Je moet wat invullen!<br><br><a href="/chat.php">« Terug</a>';
        }else{
        $habbo2 = $_COOKIE['habbo'];
        $hotel2 = $_COOKIE['hotel'];
        $margin = $_COOKIE['margin'];
        mysql_query("INSERT INTO `chat` (`habbo`, `hotel`, `margin`, `message`) VALUES ('$username', '$hotel2', '$margin', '$msg');");
        header("Location: /chat.php");
        }
        }else{
        ?>
        <div id="top">
        <?php
        $last10 = mysql_query("SELECT * FROM chat ORDER BY `id` DESC LIMIT 7");
        if(mysql_num_rows($last10) == 0){
        echo '<img src="http://retroplace.nl/scripts/ballonmaker/ballon.php?ballon=                         Er zijn nog geen shouts, ben jij de eerste?" style="margin-left: '.$margin.'px;">';
        }else{
        while($r = mysql_fetch_array($last10)){
        $habbo = $r["habbo"];
        $hotel = $r["hotel"];
        $margin = $r["margin"];
        $msg = $r["message"];
        echo '<img src="http://retroplace.nl/scripts/ballonmaker/ballon.php?ballon='.$habbo.': '.$msg.'&format=say" style="margin-left: '.$margin.'px;"><br>';
        }
        }
        ?>
        </div>
        <div id="speech">
        <form method="post">
        <input type="text" name="chat-msg" value="Type een bericht..." id="chat-msg" onfocus="if (this.value=='Type a message...') this.value = '';" onblur="if (this.value=='') this.value = 'Type a message...';">
        </form>
        </div>
    
        <?php
        }
        ?>
        </div>
    
          <?php if($users->UserPermission('hk_login', $core->EscapeString($_SESSION['username']))) {?>
              <center>Delete al shouts: <a href="/chat.php?page=leegchat">Click here!</a> (Only staff can see this).</center>
              <?php } ?>
    
    
        <?php
           
              if($_GET['page'] == 'leegchat')
              {
                        ?>
    
    
    
                             <?php   
        mysql_query("TRUNCATE TABLE chat");
    
        ?>
    
        <center><a href="/chat.php"><b>Chat is clean!</b></a><br></center>
    
    
        <?php
              }
              ?>
    Run this Query;
    Code:
    --
    -- Tabelstructuur voor tabel `chat`
    --
    
    CREATE TABLE IF NOT EXISTS `chat` (
      `id` int(90) NOT NULL auto_increment,
      `habbo` varchar(45) NOT NULL,
      `hotel` varchar(10) NOT NULL,
      `margin` int(2) NOT NULL default '0',
      `message` varchar(100) NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
    
    --
    -- Gegevens worden uitgevoerd voor tabel `chat`
    --
    
    INSERT INTO `chat` (`id`, `habbo`, `hotel`, `margin`, `message`) VALUES
    (1, 'Arjan', '', 0, 'Chat working look for more stuff at: Retroplace.nl');

    And edit;
    Go to chat.php search for this;
    if($_GET['page'] == 'leegchat')
    And change 'leegchat' to something else (because that is not secure).

    Enjoy

    If you want only a HTML chat;
    Code:
    <html>
        <head>
        <title>Drabbo: Chat</title>
        <style type="text/css">
        body {
        font-family: Verdana;
        font-size: 11px;
        color: black;
        margin: 0 auto;
        }
    
        input {
        font-family: Verdana;
        font-size: 11px;
        color: black;
        }
    
        div#container {
        width: 548px;
        margin: 0 auto;
        }
    
        div#top {
        background-image: url('/web-gallery/chat/achtergrond.png');
        height: 228px;
        width: 523px;
        margin: 10px 0 0 0;
        padding: 13px 5px 5px 20px;
        }
    
        div#speech {
        background-image: url('/web-gallery/chat/chatbubbel.png');
        height: 62px;
        width: 548px;
        }
    
        input#chat-msg {
        margin: 22px 0 0 65px;
        background-color: transparent;
        width: 465px;
        border: 0;
        }
        </style>
        </head>
    
        <body>
        <div id="container">
    
        <div id="top">
    
        <img src="http://retroplace.nl/scripts/ballonmaker/ballon.php?ballon=Arjan: Test voor Retroplace.nl"><br>';
    
        </div>
        <div id="speech">
        <form method="post">
        <input type="text" name="chat-msg" value="Type een bericht..." id="chat-msg" onfocus="if (this.value=='Type een bericht...') this.value = '';" onblur="if (this.value=='') this.value = 'Type een bericht...';">
        </form>
        </div>
    
    
        </div>
    If you are dutch; RetroPlace - Inloggen

    Like if you like :)

    Other thread(s) from me: http://forum.ragezone.com/f353/dubbe...back-p-852888/
    http://forum.ragezone.com/f353/new-i...om-ads-840500/
    http://forum.ragezone.com/f353/rooft...om_ads-835157/
    Last edited by .::Arjan::.; 06-07-12 at 09:59 PM.


  2. #2
    Zephyr Studios PRIZM is offline
    MemberRank
    Feb 2012 Join Date
    DenmarkLocation
    2,291Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Cool, i like really much!! :-D

  3. #3
    Make a wish .::Arjan::. is offline
    MemberRank
    Jan 2012 Join Date
    the NetherlandsLocation
    504Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Quote Originally Posted by Lasse View Post
    Cool, i like really much!! :-D
    Thanks :)

  4. #4
    Member JaayNL is offline
    MemberRank
    Jun 2012 Join Date
    Nederland !Location
    61Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Great work Arjan :).

  5. #5
    Alpha Member Danny is offline
    MemberRank
    Oct 2011 Join Date
    My PCLocation
    2,158Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    I have one question, does this chat use the user name of the account that's registered?

  6. #6
    Make a wish .::Arjan::. is offline
    MemberRank
    Jan 2012 Join Date
    the NetherlandsLocation
    504Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Quote Originally Posted by Facebook View Post
    I have one question, does this chat use the user name of the account that's registered?
    Yes and guests can not visit that page. (Chat.php).

  7. #7
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    MemberRank
    May 2008 Join Date
    KanaadaLocation
    992Posts
    Nice but you should add some spam control. Check the last submitted chat from a user against the current time stamp. Maybe make it so they can only submit once every 15 seconds...

    Sent from some remote location using Tapatalk...

  8. #8
    Alpha Member Danny is offline
    MemberRank
    Oct 2011 Join Date
    My PCLocation
    2,158Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Quote Originally Posted by iArjan View Post
    Yes and guests can not visit that page. (Chat.php).
    Great I will definitely use this, also how do the query's get handled?

  9. #9
    Make a wish .::Arjan::. is offline
    MemberRank
    Jan 2012 Join Date
    the NetherlandsLocation
    504Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Quote Originally Posted by Facebook View Post
    Great I will definitely use this, also how do the query's get handled?
    You post a message and it wil be placed in the Database.

  10. #10
    Account Upgraded | Title Enabled! landline is offline
    MemberRank
    Oct 2011 Join Date
    In Blast HotelLocation
    423Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    This is really good, I will use this. (Y)

    EDIT:
    Lol, I was just thinking, and this would be really good as new comments.

  11. #11
    Make a wish .::Arjan::. is offline
    MemberRank
    Jan 2012 Join Date
    the NetherlandsLocation
    504Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Quote Originally Posted by landline View Post
    This is really good, I will use this. (Y)

    EDIT:
    Lol, I was just thinking, and this would be really good as new comments.
    Can you make image how you think about that?
    I can make it then..

  12. #12
    Account Upgraded | Title Enabled! landline is offline
    MemberRank
    Oct 2011 Join Date
    In Blast HotelLocation
    423Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Lol, tried getting this working for rev, but failed. xP

  13. #13
    Valued Member Shebsonwai is offline
    MemberRank
    Mar 2012 Join Date
    wwwrootLocation
    108Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Arjan, can you make this one for Rev?

  14. #14
    Zephyr Studios PRIZM is offline
    MemberRank
    Feb 2012 Join Date
    DenmarkLocation
    2,291Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Also Uber! :-)

  15. #15
    Account Upgraded | Title Enabled! Xavi. is offline
    MemberRank
    Jul 2010 Join Date
    At Home.phpLocation
    708Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    I really like this, but im thinking about optimisation and security.

    And im trying to think if theres any other way to store the chat log as a db query every second is no good.
    And has anyone got a demo up?

    Apart from that, this is sexy and i will use. ty

    -------------- EDIT--------------

    Can you also make Mods/Staff/VIP have different colours :P
    And implement some commands for banning for X hours, pruning, muting, spam prevention
    And also a user list on the side which shows the users rank etc when their names clicked

    Its easy, im just lazy
    Last edited by Xavi.; 06-07-12 at 08:46 PM.

  16. #16
    Member Ken816 is offline
    MemberRank
    Jun 2012 Join Date
    59Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Nice release, iArjan... its nicely coded but unncessesary, i mean what's the client for??? oh well, im still using it.....

  17. #17
    Account Upgraded | Title Enabled! No0b is offline
    MemberRank
    Jul 2010 Join Date
    Michigan, USLocation
    1,426Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Nice dude...

  18. #18
    Make a wish .::Arjan::. is offline
    MemberRank
    Jan 2012 Join Date
    the NetherlandsLocation
    504Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    If a user was banned (PhoenixPHP).
    He cant talk.

    And i'm make now a spam control and a live update chat.
    And i dont know how make it for RevCMS? i have never use it.

  19. #19
    Account Upgraded | Title Enabled! Xavi. is offline
    MemberRank
    Jul 2010 Join Date
    At Home.phpLocation
    708Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    so wait, it wasnt live update then? So when did it update, on refresh? -,- and is there a demo?

  20. #20
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    MemberRank
    May 2008 Join Date
    KanaadaLocation
    992Posts
    Quote Originally Posted by No0b View Post
    Nice dude...
    When a person posts just set a session with the time stamp. Also on submit check that session first to see if 15 seconds or so have passed... That way u don't overload the mysql server when someone tries to spam... I am thinking that that's a easy and effective way of doing it...

    Sent from some remote location using Tapatalk...

  21. #21
    Make a wish .::Arjan::. is offline
    MemberRank
    Jan 2012 Join Date
    the NetherlandsLocation
    504Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Quote Originally Posted by leenster View Post
    When a person posts just set a session with the time stamp. Also on submit check that session first to see if 15 seconds or so have passed... That way u don't overload the mysql server when someone tries to spam... I am thinking that that's a easy and effective way of doing it...

    Sent from some remote location using Tapatalk...
    i'm not a PHP god, i make only a spam control and a live update system..
    Other people can make more updates. (Make it for revcms phoenixcf etc).


    Demo;
    http://pastehtml.com/view/c3x3ghu4f.html
    Last edited by .::Arjan::.; 06-07-12 at 09:57 PM.

  22. #22
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    MemberRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Quote Originally Posted by iArjan View Post
    i'm not a PHP god, i make only a spam control and a live update system..
    Other people can make more updates. (Make it for revcms phoenixcf etc).


    Demo;
    http://pastehtml.com/view/c3x3ghu4f.html
    U can do it.... I have faith in you...

  23. #23
    GreenMaX keven007 is offline
    MemberRank
    Jul 2008 Join Date
    The NetherlandsLocation
    275Posts
    Already got something like this, but nice too see something like this

    Sent from my GT-S5660 using Tapatalk

  24. #24
    Account Upgraded | Title Enabled! J4y2 is offline
    MemberRank
    Feb 2012 Join Date
    South KoreaLocation
    317Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Cool,Nice One

  25. #25
    Make a wish .::Arjan::. is offline
    MemberRank
    Jan 2012 Join Date
    the NetherlandsLocation
    504Posts

    Re: Chat maked for PhpRetro and PhoenixPHP

    Quote Originally Posted by leenster View Post
    U can do it.... I have faith in you...
    Thank you, I will try it.. :$



Page 1 of 2 12 LastLast

Advertisement