From dffdcc4411de2bf1bab653074e495974265b8ac7 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Mon, 25 Jun 2018 21:06:30 +0300 Subject: [PATCH] Enable (Disable) some new features +Enable (Disable) New forum post message +Enable (Disable) Tribes images in profile +Enable (Disable) MHs images in profile +Enable (Disable) Display artifact in profile +Minor changes 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: ameEngine/config.php define("NEW_FUNCTIONS_FORUM_POST_MESSAGE", False); define("NEW_FUNCTIONS_TRIBE_IMAGES", False); define("NEW_FUNCTIONS_MHS_IMAGES", False); define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", False); GameEngine/Admin/Mods/constant_format.tpl define("NEW_FUNCTIONS_FORUM_POST_MESSAGE", %NEW_FUNCTIONS_FORUM_POST_MESSAGE%); define("NEW_FUNCTIONS_TRIBE_IMAGES", %NEW_FUNCTIONS_TRIBE_IMAGES%); define("NEW_FUNCTIONS_MHS_IMAGES", %NEW_FUNCTIONS_MHS_IMAGES%); define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", %NEW_FUNCTIONS_DISPLAY_ARTIFACT%); 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! --- Admin/Templates/config.tpl | 16 ++++ Admin/Templates/editNewFunctions.tpl | 102 ++++++++++++++------- GameEngine/Admin/Mods/editAdminInfo.php | 20 ++-- GameEngine/Admin/Mods/editExtraSet.php | 20 ++-- GameEngine/Admin/Mods/editLogSet.php | 20 ++-- GameEngine/Admin/Mods/editNewFunctions.php | 14 ++- GameEngine/Admin/Mods/editNewsboxSet.php | 20 ++-- GameEngine/Admin/Mods/editPlusSet.php | 20 ++-- GameEngine/Admin/Mods/editServerSet.php | 20 ++-- GameEngine/Alliance.php | 5 +- GameEngine/Database.php | 41 +++++---- Templates/Profile/medal.php | 37 ++++---- Templates/Profile/overview.tpl | 4 +- Templates/Profile/profile.tpl | 41 +++++---- install/data/constant_format.tpl | 5 + install/process.php | 14 ++- install/templates/config.tpl | 36 ++++++++ 17 files changed, 297 insertions(+), 138 deletions(-) diff --git a/Admin/Templates/config.tpl b/Admin/Templates/config.tpl index 4970cbc7..17cea35a 100644 --- a/Admin/Templates/config.tpl +++ b/Admin/Templates/config.tpl @@ -204,6 +204,22 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN); New Alliance & Embassy Mechanics ?For this setting, you can find more information on the link: https://github.com Enabled" : "Disabled"; ?> + + New forum post message ?Enable (Disable) if a player leaves at least one message in the thread on the forum, he will receive in-game messages about the fact that new messages have appeared in the same thread (i.e. is technically "subscribed to") + Enabled" : "Disabled"; ?> + + + Tribes images in profile ?Enable (Disable) displaying images of tribes with a description in the players profile + Enabled" : "Disabled"; ?> + + + MHs images in profile ?Enable (Disable) displaying images of Multihunters with a description in the MHs profile + Enabled" : "Disabled"; ?> + + + Display artifact in profile ?Enable (Disable) the display of the artifact in the player profile, opposite the corresponding village in which it is located + Enabled" : "Disabled"; ?> + diff --git a/Admin/Templates/editNewFunctions.tpl b/Admin/Templates/editNewFunctions.tpl index ad3035ab..897d3caa 100644 --- a/Admin/Templates/editNewFunctions.tpl +++ b/Admin/Templates/editNewFunctions.tpl @@ -16,47 +16,83 @@ if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);

-
-
- - - - - - +
+
Edit New Mechanics and Functions
+ - - + - + + + + + + + + - + + - -
Display oasis in profile ?Turns on or off the display of oases of each village in the player profile - - Edit New Mechanics and Functions
Display oasis in profile ?Enable (Disable) the display of oases of each village in the player profile + +
Alliance invitation message ?Enable (Disable) sending an in-game message to the player, if he was invited to the alliance - + + -
New Alliance & Embassy Mechanics ?For this setting, you can find more information on the link: https://github.com - + + -
-
- - - + + + -
<<
New forum post message ?Enable (Disable) if a player leaves at least one message in the thread on the forum, he will receive in-game messages about the fact that new messages have appeared in the same thread (i.e. is technically "subscribed to") + +
- + + Tribes images in profile ?Enable (Disable) displaying images of tribes with a description in the players profile + + + + + + MHs images in profile ?Enable (Disable) displaying images of Multihunters with a description in the MHs profile + + + + + + Display artifact in profile ?Enable (Disable) the display of the artifact in the player profile, opposite the corresponding village in which it is located + + + + + + +
+ + + + +
<<
+ diff --git a/GameEngine/Admin/Mods/editAdminInfo.php b/GameEngine/Admin/Mods/editAdminInfo.php index 4cfa11d9..59627b11 100755 --- a/GameEngine/Admin/Mods/editAdminInfo.php +++ b/GameEngine/Admin/Mods/editAdminInfo.php @@ -48,9 +48,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $NEWSBOX2=(NEWSBOX2==false)? "false":"true"; $NEWSBOX3=(NEWSBOX3==false)? "false":"true"; $LIMIT_MAILBOX=(LIMIT_MAILBOX==false)? "false":"true"; - $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); - $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); + $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_FORUM_POST_MESSAGE = (NEW_FUNCTIONS_FORUM_POST_MESSAGE == false ? 'false' : 'true'); + $NEW_FUNCTIONS_TRIBE_IMAGES = (NEW_FUNCTIONS_TRIBE_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_MHS_IMAGES = (NEW_FUNCTIONS_MHS_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_DISPLAY_ARTIFACT = (NEW_FUNCTIONS_DISPLAY_ARTIFACT == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); @@ -126,9 +130,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); - $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); - $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); - $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); + $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_FORUM_POST_MESSAGE%'", $NEW_FUNCTIONS_FORUM_POST_MESSAGE, $text); + $text = preg_replace("'%NEW_FUNCTIONS_TRIBE_IMAGES%'", $NEW_FUNCTIONS_TRIBE_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_MHS_IMAGES%'", $NEW_FUNCTIONS_MHS_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_ARTIFACT%'", $NEW_FUNCTIONS_DISPLAY_ARTIFACT, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editExtraSet.php b/GameEngine/Admin/Mods/editExtraSet.php index e2dac2b3..444b34c1 100755 --- a/GameEngine/Admin/Mods/editExtraSet.php +++ b/GameEngine/Admin/Mods/editExtraSet.php @@ -47,9 +47,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); - $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); + $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_FORUM_POST_MESSAGE = (NEW_FUNCTIONS_FORUM_POST_MESSAGE == false ? 'false' : 'true'); + $NEW_FUNCTIONS_TRIBE_IMAGES = (NEW_FUNCTIONS_TRIBE_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_MHS_IMAGES = (NEW_FUNCTIONS_MHS_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_DISPLAY_ARTIFACT = (NEW_FUNCTIONS_DISPLAY_ARTIFACT == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text); @@ -123,9 +127,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); - $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); - $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); - $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); + $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_FORUM_POST_MESSAGE%'", $NEW_FUNCTIONS_FORUM_POST_MESSAGE, $text); + $text = preg_replace("'%NEW_FUNCTIONS_TRIBE_IMAGES%'", $NEW_FUNCTIONS_TRIBE_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_MHS_IMAGES%'", $NEW_FUNCTIONS_MHS_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_ARTIFACT%'", $NEW_FUNCTIONS_DISPLAY_ARTIFACT, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editLogSet.php b/GameEngine/Admin/Mods/editLogSet.php index c231c04d..996d9a2e 100755 --- a/GameEngine/Admin/Mods/editLogSet.php +++ b/GameEngine/Admin/Mods/editLogSet.php @@ -43,9 +43,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); - $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); + $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_FORUM_POST_MESSAGE = (NEW_FUNCTIONS_FORUM_POST_MESSAGE == false ? 'false' : 'true'); + $NEW_FUNCTIONS_TRIBE_IMAGES = (NEW_FUNCTIONS_TRIBE_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_MHS_IMAGES = (NEW_FUNCTIONS_MHS_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_DISPLAY_ARTIFACT = (NEW_FUNCTIONS_DISPLAY_ARTIFACT == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); @@ -123,9 +127,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); - $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); - $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); - $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); + $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_FORUM_POST_MESSAGE%'", $NEW_FUNCTIONS_FORUM_POST_MESSAGE, $text); + $text = preg_replace("'%NEW_FUNCTIONS_TRIBE_IMAGES%'", $NEW_FUNCTIONS_TRIBE_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_MHS_IMAGES%'", $NEW_FUNCTIONS_MHS_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_ARTIFACT%'", $NEW_FUNCTIONS_DISPLAY_ARTIFACT, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editNewFunctions.php b/GameEngine/Admin/Mods/editNewFunctions.php index 1323099f..8b716117 100644 --- a/GameEngine/Admin/Mods/editNewFunctions.php +++ b/GameEngine/Admin/Mods/editNewFunctions.php @@ -30,8 +30,8 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); - $REG_OPEN = (REG_OPEN == false ? 'false' : 'true'); - $QUEST = (QUEST == false ? 'false' : 'true'); + $REG_OPEN = (REG_OPEN == false ? 'false' : 'true'); + $QUEST = (QUEST == false ? 'false' : 'true'); // SERVER SETTINGS - we need to keep these intact $text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text); @@ -105,9 +105,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); - $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $_POST['new_functions_oasis'], $text); - $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $_POST['new_functions_alliance_invitation'], $text); - $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $_POST['new_functions_embassy_mechanics'], $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $_POST['new_functions_oasis'], $text); + $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $_POST['new_functions_alliance_invitation'], $text); + $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $_POST['new_functions_embassy_mechanics'], $text); + $text = preg_replace("'%NEW_FUNCTIONS_FORUM_POST_MESSAGE%'", $_POST['new_functions_forum_post_message'], $text); + $text = preg_replace("'%NEW_FUNCTIONS_TRIBE_IMAGES%'", $_POST['new_functions_tribe_images'], $text); + $text = preg_replace("'%NEW_FUNCTIONS_MHS_IMAGES%'", $_POST['new_functions_mhs_images'], $text); + $text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_ARTIFACT%'", $_POST['new_functions_display_artifact'], $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editNewsboxSet.php b/GameEngine/Admin/Mods/editNewsboxSet.php index 4e83286e..b8aa46d6 100755 --- a/GameEngine/Admin/Mods/editNewsboxSet.php +++ b/GameEngine/Admin/Mods/editNewsboxSet.php @@ -49,9 +49,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); - $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); + $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_FORUM_POST_MESSAGE = (NEW_FUNCTIONS_FORUM_POST_MESSAGE == false ? 'false' : 'true'); + $NEW_FUNCTIONS_TRIBE_IMAGES = (NEW_FUNCTIONS_TRIBE_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_MHS_IMAGES = (NEW_FUNCTIONS_MHS_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_DISPLAY_ARTIFACT = (NEW_FUNCTIONS_DISPLAY_ARTIFACT == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", $ERRORREPORT, $text); @@ -129,9 +133,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); - $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); - $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); - $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); + $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_FORUM_POST_MESSAGE%'", $NEW_FUNCTIONS_FORUM_POST_MESSAGE, $text); + $text = preg_replace("'%NEW_FUNCTIONS_TRIBE_IMAGES%'", $NEW_FUNCTIONS_TRIBE_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_MHS_IMAGES%'", $NEW_FUNCTIONS_MHS_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_ARTIFACT%'", $NEW_FUNCTIONS_DISPLAY_ARTIFACT, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Admin/Mods/editPlusSet.php b/GameEngine/Admin/Mods/editPlusSet.php index abe31b35..6a5633b5 100644 --- a/GameEngine/Admin/Mods/editPlusSet.php +++ b/GameEngine/Admin/Mods/editPlusSet.php @@ -31,9 +31,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); - $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); + $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_FORUM_POST_MESSAGE = (NEW_FUNCTIONS_FORUM_POST_MESSAGE == false ? 'false' : 'true'); + $NEW_FUNCTIONS_TRIBE_IMAGES = (NEW_FUNCTIONS_TRIBE_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_MHS_IMAGES = (NEW_FUNCTIONS_MHS_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_DISPLAY_ARTIFACT = (NEW_FUNCTIONS_DISPLAY_ARTIFACT == false ? 'false' : 'true'); // SERVER SETTINGS - we need to keep these intact $text = preg_replace("'%ERRORREPORT%'", ERROR_REPORT, $text); @@ -107,9 +111,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); - $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); - $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); - $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); + $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_FORUM_POST_MESSAGE%'", $NEW_FUNCTIONS_FORUM_POST_MESSAGE, $text); + $text = preg_replace("'%NEW_FUNCTIONS_TRIBE_IMAGES%'", $NEW_FUNCTIONS_TRIBE_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_MHS_IMAGES%'", $NEW_FUNCTIONS_MHS_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_ARTIFACT%'", $NEW_FUNCTIONS_DISPLAY_ARTIFACT, $text); // PLUS SETTINGS $text = preg_replace("'%PLUS_TIME%'", $_POST['plus_time'], $text); diff --git a/GameEngine/Admin/Mods/editServerSet.php b/GameEngine/Admin/Mods/editServerSet.php index 0a29cff4..38f6eaf8 100755 --- a/GameEngine/Admin/Mods/editServerSet.php +++ b/GameEngine/Admin/Mods/editServerSet.php @@ -42,9 +42,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $INCLUDE_ADMIN=(INCLUDE_ADMIN==false)? "false":"true"; $SUPPORT_MSGS_IN_ADMIN = (ADMIN_RECEIVE_SUPPORT_MESSAGES == false ? 'false' : 'true'); $ADMINS_RAIDABLE = (ADMIN_ALLOW_INCOMING_RAIDS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); - $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); - $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_OASIS = (NEW_FUNCTIONS_OASIS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_ALLIANCE_INVITATION = (NEW_FUNCTIONS_ALLIANCE_INVITATION == false ? 'false' : 'true'); + $NEW_FUNCTIONS_EMBASSY_MECHANICS = (NEW_FUNCTIONS_EMBASSY_MECHANICS == false ? 'false' : 'true'); + $NEW_FUNCTIONS_FORUM_POST_MESSAGE = (NEW_FUNCTIONS_FORUM_POST_MESSAGE == false ? 'false' : 'true'); + $NEW_FUNCTIONS_TRIBE_IMAGES = (NEW_FUNCTIONS_TRIBE_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_MHS_IMAGES = (NEW_FUNCTIONS_MHS_IMAGES == false ? 'false' : 'true'); + $NEW_FUNCTIONS_DISPLAY_ARTIFACT = (NEW_FUNCTIONS_DISPLAY_ARTIFACT == false ? 'false' : 'true'); $text = file_get_contents("constant_format.tpl"); $text = preg_replace("'%ERRORREPORT%'", $_POST['error'], $text); @@ -118,9 +122,13 @@ $fh = fopen($myFile, 'w') or die("


Can't open file: GameEngine\con $text = preg_replace("'%DOMAIN%'", DOMAIN, $text); $text = preg_replace("'%HOMEPAGE%'", HOMEPAGE, $text); $text = preg_replace("'%SERVER%'", SERVER, $text); - $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); - $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); - $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_OASIS%'", $NEW_FUNCTIONS_OASIS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_ALLIANCE_INVITATION%'", $NEW_FUNCTIONS_ALLIANCE_INVITATION, $text); + $text = preg_replace("'%NEW_FUNCTIONS_EMBASSY_MECHANICS%'", $NEW_FUNCTIONS_EMBASSY_MECHANICS, $text); + $text = preg_replace("'%NEW_FUNCTIONS_FORUM_POST_MESSAGE%'", $NEW_FUNCTIONS_FORUM_POST_MESSAGE, $text); + $text = preg_replace("'%NEW_FUNCTIONS_TRIBE_IMAGES%'", $NEW_FUNCTIONS_TRIBE_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_MHS_IMAGES%'", $NEW_FUNCTIONS_MHS_IMAGES, $text); + $text = preg_replace("'%NEW_FUNCTIONS_DISPLAY_ARTIFACT%'", $NEW_FUNCTIONS_DISPLAY_ARTIFACT, $text); // PLUS settings need to be kept intact $text = preg_replace("'%PLUS_TIME%'", PLUS_TIME, $text); diff --git a/GameEngine/Alliance.php b/GameEngine/Alliance.php index 02d493f0..5ee3dc77 100755 --- a/GameEngine/Alliance.php +++ b/GameEngine/Alliance.php @@ -245,12 +245,11 @@ class Alliance { // Log the notice $database->insertAlliNotice($session->alliance, '' . addslashes($session->username) . ' has invited ' . addslashes($UserData['username']) . ' into the alliance.'); // send invitation via in-game messages - if(!NEW_FUNCTIONS_ALLIANCE_INVITATION) return; - else { + if(NEW_FUNCTIONS_ALLIANCE_INVITATION){ $database->sendMessage( $UserData['id'], 4, - 'Alliance invitation.', + 'Invitation to Alliance', $database->escape("Hi, ".$UserData['username']."!\n\nThis is to inform you that you have been invited to join an alliance. To accept this invitation, please visit your Embassy.\n\nYours sincerely,\nServer Robot :)"), 0, 0, diff --git a/GameEngine/Database.php b/GameEngine/Database.php index 0bd092dc..aa51c577 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -2766,28 +2766,29 @@ class MYSQLi_DB implements IDbConnection { // create a message notification for each person subscribed to this topic // ... for now it's everyone who ever posted there, there is no real un/subscription yet - if ($fid2 !== 0) { - $q = "SELECT DISTINCT owner FROM ".TB_PREFIX . "forum_post WHERE topic = $tids"; - $result = mysqli_query($this->dblink, $q); - if ($result->num_rows) { - while ($row = mysqli_fetch_assoc($result)) { - if ($row['owner'] != $owner) { - $this->sendMessage( - (int) $row['owner'], - 4, - 'New Message in Alliance Forum', - "Hi!\n\n".$this->escape($session->username)." posted a new message into your common topic. Here\\'s a link that will get you there: forum link\n\nYours sincerely,\nServer Robot :)", - 0, - 0, - 0, - 0, - 0, - true); + if(NEW_FUNCTIONS_FORUM_POST_MESSAGE){ + if ($fid2 !== 0) { + $q = "SELECT DISTINCT owner FROM ".TB_PREFIX . "forum_post WHERE topic = $tids"; + $result = mysqli_query($this->dblink, $q); + if ($result->num_rows) { + while ($row = mysqli_fetch_assoc($result)) { + if ($row['owner'] != $owner) { + $this->sendMessage( + (int) $row['owner'], + 4, + 'New Message in Forum', + "Hi!\n\n".$this->escape($session->username)." posted a new message into your common topic. Here\\'s a link that will get you there: forum link\n\nYours sincerely,\nServer Robot :)", + 0, + 0, + 0, + 0, + 0, + true); + } } } } } - return $postID; } @@ -7173,9 +7174,9 @@ References: User ID/Message ID, Mode $email = "natars@noreply.com"; $uid = 3; $tribe = 5; - $desc = "*************************** + $desc = "************************** [#natars] - ***************************"; + **************************"; $q = "INSERT INTO ".TB_PREFIX."users (id, username, password, access, email, timestamp, tribe, protect, desc2) VALUES ('$uid', '$username', '$password', ".USER.", '$email', ".time().", $tribe, 0, '$desc')"; mysqli_query($this->dblink, $q); diff --git a/Templates/Profile/medal.php b/Templates/Profile/medal.php index 3ae439f0..7af7470e 100644 --- a/Templates/Profile/medal.php +++ b/Templates/Profile/medal.php @@ -44,14 +44,15 @@ $profiel = preg_replace("/\[#natars]/is",'', $profiel, 1); } -// TRIBE IMAGE - MUST TO BE SET FROM ADMIN PANEL @iopietro must code // Added by Shadow - cata7007@gmail.com / Skype : cata7007 -if($displayarray['tribe'] == "1"){ -$profiel = preg_replace("/\[#roman]/is",'', $profiel, 1); -}elseif($displayarray['tribe'] == "2"){ -$profiel = preg_replace("/\[#teuton]/is",'', $profiel, 1); -}elseif($displayarray['tribe'] == "3"){ -$profiel = preg_replace("/\[#gaul]/is",'', $profiel, 1); +if(NEW_FUNCTIONS_TRIBE_IMAGES){ + if($displayarray['tribe'] == "1"){ + $profiel = preg_replace("/\[#roman]/is",'', $profiel, 1); + }elseif($displayarray['tribe'] == "2"){ + $profiel = preg_replace("/\[#teuton]/is",'', $profiel, 1); + }elseif($displayarray['tribe'] == "3"){ + $profiel = preg_replace("/\[#gaul]/is",'', $profiel, 1); + } } //Shadow image - MUST TO BE SET FROM ADMIN PANEL @iopietro must code @@ -73,19 +74,17 @@ $profiel = preg_replace("/\[#DEFENSIVE]/is",'', $profiel, 1); } -// Multihunter image - MUST TO BE SET FROM ADMIN PANEL @iopietro must code // Added by Shadow - cata7007@gmail.com / Skype : cata7007 -if($displayarray['username'] == "Multihunter"){ -$profiel = preg_replace("/\[#MULTIHUNTER]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#MH]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#TEAM]/is",'', $profiel, 1); -}elseif($displayarray['access'] == "8"){ -$profiel = preg_replace("/\[#MULTIHUNTER]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#MH]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#TEAM]/is",'', $profiel, 1); -}elseif($displayarray['access'] == "9"){ -$profiel = preg_replace("/\[#TEAM]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#MH]/is",'', $profiel, 1); +if(NEW_FUNCTIONS_MHS_IMAGES){ + if($displayarray['access'] == "9"){ + $profiel = preg_replace("/\[#MULTIHUNTER]/is",'', $profiel, 1); + $profiel = preg_replace("/\[#MH]/is",'', $profiel, 1); + $profiel = preg_replace("/\[#TEAM]/is",'', $profiel, 1); + }elseif($displayarray['access'] == "8"){ + $profiel = preg_replace("/\[#MULTIHUNTER]/is",'', $profiel, 1); + $profiel = preg_replace("/\[#MH]/is",'', $profiel, 1); + $profiel = preg_replace("/\[#TEAM]/is",'', $profiel, 1); + } } //NATURE image - MUST TO BE SET FROM ADMIN PANEL @iopietro must code diff --git a/Templates/Profile/overview.tpl b/Templates/Profile/overview.tpl index ec30898e..0d926af6 100644 --- a/Templates/Profile/overview.tpl +++ b/Templates/Profile/overview.tpl @@ -175,7 +175,9 @@ if($displayarray['vac_mode'] == 1) echo "getMapCheck($vil['wref'])."\">".$vil['name'].""; if($vil['capital'] == 1) echo " (capital)"; - if($hasArtifact) echo " (artifact) "; + if(NEW_FUNCTIONS_DISPLAY_ARTIFACT){ + if($hasArtifact) echo " (artifact)"; + } if(NEW_FUNCTIONS_OASIS){ echo ""; diff --git a/Templates/Profile/profile.tpl b/Templates/Profile/profile.tpl index ef4a17b8..c4683340 100644 --- a/Templates/Profile/profile.tpl +++ b/Templates/Profile/profile.tpl @@ -156,22 +156,31 @@ MEDAL CATEGORY: userinfo['tribe'] == 1) { - echo"Tribe Romans[#roman]"; - } else if($session->userinfo['tribe'] == 2) { - echo"Tribe Teutons[#teuton]"; - } else if($session->userinfo['tribe'] == 3) { - echo"Tribe Gauls[#gaul]"; - } else if($session->userinfo['access'] == 9) { - echo"Administrator[#MH]"; - echo"Administrator[#TEAM]"; - } else if($session->userinfo['access'] == 8) { - echo"Multihunter[#MH]"; - echo"Multihunter[#TEAM]"; - } else if($session->userinfo['username'] == "Shadow") { - echo"Shadow[#MH]"; - echo"Shadow[#TEAM]"; - echo"Shadow[#EVENT]"; + if(NEW_FUNCTIONS_TRIBE_IMAGES){ + if($session->userinfo['tribe'] == 1){ + echo"Tribe Romans[#roman]"; + }elseif($session->userinfo['tribe'] == 2){ + echo"Tribe Teutons[#teuton]"; + }elseif($session->userinfo['tribe'] == 3){ + echo"Tribe Gauls[#gaul]"; + } + } + if(NEW_FUNCTIONS_MHS_IMAGES){ + if($session->userinfo['access'] == 9){ + echo"Administrator[#MULTIHUNTER]"; + echo"Administrator[#MH]"; + echo"Administrator[#TEAM]"; + }elseif($session->userinfo['access'] == 8){ + echo"Multihunter[#MULTIHUNTER]"; + echo"Multihunter[#MH]"; + echo"Multihunter[#TEAM]"; + } + } + if($session->userinfo['username'] == "Shadow"){ + echo"Shadow[#SHADOW]"; + echo"Shadow[#MH]"; + echo"Shadow[#TEAM]"; + echo"Shadow[#EVENT]"; }?>

diff --git a/install/data/constant_format.tpl b/install/data/constant_format.tpl index 75914a85..853f3bc3 100644 --- a/install/data/constant_format.tpl +++ b/install/data/constant_format.tpl @@ -296,12 +296,17 @@ define("ADMIN_RECEIVE_SUPPORT_MESSAGES", %ASUPPMSGS%); // ***** Allow Admin accounts to be raided and attacked define("ADMIN_ALLOW_INCOMING_RAIDS", %ARAIDS%); + ///////////////////////////////////////////////// // **** NEW MECHANICS AND FUNCTIONS **** // ///////////////////////////////////////////////// define("NEW_FUNCTIONS_OASIS", %NEW_FUNCTIONS_OASIS%); define("NEW_FUNCTIONS_ALLIANCE_INVITATION", %NEW_FUNCTIONS_ALLIANCE_INVITATION%); define("NEW_FUNCTIONS_EMBASSY_MECHANICS", %NEW_FUNCTIONS_EMBASSY_MECHANICS%); +define("NEW_FUNCTIONS_FORUM_POST_MESSAGE", %NEW_FUNCTIONS_FORUM_POST_MESSAGE%); +define("NEW_FUNCTIONS_TRIBE_IMAGES", %NEW_FUNCTIONS_TRIBE_IMAGES%); +define("NEW_FUNCTIONS_MHS_IMAGES", %NEW_FUNCTIONS_MHS_IMAGES%); +define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", %NEW_FUNCTIONS_DISPLAY_ARTIFACT%); ////////////////////////////////////////// diff --git a/install/process.php b/install/process.php index e2091f6a..44df8ae0 100644 --- a/install/process.php +++ b/install/process.php @@ -141,11 +141,15 @@ class Process { $findReplace["%T4_COMING%"] = $_POST['t4_coming']; $findReplace["%REG_OPEN%"] = $_POST['reg_open']; $findReplace["%PEACE%"] = $_POST['peace']; - - //New Mechanics and Functions - $findReplace["%NEW_FUNCTIONS_OASIS%"] = $_POST['new_functions_oasis']; - $findReplace["%NEW_FUNCTIONS_ALLIANCE_INVITATION%"] = $_POST['new_functions_alliance_invitation']; - $findReplace["%NEW_FUNCTIONS_EMBASSY_MECHANICS%"] = $_POST['new_functions_embassy_mechanics']; + + //New Mechanics and Functions + $findReplace["%NEW_FUNCTIONS_OASIS%"] = $_POST['new_functions_oasis']; + $findReplace["%NEW_FUNCTIONS_ALLIANCE_INVITATION%"] = $_POST['new_functions_alliance_invitation']; + $findReplace["%NEW_FUNCTIONS_EMBASSY_MECHANICS%"] = $_POST['new_functions_embassy_mechanics']; + $findReplace["%NEW_FUNCTIONS_FORUM_POST_MESSAGE%"] = $_POST['new_functions_forum_post_message']; + $findReplace["%NEW_FUNCTIONS_TRIBE_IMAGES%"] = $_POST['new_functions_tribe_images']; + $findReplace["%NEW_FUNCTIONS_MHS_IMAGES%"] = $_POST['new_functions_mhs_images']; + $findReplace["%NEW_FUNCTIONS_DISPLAY_ARTIFACT%"] = $_POST['new_functions_display_artifact']; fwrite($gameConfig, str_replace(array_keys($findReplace), array_values($findReplace), $text)); diff --git a/install/templates/config.tpl b/install/templates/config.tpl index 6c06214d..8a592f04 100644 --- a/install/templates/config.tpl +++ b/install/templates/config.tpl @@ -300,6 +300,42 @@ echo "
Error creating constant.php + + New forum post message: + + + + + + Tribes images in profile: + + + + + + MHs images in profile: + + + + + + Display artifact in profile: + + + +