Hey guys,
I think this should be pretty easy but i cant seem to find anything on the forums.
I'm building my site on top of phpbb and would like to display if the users have any new messages on the index, exactly like on the forum index. I thought i could do a query to count the messages in the privmsgs_to table but that doesn't seem to be how phpbb does it since as soon as you go to your inbox it clears the number even if you haven't actually opened the messages.
Any suggestions are appreciated.
get pm new messages count from outside phpbb
-
- Registered User
- Posts: 9
- Joined: Mon Jan 26, 2009 3:27 am
- DavidIQ
- Customisations Team Leader
- Posts: 1872
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: get pm new messages count from outside phpbb
It's in the users table. The 2 columns that deal with PMs are user_new_privmsg which indicates that there is a new private message and is set to 0 or 1 accordingly and the other column is user_unread_privmsg which actually stores the number of unread private messages (2 new messages, etc.).
-
- Registered User
- Posts: 9
- Joined: Mon Jan 26, 2009 3:27 am
Re: get pm new messages count from outside phpbb
Thank you. I was able to use the $user->data['user_new_privmsg']; value. Since its in the user table it was already in the array ready for me to use.
So now i've mimicked the process that the forum uses.
Thanks again and hopefully anyone else doing this will be able to find this thread.
So now i've mimicked the process that the forum uses.
Thanks again and hopefully anyone else doing this will be able to find this thread.