Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
+Added Enable (Disable) of information about the troops of Nature and Natars in the manual

NOTE 1: To play this version of the game, you need to reinstall the server OR you can simply add these lines of code into your file:

GameEngine/config.php

define("NEW_FUNCTIONS_MANUAL_NATURENATARS", false);

GameEngine/Admin/Mods/constant_format.tpl

define("NEW_FUNCTIONS_MANUAL_NATURENATARS", %NEW_FUNCTIONS_MANUAL_NATURENATARS%);

NOTE 2: pay special attention to the fact that these are two different records !!! If the records are entered incorrectly, you will receive a non-working code!
  • Loading branch information
Vladyslav committed Aug 28, 2018
1 parent c33322e commit c9d1867
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 13 deletions.
4 changes: 4 additions & 0 deletions Admin/Templates/config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
<tr>
<td>Catapult targets <em class="tooltip">?<span class="classic">Enable (Disable) the display of the targets of the catapults in the rally point that were sent by you</span></em></td>
<td><?php echo NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
<tr>
<td>Manual on Nature and Natars <em class="tooltip">?<span class="classic">Enable (Disable) displaying information in the Manual about the troops of Nature and Natars</span></em></td>
<td><?php echo NEW_FUNCTIONS_MANUAL_NATURENATARS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
</tr>
</table>
<table id="member">
Expand Down
9 changes: 9 additions & 0 deletions Admin/Templates/editNewFunctions.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
</select>
</td>
</tr>
<tr>
<td>Manual on Nature and Natars <em class="tooltip">?<span class="classic">Enable (Disable) displaying information in the Manual about the troops of Nature and Natars</span></em></td>
<td>
<select name="new_functions_manual_naturenatars">
<option value="True" <?php if(NEW_FUNCTIONS_MANUAL_NATURENATARS == true) echo "selected";?>>True</option>
<option value="False" <?php if(NEW_FUNCTIONS_MANUAL_NATURENATARS == false) echo "selected";?>>False</option>
</select>
</td>
</tr>
</tbody>
</table>
<br />
Expand Down
2 changes: 2 additions & 0 deletions GameEngine/Admin/Mods/editAdminInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
$NEW_FUNCTIONS_DISPLAY_WONDER = (NEW_FUNCTIONS_DISPLAY_WONDER == false ? 'false' : 'true');
$NEW_FUNCTIONS_VACATION = (NEW_FUNCTIONS_VACATION == false ? 'false' : 'true');
$NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET = (NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET == false ? 'false' : 'true');
$NEW_FUNCTIONS_MANUAL_NATURENATARS = (NEW_FUNCTIONS_MANUAL_NATURENATARS == false ? 'false' : 'true');

$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text);
Expand Down Expand Up @@ -143,6 +144,7 @@
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_WONDER%'", $NEW_FUNCTIONS_DISPLAY_WONDER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_VACATION%'", $NEW_FUNCTIONS_VACATION, $text);
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%'", $NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET, $text);
$text = preg_replace("'%NEW_FUNCTIONS_MANUAL_NATURENATARS%'", $NEW_FUNCTIONS_MANUAL_NATURENATARS, $text);

// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
Expand Down
2 changes: 2 additions & 0 deletions GameEngine/Admin/Mods/editExtraSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
$NEW_FUNCTIONS_DISPLAY_WONDER = (NEW_FUNCTIONS_DISPLAY_WONDER == false ? 'false' : 'true');
$NEW_FUNCTIONS_VACATION = (NEW_FUNCTIONS_VACATION == false ? 'false' : 'true');
$NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET = (NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET == false ? 'false' : 'true');
$NEW_FUNCTIONS_MANUAL_NATURENATARS = (NEW_FUNCTIONS_MANUAL_NATURENATARS == false ? 'false' : 'true');

$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text);
Expand Down Expand Up @@ -140,6 +141,7 @@
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_WONDER%'", $NEW_FUNCTIONS_DISPLAY_WONDER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_VACATION%'", $NEW_FUNCTIONS_VACATION, $text);
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%'", $NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET, $text);
$text = preg_replace("'%NEW_FUNCTIONS_MANUAL_NATURENATARS%'", $NEW_FUNCTIONS_MANUAL_NATURENATARS, $text);

// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
Expand Down
2 changes: 2 additions & 0 deletions GameEngine/Admin/Mods/editLogSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
$NEW_FUNCTIONS_DISPLAY_WONDER = (NEW_FUNCTIONS_DISPLAY_WONDER == false ? 'false' : 'true');
$NEW_FUNCTIONS_VACATION = (NEW_FUNCTIONS_VACATION == false ? 'false' : 'true');
$NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET = (NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET == false ? 'false' : 'true');
$NEW_FUNCTIONS_MANUAL_NATURENATARS = (NEW_FUNCTIONS_MANUAL_NATURENATARS == false ? 'false' : 'true');

$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text);
Expand Down Expand Up @@ -140,6 +141,7 @@
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_WONDER%'", $NEW_FUNCTIONS_DISPLAY_WONDER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_VACATION%'", $NEW_FUNCTIONS_VACATION, $text);
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%'", $NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET, $text);
$text = preg_replace("'%NEW_FUNCTIONS_MANUAL_NATURENATARS%'", $NEW_FUNCTIONS_MANUAL_NATURENATARS, $text);

// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
Expand Down
1 change: 1 addition & 0 deletions GameEngine/Admin/Mods/editNewFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_WONDER%'", $_POST['new_functions_display_wonder'], $text);
$text = preg_replace("'%NEW_FUNCTIONS_VACATION%'", $_POST['new_functions_vacation'], $text);
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%'", $_POST['new_functions_display_catapult_target'], $text);
$text = preg_replace("'%NEW_FUNCTIONS_MANUAL_NATURENATARS%'", $_POST['new_functions_manual_naturenatars'], $text);

// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
Expand Down
2 changes: 2 additions & 0 deletions GameEngine/Admin/Mods/editNewsboxSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
$NEW_FUNCTIONS_DISPLAY_WONDER = (NEW_FUNCTIONS_DISPLAY_WONDER == false ? 'false' : 'true');
$NEW_FUNCTIONS_VACATION = (NEW_FUNCTIONS_VACATION == false ? 'false' : 'true');
$NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET = (NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET == false ? 'false' : 'true');
$NEW_FUNCTIONS_MANUAL_NATURENATARS = (NEW_FUNCTIONS_MANUAL_NATURENATARS == false ? 'false' : 'true');

$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text);
Expand Down Expand Up @@ -146,6 +147,7 @@
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_WONDER%'", $NEW_FUNCTIONS_DISPLAY_WONDER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_VACATION%'", $NEW_FUNCTIONS_VACATION, $text);
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%'", $NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET, $text);
$text = preg_replace("'%NEW_FUNCTIONS_MANUAL_NATURENATARS%'", $NEW_FUNCTIONS_MANUAL_NATURENATARS, $text);

// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
Expand Down
2 changes: 2 additions & 0 deletions GameEngine/Admin/Mods/editPlusSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
$NEW_FUNCTIONS_DISPLAY_WONDER = (NEW_FUNCTIONS_DISPLAY_WONDER == false ? 'false' : 'true');
$NEW_FUNCTIONS_VACATION = (NEW_FUNCTIONS_VACATION == false ? 'false' : 'true');
$NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET = (NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET == false ? 'false' : 'true');
$NEW_FUNCTIONS_MANUAL_NATURENATARS = (NEW_FUNCTIONS_MANUAL_NATURENATARS == false ? 'false' : 'true');

// SERVER SETTINGS - we need to keep these intact
$text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text);
Expand Down Expand Up @@ -124,6 +125,7 @@
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_WONDER%'", $NEW_FUNCTIONS_DISPLAY_WONDER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_VACATION%'", $NEW_FUNCTIONS_VACATION, $text);
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%'", $NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET, $text);
$text = preg_replace("'%NEW_FUNCTIONS_MANUAL_NATURENATARS%'", $NEW_FUNCTIONS_MANUAL_NATURENATARS, $text);

// PLUS SETTINGS
$text = preg_replace("'%PLUS_TIME%'", $_POST['plus_time'], $text);
Expand Down
2 changes: 2 additions & 0 deletions GameEngine/Admin/Mods/editServerSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
$NEW_FUNCTIONS_DISPLAY_WONDER = (NEW_FUNCTIONS_DISPLAY_WONDER == false ? 'false' : 'true');
$NEW_FUNCTIONS_VACATION = (NEW_FUNCTIONS_VACATION == false ? 'false' : 'true');
$NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET = (NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET == false ? 'false' : 'true');
$NEW_FUNCTIONS_MANUAL_NATURENATARS = (NEW_FUNCTIONS_MANUAL_NATURENATARS == false ? 'false' : 'true');

$text = file_get_contents("constant_format.tpl");
$text = preg_replace("'%ERRORREPORT%'", $_POST['error'], $text);
Expand Down Expand Up @@ -135,6 +136,7 @@
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_WONDER%'", $NEW_FUNCTIONS_DISPLAY_WONDER, $text);
$text = preg_replace("'%NEW_FUNCTIONS_VACATION%'", $NEW_FUNCTIONS_VACATION, $text);
$text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%'", $NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET, $text);
$text = preg_replace("'%NEW_FUNCTIONS_MANUAL_NATURENATARS%'", $NEW_FUNCTIONS_MANUAL_NATURENATARS, $text);

// PLUS settings need to be kept intact
$text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text);
Expand Down
12 changes: 7 additions & 5 deletions Templates/Manual/0.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
<li><a href="manual.php?s=1&amp;typ=1">The troops</a></li>

<ul>
<li><a href="manual.php?typ=2&amp;s=1">Romans</a></li>
<li><a href="manual.php?typ=2&amp;s=2">Teutons</a></li>
<li><a href="manual.php?typ=2&amp;s=3">Gauls</a></li>
<li><a href="manual.php?typ=2&amp;s=4">Nature</a></li>
<li><a href="manual.php?typ=2&amp;s=5">Natars</a></li>
<li><a href="manual.php?typ=2&amp;s=1">Romans</a></li>
<li><a href="manual.php?typ=2&amp;s=2">Teutons</a></li>
<li><a href="manual.php?typ=2&amp;s=3">Gauls</a></li>
<?php if(NEW_FUNCTIONS_MANUAL_NATURENATARS){ ?>
<li><a href="manual.php?typ=2&amp;s=4">Nature</a></li>
<li><a href="manual.php?typ=2&amp;s=5">Natars</a></li>
<?php } ?>
</ul>

<br />
Expand Down
12 changes: 7 additions & 5 deletions Templates/Manual/00.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
<li><a href="manual.php?s=1&amp;typ=2">The troops</a></li>

<ul>
<li><a href="manual.php?typ=2&amp;s=1">Romans</a></li>
<li><a href="manual.php?typ=2&amp;s=2">Teutons</a></li>
<li><a href="manual.php?typ=2&amp;s=3">Gauls</a></li>
<li><a href="manual.php?typ=2&amp;s=4">Nature</a></li>
<li><a href="manual.php?typ=2&amp;s=5">Natars</a></li>
<li><a href="manual.php?typ=2&amp;s=1">Romans</a></li>
<li><a href="manual.php?typ=2&amp;s=2">Teutons</a></li>
<li><a href="manual.php?typ=2&amp;s=3">Gauls</a></li>
<?php if(NEW_FUNCTIONS_MANUAL_NATURENATARS){ ?>
<li><a href="manual.php?typ=2&amp;s=4">Nature</a></li>
<li><a href="manual.php?typ=2&amp;s=5">Natars</a></li>
<?php } ?>
</ul>

<br />
Expand Down
8 changes: 5 additions & 3 deletions Templates/Manual/4.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
<img class="troops" src="img/x.gif" alt="Troops" title="Troops" />
<img class="buildings" src="img/x.gif" alt="Buildings" title="Buildings" />
<ul>
<li><a href="manual.php?s=1&amp;typ=1">The troops</a></li>
<li><a href="manual.php?s=1&amp;typ=1">The troops</a></li>

<ul>
<li><a href="manual.php?typ=2&amp;s=1">Romans</a></li>
<li><a href="manual.php?typ=2&amp;s=2">Teutons</a></li>
<li><a href="manual.php?typ=2&amp;s=3">Gauls</a></li>
<?php if(NEW_FUNCTIONS_MANUAL_NATURENATARS){ ?>
<li><a href="manual.php?typ=2&amp;s=4">Nature</a></li>
<li><a href="manual.php?typ=2&amp;s=5">Natars</a></li>
<?php } ?>
</ul>

<br />
Expand All @@ -23,8 +25,8 @@
<li><a href="manual.php?typ=3&amp;s=3">Infrastructure</a></li>
</ul>

<br />
<li><a href="anleitung.php?s=3" target="_blank">Travian FAQ <img class="external" src="img/x.gif" alt="new window" title="new window" /></a><br>This ingame help just gives you brief information. More information is available at the <a href="http://travian.wikia.com/wiki/Travian_Wiki" target=blank>Fandom Travian Wiki</a>.</li><br />
<br />
<li><a href="anleitung.php?s=3" target="_blank">Travian FAQ <img class="external" src="img/x.gif" alt="new window" title="new window" /></a><br>This ingame help just gives you brief information. More information is available at the <a href="http://travian.wikia.com/wiki/Travian_Wiki" target=blank>Fandom Travian Wiki</a>.</li><br />
</ul>
<map id="nav" name="nav">
<area href="manual.php?typ=3&amp;s=3" title="back" coords="0,0,45,18" shape="rect" alt="" />
Expand Down
1 change: 1 addition & 0 deletions install/data/constant_format.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", %NEW_FUNCTIONS_DISPLAY_ARTIFACT%);
define("NEW_FUNCTIONS_DISPLAY_WONDER", %NEW_FUNCTIONS_DISPLAY_WONDER%);
define("NEW_FUNCTIONS_VACATION", %NEW_FUNCTIONS_VACATION%);
define("NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET", %NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%);
define("NEW_FUNCTIONS_MANUAL_NATURENATARS", %NEW_FUNCTIONS_MANUAL_NATURENATARS%);


//////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions install/process.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ private function constForm() {
$findReplace["%NEW_FUNCTIONS_DISPLAY_WONDER%"] = $_POST['new_functions_display_wonder'];
$findReplace["%NEW_FUNCTIONS_VACATION%"] = $_POST['new_functions_vacation'];
$findReplace["%NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%"] = $_POST['new_functions_display_catapult_target'];
$findReplace["%NEW_FUNCTIONS_MANUAL_NATURENATARS%"] = $_POST['new_functions_manual_naturenatars'];

fwrite($gameConfig, str_replace(array_keys($findReplace), array_values($findReplace), $text));

Expand Down
9 changes: 9 additions & 0 deletions install/templates/config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,15 @@ echo "<div class=\"headline\"><span class=\"f10 c5\">Error creating constant.php
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Manual on Nature and Natars:</span></td>
<td>
<select name="new_functions_manual_naturenatars">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
</table>
</p>
Expand Down

1 comment on commit c9d1867

@velhbxtyrj
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default

Please sign in to comment.