New theme and mobiles

Tell of us any technical problems in here, there are also a lot of FAQs listed
User avatar
Andrew
Bailiff
Bailiff
Posts: 15570
Joined: Wed Nov 02 2011 05:00

Re: New theme and mobiles

Post by Andrew »

yay!

the solution was staring me in the face, Doh.
public function is_mobile($event)
{
$user_agent = strtolower($this->request->server('HTTP_USER_AGENT'));
$browsers = array('240x320', '320x240','blackberry', 'iemobile', 'minimobile', 'mobile', 'opera mini', 'pda', 'phone', 'pocket', 'psp', 'symbian', 't-shark', 'wireless');

foreach ($browsers as $inbrowserarray)
{
if (stripos($user_agent, $inbrowserarray) !== false)
{
$event['style_id'] = 25;
break;
}
elseif ((strpos($user_agent, 'ipad') == true))
{
break;
}
}
}
:roll:
User avatar
Ian Crook
Barbel
Barbel
Posts: 4821
Joined: Wed Nov 02 2011 05:00
Location: Berkshire via Lancashire
Contact:

Re: New theme and mobiles

Post by Ian Crook »

Sorted now, thanks Andrew, for others info I am using Google Chrome on my iPad, not Safari as it retains logged in status on forums
User avatar
MarkBerrisford
Chub
Chub
Posts: 1873
Joined: Fri Sep 02 2011 05:00
Location: Manchester

Re: New theme and mobiles

Post by MarkBerrisford »

Cheers Andrew much better :thumbs:
Search MB Custom Lures on Facebook
User avatar
Andrew
Bailiff
Bailiff
Posts: 15570
Joined: Wed Nov 02 2011 05:00

Re: New theme and mobiles

Post by Andrew »

Its device name it picks up on usersgent for ipad. ipad contains both strings mobile and ipad so wee conflict there.
User avatar
Tomcox77
Chub
Chub
Posts: 1902
Joined: Wed Sep 07 2011 05:00
Location: Mkt harborough

Re: New theme and mobiles

Post by Tomcox77 »

Well done Andrew, much better , you can only sort when you get feedback. Ta
Glenn..
Jack Pike
Jack Pike
Posts: 467
Joined: Sat Aug 27 2011 05:00
Location: Suffolk

Re: New theme and mobiles

Post by Glenn.. »

Nige Johns wrote: Wed Mar 22 2017 11:13 -
Carlperkins wrote: Wed Mar 22 2017 10:20 -
Same as
Can't seem to change it in this b*****d Iphone
Carl,open up safari,at the bottom of the page in the middle is a box with an up arrow in it,click on that,you'll see 2 lines of icons,go onto the black and white bottom row,scroll across to the one that says 'request desk tip site' that should put you right :thumbs:
Ok.. know all.. :roll: :roll: :wink: :thanks:
User avatar
pikerholic2
Barbel
Barbel
Posts: 2927
Joined: Wed Apr 02 2014 19:57
Location: Saturn

Re: New theme and mobiles

Post by pikerholic2 »

I am impressed with your set up now mr croft :thumbs:

Nice one :thanks:
Crack Hargreaves...........far out of town.


Mr godfrey I post mostly drivel
Post Reply