From 674f553eb2d88275e53bc0c5cb0a2b711480f6f3 Mon Sep 17 00:00:00 2001 From: jmo1121109 Date: Fri, 29 Mar 2019 22:15:31 -0400 Subject: [PATCH] Restyle Multiple Pages Update settings, intro to diplomacy, developer, and datc tests pages to modern styling. Minor content corrections. --- css/global.css | 106 ++++++++++++++++++++- datc.php | 2 +- locales/English/datc.php | 8 +- locales/English/developers.php | 50 +++++----- locales/English/intro.php | 9 +- locales/English/user.php | 162 ++++++++++++++++----------------- usercp.php | 12 ++- 7 files changed, 221 insertions(+), 128 deletions(-) diff --git a/css/global.css b/css/global.css index 9c1d9b5ab..66df25606 100755 --- a/css/global.css +++ b/css/global.css @@ -638,7 +638,7 @@ TABLE { border-collapse: collapse; width:100%; } -div.datc table { +/* div.datc table { border: solid #aaa 1px; } div.datc th, .datc td { @@ -651,7 +651,7 @@ div.datc th { border-bottom: solid #aaa 1px; padding: 3px 5px; font-size:16px; -} +} */ TABLE.credits { border: solid #aaa 1px; width:85%; @@ -745,6 +745,47 @@ TD.army, div.army { } /* End of section for FAQ styling */ +/* Section for datc styling */ +.datc { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + border-collapse: collapse; +} + +.datc td, .datc th { + border: 1px solid #ddd; + padding: 6px; +} + +.datc tr:nth-child(even){background-color: #f2f2f2; word-break: break-word;} +.datc tr:nth-child(odd){background-color: #ffffff; word-break: break-word;} + +.datc th { + padding-top: 12px; + padding-bottom: 12px; + text-align: left; + background-color: #009902; + color: white; + min-width:70px; +} +/* End of section for Hall of Fame styling */ + +/* Section for Developer styling */ +.developerInfo-show { + border-radius: 7px; + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + overflow: hidden; + background-color: #f1f1f1; + font-size: 14px; + padding: 0 0 0 10px; + margin-top:0px !important; +} + +.developerInfo-show h3 { + margin-left: 0px !important; +} +/* End of section for Developer styling */ + + /* Section for Hall of Fame styling */ .hof { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; @@ -810,6 +851,64 @@ input[type="text"].contactUs, input[type="password"].contactUs, textarea.contact } /* End of section for contactUsDirect page styling */ +/* Section for intro page */ +.introToDiplomacy { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; +} + +.introToDiplomacy_show { + border-radius: 7px; + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + overflow: hidden; + background-color: #f1f1f1; + font-size: 14px; + padding: 0 0 0 10px; + margin-top:0px !important; +} +/* End of section for intro page */ + +/* Section for settings page */ +.settings { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; +} + +.settings_show { + border-radius: 7px; + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + overflow: hidden; + background-color: #f1f1f1; + font-size: 14px; + padding: 0 0 0 10px; + margin-top:0px !important; +} + +.settings-submit { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + color: #fff !important; + text-transform: uppercase; + background: #60a3bc !important; + padding: 5px; + border-radius: 50px; + display: inline-block; + border: none; +} + +.settings-submit:hover { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + text-shadow: 0px 0px 6px rgba(255, 255, 255, 1); + transition: all 0.4s ease 0s; +} + +input[type="text"].settings, input[type="password"].settings, textarea.settings, select.settings { + font-size: 14px; + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + background-color: #ffffff !important; + border: 1px solid #c1c1c1; + color:#000000; +} +/* End of section for settings page */ + + /* Section for credits page styling */ .credits { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; @@ -1301,4 +1400,7 @@ input[id^="FinalizeButton"]{ textarea.contactUs, input[type="text"].contactUs, select.contactUs{ width: 80%; } + textarea.settings, input[type="text"].settings, input[type="password"].settings, select.settings{ + width: 80%; + } } \ No newline at end of file diff --git a/datc.php b/datc.php index fe74d5dce..e373f964a 100755 --- a/datc.php +++ b/datc.php @@ -26,7 +26,7 @@ libHTML::starthtml(l_t('DATC Tests')); -print libHTML::pageTitle(l_t('Diplomacy Adjudicator Test Cases'),l_t('The results of a set of automated tests which show the webDiplomacy\'s compliance with the official Diplomacy rules.')); +print libHTML::pageTitle(l_t('Diplomacy Adjudicator Test Cases'),l_t('The results of a set of automated tests which show webDiplomacy\'s compliance with the official Diplomacy rules.')); if ( $Misc->Maintenance ) { diff --git a/locales/English/datc.php b/locales/English/datc.php index d3cf9b1cd..b6b8015aa 100755 --- a/locales/English/datc.php +++ b/locales/English/datc.php @@ -117,20 +117,16 @@

Tests

'; -$alternate=2; $lastSectionID=-1; while ( list($id, $name, $status, $description) = $DB->tabl_row($tabl) ) { - $alternate = 3-$alternate; - $sectionID = floor($id/100); if( $sectionID != $lastSectionID ) { - print ' + print ''; - $alternate = 3-$alternate; } $lastSectionID = $sectionID; @@ -149,7 +145,7 @@ $name.' - '.$status.'
'.$description; print ' - + diff --git a/locales/English/developers.php b/locales/English/developers.php index a25a91082..6e75c1142 100755 --- a/locales/English/developers.php +++ b/locales/English/developers.php @@ -25,25 +25,26 @@ * @subpackage Static */ -print libHTML::pageTitle('Developer/webmaster info','If you want to fix/improve/install webDiplomacy all the info you need to make it happen is here.'); - +print libHTML::pageTitle('Developer/webmaster info','All the info you need to help improve or install webDiplomacy.'); ?> -

Webdiplomacy is open source, and we welcome contributions! You can find our todo list here, and our code here

- -
- -

Feature requests

+
+

Webdiplomacy is open source, and we welcome contributions! You can find our todo list here, +and our code here

-

We get a lot of feature requests. If your feature request isn't already on our issue tracker, then the best place to ask is the forum. This will help us gauge support for your ideas, before we add it to the todo list.

+

Feature requests

-
-

Bug reports

+

We get a lot of feature requests. If your feature request isn't already on our issue tracker, then the best place to ask is the forum. + This will help us gauge support for your ideas, before we add it to the todo list.

+ +

Bug reports

-

If you're familiar with github, you're welcome to submit a bug report in our issue tracker. Please be as detailed as possible, and include steps to reproduce the bug, what happens, and what you expect to happen instead. If you don't want to use github, you can also email bug reports to webdipmod@gmail.com.

-
+

If you're familiar with github, you're welcome to submit a bug report in our issue tracker. Please be as detailed as possible, + and include steps to reproduce the bug, what happens, and what you expect to happen instead. If you don't want to use github, + you can also email bug reports to + .

-

Code contributions

+

Code contributions

We welcome code contributions for any of the issues on the "soon" milestone. Simply fork the project, and develop a fix in a branch. We accept pull requests that:

@@ -59,27 +60,24 @@ -

Any questions, please email webdipmod@gmail.com, and a member of the dev team will answer.

+

Any questions, please email + , and a member of the dev team will answer.

- -
-

Code links

+

Code links

github.com/kestasjk/webDiplomacy - the code

github.com/kestasjk/webDiplomacy - the issues

-

Webmasters

+

Webmasters

README.txt - Installation data for webmasters

AGPL.txt - The license protecting this code, if you make changes to the code you've got to share those changes.

-
- -

Layout

+

Layout

If you want to make a change this is where you should start. The two images and text files below will give you a feel for where everything is and how webDip is structured, so you know where to go to find whatever you need to change.

@@ -91,9 +89,7 @@ layout-database.txt - The database layout image and text file; how the database is structured and what different tables do

-
- -

Misc notes

+

Misc notes

javascript.txt - JavaScript info

@@ -104,4 +100,6 @@

coasts.txt - Info on how coasts are handled

We used to have a forum for developers, but it was closed due to inactivity and spammers. Some of the content there is still useful: -forum.webdiplomacy.net

+forum.webdiplomacy.net +

+
diff --git a/locales/English/intro.php b/locales/English/intro.php index b050e83b1..90b199cdd 100755 --- a/locales/English/intro.php +++ b/locales/English/intro.php @@ -25,9 +25,9 @@ * @subpackage Static */ -print libHTML::pageTitle('Intro to webDiplomacy','A quick & easy guide to get newcomers to webDiplomacy playing the game.'); +print libHTML::pageTitle('Intro to webDiplomacy','A quick guide to get newcomers playing the game.'); -print ' +print '

Diplomacy is a game which is easy to learn but impossible to master. The rules are all very intuitive, lots of people pick them up just by playing, but this document will familiarize you more quickly. @@ -213,10 +213,11 @@ With these rules you know everything you need to start playing Diplomacy online! After you register a user account you can create a game - and join existing games. + and join existing games.

- \ No newline at end of file + +
\ No newline at end of file diff --git a/locales/English/user.php b/locales/English/user.php index 17582d4e7..5549f69d6 100755 --- a/locales/English/user.php +++ b/locales/English/user.php @@ -26,8 +26,8 @@ */ ?> -
  • E-mail address
  • -
  • />
  • -
  • Your e-mail address; this will not be spammed or given out to anyone.
  • + ?>" /> +
    *Will not be spammed or given out. +

    -
  • Hide e-mail address:
  • -
  • +

    Hide e-mail address?
    hideEmail=='Yes') print "checked"; ?>>Yes hideEmail=='No') print "checked"; ?>>No -

  • -
  • - Select whether or not you would like other users to be able - to see your e-mail address. If you choose to show your e-mail it - will be embedded into an image to prevent spam bots from picking it up, - so only humans can see it even if you choose to show it. -
  • - -
  • Password:
  • -
  • - -
  • -
  • - Your webDiplomacy password. -
  • - -
  • Password again:
  • -
  • - -
  • -
  • - Re-enter your webDiplomacy password, to make sure there are no typos. -
  • - -
  • Home page:
  • -
  • - -
  • -
  • - type['User'] ) print '(Optional): '; ?> - Your blog, personal website or favourite website. -
  • +

    + +

    Password:
    + +

    + +

    Confirm Password:
    + +

    -
  • Comment:
  • -
  • - -
  • -
  • +
    type['User'] ) print '(Optional): '; ?> - A comment that you would like to be visible to other members on your profile. For example: favourite quotes, links to games you're proud of, favourite threads, etc. -
  • + Profile quote visible to others. Consider favorite quotes or links to games. +

    sql_row("SELECT user_id FROM `phpbb_users` WHERE webdip_user_id = ".$User->id); + if ($newForumId > 0) + { + print '

    Forum User Settings

    '; + } + } + foreach ($User->options->value as $name=>$val) { - print '
  • '.UserOptions::$titles[$name].':
  • '; - print '
  • '; + print '
  • '.UserOptions::$titles[$name].':
  • '; foreach (UserOptions::$possibleValues[$name] as $possible) { print ' '. $possible; } - print ''; + print '
    '; } - if( $User->type['User'] ) { // If the user is registered show the list of muted users/countries: @@ -146,43 +134,46 @@ print ''; } */ - $tablMutedThreads = $DB->sql_tabl( - "SELECT mt.muteThreadID, f.subject, f.replies, fu.username ". - "FROM wD_MuteThread mt ". - "INNER JOIN wD_ForumMessages f ON f.id = mt.muteThreadID ". - "INNER JOIN wD_Users fu ON fu.id = f.fromUserID ". - "WHERE mt.userID = ".$User->id); - $mutedThreads = array(); - while( $mutedThread = $DB->tabl_hash($tablMutedThreads)) - $mutedThreads[] = $mutedThread; - unset($tablMutedThreads); - - if( count($mutedThreads) > 0 ) { - print '
  • Muted threads:
  • '; - print '
  • The threads which you muted.
  • '; + if (!isset(Config::$customForumURL)) + { + $tablMutedThreads = $DB->sql_tabl( + "SELECT mt.muteThreadID, f.subject, f.replies, fu.username ". + "FROM wD_MuteThread mt ". + "INNER JOIN wD_ForumMessages f ON f.id = mt.muteThreadID ". + "INNER JOIN wD_Users fu ON fu.id = f.fromUserID ". + "WHERE mt.userID = ".$User->id); + $mutedThreads = array(); + while( $mutedThread = $DB->tabl_hash($tablMutedThreads)) + $mutedThreads[] = $mutedThread; + unset($tablMutedThreads); - $unmuteThreadID=0; - if( isset($_GET['unmuteThreadID']) ) { + if( count($mutedThreads) > 0 ) { + print '
  • Muted threads:
  • '; + print '
  • The threads which you muted.
  • '; - $unmuteThreadID = (int)$_GET['unmuteThreadID']; - $User->toggleThreadMute($unmuteThreadID); + $unmuteThreadID=0; + if( isset($_GET['unmuteThreadID']) ) { + + $unmuteThreadID = (int)$_GET['unmuteThreadID']; + $User->toggleThreadMute($unmuteThreadID); + + print '
  • Thread #'.$unmuteThreadID.' unmuted.
  • '; + } - print '
  • Thread #'.$unmuteThreadID.' unmuted.
  • '; - } - - print '
  • '; } } /* @@ -191,9 +182,8 @@ */ print ' -
    - - -'; +

    + +'; ?> diff --git a/usercp.php b/usercp.php index e95dcc0a2..2d0fac63e 100755 --- a/usercp.php +++ b/usercp.php @@ -187,9 +187,15 @@ } -print libHTML::pageTitle(l_t('User account settings'),l_t('Alter the settings for your webDiplomacy user account; e.g. change your password/e-mail.')); - -print ' +print libHTML::pageTitle(l_t('User account settings'),l_t('Control settings for your account.')); + +print ' +
    +
    This page allows you to update your profile settings. Your email address will never be spammed or given out, and is only used +by the moderator team to contact you. PLease ensure your email is updated so that the moderators can contact you.

    +If you select "no" for "Hide email address" your email will be displayed to other site users in an image file to protect you from bots. +If you leave the default of "yes" it is only visible to moderators.

    +
    '.$sections[$sectionID][0].' '.$sections[$sectionID][1].'

    '.$image.'

    '.$details.'