Topic: Showing new private message count on external page?
Hi
At the moment I'm working on a log in script for an external page that once logged in displays the user avatar, a link to edit there profile, how many messages they have and also a log out link.
I have success with displaying all of these apart from the message link, could some one point me in the right direction as to what page I should be looking at? I am using the pun_pm package coded by the punbb development team.
My current coding looks like this... ( please bare in mind it is ugly and basic at the moment as I am just working out the best way to achieve the effect )
<?php
if($forum_user['id'] > 2)
{
echo forum_htmlencode($forum_user['username']);
echo $user_avatar = '<img src="forums/'.$forum_config['o_avatars_dir'].'/'.$forum_user['id'].'.jpg" '.' width="30" height="30" alt="" />';
echo '******* PRIVATE MESSAGE OUTPUT SHOULD GO HERE ******* ';
echo $links['profile'] = '<li id="navprofile"'.((substr(FORUM_PAGE, 0, 7) == 'profile') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['user'], $forum_user['id']).'">'.$lang_common['Profile'].'</a></li>';
echo $links['logout'] = '<li id="navlogout"><a href="'.forum_link($forum_url['logout'], array($forum_user['id'], generate_form_token('logout'.$forum_user['id']))).'">'.$lang_common['Logout'].'</a></li>';
}
else
{
echo "Log In Form Will Go Here";
}
?>
any help would much appreciated