Ghetto Posted May 3, 2007 Share Posted May 3, 2007 Re: [mccode] mailbox with smilies Just put the images in a folder called 'smilies'. Quote Link to comment Share on other sites More sharing options...
mrswhodini Posted May 7, 2007 Share Posted May 7, 2007 Re: [mccode] mailbox with smilies I added this to my game and everything seems to be working fine other than when you send the mail all you see is the code is there a way for the smileys to show when you recieve the mail other than is saying ie: :cool? Quote Link to comment Share on other sites More sharing options...
03laceys Posted May 7, 2007 Share Posted May 7, 2007 Re: [mccode] mailbox with smilies hey mrswhodini send me ur mailbox.php Quote Link to comment Share on other sites More sharing options...
mrswhodini Posted May 7, 2007 Share Posted May 7, 2007 Re: [mccode] mailbox with smilies <?php /* ----------------------------------------------------------------------- -- Ajax Mailbox Script -- © 2006 Dabomstew ----------------------------------------------------------------------- -- This script is distributed in the hope that -- it will be useful, but WITHOUT A WARRANTY -- OF ANY KIND. ----------------------------------------------------------------------- -- Dabomstew, DBS-Network.net, and -- everyone else involved with this script do not -- take any liability for damage done to your game -- by the use of this script. ----------------------------------------------------------------------- */ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); if($ir['mailban']) { die("<font color=red><h3>! ERROR</h3> You have been mail banned for {$ir['mailban']} days. Reason: {$ir['mb_reason']}</font>"); } $http= $_SERVER['HTTP_HOST']; //we grab game's domain name! ?> <script language="javascript" type="text/javascript"> function my_getbyid(special) { return document.getElementById(special); } var url = "ajaxmail.php?PHPSESSID=<?php print $_REQUEST["PHPSESSID"]; ?>¶m="; // The server-side script function handleHttpResponse() { if (http.readyState == 4) { // Split the comma delimited response into an array results = http.responseText.split("<split>"); document.getElementById(results[1]).innerHTML=results[0]; } } function showMail(mail_id) { itm = my_getbyid("div_mail_"+mail_id); itmer = my_getbyid("indicator_"+mail_id); if (itmer.src == "http://<?php print $http; ?>/minus.gif") { document.getElementById("indicator_"+mail_id).src="http://<?php print $http; ?>/plus.gif"; document.getElementById("div_mail_"+mail_id).style.display="none"; } else { document.getElementById("indicator_"+mail_id).src="http://<?php print $http; ?>/minus.gif"; document.getElementById("div_mail_"+mail_id).style.display=""; document.getElementById("div_mail_"+mail_id).innerHTML="Loading...."; } if(itm.style.display=="") { var zipValue = mail_id; http.open("GET", url + escape(zipValue), true); http.onreadystatechange = handleHttpResponse; http.send(null); } } function getHTTPObject() { var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } var http = getHTTPObject(); // We create the HTTP Object </script> <? $_GET['ID'] = abs((int) $_GET['ID']); print "<table width=75% border=2><tr><td>Inbox</td> <td>Sent Messages</td> <td>Compose Message</td> <td> Messages</td> <td>Archive Messages</td></tr> </table> "; switch($_GET['action']) { case 'inbox': mail_inbox(); break; case 'outbox': mail_outbox(); break; case 'compose': mail_compose(); break; case 'delete': mail_delete(); break; case 'send': mail_send(); break; case 'delall': mail_delall(); break; case 'delall2': mail_delall2(); break; case 'archive': mail_archive(); break; default: mail_inbox(); break; } function mail_inbox() { global $ir,$c,$userid,$h, $http; print "Only the last 25 messages sent to you are visible. <table width='95%' border=2><tr class='headercolor'><th>From</th><th>Subject/Message</th></tr>"; $q=mysql_query("SELECT m.mail_subject,m.mail_to,m.mail_from,m.mail_id,m.mail_time,m.mail_read, u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_to=$userid ORDER BY mail_time DESC LIMIT 25",$c); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>"; if($r['userid']) { print "{$r['username']} [{$r['userid']}]"; } else { print "SYSTEM"; } $fm=urlencode($r['mail_id']); if(!$r['mail_subject']) { $r['mail_subject'] = "No Subject"; } if(!$r['mail_read']) { $ur=" New!"; } else { $ur=""; } print "$ur</td>\n<td>{$r['mail_subject']}, Sent at: $sent (Reply | [/url] | Report)</td><td><a onClick='showMail({$r['mail_id']})'></a></td></tr> <tr><td colspan='3'><div id='div_mail_{$r['mail_id']}' style='display: none;'></div></td></tr>"; } print "</table>"; } function mail_outbox() { global $ir,$c,$userid,$h, $http; print "Only the last 25 messages you have sent are visible. <table width=75% border=2><tr class='headercolor'><th>To</th><th>Subject/Message</th><th></th></tr>"; $q=mysql_query("SELECT m.mail_id,m.mail_from,m.mail_to,m.mail_time,m.mail_subject,u.* FROM mail m LEFT JOIN users u ON m.mail_to=u.userid WHERE m.mail_from=$userid ORDER BY mail_time DESC LIMIT 25",$c); while($r=mysql_fetch_array($q)) { if(!$r['mail_subject']) { $r['mail_subject'] = "No Subject"; } $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>{$r['username']} [{$r['userid']}]</td><td>{$r['mail_subject']}, Sent at: $sent</td><td><a onClick='showMail({$r['mail_id']})'></a></td></tr> <tr><td colspan='3'><div id='div_mail_{$r['mail_id']}' style='display: none;'></div></td></tr>"; } } function mail_compose() { global $ir,$c,$userid,$h; print "<form action='mailbox.php?action=send' method='post'> <table width=75% border=2> <tr> <td>ID to send to:</td> <td><input type='text' name='userid' value='{$_GET['ID']}' /></td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' /></td></tr><tr> <td>Message:</td> <td><textarea rows=5 cols=40 name='message'></textarea> = :) = ;) = :o = :D = :s = :( = :red = :roll = :x = :green = :| = ;( = :] = :horny = :cool</td></tr><tr> <td colspan=2><input type='submit' value='Send' /></td></tr></table></form>"; if($_GET['ID']) { print " <table width=75% border=2><tr><td colspan=2>Your last 5 mails to/from this person:</td></tr>"; $q=mysql_query("SELECT m.*,u1.username as sender from mail m left join users u1 on m.mail_from=u1.userid WHERE (m.mail_from=$userid AND m.mail_to={$_GET['ID']}) OR (m.mail_to=$userid AND m.mail_from={$_GET['ID']}) ORDER BY m.mail_time DESC LIMIT 5",$c); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>$sent</td> <td>{$r['sender']} wrote: {$r['mail_text']}</td></tr>"; } print "</table>"; } } function mail_send() { global $ir,$c,$userid,$h; $subj=str_replace(array("'","\n"),array("''"," "),htmlentities($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),htmlentities($_POST['message'])); $to= (int) $_POST['userid']; if (eregi("(http://)|(com)|(.net)|(.org)|(.info)|(.co.uk)|(www.)", $subj)) { die ("Quit sending off site links asshole, no one cares about your game"); } else if (eregi("(http://)|(com)|(.net)|(.org)|(.info)|(.co.uk)|(www.)", $msg)) { die ("Quit sending off site links asshole, no one cares about your game"); } else { mysql_query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$msg')",$c) or die(mysql_error()); print "Message sent. > Back"; } } function mail_delete() { global $ir,$c,$userid,$h; mysql_query("DELETE FROM mail WHERE mail_id={$_GET['ID']} AND mail_to=$userid",$c); print "Message deleted. > Back"; } function mail_delall() { global $ir,$c,$userid,$h; print "This will delete all the messages in your inbox. There is NO undo, so be sure. > Yes, delete all messages > No, go back"; } function mail_delall2() { global $ir,$c,$userid,$h; mysql_query("DELETE FROM mail WHERE mail_to=$userid",$c); print "All ".mysql_affected_rows($c)." mails in your inbox were deleted. > Back"; } function mail_archive() { global $ir,$c,$userid,$h; print "This tool will download an archive of all your messages. > Download Inbox > Download Outbox"; } $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
spellbyte ® Posted May 7, 2007 Author Share Posted May 7, 2007 Re: [mccode] mailbox with smilies are you sure you uploaded the smilies to a directory called /smilies Quote Link to comment Share on other sites More sharing options...
mrswhodini Posted May 7, 2007 Share Posted May 7, 2007 Re: [mccode] mailbox with smilies yes that is the first thing i checked Quote Link to comment Share on other sites More sharing options...
spellbyte ® Posted May 8, 2007 Author Share Posted May 8, 2007 Re: [mccode] mailbox with smilies ok after actually looking at your mailbox script, it looks like you need to have your smilies in the root directory instead of in the smilies directory Quote Link to comment Share on other sites More sharing options...
~Spooky~ Posted May 9, 2007 Share Posted May 9, 2007 Re: [mccode] mailbox with smilies Thanks Spellbyte. Works great. I love it!! Quote Link to comment Share on other sites More sharing options...
spellbyte ® Posted May 9, 2007 Author Share Posted May 9, 2007 Re: [mccode] mailbox with smilies no probs Quote Link to comment Share on other sites More sharing options...
mrswhodini Posted May 11, 2007 Share Posted May 11, 2007 Re: [mccode] mailbox with smilies Oh i have them both in the root directory as well as in a smileys folder i have tried it both ways. I was told it could be something with my mailbox script. I have ajax mailbox?? Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted August 3, 2007 Share Posted August 3, 2007 Re: [mccode] mailbox with smilies this dont work beacuse after u send a mess with one all it does is send the :( or what ever u put Quote Link to comment Share on other sites More sharing options...
RooTy Posted August 3, 2007 Share Posted August 3, 2007 Re: [mccode] mailbox with smilies :-o well that sucks big time :x Quote Link to comment Share on other sites More sharing options...
oxidati0n Posted August 3, 2007 Share Posted August 3, 2007 Re: [mccode] mailbox with smilies Couldn't this be injected easily? Quote Link to comment Share on other sites More sharing options...
-Matt- Posted August 8, 2007 Share Posted August 8, 2007 Re: [mccode] mailbox with smilies +1 Quote Link to comment Share on other sites More sharing options...
-CrAzY- Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies Is There Anyway I Could Add Some Buttons, Above The Msg Box, And Say When You Press The One With The Smiley Face It Enters You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
YoungGold Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies Yes you can do that. Quote Link to comment Share on other sites More sharing options...
Godfather Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies and i know how :-P Quote Link to comment Share on other sites More sharing options...
YoungGold Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies and i know how :-P Thats not very helpfull is it why dont u post it ifu know Quote Link to comment Share on other sites More sharing options...
-CrAzY- Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies Please Tell Me, I Want It Just Like When You Reply To A Topic On CE Quote Link to comment Share on other sites More sharing options...
YoungGold Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies meh i thought u was gunna come back when u could code. Quote Link to comment Share on other sites More sharing options...
3XTR3M3 Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies Good thing i just couldnt find any decent smilies Quote Link to comment Share on other sites More sharing options...
-CrAzY- Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies go on www.gangparadise.com, register, login, then go on send message, n right click on all them and save them, there mint smilies Quote Link to comment Share on other sites More sharing options...
3XTR3M3 Posted September 9, 2007 Share Posted September 9, 2007 Re: [mccode] mailbox with smilies if i can be bothered Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted February 6, 2008 Share Posted February 6, 2008 Re: [mccode] mailbox with smilies does anyone have the smilies file so i can add it plz Quote Link to comment Share on other sites More sharing options...
ronhouston2 Posted February 24, 2008 Share Posted February 24, 2008 Re: [mccode] mailbox with smilies for some reason the mail box is showing two send mail things with the Smiles any one know why this is happinging??????????????? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.