Zitat von
ETES
Wie ich in deinem Ticketing gesehen habe, hast du die Klasse direkt eingebunden, weil du sie erweitert hast.
Jan
Direkt eingebunden weil ich die Browser je Zähler brauche, nicht je Contao Installation. (Multidomain Installation, inkl. Statistik Anzeige Backend)
Die Klasse selbst habe ich erweitert und verändert um diese mit meiner Vorgänger Version kompatibel zu machen.
Das auffälligste wäre die Windows Version Ergänzung + MacOSX:
PHP-Code:
const PLATFORM_WINDOWS_98 = 'Win98';
const PLATFORM_WINDOWS_ME = 'WinME';
const PLATFORM_WINDOWS_NT = 'WinNT';
const PLATFORM_WINDOWS_2000 = 'Win2000';
const PLATFORM_WINDOWS_2003 = 'Win2003';
const PLATFORM_WINDOWS_XP = 'WinXP';
const PLATFORM_WINDOWS_VISTA = 'WinVista';
const PLATFORM_WINDOWS_7 = 'Win7';
const PLATFORM_MACOSX = 'MacOSX';
Und damit die Änderung gleich zu Anfang in der protected function checkPlatform():
PHP-Code:
if( stripos($this->_agent, 'windows NT 7.0') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_7;
}
elseif( stripos($this->_agent, 'windows NT 6.1') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_7;
}
elseif( stripos($this->_agent, 'windows NT 6.0') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_VISTA;
}
elseif( stripos($this->_agent, 'windows NT 5.2') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_2003;
}
elseif( stripos($this->_agent, 'windows NT 5.1') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_XP;
}
elseif( stripos($this->_agent, 'windows NT 5.0') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_2000;
}
elseif( stripos($this->_agent, 'windows NT 4.0') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_NT;
}
elseif( stripos($this->_agent, 'windows Me') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_ME;
}
elseif( stripos($this->_agent, 'windows 98') !== false ) {
$this->_platform = self::PLATFORM_WINDOWS_98;
}
elseif( stripos($this->_agent, 'Mac OS X') !== false ) {
$this->_platform = self::PLATFORM_MACOSX;
}
Sobald ich die neue Version von Visitors im ER habe, kannste dir Details anschauen in der Datei ModuleVisitorBrowser3.php
Lesezeichen