Split from: http://drupal.org/node/1866196

A context reaction to override ad unit size, coupled with http://drupal.org/project/context_breakpoint, could provide a neat way of delivering ads on reactive themes.

We have a scenario where we have three buttons the same size in a sidebar, so the ability to select more than one ad unit for this would be helpful.

Thoughts?

CommentFileSizeAuthor
#4 1884052.patch6.43 KBbleen
#4 Screenshot_1_22_13_4_00_PM.png72.89 KBbleen
#3 DFP2.png148.48 KBgurrmag
#2 DFP.png124.46 KBgurrmag
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bleen’s picture

This is something i would definitely consider as long as we found a good way to say "at breakpoint X, set tagA's size to wXh AND tagB's size to wXh ...." The UI here could get very confusing

gurrmag’s picture

FileSize
124.46 KB

I was thinking breakpoints+context-breakpoint to provide a context condition that effectively looks to see if a media query set in breakpoints is satisfied - see attached.

gurrmag’s picture

FileSize
148.48 KB

Very rough mock-up of UI following that of existing context plugin for DFP - not sure if tokens are necessary though?

bleen’s picture

Status: Active » Needs review
FileSize
72.89 KB
6.43 KB

This patch should work really well (especially with a module like context_breakpoint for example) and should allow users to override the size of ads.

Screenshot_1_22_13_4_00_PM.png

gurrmag’s picture

That's great... Thanks for looking at this so quickly...

I'll look at this as soon as I can...

bleen’s picture

Thanks ... the sooner the better - I'm ramping up to do an official release of DFP :)

gurrmag’s picture

I can confirm this works... Looking forward to an official release!

In case anyone else decides to go down this path, it may be worth just cross-posting this issue/patch on context_breakpoints which means, on some browsers, the context using breakpoints will not fire the first time someone visits the site (i.e. cleared cookies): Current context is not checked against existing cookie when page is loaded, so, without applying the patch at #1 there, you may get either no ads or ads of the wrong size the first time you visit the site.

bleen’s picture

Status: Needs review » Reviewed & tested by the community

I'll take that as RTBC :)

bleen’s picture

Status: Reviewed & tested by the community » Fixed

stupendous ... committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.