kestasjk/webDiplomacy — pull request #9 by Alderian33 (2011-12-31 09:47:18+00:00)
Title: Private Message Notification

I've put this in a separate branch so I could send it as a separate pull request since my last pull request is still open. (Although it appears, from when I merged your code back into mine, that you did end up including the forum.php change, it just hasn't been marked as such so is still open.)

objects\user.php - Add notification flag array. Populate in function load() from wd_users.notifications. Add setNotification() and clearNotification() methods to set and clear the notification flag in the User object and wd_users table entry. In function sendPM(), call setNotification('PrivateMessage') to set the flag.

index.php - when on index.php?notices=on page, call &User->clearNotification('PrivateMessage') to clear the flag.

lib\html.php - In gameNotifyBlock(), display PM tab if private message notification flag is set and not on a page with the notices field, presumably index.php?notices=on which the tab takes you to.