Messagebox

Post all your tuts or request for tuts here.
Post Reply
skacke
Posts: 38
Joined: Mon Oct 12, 2009 10:08 pm

Messagebox

Post by skacke »

Hello! :)

I've created a text-based game by following the mmo tutorials, + i've added some things,
but can anyone help me create a mail box, in which i can send, and read mail from other players in the game? Or maybe that takes to much space in the database?
darspire
Posts: 194
Joined: Sat Jul 25, 2009 9:21 pm

Re: Messagebox

Post by darspire »

you can always put on your website the html code that lets them create an E-mail to send to you


<a href="mailto:email@provider.com">send me an email!</a>

of course replace "email@provider.com" with your email

with my computer it opens up outlook express and lets them send a message.
if you love something, let it go.
if it doesnt return.....hunt it down and kill it.
skacke
Posts: 38
Joined: Mon Oct 12, 2009 10:08 pm

Re: Messagebox

Post by skacke »

darspire wrote:you can always put on your website the html code that lets them create an E-mail to send to you


<a href="mailto:email@provider.com">send me an email!</a>

of course replace "email@provider.com" with your email

with my computer it opens up outlook express and lets them send a message.
Yea, i am aware of that, but i mean a mail box within the game. but thx! :)
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Messagebox

Post by hallsofvallhalla »

just add a table called mail, with fields of
PID
sender
date
read
subject
body

then make a php page with a while statement much like the equipment where it queries select * from mail where pid = player id

if read = 1 then it hasn't been read and make it orange or something, then once you open it do a update and make read = 0

make another new page that they can make a new mail.

I could make a video tut on this but it may be a while.
skacke
Posts: 38
Joined: Mon Oct 12, 2009 10:08 pm

Re: Messagebox

Post by skacke »

hallsofvallhalla wrote:just add a table called mail, with fields of
PID
sender
date
read
subject
body

then make a php page with a while statement much like the equipment where it queries select * from mail where pid = player id

if read = 1 then it hasn't been read and make it orange or something, then once you open it do a update and make read = 0

make another new page that they can make a new mail.

I could make a video tut on this but it may be a while.
how do i make it so that it erases the mail after a week or something like that?
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Messagebox

Post by hallsofvallhalla »

make a cron that runs every day,
make a while query
if date is older than 1 week delete
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: Messagebox

Post by Torniquet »

oh yeah that reminds me.... i never got round to doing my tutorial on a pm system lol.

been so god damn busy, and my moods just not been quite up to scratch i completly forgot about it :lol:

i may post my code up for people to look through and if i get round to it. walk through it all in a vid.

its nothing fancy tho lol.
New Site Coming Soon! Stay tuned :D
Post Reply

Return to “Tutorials”