*

Recent

Author Topic: unread messages in header  (Read 3286 times)

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
unread messages in header
« on: June 03, 2009, 03:29:13 PM »
This code will show users if they have unread messages in the header of your site.

heres the code:
Code: [Select]
<?
$w = $db->query("SELECT * FROM dd_messages WHERE to_userid='{$userid}' LIMIT 0,1");
while($iw = $db->fetch_row($w)){
if($iw['status'] == 0){
echo'You have <a style="color:green; font-weight:bold; font-size:15" href="'.$domain.'/index.php?action=messages">Unread Message(s)</a>';
}}
?>

You can put it anywhere in just about any file.
If you want it in the header just open up the templates/default dictionary and open the header.php file.
« Last Edit: June 04, 2009, 05:23:53 PM by Adam »