Support » Plugin: Dynamic Widgets » Dynamic rule based on user agent

  • Resolved Daedalon


    The option to set widgets invisible for people with a certain user agent would be very handy.

    We have some widgets that don’t work correctly on iPhones using the Safari browser and Nokia Lumia with Internet Explorer, but they work correctly on all other devices we have tested so far. The current rulesets allow to hide based on the browser, but they don’t allow for a device-based hiding.

    I’d imagine the option would work well if users could add strings and decide whether that’s a Display or Do Not Display rule, and then have an option below for All The Other User Agents: Display or Do Not Display. This way we could create rules for “iPhone” and “Lumia”, and as they match strpos( $_SERVER[‘HTTP_USER_AGENT’], ‘iPhone’ ), the chosen rule of Do Not Display would be applied. For every other user agent we’d set Display.

    Could this setting be added?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Qurl


    I’ve received similar requests for mobile detection. The plan is to have some mobile detection available in the next release. But to be honest probably not such a fine granularity you would like to have.

    Ok, that’s a good step forward in any case. For the problematic plugin vs. certain mobile clients case we had I’ve implemented a workaround in the plugin code. Not update-safe and has to be maintained by editing the code, but gets the job done today.

    The user-agent rule would be excellent and cover many more possible use cases, so hope it gets implemented one fine day. A further improvement to it would be the ability to specify if a certain rule is to be evaluated as regexp instead of just a string to be passed to strpos. That covers all user agent related cases I could think of between these two posts.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dynamic rule based on user agent’ is closed to new replies.