Posted by cbassig on October 28, 2009 at 1:24am
| Project: | Advertisement |
| Version: | 6.x-2.2 |
| Component: | ad module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Great Module!
I was wondering is it possible to have the image banners rotate on a time delay rather than just on page load? How can I go about accomplishing this?
I would like to do something similar to the Rotor Banner Module. It doesn't necessarily need to do all the fancy transitions (although it would be nice), but it would be great to have it just switch after like 15 seconds. I would just use the Rotor Banner Module, but it doesn't keep track of statistics, which I would like to keep.
Thanks!
Comments
#1
It really would be nice to somehow integrate these two modules, or at least allow them to interact.
#2
There are a number of modules out there that offer this type of functionality -- perhaps one of the ones listed here works out of the box?
http://drupal.org/node/418616
I would accept good, clean patches if necessary to integrate the ad module with one of these other modules to provide this functionality.
#3
I think the idea is that it needs to work with the statistics provided by the Ad module. I've used Rotor Banner before and it works fine but, like the OP mentioned, it doesn't give the ad statistics.
#4
You could also (in theory) do it with the ad_views module + Views Slideshow, but right now the integration is broken/unfinished.
#5
butler360 has it right. The most important thing is I need the stats of the Ad module and the rotating capabilities of the Rotor Banner. It would be great if the two modules could be combined in some way.
Domesticat - would ad_views module and Views Rotator work, since you mention the Views Slideshow is broken? This could possibly solve my problem.
#6
@cbassig - I can vouch that you can get ad_views + Views Slideshow to work. Read #524454: Any news about the Ad Image (ad_image) support? to get an idea of the problem. There's a workaround, but it's kludgey. I don't know about Views Rotator, but I suspect it's going to be subject to similar issues that Views Slideshow was.
#7
Thanks. I will give both a try later this week to see if I can get it to work.
#8
@domesticat
I finally got a chance to start testing this out, but can't get it to work. I read the postings at #524454: Any news about the Ad Image (ad_image) support?, but it doesn't really explain how to get the Views Slide-show involved.
I have the view showing the ads, but the Slide-Show style doesn't do anything. The ads will rotate per page view based on the standard ad module settings. How did you get the Views Slide-show to work?
My view settings include:
Thanks for any help.
#9
Hi All,
This issue seems to be the place to jump in on this discussion. I have a client with the need to rotate ads without a page refresh, and I also want to ensure that impression and click tracking remain functional.
Attached is a patch that implements a quick hack for the jQuery display type. Instead of calling the jQuery.load() function on the ad server url just once, it puts the call into a setInterval timer and calls it every 10 seconds.
For me, this has the desired effect of reloading the ad group every ten seconds, while incrementing impressions and counting clicks.
I'm posting this here as a kind of proof of concept. If this approach seems acceptable to most, we'd have to find a way to implement settings to, for example, enable/disable the auto-rotation for specific groups (perhaps configurable at the block level), and the rotation rate, which is currently hard coded to 10 seconds.
Regards,
Jeff
#10
Jeff,
I applied the patch following the directions here: http://drupal.org/patch/apply . I received this message: patching file ad.module , so I thought it would work. Unfortunately, after doing that, the ads still do not rotate. Do I need to create new ad nodes? Is there something in the module I need to tweak?
#11
Hi Johann,
Currently, this patch only works if the display type is set to 'jQuery' on your ads settings page (admin/content/ad/configure). By default this is set to 'javascript', so maybe that's the problem.
Regards,
Jeff
#12
Jeffam, applied patch worked perfect first patch I've done, cheers.
UPDATE
IE8 not cycling through images...UPDATE IE8 Caching issue
#13
gstokes,
Glad it's mostly working for you, and bummer about the IE8 issue.
This is mostly a proof of concept kind of thing, so I don't really want to troubleshoot it until the project maintainer and others chime in to say whether this is a viable way to implement this feature request.
Regards,
Jeff
#14
> This is mostly a proof of concept kind of thing, so I don't really want to troubleshoot it until
> the project maintainer and others chime in to say whether this is a viable way to implement
> this feature request.
Yes, I think this a fine way to implement it. As you've already said, it needs to be made configurable, a per-block configuration would be great (however then how does one enable/disable the feature if not displaying ads through blocks?), perhaps also a per-group configuration, with the per-block over-riding the per-group setting?
#15
Here's a first attempt at a configurable auto rotation patch for the ad module.
The rotation setting is at the Ad group level, where one may specify the rotation interval in seconds. See the attached screenshot.
For the most part, this works fine, but I had to pass the rotation interval to the theme function, which doesn't feel quite right. Not sure what to do about that, though.
Also, the ad() function can take multiple tids, but since the rotation interval is set per group (tid), it's unclear how it would be best to handle that. Currently, this code would just disable ad rotation when using an ad() call with multiple tids.
The patch still only works for jQuery display types, although I can imagine doing a little extra work to get it to work for plain old javascript as well.
Regards,
Jeff
#16
Here's a patch that will actually apply.
#17
@jeffam
I just wanted to thank you for your patch. My client required the same thing and I thought it was going to be a real headache. Your patch made things a great deal simpler, thank you for your work on that and for sharing :)
#18
@fr33dom - Glad to hear that you found this code useful.
Once I deployed this code to my client's site, though, I discovered that the continual HTTP hits on the server were a little too resource intensive, so I reworked this patch a bit.
The current version loads all possible rotatable ads once and just shows one at a time, rotating it according to the interval setting.
Note: For this version of the patch to work, the number of ads setting for the ad block must be set to a number higher than one. Since my code limits the displayed ads to just one, the block number of ads setting effectively becomes a (secondary) pool from which the current ad will display.
Hope this version of the patch helps someone, and sorry if my previous version caused any server resource issues.
Jeff
#19
Subscribe
#20
Jeffam's code does exactly what I needed and the latest version's UI has allowed my end users to correctly configure its behavior. Is there any hope that this feature will be added to the module or will users of this patch be forced to rework the patch into the next release?
#21
Jeffam's patch works. How can i add a block with 2 rotating images?
#22
Subscribing!
I would like to know when this is going to be added to the main project.
#23
Is it possible to add a block with 2 rotating images?
#24
Subscribing....
I would like this to be merged to the official project.
This is a feature that will make the ad module even better.