Is anyone working on an integration module with browscap? ( http://drupal.org/project/browscap ). Just thought I'd ask before writing my own plugin from scratch.

The functionality I'm looking for is the ability to set contexts' conditions based on the end users' screen resolution. That would mean I could supply larger images for a fullscreen slideshow if they had a large screen than on a small screen using different imagecache presets.

I thought this might be simpler to administer than using something like switchtheme (http://drupal.org/project/switchtheme) which would require a second theme which in my case would mean duplicate theme code.

Fantastic module by the way.

Comments

socialnicheguru’s picture

subscribing. I would like to help you test.

nwe_44’s picture

thanks for your support. I did build something, but it's still quite buggy. Will put it up when it's ready for more public consumption.

steven jones’s picture

Title: Integration with Browscap » Integration with Context
Project: Context » Browscap
Version: 6.x-2.0-beta7 » 6.x-1.x-dev

Thanks for the effort, I think this belongs in the Browscap module, and not in Context, hence I'm moving to that issue queue.

You will probably want to look at integrating with the 3.x branch of Context, using a ctools style plugin. Good luck!

socialnicheguru’s picture

I would also like to save the theme depending on if it comes from a mobile phone or a computer.

paulgemini’s picture

Any progress on this one?

devin carlson’s picture

Title: Integration with Context » Integrate with Context
Version: 6.x-1.x-dev » 7.x-1.x-dev

The ability to modify a theme depending on screen resolution is already handled via CSS 3 Media Queries. Check out the Omega - Responsive HTML5 Base Theme for a great example of media queries and responsive design.

Modifying image sizes (of images that are controlled by images styles) to fit certain screen resolutions can be done using the Responsive Images module.

devin carlson’s picture

Status: Active » Closed (works as designed)

In order to keep Browscap lightweight, I think that integration with other modules should be left out. Integration between Browscap and Context is taken care of by other contrib modules such as Mobile Tools.

arh1’s picture

Context integration makes good sense to me, too. Mobile Tools is often too heavy-handed when I just want to toggle off a few blocks for mobile devices in an otherwise responsive design.

Writing a Context plugin for Browscap proved pretty easy -- just want to doublecheck that you're not interested in a patch, Devin.

arh1’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Closed (works as designed) » Needs review
StatusFileSize
new2.1 KB

Attached is a patch that takes a first pass at Context integration. It just provides a simple condition with checkboxes for whether or not the UA is a mobile device.

In the hopes that you'll reconsider, Devin Carlson :)

greggles’s picture

Status: Needs review » Closed (works as designed)

I don't super duper like this idea. Why not include it in Context if anywhere?

Setting back to WAD.