Code: Select all
{% if MOBILE_ENABLE && S_MOBILE_WELCOME && S_MOBILE_NAME && SCRIPT_NAME == "app/portal" %}
Code: Select all
{% if MOBILE_ENABLE && S_MOBILE_WELCOME && S_MOBILE_NAME && SCRIPT_NAME == "app/portal" %}




That is 135 characters. User agent is setup for 255 characters. 'user_agent' => array('VCHAR:255', ''),ivailo95 wrote: 11 Jul 2018, 11:04Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1



The last post of mine was directed to earlier posts about the correct if statement syntax used for portals. Not for you ivailo95Sniper_E wrote: 12 Jul 2018, 21:28That is 135 characters. User agent is setup for 255 characters. 'user_agent' => array('VCHAR:255', ''),ivailo95 wrote: 11 Jul 2018, 11:04Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1
He should have been picked up using iPhone with that user agent info. You may have a different problem.
Not sure about safari (facebook browser) browser Maybe it is adding to the user agent string making it more than 255 characters.
Have him connect to here or at my test site with that browser and see if he has that problem.
ivailo95 have your guy try his safari (facebook browser) browser here at this site, martin's site or at my test site and see if he has that problem.Sniper_E wrote: 12 Jul 2018, 21:35 The correct syntax for that if statement for portal would be written like this...
{% if MOBILE_ENABLE && S_MOBILE_WELCOME && S_MOBILE_NAME && (SCRIPT_NAME == "index" || SCRIPT_NAME == "app/portal") %}
Given that SCRIPT_NAME == "app/portal" works in the portal as Unantastbar stated.



He said: Same error as yours boardmartin wrote: 29 Jul 2018, 17:20 This site is using an older version get him to visit mine https://www.martins-phpbb.com/forum/index.php mine is latest with a few added device's

Do you understand this below that I already posted?ivailo95 wrote: 11 Jul 2018, 11:04 This is his user agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1
this user used safari (facebook browser) browser
If he is getting the error that the data is too long for the user_agent field then that is not his user agent that is being detected.Sniper_E wrote: 12 Jul 2018, 21:28 That is 135 characters. User agent is setup for 255 characters. 'user_agent' => array('VCHAR:255', ''),


Code: Select all
<?php
/**
* @package phpBB Extension - Mobile Device
* @copyright (c) 2015 Sniper_E - http://www.sniper-e.com
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @copyright (c) 2015 martin - http://www.martins-phpbb.com
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
namespace sniper\mobiledevice\migrations;
class mobiledevice_schema extends \phpbb\db\migration\migration
{
public function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'users' => array(
'mobile_browser' => array('UINT:1', 0),
'device_name' => array('VCHAR:30', null),
'user_mobile_welcome' => array('BOOL', 1),
'user_mobile_header' => array('BOOL', 1),
'user_mobile_self' => array('BOOL', 1),
),
$this->table_prefix . 'posts' => array(
'post_device_title' => array('VCHAR:30', null),
),
),
'add_tables' => array(
$this->table_prefix . 'mobile_logs' => array(
'COLUMNS' => array(
'log_id' => array('UINT', null, 'auto_increment'),
'log_ip' => array('VCHAR:15', ''),
'log_time' => array('INT:11', 0),
'device_name' => array('VCHAR:30', ''),
'user_name' => array('VCHAR:30', ''),
'user_agent' => array('VCHAR:255', ''),
),
'PRIMARY_KEY' => 'log_id',
),
),
);
}
public function revert_schema()
{
return array(
'drop_columns' => array(
$this->table_prefix . 'users' => array(
'mobile_browser',
'device_name',
'user_mobile_welcome',
'user_mobile_header',
'user_mobile_self',
),
$this->table_prefix . 'posts' => array(
'post_device_title',
),
),
'drop_tables' => array(
$this->table_prefix . 'mobile_logs',
),
);
}
}
