Topic: New Messages on index.php
Private Messaging System
I want to show if the user has any new PM's in his startpage, I'm using this code:
<?php
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);
$pun_root = './forum/';
@include $pun_root.'include/common.php';
// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');
?>
<?php
if ($cookie['is_guest'])
{
include "loginBB.php";
}
else
{
echo 'Welcome '.pun_htmlspecialchars($cur_user['username']);
New Messages here.
}
?>
I would like to display it like this:
Example:
You have 3 new messages in your inbox
Then of course with a link to his/hers inbox.
I just saw that you have made the same on your site. (http://www.cactuz.nu/forum)
Here is my profile status:
madjedo
0 new messages
0 new gb entries
0 new friendships
1 new forum posts
Supervise
Logout