mirror of
https://github.com/DanielSiepmann/tracking.git
synced 2024-11-22 22:06:09 +01:00
Daniel Siepmann
44ca6a2d3c
Extract operating system from user agent and store it in database record. Another widget is added which displays the page views per operating system. An command is provided which will update existing data.
82 lines
3 KiB
PHP
82 lines
3 KiB
PHP
<?php
|
|
return [
|
|
'ctrl' => [
|
|
'label' => 'url',
|
|
'label_alt' => 'crdate',
|
|
'label_alt_force' => true,
|
|
'default_sortby' => 'crdate DESC',
|
|
'tstamp' => 'tstamp',
|
|
'crdate' => 'crdate',
|
|
'cruser_id' => 'cruser_id',
|
|
'languageField' => 'sys_language_uid',
|
|
'title' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview',
|
|
'searchFields' => 'uid, url',
|
|
'iconfile' => 'EXT:core/Resources/Public/Icons/T3Icons/apps/apps-pagetree-page-default.svg',
|
|
],
|
|
'types' => [
|
|
'0' => [
|
|
'showitem' => 'sys_language_uid, pid, url, user_agent, operating_system, type, crdate',
|
|
],
|
|
],
|
|
'columns' => [
|
|
'pid' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview.pid',
|
|
'config' => [
|
|
// TODO: TYPO3 v10 does no longer allow to resolve PID relations, e.g. via select or group
|
|
// This will break internal PID handling.
|
|
'type' => 'input',
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'crdate' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview.crdate',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'eval' => 'datetime',
|
|
],
|
|
],
|
|
'sys_language_uid' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview.sys_language',
|
|
'config' => [
|
|
'type' => 'select',
|
|
'renderType' => 'selectSingle',
|
|
'foreign_table' => 'sys_language',
|
|
'items' => [
|
|
['LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview.sys_language.0', 0],
|
|
],
|
|
'readOnly' => true,
|
|
]
|
|
],
|
|
'user_agent' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview.user_agent',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'operating_system' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview.operating_system',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'type' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview.type',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'readOnly' => true,
|
|
'eval' => 'int',
|
|
],
|
|
],
|
|
'url' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.pageview.url',
|
|
'config' => [
|
|
'readOnly' => true,
|
|
'type' => 'input',
|
|
'size' => 50,
|
|
'max' => 255,
|
|
],
|
|
],
|
|
],
|
|
];
|