forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Thu Oct 19, 2017 11:36 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Post Notes to Self
PostPosted: Sun Jan 01, 2012 1:03 am 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
All three game types look the same from a moderator (who is not in game) perspective:
Attachment:
chatbox-mod.png
chatbox-mod.png [ 20.95 KiB | Viewed 2859 times ]


And all three game types look the same for a non-mod who is not in the game:
Attachment:
chatbox-notmember.png
chatbox-notmember.png [ 4.02 KiB | Viewed 2859 times ]


Note that a mod that is in a gunboat game does have the sendbox just as they currently do, and their press there still shows up as moderator press.

Changes:
Code:
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 - 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 and on global tab.
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.


Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Mon Jan 02, 2012 4:08 am 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Nicely done, looks good


Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Mon Jan 02, 2012 4:25 am 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
Just saw your note on dev post saying to wait on the pull request until the next release. Will do.


Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Sun Apr 14, 2013 6:08 pm 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
Oli (and others),

I had an idea for a bit further refinement of these changes and wanted to get your thoughts. (I sent an email to the webdip mods to get theirs.)

Would there be value in having the country tabs available to mods who are not in a game to allow for direct communication with a specific player rather than only having the global tab?


Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Mon Apr 15, 2013 6:14 am 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
Kestas, I have submitted a pull request for this. I have put this code on the beta server if you want to see it.

Here are the gameids for the regularPress, publicPress, and noPress games I tested on the beta site:
gameID=114244, gameID=114245, and gameID=114246 respectively.


Oli, if you want the country tabs for your moderators, let me know and I can do that in a sub-branch for you to pull in, and Kestas if he wants it too as part of the general package. The webdip mods didn't care as they prefer to work by email.


Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Mon Apr 15, 2013 11:50 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
On vDip I made a special admin-page for chat-analysing.


Attachments:
Chatlog.png
Chatlog.png [ 98.42 KiB | Viewed 2510 times ]


Last edited by Sleepcap on Mon Apr 15, 2013 6:07 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Mon Apr 15, 2013 6:01 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
We have this on vDip for about 1 or 2 years now.

Some more things to add:
1. If a mod is playing in the game he should not be able to post there. We had quite some confusion till I disabled this for mods in games.
2. In NoPress-games the chatwindow shows up for all players if there is a message from the mods or a gamemaster. After a player has read the message the "newMessage" flag is cleared and the chatlog does not get displayed next time.


Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Mon Apr 15, 2013 10:59 pm 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
Sleepcap wrote:
We have this on vDip for about 1 or 2 years now.

Some more things to add:
1. If a mod is playing in the game he should not be able to post there. We had quite some confusion till I disabled this for mods in games.
2. In NoPress-games the chatwindow shows up for all players if there is a message from the mods or a gamemaster. After a player has read the message the "newMessage" flag is cleared and the chatlog does not get displayed next time.
Can you clarify what you mean by #1? Do you mean that a mod that is in a NoPress game should not be able to post a mod message in that game?

I sort of like the idea of the message going away after being read once, but looking down the road I was also envisioning it as a place for a game creator, mod, or TD to post special rules. Do you have an alternative way to display special rules?


Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Thu Apr 25, 2013 11:15 pm 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
Oli,

Since you implemented similar functionality but did it differently, you'll need to be careful when merging this in or you could have unexpected results. You might have the chatbox show up twice in a nopress game when there is an unread message, since my code always shows it, but in read only mode, but then you have another code snippet that shows it when there is an unread message.

But maybe the unread message will be gone after the first chatbox is built so the second piece of code will never execute.


Top
 Profile  
 
 Post subject: Re: Post Notes to Self
PostPosted: Sat Apr 27, 2013 5:17 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
In your code an Admin can post in gunboat-games he is playing.
That caused some trouble some time ago, as as a mod revealed his identity in a anon/gunboat game by accident.
(He didn't realize it was a gunboat)

I changed:
Code:
      if ( ( $User->type['Moderator'] && $msgCountryID == 0)) ||
           ( isset($Member) &&
             ( $Game->pressType == 'Regular' ||                                         // All tabs allowed for Regular
               $Member->countryID == $msgCountryID ||                                   // Notes tab always allowed
               ( $msgCountryID == 0 &&                                                  // Global tab allowed for...
                 ( $Game->pressType == 'PublicPressOnly' ||                             // public press and
                   ( $Game->pressType == 'NoPress' && $Game->phase == 'Finished' )))))) // finished nopress.
      {

with
Code:
      if ( ( $User->type['Moderator'] && $msgCountryID == 0 && !isset($Member)) ||
           ( isset($Member) &&
             ( $Game->pressType == 'Regular' ||                                         // All tabs allowed for Regular
               $Member->countryID == $msgCountryID ||                                   // Notes tab always allowed
               ( $msgCountryID == 0 &&                                                  // Global tab allowed for...
                 ( $Game->pressType == 'PublicPressOnly' ||                             // public press and
                   ( $Game->pressType == 'NoPress' && $Game->phase == 'Finished' )))))) // finished nopress.
      {


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group