Send you a PMMiri4ever wrote:My Opera Browser is displayed as Chrome ?? Is this correct ?
Code: Select all
if (substr($version, 0, 3) == 6.0)
if
and always write it so that it would also work with ===. You are comparing a string with a float number.Code: Select all
public function submit_post_modify_sql_data($event)
{
$post = $this->request->get_super_global(\phpbb\request\request::SERVER);
$sql_data = $event['sql_data'];
if (($event['post_mode'] == 'post') || ($event['post_mode'] == 'reply')) {
$sql_data[POSTS_TABLE]['sql']['user_agent'] = $post['HTTP_USER_AGENT'];
}
$event['sql_data'] = $sql_data;
}
Code: Select all
$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac');
Code: Select all
$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac', 'Android', 'iPhone', 'Windows Phone');
Code: Select all
if (substr($version, 0, 3) == 10.0)
$system = 'Windows 10';
}
}
Code: Select all
elseif ($system == 'Android')
{
$system = 'Android';
}
elseif ($system == 'iPhone')
{
$system = 'iPhone';
}
elseif ($system == 'Windows Phone')
{
$system = 'Windows_Phone';
}
One year later... LOLDifadon wrote:Hello,
I added support for Android, iPhone and Windows Phone (iPhone + Windows Phone -> I can´t testing).
Perhaps someone can handle distribution for the version.
1. Open file */includes/user_agent.php
2. Find:Replace with:Code: Select all
$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac');
3. Find:Code: Select all
$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac', 'Android', 'iPhone', 'Windows Phone');
Add after:Code: Select all
if (substr($version, 0, 3) == 10.0) $system = 'Windows 10'; } }
Upload this pack to */images/user_agent/os/Code: Select all
elseif ($system == 'Android') { $system = 'Android'; } elseif ($system == 'iPhone') { $system = 'iPhone'; } elseif ($system == 'Windows Phone') { $system = 'Windows_Phone'; }
https://webshare.cz/file/1Me3Bd6kp5/icons-zip