3.2 & 3.3 Extensions Database 3.1 / 3.2Mobile Device

<span class="qte-attr qte_31_32-qte">3.1.x &amp; 3.2.x</span>
User avatar

Kinsman
Users
Users
Posts: 109
Joined: 18 Aug 2016, 15:38
    Windows 7 Firefox

Re: Mobile Device

Post by Kinsman »

Mmm, but then all tapatalk users become windows browser? Maybe I could add it before each type? say before android starts, etc etc?

Would that be worth trying?

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Mobile Device

Post by Sniper_E »

Yes you can add that code to the top.

Code: Select all

	private function mobile_device_detect($iphone=true,$ipod=true,$ipad=true,$android=true,$opera=true,$blackberry=true,$palm=true,$windows=true,$lg=true)
	{
		$mobile_browser	= false;
		$user_agent	 = $this->request->server('HTTP_USER_AGENT');

		switch(true)
		{
			case (preg_match('/taptalk/i',$user_agent));
				$status = 'Taptalk';
				$mobile_browser = $windows;
			break;
$windows; just tells it that is is a valid mobile device and post it.

You could use $taptalk; there if you really wanted to.

Code: Select all

	private function mobile_device_detect($iphone=true,$ipod=true,$ipad=true,$android=true,$opera=true,$blackberry=true,$palm=true,$windows=true,$lg=true,$taptalk=true)
	{
		$mobile_browser	= false;
		$user_agent	 = $this->request->server('HTTP_USER_AGENT');

		switch(true)
		{
			case (preg_match('/taptalk/i',$user_agent));
				$status = 'Taptalk';
				$mobile_browser = $taptalk;
			break;
Look how it's added to that first line also.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Mobile Device

Post by Sniper_E »

I got you added in the event/listener.php down at the bottom of the androids like this.

Code: Select all

				elseif (preg_match('/lumia 830/i',$user_agent))
				{
					$status = 'Lumia 830';
				}
				else
				{
					$status = 'Android';
				}
You're setup to show on my test site now. :thumbup:

User avatar

Kinsman
Users
Users
Posts: 109
Joined: 18 Aug 2016, 15:38
    Windows 7 Firefox

Re: Mobile Device

Post by Kinsman »

Oh ok, I noticed that if I altered the browser then nothing shows up next to the author's name, so figured that everything should probably have a valid browser was all. BTW the Lumia 830 is Windows Phone 10.0, while my wife's 640XL is Windows Phone 8.1 just for info.

I'm going to abandon this idea as most of us us Tapatalk and funnily enough tapatalk useragent on my phone identifies as an iphone. We all have custom sigs in our tapatalk app anyhow, so this is a bit irrelevant for us and I'm over crappy user-agents.

No offence to your ext in any way, it's great work.

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Mobile Device

Post by Sniper_E »

Cool, I got you both setup at my test site now.

Code: Select all

				elseif (preg_match('/lumia 830/i',$user_agent))
				{
					$status = 'Windows 10';
				}
				elseif (preg_match('/640XL/i',$user_agent))
				{
					$status = 'Windows 8.1';
				}

User avatar

Kinsman
Users
Users
Posts: 109
Joined: 18 Aug 2016, 15:38
    Windows 10 Chrome

Re: Mobile Device

Post by Kinsman »

Thanks, you should be able to read the results of our testing here.

http://www.junglewraiths.net/viewtopic. ... 616#p57616

It seems like the Android Version of tapatalk does not identify itself, and also the tapatalk sigs appear to replace the Post Made By text inside the posts.

Other than that it's working ok. I might think about trying to identify Windows Phone 10 and Windows Phone 8.1 separately one day, but it's good enough for now.

Code: Select all

private function mobile_device_detect($iphone=true,$ipod=true,$ipad=true,$android=true,$opera=true,$blackberry=true,$palm=true,$windows=true,$lg=true,$tapatalk=true)
	{
		$mobile_browser	= false;
		$user_agent	 = $this->request->server('HTTP_USER_AGENT');

		switch(true)
		{
			case (preg_match('/tapatalk/i',$user_agent));
				$status = 'Tapatalk';
				$mobile_browser = $tapatalk;
			break;
			
      case (preg_match('/(iris|3g_t|windows ce|windows Phone|windows Phone 10.0|windows Phone 8.1|opera mobi|windows ce; smartphone;|windows ce; iemobile)/i',$user_agent));
				if (preg_match('/Lumia 830/i',$user_agent))
			{
				$status = 'Lumia 830';
				$mobile_browser = $windows;
				}
				elseif (preg_match('/Lumia 640 XL LTE/i',$user_agent))
				{
					$status = 'Lumia 640XL';
					$mobile_browser = $windows;
				}
				else
				{
					$status = 'Windows Smartphone';
				}
				$mobile_browser = $windows;
			break;		

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Mobile Device

Post by Sniper_E »

When you are on your android do you click the Who Is Online link in the bottom of the index page to get your browser info?

I'm not sure how you get a browser info when posting with Taptalk. Is it identified the same as in the Who Is Online?

What is this Taptalk Sig that replaces the Post Made By text inside the posts?
Maybe it's not replacing the Post Made By text inside the posts, that part may not be posting because it's not recognized as a mobile.

User avatar

Kinsman
Users
Users
Posts: 109
Joined: 18 Aug 2016, 15:38
    Windows 10 Firefox

Re: Mobile Device

Post by Kinsman »

Yes, I'm just getting the agents from the logs, tapatalk has signatures, which get posted where the mobile device would be posted.

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Mobile Device

Post by Sniper_E »

I would think that it would post in that place also... not posted there instead of the mobile post.

Your Taptalk sig and the mobile post both should post in that place.
I think you just need to get the mobile detect to recognize the Taptalk browser.

Check your mobile logs and check the Who Is Online page see if they are listed the same.

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Mobile Device

Post by Sniper_E »

I've been playing around with the look of the mobile logs popup page.
Sign in on your mobile and look at the mobile logs for your mobile listed.
Login: tester/tester - See the progress, suggestions ok.

User avatar

Kinsman
Users
Users
Posts: 109
Joined: 18 Aug 2016, 15:38
    Windows 10 Chrome

Re: Mobile Device

Post by Kinsman »

Tapatalk from Iphone

Mozilla/5.0 Firefox/3.5.6 Tapatalk/1549

From Windows Phone

Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36 Tapatalk/6.1.5

From Samsung S7

Dalvik/2.1.0 (Linux; U; Android 6.0.1; SM-G930F Build/MMB29K)

as you can see it's all over the place.

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Mobile Device

Post by Sniper_E »

I didn't see where Taptalk registered in my site logs. I had the taptalk case in the listener.php but not at the top line.

I moved that case to the top line, I am curious to see if your Taptalk will show up now. Visit with taptalk when you get a chance.

Login as tester and make a post in the Testing forum with your Taptalk. See if it shows at my test site. Thanks!

It doesn't look like you have had much luck on your site with that.

User avatar

Topic Author
Sniper_E
VIP
VIP
Posts: 1160
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Mobile Device

Post by Sniper_E »

Kinsman wrote: 06 Oct 2016, 09:34Tapatalk from Iphone - Mozilla/5.0 Firefox/3.5.6 Tapatalk/1549
I did not see your posts on your site with this working in it. Did you figure it out?
Are you still not getting this line below in your post when you make a post using Taptalk?

[ Post made via Taptalk ] Image

Can you visit my site with Taptalk and have the detected mobile icon show on the index page?
I'm setup for that now. Or make a post there and see if that line shows up using Taptalk?
I'm still curious if you can get that working. It seems like it should.
taptalk.gif
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

Tarantino
Users
Users
Posts: 42
Joined: 10 Sep 2016, 04:58
    Windows 10 Chrome

Re: Mobile Device

Post by Tarantino »

This seems very interesting. :thumbup:

User avatar

Musiker15
Users
Users
Posts: 29
Joined: 07 Oct 2016, 16:10
    Windows 10 Chrome

Re: Mobile Device

Post by Musiker15 »

German Translation
de.zip
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
I'm from Germany so my English is not the best...
________________________________________________________________
Image

Post Reply Previous topicNext topic