Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2018-06-14 05:59:40

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: adi_mobile - Mobile browser detection

Thanks Adi

That makes sense even to me. The joys of being entirely self-taught.

I think I spotted another plugin with a similar issue so I can update that one as well, accordingly.

You can tell I prefer content creation to the backend stuff.

Have you thought of writing haikus?

Offline

#62 2018-06-17 19:40:07

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 176
Website

Re: adi_mobile - Mobile browser detection

gomedia wrote #312560:

I haven’t updated the plugin for the new tag registry. The workaround is to edit it and insert the following at the top somewhere:

Thanks so much Adi. That works a treat.

Sorry I took so long to reply. Been, umm, distracted.

Offline

#63 2018-06-17 22:37:24

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_mobile - Mobile browser detection

No need to worry
So glad that it is working
Talk another time

Offline

#64 2020-08-07 07:26:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: adi_mobile - Mobile browser detection

Hi Adi, I have only just started using this plugin as a replacement to act_if_mobile. It appears that there is an issue when using it with txp 4.8.2, as it always returns 1. I disabled pat_speeder on the home page in order for you to easily see the output.

  • My default template can be found here
  • The source of our home page shows where the adi_mobile breaks on lines 11, 22.

> 2nd edit to add that I have tried this using php7, 7.2, and 7.4

Last edited by colak (2020-08-07 07:46:08)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#65 2020-08-07 07:55:27

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_mobile - Mobile browser detection

Hi Yiannis,

I haven’t got adi_mobile running on anything beyond 4.7 (yes, I know, people tell me I’m old school). However, it being a public-side plugin … in principle nothing should break (unless it’s a PHP problem).

From your template I can see that with <txp:adi_mobile include="tablet" /> you’re bundling mobiles & tablets together – i.e. <txp:adi_if_mobile> is true for both.

Not sure which lines 11, 22 I’m looking at … are there error messages or is <txp:adi_if_mobile> not doing the true/false thing properly?

Offline

#66 2020-08-07 08:09:45

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: adi_mobile - Mobile browser detection

Hi Adi, Line 11 in the source code corresponds to these lines in the template and line 22 corresponds to this one.

I agree with you that the plugin should not have been broken but I have no idea why both yours and act_if_mobile return identical results.

> Edited to clarify. If you visit NeMe’s home page, and view the source, I am referring to the lines 11 and 22 there.

Last edited by colak (2020-08-07 08:18:15)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#67 2020-08-07 08:21:22

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_mobile - Mobile browser detection

Can you elaborate on “identical results”? What device is not being detected correctly?

You could try debug="1" on <txp:adi_mobile /> to see if that splurges out anything incriminating.

Offline

#68 2020-08-07 08:36:32

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: adi_mobile - Mobile browser detection

The guilty is certainly the recent EvalElse() function (deprecated since txp 4.6) bug, sorry. I will take a look, but you should replace

parse(EvalElse($thing, $condition));

with

parse($thing, $condition);

Offline

#69 2020-08-07 08:50:45

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: adi_mobile - Mobile browser detection

Thanks so much guys. I think that Oleg’s suggestion worked. At least on my desktop.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#70 2020-08-07 08:57:53

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_mobile - Mobile browser detection

etc wrote #325219:

The guilty is certainly the recent EvalElse() function bug …

And there was I thinking I only need to wade through all my admin plugins to bring them up to speed :-(

Offline

#71 2020-08-07 09:58:47

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: adi_mobile - Mobile browser detection

gomedia wrote #325221:

And there was I thinking I only need to wade through all my admin plugins to bring them up to speed :-(

I’m the first annoyed, since many old plugins will break, unless we quickly release 4.8.3… sorry! :-(

Offline

#72 2020-08-07 10:14:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: adi_mobile - Mobile browser detection

etc wrote #325222:

I’m the first annoyed, since many old plugins will break, unless we quickly release 4.8.3… sorry! :-(

If EvalElse is deprecated, it makes more sense for plugins to be updated. This one was easy to do. I’m sure that the rest will not be that hard either.

Prolonging the life of deprecated functions will make txp harder to control. I can understand, supporting some functions for a few years but 4.6 was released 4 years ago!

It is strange that neither this, or act_if_mobile plugins returned no errors until this morning. I’ll investigate my server logs to check if I have missed anything.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB