mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
parent
86f8cb5100
commit
d04f703f35
@ -114,6 +114,7 @@ class FeaturesController extends AbstractController
|
||||
'enablepopupnotification',
|
||||
'showonlineoperators',
|
||||
'enablecaptcha',
|
||||
'trackoperators',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,10 @@ class WidgetController extends AbstractController
|
||||
'data' => array(),
|
||||
);
|
||||
|
||||
if (Settings::get('enabletracking') == '1') {
|
||||
$tracking_allowed = (Settings::get('enabletracking') == '1')
|
||||
&& (Settings::get('trackoperators') == '1' || !$this->getOperator());
|
||||
|
||||
if ($tracking_allowed) {
|
||||
|
||||
$entry = $request->query->get('entry', '');
|
||||
$referer = $request->server->get('HTTP_REFERER', '');
|
||||
|
@ -106,6 +106,7 @@ class Settings
|
||||
'visitors_limit' => 20, /* Number of visitors to look over */
|
||||
'invitation_lifetime' => 60, /* Lifetime for invitation to chat */
|
||||
'tracking_lifetime' => 600, /* Time to store tracked old visitors' data */
|
||||
'trackoperators' => '0',
|
||||
'cron_key' => DEFAULT_CRON_KEY,
|
||||
// System values are listed below. They cannot be changed via
|
||||
// administrative interface. Start names for these values from
|
||||
|
@ -31,6 +31,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
function updateTracking() {
|
||||
if ($("#enabletracking").is(":checked")) {
|
||||
$(".undertracking").show();
|
||||
} else {
|
||||
$(".undertracking").hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#enablepresurvey").change(function() {
|
||||
updateSurvey();
|
||||
@ -41,8 +49,12 @@
|
||||
$("#enablegroups").change(function() {
|
||||
updateGroups();
|
||||
});
|
||||
$("#enabletracking").change(function() {
|
||||
updateTracking();
|
||||
});
|
||||
updateSurvey();
|
||||
updateSSL();
|
||||
updateGroups();
|
||||
updateTracking();
|
||||
});
|
||||
})(jQuery);
|
@ -94,6 +94,15 @@
|
||||
</div>
|
||||
<label for="enabletracking" class="fdescr"> — {{l10n "Enable tracking of visitors' activity on your site and ability to invite visitors to chat."}}</label>
|
||||
<br clear="all"/>
|
||||
|
||||
<div class="subfield undertracking">
|
||||
<label for="trackoperators" class="flabel">{{l10n "Track operators"}}</label>
|
||||
<div class="fvalue">
|
||||
<input id="trackoperators" type="checkbox" name="trackoperators" value="on"{{#if formtrackoperators}} checked="checked"{{/if}}{{#unless canmodify}} disabled="disabled"{{/unless}}/>
|
||||
</div>
|
||||
<label for="trackoperators" class="fdescr"> — {{l10n "Track operators like any other visitors."}}</label>
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
|
Loading…
Reference in New Issue
Block a user