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:
Run this Query;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 } ?>
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;
If you are dutch; RetroPlace - InloggenCode:<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>
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/



Reply With Quote


