Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace png icons with new SVG icons & Add adamantium/platinum donator badges #724

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions admin/adminActionsRestricted.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,38 @@ public function __construct()
<em>Only for owner use.</em>',
'params' => array('userID'=>'User ID'),
),
'makeDonatorOwner' => array(
'name' => 'Donator: Site Co-Owner',
'description' => 'Give Co-Owner marker<br />
<em>Only for owner use.</em>',
'params' => array('userID'=>'User ID'),
),
'makeDonatorAdamantium' => array(
'name' => 'Donator: Adamantium',
'description' => 'Give adamantium donator marker<br />
<em>Only for owner use.</em>',
'params' => array('userID'=>'User ID'),
),
'makeDonatorPlatinum' => array(
'name' => 'Donator: platinum',
'name' => 'Donator: Platinum',
'description' => 'Give platinum donator marker<br />
<em>Only for owner use.</em>',
'params' => array('userID'=>'User ID'),
),
'makeDonatorGold' => array(
'name' => 'Donator: gold',
'name' => 'Donator: Gold',
'description' => 'Give gold donator marker<br />
<em>Only for owner use.</em>',
'params' => array('userID'=>'User ID'),
),
'makeDonatorSilver' => array(
'name' => 'Donator: silver',
'name' => 'Donator: Silver',
'description' => 'Give silver donator marker<br />
<em>Only for owner use.</em>',
'params' => array('userID'=>'User ID'),
),
'makeDonatorBronze' => array(
'name' => 'Donator: bronze',
'name' => 'Donator: Bronze',
'description' => 'Give bronze donator marker<br />
<em>Only for owner use.</em>',
'params' => array('userID'=>'User ID'),
Expand Down Expand Up @@ -954,6 +966,16 @@ public function makeDonator(array $params)
return $this->makeDonatorType($params);
}

public function makeDonatorOwner(array $params)
{
return $this->makeDonatorType($params,'Owner');
}

public function makeDonatorAdamantium(array $params)
{
return $this->makeDonatorType($params,'Adamantium');
}

public function makeDonatorPlatinum(array $params)
{
return $this->makeDonatorType($params,'Platinum');
Expand Down
4 changes: 2 additions & 2 deletions admin/adminMultiFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public function printCheckSummary()
print '<p>'.l_t('Checking %s %s %s (userID=%s)','<a href="userprofile.php?userID='.$this->aUserID.'">'.$this->aUser->username.'</a>',
'('.$this->aUser->points.' '.libHTML::points().')',
'RR: '.$this->aUser->reliabilityRating,$this->aUserID)
.($this->aUser->type['Banned'] ? '<img src="'.l_s('images/icons/cross.png').'" alt="X" title="'.l_t('Banned').'" />' : '').'
.($this->aUser->type['Banned'] ? '<img src="'.l_s('images/icons/cross.svg').'" alt="X" title="'.l_t('Banned').'" />' : '').'
<ul>
<li><strong>email:</strong> ' .$this->aUser->email.'</li>
</ul></p>';
Expand Down Expand Up @@ -698,7 +698,7 @@ public function compare(User $bUser)

print '<ul>';
print '<li><a href="userprofile.php?userID='.$bUser->id.'">'.$bUser->username.'</a> ('.$bUser->points.' '.libHTML::points().')
'.($bUser->type['Banned'] ? '<img src="'.l_s('images/icons/cross.png').'" alt="X" title="'.l_t('Banned').'" />' : '').'
'.($bUser->type['Banned'] ? '<img src="'.l_s('images/icons/cross.svg').'" alt="X" title="'.l_t('Banned').'" />' : '').'
RR: '.$bUser->reliabilityRating.'
(<a href="?aUserID='.$bUser->id.'#viewMultiFinder" class="light">'.l_t('check userID=%s',$bUser->id).'</a>)
<ul><li><strong>email:</strong> ' .$bUser->email.'</li>';
Expand Down
2 changes: 1 addition & 1 deletion ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function logJavaScriptError() {
else
$DB->sql_put("ROLLBACK");

$results = array('invalid'=>true, 'statusIcon'=>'<img src="'.l_s('images/icons/alert.png').'" alt="'.l_t('Error').'" title="'.l_t('Error alert').'" />',
$results = array('invalid'=>true, 'statusIcon'=>'<img src="'.l_s('images/icons/alert.svg').'" alt="'.l_t('Error').'" title="'.l_t('Error alert').'" />',
'statusText'=>'', 'notice'=>l_t('Exception: ').$e->getMessage(), 'orders'=>array());
}
}
Expand Down
2 changes: 1 addition & 1 deletion board/info/maps.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
print '<p style="text-align:center">
<img src="map.php?gameID='.$Game->id.'&turn='.$i.'" title="'.l_t('Small map for this turn').'" /><br />
'.l_t('Large map:').' <a href="map.php?gameID='.$Game->id.'&largemap=on&turn='.$i.'">
<img src="'.l_s('images/historyicons/external.png').'" alt="'.l_t('Large map').'"
<img src="'.l_s('images/historyicons/external.svg').'" alt="'.l_t('Large map').'"
title="'.l_t('This button will open the large map in a new window. The large map shows all the moves, and is useful when the small map isn\'t clear enough').'."
/></a>
</p>';
Expand Down
92 changes: 46 additions & 46 deletions board/info/orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ function outputOrderLogs(array $orders)

foreach($types as $phase=>$orderTypes)
{
if ($phase == 'Diplomacy' ) {
$buffer .= '<li><strong>'.l_t($phase)."</strong></li>\n\t\t\t<ul>";
} else {
$orderFound=0;
foreach($orderTypes as $t) {
if (array_key_exists($t, $orders)) {
$orderFound=1;
break;
}
}
if ($orderFound)
$buffer .= '<li>'.orderIndex(l_t($phase), 3).'<strong>'.l_t($phase)."</strong></li>\n\t\t\t<ul>";
else
continue;
}
if ($phase == 'Diplomacy' ) {
$buffer .= '<li><strong>'.l_t($phase)."</strong></li>\n\t\t\t<ul>";
} else {
$orderFound=0;
foreach($orderTypes as $t) {
if (array_key_exists($t, $orders)) {
$orderFound=1;
break;
}
}
if ($orderFound)
$buffer .= '<li>'.orderIndex(l_t($phase), 3).'<strong>'.l_t($phase)."</strong></li>\n\t\t\t<ul>";
else
continue;
}

foreach($orderTypes as $orderType)
{
Expand All @@ -116,9 +116,9 @@ function outputOrderLogs(array $orders)
{
$buffer .= '<li>';

if ($order['dislodged'] == 'Yes' || ($order['success'] == 'No' && $order['type'] != 'hold'))
$buffer .= '<u>'; // underline failed orders

if ($order['dislodged'] == 'Yes' || ($order['success'] == 'No' && $order['type'] != 'hold'))
$buffer .= '<u>'; // underline failed orders
if ( $phase == 'Retreats' )
{
switch($order['type'])
Expand Down Expand Up @@ -152,30 +152,30 @@ function outputOrderLogs(array $orders)
($order['fromTerrID'] ? l_t(" from %s",l_t($terrIDToName[$order['fromTerrID']])) : '').
($order['viaConvoy'] == 'Yes' ? l_t(" via convoy") : '');
}

$buffer .= '.';

if ($order['dislodged'] == 'Yes' || ($order['success'] == 'No' && $order['type'] != 'hold')) {
$buffer .= '</u>';

if ($order['success'] == 'No') {
/*
if ($order['type'] == 'move') // not sure its good idea to say 'bounce'
$buffer .= ' (bounce)'; // when you don't really know cause of failure
else if ($order['type'] == 'retreat')
$buffer .= ' (fail)';
else if ($order['type'] != 'hold')// supports and convoy
$buffer .= ' (cut)';
*/
if ($order['type'] != 'hold')
$buffer .= ' ('.l_t('fail').')';
}

if ($order['dislodged'] == 'Yes')
$buffer .= ' ('.l_t('dislodged').')';
}

$buffer .= '</li>';
$buffer .= '.';

if ($order['dislodged'] == 'Yes' || ($order['success'] == 'No' && $order['type'] != 'hold')) {
$buffer .= '</u>';
if ($order['success'] == 'No') {
/*
if ($order['type'] == 'move') // not sure its good idea to say 'bounce'
$buffer .= ' (bounce)'; // when you don't really know cause of failure
else if ($order['type'] == 'retreat')
$buffer .= ' (fail)';
else if ($order['type'] != 'hold')// supports and convoy
$buffer .= ' (cut)';
*/
if ($order['type'] != 'hold')
$buffer .= ' ('.l_t('fail').')';
}
if ($order['dislodged'] == 'Yes')
$buffer .= ' ('.l_t('dislodged').')';
}
$buffer .= '</li>';
}
}

Expand All @@ -189,7 +189,7 @@ function outputOrderLogs(array $orders)
print '<h3>'.l_t('Order history').'</h3>';
print '<div class="variant'.$Game->Variant->name.'">';

$tabl = $DB->sql_tabl("SELECT turn, countryID, LOWER(unitType) as unitType, LOWER(type) as type, terrID, toTerrID, fromTerrID, viaConvoy, success, dislodged
$tabl = $DB->sql_tabl("SELECT turn, countryID, LOWER(unitType) as unitType, LOWER(type) as type, terrID, toTerrID, fromTerrID, viaConvoy, success, dislodged
FROM wD_MovesArchive WHERE gameID = ".$Game->id."
ORDER BY turn DESC, countryID ASC");

Expand All @@ -214,7 +214,7 @@ function outputOrderLogs(array $orders)
$buffer .= orderIndex($Game->datetxt($row['turn']), 1);

$buffer .= $Game->datetxt($row['turn']).' <a href="map.php?gameID='.$Game->id.'&largemap=on&turn='.$row['turn'].'">
<img src="'.l_s('images/historyicons/external.png').'" alt="'.l_t('Large map').'"
<img src="'.l_s('images/historyicons/external.svg').'" alt="'.l_t('Large map').'"
title="'.l_t('This button will open the large map in a new window. The large map shows all the moves, and is useful when the small map isn\'t clear enough.').
'" /></a>:</h4>';
$buffer .= '<p>';
Expand All @@ -224,7 +224,7 @@ function outputOrderLogs(array $orders)

$buffer .= orderIndex(l_t($countryIDToName[$row['countryID']]), 2);

$buffer .= '<strong><span class="country'.$row['countryID'].'">'.l_t($countryIDToName[$row['countryID']])."</span>:</strong><br />";
$buffer .= '<strong><span class="country'.$row['countryID'].'">'.l_t($countryIDToName[$row['countryID']])."</span>:</strong><br />";
$lastCountryID = $row['countryID'];
}

Expand All @@ -245,4 +245,4 @@ function outputOrderLogs(array $orders)

print '</p></div>';

?>
?>
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ public function load_webdip($event)
if ($finalTheme == 'dark')
{
$this->template->assign_vars(array(
'U_WD_WEBDIPPOINTS' => '(' . $this->points . ' <img src="' . $this->WEBDIPPATH . 'images/icons/points.png" alt="D" />)'.'<link rel="stylesheet" href="'.$this->WEBDIPPATH.('/css/darkMode/global.css').'" type="text/css" />',
'U_WD_WEBDIPPOINTS' => '(' . $this->points . ' <img src="' . $this->WEBDIPPATH . 'images/icons/points.svg" alt="D" />)'.'<link rel="stylesheet" href="'.$this->WEBDIPPATH.('/css/darkMode/global.css').'" type="text/css" />',
'U_WD_NOTICEBLOCK' => $this->noticeBlock() . $this->variantCSS($finalTheme),
'U_WD_GAMENOTIFYBLOCK' => $this->gameNotifyBlock()
));
}
else
{
$this->template->assign_vars(array(
'U_WD_WEBDIPPOINTS' => '(' . $this->points . ' <img src="' . $this->WEBDIPPATH . 'images/icons/points.png" alt="D" />)',
'U_WD_WEBDIPPOINTS' => '(' . $this->points . ' <img src="' . $this->WEBDIPPATH . 'images/icons/points.svg" alt="D" />)',
'U_WD_NOTICEBLOCK' => $this->noticeBlock() . $this->variantCSS($finalTheme),
'U_WD_GAMENOTIFYBLOCK' => $this->gameNotifyBlock()
));
Expand Down Expand Up @@ -214,7 +214,7 @@ private function gameNotifyBlock()
if ( strpos($this->notifications,'PrivateMessage')!==false )
{
$gameNotifyBlock .= '<span class=""><a href="' . $this->WEBDIPPATH . 'index.php?notices=on">'.
('PM').' <img src="' . $this->WEBDIPPATH . ''.('images/icons/mail.png').'" alt="'.('New private messages').'" title="'.('New private messages!').'" />'.
('PM').' <img src="' . $this->WEBDIPPATH . ''.('images/icons/mail.svg').'" alt="'.('New private messages').'" title="'.('New private messages!').'" />'.
'</a></span> ';
}

Expand All @@ -229,14 +229,14 @@ private function gameNotifyBlock()
}
else
{
$orderIcon = 'alert.png';
$orderIcon = 'alert.svg';
if( strpos($notifyGame['orderStatus'],'Saved')!==false )
{
$orderIcon = 'alert_minor.png';
$orderIcon = 'alert_minor.svg';
}
if( strpos($notifyGame['orderStatus'],'Completed')!==false )
{
$orderIcon = 'tick_faded.png';
$orderIcon = 'tick_faded.svg';
}
if( strpos($notifyGame['orderStatus'],'Ready')!==false )
{
Expand All @@ -254,7 +254,7 @@ private function gameNotifyBlock()
$notifyGame['name'];

if ( $notifyGame['processStatus'] == 'Paused' )
$gameNotifyBlock .= '-<img src="' . $this->WEBDIPPATH . ''.'images/icons/pause.png'.'" alt="'.'Paused'.'" title="'.'Game paused'.'" />';
$gameNotifyBlock .= '-<img src="' . $this->WEBDIPPATH . ''.'images/icons/pause.svg'.'" alt="'.'Paused'.'" title="'.'Game paused'.'" />';

$gameNotifyBlock .= ' ';

Expand All @@ -264,7 +264,7 @@ private function gameNotifyBlock()
}

if ( $notifyGame['newMessagesFrom'] )
$gameNotifyBlock .= '<img src="' . $this->WEBDIPPATH . ''.'images/icons/mail.png'.'" alt="'.'New messages'.'" title="'.'New messages!'.'" />';
$gameNotifyBlock .= '<img src="' . $this->WEBDIPPATH . ''.'images/icons/mail.svg'.'" alt="'.'New messages'.'" title="'.'New messages!'.'" />';

$gameNotifyBlock .= '</a></span> ';
}
Expand Down
Loading