SilverBoy
01-19-2017, 10:56 PM
Hi
I notice that no one can use asset manager to upload files if he browsing using his mobile phone !!
If this is a known issue, is there any trick to solve it?
Thanks in advance.
MarkFL
01-19-2017, 11:00 PM
...If this is a known issue, is there any trick to solve it?
Yes...put away the toy and log on using a computer. ;) :erm::confused::p
SilverBoy
01-19-2017, 11:03 PM
Yes...put away the toy and log on using a computer. ;) :erm::confused::p
LooooooooL
Really is there any solution? I'm trying to get new responsive theme but the designer asked me to disable asset manager because it will not work with mobiles, and after check it with my current style I found what he say is right !!
SilverBoy
01-22-2017, 01:13 AM
I think in newattacment.php file, if we can add check if the user uses mobile to browse then disable asset manager before this line
$templater->register('asset_enable', $vbulletin->userinfo['vbasset_enable'] ? $vbulletin->options['vbasset_enable'] : 0);
Is it right guessing? if that then how I can make the check for mobile?
--------------- Added 1485058458 at 1485058458 ---------------
I found the half of the solution, here is the check code from include/init.php file
// Test mobile browser
$mobile_browser = false;
$mobile_browser_advanced = false;
if (stripos($_SERVER['HTTP_USER_AGENT'], 'windows') === false OR preg_match('/(Windows Phone OS|htc)/i', strtolower($_SERVER['HTTP_USER_AGENT'])))
{
if (
preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wa p|phone|android|Windows Phone OS|htc)/i', strtolower($_SERVER['HTTP_USER_AGENT']))
OR
stripos($_SERVER['HTTP_ACCEPT'],'application/vnd.wap.xhtml+xml') !== false
OR
((isset($_SERVER['HTTP_X_WAP_PROFILE']) OR isset($_SERVER['HTTP_PROFILE'])))
OR
stripos($_SERVER['ALL_HTTP'],'OperaMini') !== false
)
{
$mobile_browser = true;
}
// This array is big and may be bigger later on. So we move it to a second if.
else if (in_array(
strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4)),
array(
'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird' ,'blac',
'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno',
'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-',
'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-',
'newt','noki','oper','palm','pana','pant','phil',' play','port','prox',
'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar',
'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-',
'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp',
'wapr','webc','winw','winw','xda ','xda-')
)
)
{
$mobile_browser = true;
if(strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4)) == 'oper' AND preg_match('/(linux|mac)/i', $_SERVER['HTTP_USER_AGENT']))
{
$mobile_browser = false;
}
}
}
if (
$mobile_browser
AND
preg_match('/(ipad|ipod|iphone|blackberry|android|pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine |Windows Phone OS|htc)/i', strtolower($_SERVER['HTTP_USER_AGENT']))
)
{
$mobile_browser_advanced = true;
}
The problem is that I was mistaken about newattacment.php file it is not the responsible about checking if the asset manager enabled or not.
Any hint?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.