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!
This commit is contained in:
Vladyslav
2018-06-25 21:06:30 +03:00
parent d30066dc9f
commit dffdcc4411
17 changed files with 297 additions and 138 deletions
+21 -20
View File
@@ -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<a href=\"".rtrim(SERVER, '/')."/spieler.php?uid=".(int) $session->uid."\">".$this->escape($session->username)."</a> posted a new message into your common topic. Here\\'s a link that will get you there: <a href=\"".rtrim(SERVER, '/')."/allianz.php?s=2&amp;pid=2&amp;fid2=$fid2&amp;tid=$tids\">forum link</a>\n\nYours sincerely,\n<i>Server Robot :)</i>",
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<a href=\"".rtrim(SERVER, '/')."/spieler.php?uid=".(int) $session->uid."\">".$this->escape($session->username)."</a> posted a new message into your common topic. Here\\'s a link that will get you there: <a href=\"".rtrim(SERVER, '/')."/allianz.php?s=2&amp;pid=2&amp;fid2=$fid2&amp;tid=$tids\">forum link</a>\n\nYours sincerely,\n<i>Server Robot :)</i>",
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);