kestasjk/webDiplomacy — pull request #22 by Alderian33 (2013-04-15 05:48:36+00:00)
Title: Add Notes tab for all press types and read-only Global tab for nopress

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

Add "Notes" tab to list of output tabs using country's own country id.
Show Global tab for gunboat games, no sendbox for non-finished games.

board/chatbox.php - findTab() - allow $msgCountryID to be set to the Notes value for all press types.

board/chatbox.php - postMessage() - allow posting to Notes tab for all press types.
board/chatbox.php - postMessage() - allow posting to Global tab for Finished nopress games.

board/chatbox.php - output() - don't show the member bar on the Notes tab.
board/chatbox.php - output() -
previous functionality:
*for moderator, show sendbox regardless of tab;
*for member, show sendbox if regular or public press, regardless of tab.
new functionality:
*for moderator, show sendbox on global tab only
*for member, show sendbox if regular press on any tab, or Notes tab,
*or public press global tab, or nopress global tab on a finished game.

board/chatbox.php - outputTabs() - allow both Global and Notes tabs for non-Regular press games. Do not block the Notes tab which is the country's own id. Label the Notes

tab 'Notes'. Cleanup some redundant if statements.

lib/gamemessage.php - send() - do not call notify() if $fromCountryID is the same as $toCountryID (Notes tab).

board.php - remove restriction on showing Chatbox on NoPress games.