diff -ru adsense.orig/adsense.module adsense/adsense.module --- adsense.orig/adsense.module 2008-03-27 23:13:43.000000000 +0100 +++ adsense/adsense.module 2008-03-28 01:17:40.000000000 +0100 @@ -1306,8 +1306,8 @@ $patterns = array( 'flexi' => '/\[adsense:flexiblock:(\d+)\]/x', 'block' => '/\[adsense:block:(\d+)\]/x', - 'tags' => '/\[adsense:(\w+):(\d+):(\d+)\]/x', - 'refer' => '/\[adsense:referrer:(\w+):(\d+):(\d+):(\w*):(\w*)\]/x' + 'tags' => '/\[adsense:([^:]+):(\d+):(\d+):?(\w*)\]/x', + 'refer' => '/\[adsense:referral:(\w+):(\d+):(\d+):(\w*):(\w*)\]/x' ); foreach ($patterns as $mode => $pattern) { @@ -1321,7 +1321,7 @@ $ad = _adsense_tag_block($match[1]); break; case 'tags': - $ad = adsense_display($match[1], $match[2], $match[3]); + $ad = adsense_display($match[1], $match[2], $match[3], $match[4]); break; case 'refer': $ad = adsense_display($match[1], $match[2], $match[3], $match[4], 1, $match[5]); @@ -1470,7 +1470,7 @@ } function adsense_filter_tips($delta, $format, $long = FALSE) { - return t('Use the special tag [adsense:format:group:channel] or [adsense:referral:format:group:channel:slot:CPA] or [adsense:flexiblock:location] to display Google AdSense ads.'); + return t('Use the special tag [adsense:format:group:channel:slot] or [adsense:referral:format:group:channel:slot:CPA] or [adsense:block:location] to display Google AdSense ads.'); } /** diff -ru adsense.orig/adsense_help.inc adsense/adsense_help.inc --- adsense.orig/adsense_help.inc 2008-03-28 00:51:55.000000000 +0100 +++ adsense/adsense_help.inc 2008-03-28 01:40:56.000000000 +0100 @@ -95,20 +95,20 @@
Note that filters sometimes may have conflicts, and changing the order can make AdSense work in some cases.
The tag syntax comes in these variants:
Where:
All fields are required, unlike when using the adsense_display() +
All fields are required, except the slot field unlike when using the adsense_display() function above.
Example:
-[adsense:468x60:1:2]
-Display a 468x60 banner with the colors defined in group 1, and with -channel ID 2
+[adsense:468x60:1:2:0123456789]
+Display a 468x60 banner with the colors defined in group 1, channel ID 2 and with slot ID 0123456789.
[adsense:block:7]
Display the ad code of the block with ID 7.
Where:
+Example:
+[adsense:referral:468x60:1:2:0123456789:CAAxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
+Display a 468x60 banner with the colors defined in group 1, channel ID 2, slot ID 0123456789 +and with CPA value CAAxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
+This is provided for backward compatibility, but will be deprecated