Jump to content


Photo

Private Message System


  • Please log in to reply
2 replies to this topic

#1 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 13 April 2006 - 09:57 AM

For a web project I am working on, I need to have a messaging system, pretty much like any PM system on a forum. I dont want a forum however...

I can manage the sending and storing of messages in the database. How would I get te system to show new messages, such as in bold or highlighted, or with a small image when they havent read it? Would it be as simple as having a field in the database tat is set to 0 to start with (as in not read) and they view it, set it to 1 (as in read)? Would there need to be anything done with sessions?

TIA

Niall
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application

#2 wisewood

wisewood
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts
  • LocationRotherham, England

Posted 13 April 2006 - 10:12 AM

I created something the same just last week. This is pretty much what i did.

My table has a field which is updated with 1 whenever a message is read... then in the inbox i have something like this;

if($read<1) {$image="<img src=images/unread.jpg>"} else {$image="<img src=images/read.jpg>"}

For mine, unread is an illuminated lighbulb, and read is not illuminiated. I didnt do anything with sessions
wisewood: proven fact, I am both wise, and wooden.

#3 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 13 April 2006 - 10:46 AM

[!--quoteo(post=364338:date=Apr 13 2006, 11:12 AM:name=wisewood)--][div class=\'quotetop\']QUOTE(wisewood @ Apr 13 2006, 11:12 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I created something the same just last week. This is pretty much what i did.

My table has a field which is updated with 1 whenever a message is read... then in the inbox i have something like this;

if($read<1) {$image="<img src=images/unread.jpg>"} else {$image="<img src=images/read.jpg>"}

For mine, unread is an illuminated lighbulb, and read is not illuminiated. I didnt do anything with sessions
[/quote]

Cool, thanks. :)
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users