Closed (fixed)
Project:
DART
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2011 at 15:33 UTC
Updated:
6 Jul 2011 at 02:43 UTC
Jump to comment: Most recent file
Comments
Comment #1
gansbrest commentedYep, you can refresh ads dynamically with writeCapture. As example you can check http://www.fastcompany.com/most-creative-people/2011/wadah-khanfar-al-ja... - when you click between Profile, Process and Inspiration on the top, Ad units will be refreshed.
We use DART + WriteCapture library.
Comment #2
bleen commentedgansbrest .. did you have to alter the DART module at all? If so, can you post a patch?
Either way can you give just a bit more detail as to what you did to get WriteCapture to work ... as much detail as you can give would be helpfull
Comment #3
gansbrest commentedSure. I didn't alter dart module. The only thing I changed is that I took out document.write from dart.js (as we discussed in here http://drupal.org/node/1146080), but since you added new writeTags setting, it should work as well.
Here is the overview of what I've done to make ad refreshing along with js on the bottom of the page possible:
1) I moved dart.tpl to the project theme and altered it. The idea is that instead of outputting ad tags right away, we create placeholder for those ad units on the page:
Something like that:
###########################
2) The next step is to output stored ad tags on the page, so we can render them. To do that I've used preprocess_page function in the template.php.
3) Render ads in JS. We used a little overcomplicated logic to render and refresh ad tags on the page, because of those crazy content scrollers. But here is the general idea:
I think that was about it.. )
Comment #4
bleen commentedok .. this patch was largely stolen from some code used by mofolo. Its a whole lot simpler than the code provided in #3
I'm making the change to 6.x first and will port it to 7.x later
Comment #5
bleen commented... same patch without whitespace issues
Comment #6
bleen commentedthe patch in #4 would kill an ad's "slug" This patch fixes that
Comment #7
bleen commentedI committed #6 to 6.x-dev ... need to port to 7.x now
Comment #8
bleen commentedthis is the patch for 7.x
Comment #9
bleen commentedcommitted to 7.x
Comment #10
gansbrest commentedGreat, I think I will try it out for a new non trivial project pretty soon. Thanks for your work!