Closed (fixed)
Project:
Google AdSense integration
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2007 at 22:15 UTC
Updated:
14 Jul 2012 at 19:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
mcurry commentedHere's a very simple patch that allows selection of 5-link link ad units. Please review and comment.
Part of the difficulty is that the array that holds the ad formats uses, as a key, the dimensions of the ad. This value is used to determine the ad format when constructing the ad code. So, adding any text to the array key is a no-no, unless you also fix any other code that depends on the key always being in the format 'widthxheight' - as I have done in this patch (_adsense_get_dimensions($format)).
So, this patch might break other dependent code (anything that depends on the formats array key always being in the 'widthxheight' format.)
The only way around this, it seems to me, would be to alter the format of the adsense_ad_formats() array - add another element to the map's array that contains the dimensions, and use that where needed, rather than the primary map key as the dimensions.
Comments?
Comment #2
mcurry commentedOops, sorry. Ignore the last patch (I hit submit too soon). It's for an older adsense module issue.
Here's the correct patch.
Comment #3
nicholasthompsonHere is the 5.x equivalent patch too... Worked fine for me when doing exactly what the patch was doing for 4.7 to my 5.1 install.
Comment #4
kbahey commentedThis is not against the latest 5.x. Please download 5.x-1.5 and reroll the patch against.
Also this code
$height = (int)$height;is hackish. Need a cleaner way for that.Comment #5
jcnventura5-link variants are now supported by the 5.x-3.x branch
João
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.