At time of writing, Drupal's just gone into feature freeze, and so is all about bug fixing and testing before release in some months time.
As I'm doing some preliminary work with Drupal 6, I've taken the latest adsense module for version 5 and hacked it into shape to work with Drupal 6.
I must stress: This isn't tested particularly well, nor is it supported by anyone. Use it entirely at your own risk, and for the time being, don't expect too much help if you spot a problem!
That said, if you're looking to play around with Drupal 6, or indeed do a proper conversion of this module to Drupal 6, then this might just give you a bunk-up. In reality, I haven't had to do much conversion work, so I strongly suspect this module will work almost exactly as it does in Drupal 5. Your mileage may vary ;-)
| Comment | File | Size | Author |
|---|---|---|---|
| adsense-6.x-preview.tar_.gz | 38.06 KB | coofercat |
Comments
Comment #1
kbahey commentedPlease submit this as a patch to the latest 5.x version (not HEAD).
See http://drupal.org/patch for details on how to do so.
Also, for your info, I will not branch for 6.x until a decision on tags is made (DRUPAL-6 or DRUPAL-6--1). I can commit your changes to HEAD though.
Comment #2
coofercat commentedSorry, yes, 5.x makes more sense!
I wouldn't want to suggest anything I've done here is "proper patch worthy", which is why I just bundled up the module, rather than producing formal patches. I've barely tested this module on Drupal 6 (partly because D6 isn't completely functional yet), so I think it'd be risky to use anything from this "properly". However, as I say, what I've done may be of use to someone like me working with D6 (at the very least, you'll get ad boxes where you expect to see them).
At time of writing, I wouldn't do much work with Drupal 6 besides just taking a look to see how it's getting on. Various things that you'll absolutely need aren't all that reliable, so doing any serious development isn't really possibly for at least a few weeks (IMHO). I think you're wise to steer clear until core reaches at least an RC or some such.
Comment #3
kbahey commentedWhen you create a patch, it just includes the diffs between versions. This is far less code than the entire module duplicated.
So, the changes can be reviewed easily, and issue identified.
It also has to be tested, at least get the basics working.
If you want, you can wait till an RC is out, you can submit a proper patch.
Comment #4
Anonymous (not verified) commentedHey there! how's the development going on this? I noticed your comments on this page were dated back last July, and since this is now February and Drupal 6 just got released, thought I'd ask - how's this module working for people? Can I hope to see a "stable-ish" version soon? If not I'd consider going back to 5.7 if need be (although I would hate to do that)
Thanks everyone!
S
Comment #5
kbahey commentedDruplicate of http://drupal.org/node/211584
Comment #6
Gijs commentedHi
I installed the adsense-6.x-preview.tar_.gz
like so:
cd ../path/to/modules
mv adsense adsense-old
wget http://drupal.org/files/issues/adsense-6.x-preview.tar_.gz
tar xvxf adsense-6.x-preview.tar_.gz
login to my drupal site as ?q=user1
and lo and behold, I have a "working" google adsense module, which I can activate. The google bars show up, be it empty.
I log out to see if the ads return. and yes! So, it "looks" good.
However I get three errors:
1) warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "<" LINE 2:
2) user warning: query: UPDATE
SET data = 'cache', created = 1205870869, expire = 0, headers = '', serialized = 0 WHERE cid = 'adsense-1-728x90-1' in /usr/share/drupal-6.1/includes/cache.inc on line 109.
3) warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "<" LINE 2:
and :-) four
4) user warning: query: UPDATE
SET data = 'cache', created = 1205870869, expire = 0, headers = '', serialized = 0 WHERE cid = 'adsense-1-120x600-1' in /usr/share/drupal-6.1/includes/cache.inc on line 109.
I'll investigate these further.
Comment #7
kbahey commentedThis port is incomplete.
Many things went into adsense 5.x-2.x that is not in this release.
This is why this is marked as duplicate.
See the other issue for what is delaying a 6.x port.
Comment #8
Gijs commentedAlso:
The module shows up nicely in the /admin page
The adsense module's settings seem to be all there...
Comment #9
Gijs commentedthe settings in "admin/settings/adsense" seem to be all there. Have not yet set/tweaked any of these,
I get a few warnings, however, when selecting on the /admin page the "adsense clicks by day" option:
# warning: pg_query() [function.pg-query]: Query failed: ERROR: multiple decimal points in /usr/share/drupal-6.1/includes/database.pgsql.inc on line 138.
# user warning: query: SELECT COUNT(DISTINCT(TO_CHAR(timestamp, 'YYYY-MM-DD'))) FROM adsense_clicks in /etc/drupal/sites/all/modules/adsense/adsense.module on line 1181.
and these when clicking on /admin adsense "top pages"
* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "path" does not exist LINE 1: SELECT COUNT(*) FROM adsense_clicks GROUP BY path ^ in /usr/share/drupal-6.1/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT COUNT(*) FROM adsense_clicks GROUP BY path in /etc/drupal/sites/all/modules/adsense/adsense.module on line 1150.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "path" does not exist LINE 1: SELECT path, COUNT(*) AS count, MAX(timestamp) AS last FROM ... ^ in /usr/share/drupal-6.1/includes/database.pgsql.inc on line 138.
* user warning: query: SELECT path, COUNT(*) AS count, MAX(timestamp) AS last FROM adsense_clicks GROUP BY path ORDER BY count DESC LIMIT 50 OFFSET 0 in /etc/drupal/sites/all/modules/adsense/adsense.module on line 1150
Comment #10
kbahey commentedThis patch was done way before Drupal 6 was released. In fact, almost 6 months before it became stable.
So, using it will cause problems.
Do not ask for support on it and read what I wrote before.