Skip to content

Commit b411059

Browse files
committed
Be consistent with colour vs color.
1 parent 7ce7c8c commit b411059

File tree

12 files changed

+71
-71
lines changed

12 files changed

+71
-71
lines changed

engine/Default/combat_log_viewer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
function getParticipantName($accountID, $sectorID) {
160160
global $player;
161161
if($accountID == ACCOUNT_ID_PORT) {
162-
return '<a href="' . Globals::getPlotCourseHREF($player->getSectorID(), $sectorID) . '">Port <span class="sectorColor">#' . $sectorID . '</span></a>';
162+
return '<a href="' . Globals::getPlotCourseHREF($player->getSectorID(), $sectorID) . '">Port <span class="sectorColour">#' . $sectorID . '</span></a>';
163163
}
164164
if($accountID == ACCOUNT_ID_PLANET) {
165165
return '<span class="yellow">Planetary Defenses</span>';

engine/Default/preferences_processing.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
$HoF_name = trim($_REQUEST['HoF_name']);
2222
$ircNick = trim($_REQUEST['irc_nick']);
2323
$cellPhone = trim($_REQUEST['cell_phone']);
24-
$friendlyColor = $_REQUEST['friendly_color'];
25-
$neutralColor = $_REQUEST['neutral_color'];
26-
$enemyColor = $_REQUEST['enemy_color'];
24+
$friendlyColour = $_REQUEST['friendly_color'];
25+
$neutralColour = $_REQUEST['neutral_color'];
26+
$enemyColour = $_REQUEST['enemy_color'];
2727

2828
if (USE_COMPATIBILITY && $action == 'Link Account') {
2929
if(!$account->linkAccount($_REQUEST['oldAccountLogin'],$_REQUEST['oldAccountPassword'])) {
@@ -275,15 +275,15 @@
275275
$db->query('INSERT INTO news (time, news_message, game_id, dead_id,dead_alliance) VALUES (' . $db->escapeNumber(TIME) . ',' . $db->escape_string($news, FALSE) . ',' . $db->escapeNumber($player->getGameID()) . ',' . $db->escapeNumber($player->getAccountID()) . ',' . $db->escapeNumber($player->getAllianceID()) . ')');
276276
$container['msg'] = '<span class="green">SUCCESS: </span>You have changed your player name.';
277277
}
278-
else if ($action == 'Update Colors') {
279-
if (strlen($friendlyColor) == 6) {
280-
$account->setFriendlyColor($friendlyColor);
278+
else if ($action == 'Update Colours') {
279+
if (strlen($friendlyColour) == 6) {
280+
$account->setFriendlyColour($friendlyColour);
281281
}
282-
if (strlen($neutralColor) == 6) {
283-
$account->setNeutralColor($neutralColor);
282+
if (strlen($neutralColour) == 6) {
283+
$account->setNeutralColour($neutralColour);
284284
}
285-
if (strlen($enemyColor) == 6) {
286-
$account->setEnemyColor($enemyColor);
285+
if (strlen($enemyColour) == 6) {
286+
$account->setEnemyColour($enemyColour);
287287
}
288288
$account->update();
289289
}

engine/Default/smr.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function smrBBCode($bbParser, $action, $tagName, $default, $tagParams, $tagConte
9999
return true;
100100
}
101101

102-
$sectorTag = '<span class="sectorColor">#' . $sectorID . '</span>';
102+
$sectorTag = '<span class="sectorColour">#' . $sectorID . '</span>';
103103

104104
// The use of $var here is for a corner case where an admin can check reported messages whilst being in-game.
105105
// Ugly but working, probably want a better mechanism to check if more BBCode tags get added
@@ -393,15 +393,15 @@ function get_colored_text_range($value, $maxValue, $text = null, $minValue = 0,
393393
$g_component = 'ff';
394394
}
395395
$colour = $r_component . $g_component . '00';
396-
if ($return_type == 'Color') return $colour;
396+
if ($return_type == 'Colour') return $colour;
397397
return '<span style="color:#' . $colour . '">' . $text . '</span>';
398398
}
399399
elseif ($type == 'IRC') {
400400
//IRC color codes
401401
if ($normalisedValue == 255) $colour = '[k03]';
402402
elseif ($normalisedValue == -255) $colour = '[k04]';
403403
else $colour = '[k08]';
404-
if ($return_type == 'Color') return $colour;
404+
if ($return_type == 'Colour') return $colour;
405405
return $colour . $text;
406406
}
407407
}

htdocs/css/shared.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ table.center, table.centered {
219219
.blue {
220220
color:#00F;
221221
}
222-
.npcColor {
222+
.npcColour {
223223
color: #6CF;
224224
}
225-
.sectorColor {
225+
.sectorColour {
226226
}
227227
.creds {
228228
color: #FF0;

lib/Default/AbstractSmrAccount.class.inc

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ abstract class AbstractSmrAccount {
6969
protected $template;
7070
protected $hotkeys = array();
7171
protected $permissions;
72-
protected $friendlyColor;
73-
protected $neutralColor;
74-
protected $enemyColor;
72+
protected $friendlyColour;
73+
protected $neutralColour;
74+
protected $enemyColour;
7575

7676
protected $npc;
7777

@@ -186,9 +186,9 @@ abstract class AbstractSmrAccount {
186186
$this->useAJAX = $this->db->getBoolean('use_ajax');
187187
$this->mailBanned = (int)$row['mail_banned'];
188188

189-
$this->friendlyColor = $row['friendly_color'];
190-
$this->neutralColor = $row['neutral_color'];
191-
$this->enemyColor = $row['enemy_color'];
189+
$this->friendlyColour = $row['friendly_colour'];
190+
$this->neutralColour = $row['neutral_colour'];
191+
$this->enemyColour = $row['enemy_colour'];
192192

193193
$this->cssLink = $row['css_link'];
194194
$this->defaultCSSEnabled = $this->db->getBoolean('default_css_enabled');
@@ -283,9 +283,9 @@ abstract class AbstractSmrAccount {
283283
', fontsize = ' . $this->db->escapeNumber($this->fontSize).
284284
', css_link = ' . $this->db->escapeString($this->cssLink,true,true).
285285
', cell_phone = ' . $this->db->escapeString($this->cellPhone, true, true).
286-
', friendly_color = ' . $this->db->escapeString($this->friendlyColor, true, true).
287-
', neutral_color = ' . $this->db->escapeString($this->neutralColor, true, true).
288-
', enemy_color = ' . $this->db->escapeString($this->enemyColor, true, true).
286+
', friendly_colour = ' . $this->db->escapeString($this->friendlyColour, true, true).
287+
', neutral_colour = ' . $this->db->escapeString($this->neutralColour, true, true).
288+
', enemy_colour = ' . $this->db->escapeString($this->enemyColour, true, true).
289289
' WHERE account_id = '.$this->db->escapeNumber($this->account_id).' LIMIT 1');
290290
$this->hasChanged = false;
291291
}
@@ -1163,25 +1163,25 @@ abstract class AbstractSmrAccount {
11631163
return $days;
11641164
}
11651165

1166-
public function getFriendlyColor() {
1167-
return $this->friendlyColor;
1166+
public function getFriendlyColour() {
1167+
return $this->friendlyColour;
11681168
}
1169-
public function setFriendlyColor($color) {
1170-
$this->friendlyColor = $color;
1169+
public function setFriendlyColour($colour) {
1170+
$this->friendlyColour = $colour;
11711171
$this->hasChanged = true;
11721172
}
1173-
public function getNeutralColor() {
1174-
return $this->neutralColor;
1173+
public function getNeutralColour() {
1174+
return $this->neutralColour;
11751175
}
1176-
public function setNeutralColor($color) {
1177-
$this->neutralColor = $color;
1176+
public function setNeutralColour($colour) {
1177+
$this->neutralColour = $colour;
11781178
$this->hasChanged = true;
11791179
}
1180-
public function getEnemyColor() {
1181-
return $this->enemyColor;
1180+
public function getEnemyColour() {
1181+
return $this->enemyColour;
11821182
}
1183-
public function setEnemyColor($color) {
1184-
$this->enemyColor = $color;
1183+
public function setEnemyColour($colour) {
1184+
$this->enemyColour = $colour;
11851185
$this->hasChanged = true;
11861186
}
11871187

lib/Default/AbstractSmrPlayer.class.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ abstract class AbstractSmrPlayer {
414414
}
415415

416416
public function getPlayerName() {
417-
return $this->playerName . ($this->isNPC() ? ' <span class="npcColor">[NPC]</span>' : '');
417+
return $this->playerName . ($this->isNPC() ? ' <span class="npcColour">[NPC]</span>' : '');
418418
}
419419

420420
public function setPlayerName($name) {
@@ -425,7 +425,7 @@ abstract class AbstractSmrPlayer {
425425
public function getDisplayName($includeAlliance=false) {
426426
$return = get_colored_text($this->getAlignment(),$this->playerName.' ('.$this->getPlayerID().')');
427427
if($this->isNPC()) {
428-
$return .= ' <span class="npcColor">[NPC]</span>';
428+
$return .= ' <span class="npcColour">[NPC]</span>';
429429
}
430430
if($includeAlliance) {
431431
$return.= ' (' . $this->getAllianceName() . '</a>' . ')';
@@ -531,7 +531,7 @@ abstract class AbstractSmrPlayer {
531531
}
532532

533533
public function getSpanColour() {
534-
return get_colored_name('NA', $this->alignment, 'Game', 'Color');
534+
return get_colored_name('NA', $this->alignment, 'Game', 'Colour');
535535
}
536536

537537
public function isCombatDronesKamikazeOnMines() {

lib/Default/SmrPlayer.class.inc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SmrPlayer extends AbstractSmrPlayer {
2222
protected $lastNewsUpdate;
2323
protected $stunned;
2424
protected $fleed;
25-
protected $attackColor;
25+
protected $attackColour;
2626
protected $kicked;
2727
// protected $pastKnowledge;
2828
protected $governmentHelp;
@@ -172,7 +172,7 @@ class SmrPlayer extends AbstractSmrPlayer {
172172
$this->lastNewsUpdate = (int) $result['last_news_update'];
173173
$this->stunned = (int) $result['stunned'];
174174
$this->fleed = $result['fleed']=='TRUE';
175-
$this->attackColor = (string) $result['attack_warning'];
175+
$this->attackColour = (string) $result['attack_warning'];
176176
$this->dead = $result['dead']=='TRUE';
177177
$this->startDead = $this->dead;
178178
$this->landedOnPlanet = $result['land_on_planet']=='TRUE';
@@ -288,7 +288,7 @@ class SmrPlayer extends AbstractSmrPlayer {
288288
return $this->stunned;
289289
case 'Fleed':
290290
return $this->fleed;
291-
case 'Attack Color':
291+
case 'Attack Colour':
292292
return $this->attackWarning;
293293
// case 'Chat':
294294
// return $this->chat;
@@ -302,7 +302,7 @@ class SmrPlayer extends AbstractSmrPlayer {
302302
return $this->getLevelID();
303303
case 'Display Name':
304304
return $this->getDisplayName();
305-
case 'Span Color':
305+
case 'Span Colour':
306306
return $this->getSpanColour();
307307
// case 'Ship Size':
308308
// return $this->getShipSize();
@@ -465,16 +465,16 @@ class SmrPlayer extends AbstractSmrPlayer {
465465
$this->hasChanged=true;
466466
}
467467

468-
function getAttackColor() {
469-
return $this->attackColor;
468+
function getAttackColour() {
469+
return $this->attackColour;
470470
}
471471

472-
function setAttackColor($colour) {
473-
if($this->attackColor == $colour)
472+
function setAttackColour($colour) {
473+
if($this->attackColour == $colour)
474474
return;
475-
$this->attackColor=$colour;
475+
$this->attackColour=$colour;
476476
$this->hasChanged=true;
477-
// $this->db->query('UPDATE player SET attack_warning = ' . $this->db->escapeString($this->attackColor) . ' WHERE ' . $this->SQL . ' LIMIT 1');
477+
// $this->db->query('UPDATE player SET attack_warning = ' . $this->db->escapeString($this->attackColour) . ' WHERE ' . $this->SQL . ' LIMIT 1');
478478
}
479479

480480
function getBank() {
@@ -1383,7 +1383,7 @@ class SmrPlayer extends AbstractSmrPlayer {
13831383
', last_news_update='.$this->db->escapeNumber($this->lastNewsUpdate).
13841384
', stunned='.$this->db->escapeString($this->stunned).
13851385
', fleed='.$this->db->escapeBoolean($this->fleed).
1386-
', attack_warning='.$this->db->escapeString($this->attackColor).
1386+
', attack_warning='.$this->db->escapeString($this->attackColour).
13871387
', dead='.$this->db->escapeBoolean($this->dead).
13881388
', land_on_planet='.$this->db->escapeBoolean($this->landedOnPlanet).
13891389
', kicked='.$this->db->escapeBoolean($this->kicked).

templates/Default/engine/Default/includes/Head.inc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ if(isset($ExtraCSSLink)) {
1616
/* Friend vs Foe shades */
1717

1818
.enemy, .enemy:hover { {
19-
color: #<?php echo $ThisAccount->getEnemyColor(); ?>;
19+
color: #<?php echo $ThisAccount->getEnemyColour(); ?>;
2020
}
2121
.enemyBack, .enemyBack:hover {
22-
background-color: #<?php echo $ThisAccount->getEnemyColor(); ?>;
22+
background-color: #<?php echo $ThisAccount->getEnemyColour(); ?>;
2323
}
2424

2525
.friendly, .friendly:hover {
26-
color: #<?php echo $ThisAccount->getFriendlyColor(); ?>;
26+
color: #<?php echo $ThisAccount->getFriendlyColour(); ?>;
2727
}
2828
.friendlyBack, .friendlyBack:hover {
29-
background-color: #<?php echo $ThisAccount->getFriendlyColor(); ?>;
29+
background-color: #<?php echo $ThisAccount->getFriendlyColour(); ?>;
3030
}
3131

3232
.neutral, .neutral:hover {
33-
color: #<?php echo $ThisAccount->getNeutralColor(); ?>;
33+
color: #<?php echo $ThisAccount->getNeutralColour(); ?>;
3434
}
3535
.neutralBack, .neutralBack:hover {
36-
background-color: #<?php echo $ThisAccount->getNeutralColor(); ?>;
36+
background-color: #<?php echo $ThisAccount->getNeutralColour(); ?>;
3737
}<?php
3838
} ?>
3939
</style><?php

templates/Default/engine/Default/includes/RightPanel.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if(isset($GameID)) { ?>
8585
}
8686
if($ThisShip->hasActiveIllusion()) { ?>
8787
<a href="<?php echo $HardwareLink; ?>">
88-
<span class="npcColor"><?php echo $ThisShip->getIllusionShipName(); ?></span><br />
88+
<span class="npcColour"><?php echo $ThisShip->getIllusionShipName(); ?></span><br />
8989
IG Rating : <?php echo $ThisShip->getIllusionAttack(); ?>/<?php echo $ThisShip->getIllusionDefense(); ?>
9090
</a><br />
9191
<br /><?php

templates/Default/engine/Default/includes/SectorPlayers.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
echo $Ship->getIllusionShipName();
3434
}
3535
else if($Ship->getName() != $Ship->getIllusionShipName()) {
36-
?> <span class="npcColor">(<?php echo $Ship->getIllusionShipName(); ?>)</span><?php
36+
?> <span class="npcColour">(<?php echo $Ship->getIllusionShipName(); ?>)</span><?php
3737
}
3838
}
3939
if($Ship->isCloaked()) {
@@ -49,7 +49,7 @@
4949
echo $Ship->getIllusionAttack(); ?> / <?php echo $Ship->getIllusionDefense();
5050
}
5151
else if($Ship->getAttackRating() != $Ship->getIllusionAttack() || $Ship->getDefenseRating() != $Ship->getIllusionDefense()) {
52-
?> <span class="npcColor">(<?php echo $Ship->getIllusionAttack(); ?> / <?php echo $Ship->getIllusionDefense(); ?>)</span><?php
52+
?> <span class="npcColour">(<?php echo $Ship->getIllusionAttack(); ?> / <?php echo $Ship->getIllusionDefense(); ?>)</span><?php
5353
}
5454
} ?></td>
5555
<td class="shrink center noWrap"><?php echo $Player->getLevelID() ?></td>

0 commit comments

Comments
 (0)