forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Fri Nov 17, 2017 5:30 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Jan 02, 2012 6:55 am 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
yebellz wrote:
Global chat: there is always the workaround of viewing the full message history and using ctrl+F on "To: Global", so this problem is probably not a huge deal, just an inconvenience (for live games, etc). Single letter labels like "A:" are sufficient for the three variants on this website. Alderian points out that a single letter is not sufficient for larger variants, but those could be easily handled with two or three letter abbreviations. It's ok to make variant creators specify the list of power name abbreviations. I disagree with Alderian's proposal to use black text in global chat with long labels. As Kestas pointed out, the color coding is probably helpful to many and there is no reason to remove it. Kestas also said that the main reason for not using long labels is that they would take up too much space. Single (or double/triple for some variants) letter labels, while keeping the color coding, seems like the most reasonable solution, if worthwhile at all given the message archive workaround.

Okay, so I've looked at the global chat issue side of this and have some more thoughts.

First, this could also be an issue for non-global chat channels as well. If you are Russia and Russia/Germany look the same to you, it could be hard to differentiate your own text from Germany's. Yours will be italicized of course, but adding the country abbreviation tag to the start could still help, yes? Or no?

Second, check isset($Game->Variant->abbrv) and if set, then add it to the text after the date if there is one and before the message. In each variant, $abbrv is an optional array declared like $country. If declared, then it gets used. If not declared, then it isn't used. The writer of the variant can choose to use just the first letter, or two or three, or the whole country name if they want. That makes it so variants with lots of countries, many with similar countries, can have their texts differentiated.

But it doesn't solve the issue of color-blind folks playing Classic.

Third, add a user option that says to add the country name if there isn't an abbreviation already. It would be nice to have a column in wd_users of type set() with that could hold a bunch of options. Is that the best/efficient way of doing it? From here: http://dev.mysql.com/doc/refman/5.0/en/set.html it appears that gives us room for 64 options stored as an 8 byte integer. And the set type is already used for the user types and notifications columns. The hideEmail option could be moved into it as well.

Thoughts?


Top
 Profile  
 
PostPosted: Mon Jan 02, 2012 8:50 am 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
After thinking some more, a bit of a tweak. I'd suggest that every variant, including Classic, get the abbrv array. But then variants that should always use the abbrvs should have an extra variable called useAbbrv. Then, if the user option is set to show the abbreviations or if the variant option is set to show the abbreviations, the abbreviations are shown. That way the color blind aren't stuck with the full country names for Classic and other variants that don't need this option on by default.


Top
 Profile  
 
PostPosted: Wed Jan 04, 2012 7:56 am 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
Code changes to add optionally add country abbreviation to chat:

First add the option to the user object and table:
install/???/update.sql - ALTER TABLE `wd_users` ADD `options` set('showCountryAbbrvInChat')...
objects/basic/set.php - Add class setUserOptions with showCountryAbbrvInChat as only allowed value.
objects/user.php - Add options variable, load it in load() function, and add setOptions() and clearOptions() functions.

Next add it as an option on the user control panel:
locales/English/user.php - Add Yes/No radio buttons to set userForm[showCountryAbbrvInChat] based on $User->options->showCountryAbbrvInChat.
objects/user.php - In processForm(), validate $userForm['showCountryAbbrvInChat'], setting $SQLVars['showCountryAbbrvInChat'] to Yes or No.
usercp.php - In the section where $_REQUEST['userForm'] is being processed, if $SQLVars['showCountryAbbrvInChat'] is set, call $User->setOptions() or $User->clearOptions() as appropriate.

And then:
board/chatbox.php - renderMessages() - If variant has $useAbbrv set or $User->options->showCountryAbbrvInChat is set, then insert the country abbreviation before the user message.
variants/*/variant.php - add $abbrv with country abbreviations to use for each country right after $countries is declared. If not set, code will not use the abbreviation logic for that variant.
variants/*/variant.php - add $useAbbrv for variants where we always want the country abbreviation to show.

Thoughts...
'showCountryAbbrvInChat' is kinda long, could be shortened to 'showCountryAbbrv' or something else.

The hideEmail option could also easily be moved from its own column in wd_users to the new options column. The update.sql would need to add the option column, then find all users that have the hideEmail column set to Yes, and set the hideEmail value in the options column. And then remove the hideEmail column, or for extra safety, wait to do that until the following release.

I really need to take the time to look at Sleepcap's code to make sure this fulfill's his variant needs as well as color-blind users' needs.

In any case, I've got it working nicely now. Please let me know any suggestions for changes.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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