Hey Empire! I've been getting lots of Empire Email Notifications lately, and it's kinda annoying to have to click on it and open the links. Especially if I'm at school If this has been suggested, Staff can delete this thread if they want. Otherwise, I would like to suggest an email preview. Basically, when someone sends or replies to your private message, or quotes or responds to a thread you are email-watching (you turn on "watch thread- get email notifications"), it will send you an email, like before, but it will say "[username]
http://empireminecraft.com/threads/read-suggestion-box-rules-and-guidelines.51202/#post-919122 May be possible after forum upgrade. +1
This is actually very easy to do already, all you need to do is use ajax, jquery, and php this isn't the full code, just a gist ajax within jquery Code: <script type="text/javascript"> $(document).ready(function(){ $("#reply").submit(function (e){ var message = $("#tinymce").val(); var picture = "get the quick reply user's image url" var subject = "get user sending message and the thread title" var user = "get the person that sent the message's name" $.post('http://empireminecraft.com/db/mail.php',{'username':user, 'picture':picture, 'message':message, 'subject':subject}, function(data){ //you can add a success system here if you want, not necessary }); }); }); </script> php end Code: <?php $rUser = $_POST['username']; $rUserEmail = $_POST['email'];//don't use post, do a database lookup based on the username instead $rUserMessage = $_POST['subject']; $SendPic = $_POST['picture']; $SendMessage = $_POST['message']; $to = "$rUser <$rUserEmail>"; $subject = '$rUserMessage: ' . $rUser; $message = " <html> <head> <style> body{ color:white; background-color:gray; } a{ color:lime; } p{ text-align:center; } h1{ text-align:center; } </style> </head> <body> <h1><span><img height=\"24px\" width=\"24px\" src=\"http://empireminecraft.com/static/emcicon.png\"></img></span>Empire Minecraft<span><img height=\"24px\" width=\"24px\" src=\"http://empireminecraft.com/static/emcicon.png\"></img></span></h1> <img height=\"24\" width=\"24px\" src=\"$SendPic\"></img><span>$SendMessage</span> </body> </html> "; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; $headers .= "From: Empire Minecraft <alerts@empireminecraft.com>" . "\r\n"; mail($to,$subject,$message,$headers); ?>