Project

General

Profile

Actions

Bug #14520

closed

Newer mobile phones are not recognized by condition [device = wap]

Added by old_perki almost 20 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2005-02-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The list of WAP mobile devices in class.t3lib_matchcondition.php seems to be outdated. E.g. a Samsung mobile (user agent: SAMSUNG-SGH-E700/BSI2.0 UP.Browser/6.1.0.6 (GUI) MMP/1.0 UP.Link/1.1) is not detected by function 'whichDevice'.
The use of condition [useragent = .....] is also a pain in this case, because this seems to be case sensitive and the many mobiles by the same manufacturer come with different user agents in different cases.

While it seems to be quite a pain, to get an overview of the many user agents out there for mobile phones, it still would make sense to make this condition more powerful. You can grab a list of Useragents at http://webcab.de/wapua.htm
I just added some eregi's to the function 'whichDevice', to make my wap page work with my friend's mobile phones. Since I am not a programmer I am not sure, how harmfull my changes are - changing the Typo3 core code, done by me is like - you know the elephant in the porcelain shop - so please check this before you use it, esp.the recognition of the 'LG' mobile (user agent: LG/U8120/v1.0) might be problematic.

function whichDevice($useragent) {
$agent=strtolower(trim($useragent));
// pda
if( strstr($agent, 'avantgo')) {
return 'pda';
}

// wap
$browser=strtolower(substr($agent,0,4));
//debug($browser);
$wapviwer=substr(stristr($agent,'wap'),0,3);
if( $wapviwer=='wap' ||
$browser=='noki' ||
$browser== 'eric' ||
$browser== 'r380' ||
$browser== 'up.b' ||
$browser== 'winw' ||
eregi('siemens', $agent) ||
eregi('up.browser', $agent) ||
eregi('samsung', $agent) ||
eregi('alcatel', $agent) ||
eregi('ericsson', $agent) ||
eregi('mot', $agent) ||
eregi('lg', $agent) ||
eregi('sony', $agent) ||
eregi('winwap', $agent) ||
$browser== 'wapa') {
return 'wap';
}
(issue imported from #M731)

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #18395: Yahoo, MSN, Ask.com and Alexa are not recognized in TypoScript robot conditionClosedOliver Hader2008-03-07

Actions
Actions

Also available in: Atom PDF