Skip to content

Commit 72d4442

Browse files
committed
Replaced contact us page with mod forum
1 parent 0fa9871 commit 72d4442

File tree

14 files changed

+309
-25
lines changed

14 files changed

+309
-25
lines changed

admin/adminMultiFinder.php

+55-8
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
adminMultiCheck::form();
3636

37+
require_once('objects/groupUserToUserLinks.php');
38+
3739
if ( isset($_REQUEST['aUserID']) and $_REQUEST['aUserID'] )
3840
{
3941
try
@@ -60,6 +62,27 @@
6062
}
6163
else
6264
{
65+
// Fetch the user record data
66+
$bUsers = array();
67+
foreach($m->bUserIDs as $bUserID)
68+
{
69+
try {
70+
$bUsers[$bUserID] = new User($bUserID);
71+
} catch(Exception $e) {
72+
print '<p><strong>'.l_t('%s is an invalid user ID.',$bUserID).'</strong></p>';
73+
continue;
74+
}
75+
}
76+
77+
// Output the group panel user to user links for this set of users:
78+
print '<div>';
79+
$uids = $m->bUserIDs;
80+
$uids[] = $m->aUserID;
81+
$relations = GroupUserToUserLinks::loadFromUserIDs($uids,$uids);
82+
$relations->applyUsers($bUsers);
83+
print $relations->outputTable();
84+
print '</div>';
85+
6386
if( isset($_REQUEST['showHistory']) )
6487
{
6588
$m->printUserTimeprint();
@@ -68,15 +91,8 @@
6891
}
6992
else
7093
{
71-
foreach($m->bUserIDs as $bUserID)
94+
foreach($bUsers as $bUser)
7295
{
73-
try {
74-
$bUser = new User($bUserID);
75-
} catch(Exception $e) {
76-
print '<p><strong>'.l_t('%s is an invalid user ID.',$bUserID).'</strong></p>';
77-
continue;
78-
}
79-
8096
$m->compare($bUser);
8197
}
8298
}
@@ -457,6 +473,11 @@ public function aLogsDataCollect()
457473
FROM wD_AccessLog
458474
WHERE userID = ".$this->aUserID
459475
);
476+
$this->aLogsData['browserFingerprints'] = self::sql_list(
477+
"SELECT DISTINCT browserFingerprint
478+
FROM wD_AccessLog
479+
WHERE userID = ".$this->aUserID." AND browserFingerprint IS NOT NULL"
480+
);
460481

461482
// Up until now all aLogsData arrays must be populated
462483
foreach($this->aLogsData as $name=>$data)
@@ -631,6 +652,31 @@ private function compareCookieCodeData($bUserID, $bUserTotal)
631652
}
632653
}
633654

655+
private function compareFingerprintData($bUserID, $bUserTotal)
656+
{
657+
$aUserTotal = $this->aLogsData['total'];
658+
$aUserData = $this->aLogsData['browserFingerprints'];
659+
660+
$bTally=array();
661+
$matches = self::sql_list(
662+
"SELECT browserFingerprint, COUNT(browserFingerprint)
663+
FROM wD_AccessLog
664+
WHERE userID = ".$bUserID." AND browserFingerprint IN ( '".implode("','",$aUserData)."')
665+
GROUP BY browserFingerprint", $bTally
666+
);
667+
if( count($matches) )
668+
{
669+
$aTally=array();
670+
self::sql_list(
671+
"SELECT browserFingerprint, COUNT(browserFingerprint)
672+
FROM wD_AccessLog
673+
WHERE userID = ".$this->aUserID." AND browserFingerprint IN ( '".implode("','",$matches)."' )
674+
GROUP BY browserFingerprint", $aTally
675+
);
676+
self::printDataComparison('BrowserFingerprint', $matches, count($matches), count($aUserData),
677+
array('Italy'=>0.1,'Turkey'=>0.2,'Austria'=>0.3), $aTally, $aUserTotal, $bTally, $bUserTotal);
678+
}
679+
}
634680
private function compareUserAgentData($bUserID, $bUserTotal)
635681
{
636682
$aUserTotal = $this->aLogsData['total'];
@@ -708,6 +754,7 @@ public function compare(User $bUser)
708754
$this->compareIPData($bUser->id, $bUserTotal);
709755
$this->compareCookieCodeData($bUser->id, $bUserTotal);
710756
$this->compareUserAgentData($bUser->id, $bUserTotal);
757+
$this->compareFingerprintData($bUser->id, $bUserTotal);
711758

712759
if ( count($this->aLogsData['fullGameIDs']) > 0 )
713760
$this->compareGames('All games', $bUser->id, $this->aLogsData['fullGameIDs']);

contactUs.php

+7
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,17 @@
2525

2626
require_once('header.php');
2727

28+
header('refresh: 4; url=modforum.php');
29+
30+
libHTML::notice('Redirecting to Mod forum', 'Redirecting you to the moderator forum where you can submit a request to the mod team.');
31+
32+
die();
33+
2834
libHTML::starthtml();
2935

3036
print libHTML::pageTitle(l_t('Contact the Moderators'),l_t('Learn how to contact the moderators and what information to include.'));
3137

38+
3239
require_once(l_r('locales/English/contactUs.php'));
3340

3441
print '</div>';

contactUsDirect.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ class GameResultData
391391
If you have a question about how the game works, please read the <a href="faq.php" class="contactUs">FAQ</a>
392392
and the <a href="intro.php" class="contactUs"> intro to webDiplomacy</a> before using this form. </p>
393393
394-
<p> Need something else? Take a look at our <a href="contactUs.php" class="contactUs">Contact Info</a>
395-
page to learn how to contact an owner and see all the problems moderators can help with!</p>
394+
<p> Need something else? Take a look at our <a href="modforum.php" class="contactUs">Moderator forum</a>
395+
page to get in contact with the moderator team!</p>
396396
397397
</div>';
398398
print '<div class = "contactUsShow">';

gamepanel/gameboard.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function votes()
142142
}
143143

144144
$buf = '<div style="margin: 0 auto; text-align:center; padding-top:5px; padding-bottom:5px;">
145-
<a href="contactUsDirect.php">Need help?</a> - <a id="suspicionToggle" href="#suspicion" name="suspicion">Lodge cheating suspicion</a>
145+
<a href="modforum.php?fromGameID='.$this->id.'">Need help?</a> - <a id="suspicionToggle" href="#suspicion" name="suspicion">Lodge cheating suspicion</a>
146146
<div class="bar memberVotePanel memberSuspectPanel" style="display:none; font-size:90%; font-weight:normal !important; text-align:left">
147147
<form action="group.php" method="post">
148148
'.libAuth::formTokenHTML().'

images/icons/link-facebook.svg

+95
Loading

images/icons/link-google.svg

+57
Loading

images/icons/link-sms.svg

+48
Loading

install/1.71-1.72/update.sql

+6
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,9 @@ ALTER TABLE `wD_ForceReply` ADD `replyIP` int(10) unsigned NOT NULL;
167167
ALTER TABLE `wD_Misc` CHANGE COLUMN `Name` `Name` ENUM('Version','Hits','Panic','Notice','Maintenance','LastProcessTime','GamesNew','GamesActive','GamesFinished','RankingPlayers','OnlinePlayers','ActivePlayers','TotalPlayers','ErrorLogs','GamesPaused','GamesOpen','GamesCrashed','LastModAction','ForumThreads','ThreadActiveThreshold','ThreadAliveThreshold','GameFeaturedThreshold','LastGroupUpdate','LastStatsUpdate') NOT NULL;
168168
INSERT INTO wD_Misc (`Name`,`Value`) VALUES ('LastStatsUpdate',0);
169169
INSERT INTO wD_Misc (`Name`,`Value`) VALUES ('LastGroupUpdate',0);
170+
171+
ALTER TABLE wD_AccessLog
172+
ADD INDEX `indBrowserFingerprint` (`browserFingerprint`);
173+
174+
ALTER TABLE `wD_ModForumMessages`
175+
ADD COLUMN `gameID` MEDIUMINT UNSIGNED NULL DEFAULT NULL;

install/FullInstall/fullInstall.sql

+4-1
Original file line numberDiff line numberDiff line change
@@ -1313,4 +1313,7 @@ ALTER TABLE `wD_ModForumMessages` ADD `assigned` mediumint(8) unsigned DEFAULT 0
13131313
ALTER TABLE `wD_ForceReply` ADD `status` enum('Sent','Read','Replied') NOT NULL DEFAULT 'Sent';
13141314
ALTER TABLE `wD_ForceReply` ADD `readIP` int(10) unsigned NOT NULL;
13151315
ALTER TABLE `wD_ForceReply` ADD `readTime` int(10) unsigned NOT NULL;
1316-
ALTER TABLE `wD_ForceReply` ADD `replyIP` int(10) unsigned NOT NULL;
1316+
ALTER TABLE `wD_ForceReply` ADD `replyIP` int(10) unsigned NOT NULL;
1317+
1318+
ALTER TABLE wD_AccessLog
1319+
ADD INDEX `indBrowserFingerprint` (`browserFingerprint`);

lib/html.php

+1
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,7 @@ static public function menu ($pages, $scriptname)
10431043
<a href="points.php" title="Points and Scoring Systems">Points/Scoring</a>
10441044
<a href="variants.php" title="Active webDiplomacy variants">Variants</a>
10451045
<a href="help.php" title="Site information; guides, stats, links">More Info</a>
1046+
<a href="modforum.php">Mod Forum</a>
10461047
<a href="contactUsDirect.php">Contact Us</a>
10471048
<a href="donations.php">Donate</a>
10481049
</div>

locales/English/help.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,10 @@
4141
</p>
4242
</div>
4343

44-
<div class = 'help_title'>Contact Information</div>
44+
<div class = 'help_title'>Mod forum</div>
4545
<div class = 'help_content'>
4646
<p>
47-
If you need to contact one of the site owners, or see more about what the moderator team and owners can help you out with, see their
48-
<a href="contactUs.php">Contact Information</a> here!
47+
If you need to get in touch with the mod team please submit a message to the <a href="modforum.php">moderator forum</a>!
4948
</p>
5049
</div>
5150

0 commit comments

Comments
 (0)