kestasjk/webDiplomacy — pull request #21 by Alderian33 (2013-04-14 05:06:22+00:00)
Title: private message notification tab

I've made these changes on the beta site (but not staged or committed) so you can see how it functions there.

objects/basic/set.php - Add setUserNotifications class which includes the current values already defined by wd_users.notifications.

objects/user.php - Include objects/basic/set.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.