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

Feat/template comment #1609

Merged
merged 4 commits into from
Dec 29, 2023
Merged
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
4 changes: 2 additions & 2 deletions deploy/conf/nw.local.nginx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ server {

location ~ \.php$ {
#add_header X-Frame-Options SAMEORIGIN;
add_header Content-Security-Policy "default-src * blob: filesystem: about: ws: wss: 'unsafe-eval' 'unsafe-inline'; script-src 'self' https://ajax.googleapis.com https://api.github.com https://ws-na.amazon-adsystem.com http://pagead2.googlesyndication.com https://www.googleadservices.com 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * 'self' https://localhost:* https://localhost:8765 http://www.ninjawars.net http://ninjawars.net; style-src 'self' https://use.fontawesome.com https://fonts.gstatic.com data: blob: 'unsafe-inline'; font-src 'self' https://use.fontawesome.com https://fonts.gstatic.com data: blob: 'unsafe-inline';";
add_header Content-Security-Policy "default-src * blob: filesystem: about: ws: wss: 'unsafe-eval' 'unsafe-inline'; script-src 'self' https://ajax.googleapis.com https://api.github.com https://ws-na.amazon-adsystem.com http://pagead2.googlesyndication.com https://tpc.googlesyndication.com https://www.googleadservices.com 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * 'self' https://localhost:* https://localhost:8765 http://www.ninjawars.net http://ninjawars.net; style-src 'self' https://use.fontawesome.com https://fonts.gstatic.com data: blob: 'unsafe-inline'; font-src 'self' https://use.fontawesome.com https://fonts.gstatic.com data: blob: 'unsafe-inline';";
fastcgi_param PHP_VALUE "session.cookie_domain= \n date.timezone=America/New_York \n default_charset=UTF-8 \n session.gc_maxlifetime=144000 \n display_errors=On \n";
# Check session via: php-fpm8.2 -i | grep session.gc
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
Expand All @@ -105,7 +105,7 @@ server {

location @php {
#add_header X-Frame-Options SAMEORIGIN;
add_header Content-Security-Policy "default-src * blob: filesystem: about: ws: wss: 'unsafe-eval' 'unsafe-inline'; script-src 'self' https://ajax.googleapis.com https://api.github.com https://ws-na.amazon-adsystem.com http://pagead2.googlesyndication.com https://www.googleadservices.com 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * 'self' https://localhost:* https://localhost:8765 http://www.ninjawars.net http://ninjawars.net; style-src 'self' https://use.fontawesome.com https://fonts.gstatic.com data: blob: 'unsafe-inline'; font-src 'self' https://use.fontawesome.com https://fonts.gstatic.com data: blob: 'unsafe-inline';";
add_header Content-Security-Policy "default-src * blob: filesystem: about: ws: wss: 'unsafe-eval' 'unsafe-inline'; script-src 'self' https://ajax.googleapis.com https://api.github.com https://ws-na.amazon-adsystem.com http://pagead2.googlesyndication.com https://tpc.googlesyndication.com https://www.googleadservices.com 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * 'self' https://localhost:* https://localhost:8765 http://www.ninjawars.net http://ninjawars.net; style-src 'self' https://use.fontawesome.com https://fonts.gstatic.com data: blob: 'unsafe-inline'; font-src 'self' https://use.fontawesome.com https://fonts.gstatic.com data: blob: 'unsafe-inline';";
# Check session via: php-fpm8.2 -i | grep session.gc
fastcgi_param PHP_VALUE "session.cookie_domain= \n date.timezone=America/New_York \n default_charset=UTF-8 \n session.gc_maxlifetime=144000 \n display_errors=On \n";
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
Expand Down
6 changes: 3 additions & 3 deletions deploy/lib/control/HomepageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class HomepageController extends AbstractController
public const PRIV = false;
public const ALIVE = false;
private $loggedIn = false;
public const NW_VERSION = 'v1.12.2 2021.06.12';
public const NW_VERSION = 'v1.20.2 2023.12.28';

/**
* Stores logged-in status of user in member variable for use later
Expand Down Expand Up @@ -66,7 +66,7 @@ private function game(Container $p_dependencies)
'unread_message_count' => $unreadCount,
];

return new StreamedViewResponse('Live by the Shuriken', 'index.tpl', $parts, [ 'is_index' => true ]);
return new StreamedViewResponse('Live by the Shuriken', 'index.tpl', $parts, ['is_index' => true]);
}

/**
Expand All @@ -84,6 +84,6 @@ private function splash()
'version' => self::NW_VERSION,
];

return new StreamedViewResponse('Live by the Shuriken', 'splash.tpl', $parts, [ 'is_index' => true ]);
return new StreamedViewResponse('Live by the Shuriken', 'splash.tpl', $parts, ['is_index' => true]);
}
}
2 changes: 1 addition & 1 deletion deploy/templates/footer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $(function() {
{/if}
</script>

{if !$smarty.const.LOCAL_JS}<!-- Skip for local js -->
{if !$smarty.const.LOCAL_JS}{* Skip for local js *}
<!-- Google Analytics, just add all the tracking info to an array at once -->
{literal}
<script>
Expand Down
2 changes: 1 addition & 1 deletion deploy/templates/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
{* The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags *}
<meta name="keywords" content="ninjawars, ninja wars, the ninja game, ninjawars web game, ninjas, ninja weapons &amp; techniques, samurai, free online games, {$title|escape}">
<meta name="author" content="ninjawars.net">
<meta name="description" content="Ninjawars: The ninja game where you battle other ninja for your survival. Create a ninja and use skills or magic to kill samurai, the emperor's guards, or other ninja from rival clans. {$title|escape} ">
Expand Down
23 changes: 12 additions & 11 deletions deploy/templates/logout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,18 @@
</div>
<div class='horizontal'>
<div class='google-ad group'>
<!-- Google Ad -->
<script type="text/javascript"><!--
google_ad_client = "pub-9488510237149880";
/* 300x250, created 12/17/09 */
google_ad_slot = "9563671390";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9488510237149880"
crossorigin="anonymous"></script>
<!-- NWShopAd -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9488510237149880"
data-ad-slot="9729123112"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</div><!-- End of .well -->
Expand Down
25 changes: 12 additions & 13 deletions deploy/templates/map.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@

<hr>

<!-- Google Ad -->
<script type="text/javascript">
<!--
google_ad_client = "pub-9488510237149880";
/* 300x250, created 12/17/09 */
google_ad_slot = "9563671390";
google_ad_width = 300;
google_ad_height = 250;
//
-->
</script>
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9488510237149880"
crossorigin="anonymous"></script>
<!-- NWShopAd -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9488510237149880"
data-ad-slot="9729123112"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{/if}

</div><!-- End of attack-player page container div -->
22 changes: 12 additions & 10 deletions deploy/templates/shop.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,17 @@ var loggedIn = {if $authenticated}true{else}false{/if};

<div class='glassbox text-centered'>

<!-- Google Ad -->
<script type="text/javascript"><!--
google_ad_client = "pub-9488510237149880";
/* 300x250, created 12/17/09 */
google_ad_slot = "9563671390";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9488510237149880"
crossorigin="anonymous"></script>
<!-- NWShopAd -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9488510237149880"
data-ad-slot="9729123112"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
Loading