Adding AdSense
Hipster - May 31, 2009 - 01:22
Hi,
I'm fairly new to Drupal and I'm still trying to figure things out so I hope this questions is not too basic.
I'm trying to install add AdSense using both module and by creating the block.
However when I tried doing it by adding block I see the adsense code, I tried choosing php input but it still
only showign up as plain code.
Do you know why it's doing this and how to fix it and also if you know if there is a good tutorial on how to use AdSense module or how to put ads on the Drupal site.

I usually just create blocks
I usually just create blocks for my AsSense content as you mentioned.
First, if you are using a WYSIWYG editor like fckeditor or tinymce, make sure that you disable it (there is usually an option beneath the body text field) or are in code/source mode when you paste the code or else it will simply treat it like text.
Also, you shouldn't need to use PHP as the input filter, I use Full HTML.
If that isn't working for you, go to the input filter configuration (/admin/settings/filters), configure Full HTML and make sure that none of the filters are selected.
I hope that helps.
???
Thank you for the tip about plain editor. It sort of worked. Kind of backwards. Now it's showing the ads in admin when I log in but when I log out, it's a blank page. Shouldn't it be the other way around. AHHHHHH! Why is something as easy as pasting code on the page is so freaking hard. Drupal is killing me.
=-=
when i visit the site an anon the ads are showing in the right side bar.
Thank you.
Thank you they just showed up. I really appreciate your input. :)
Do I need AdSense Module. It seems useless if you're just pasting the code into a block.
If you are fine with keeping
If you are fine with keeping the ad(s) in blocks then you won't need the adsense module.
As I've always just displayed stationary ads, I just add the code to a block and leave it there.
I would think that it would be slightly better for performance too! :P
Thank you
Awesome. It seems to be working. I think the key was to use plain text editor, it seemed to fix the problem. I haven't seen a single tutorial mention that. I hope it helps to someone who has the same problem. Thank you all for your help.
Figured it out ...
I had the exact same problem yesterday with my site (www.YouCanDoItVideos.com) ... I was searching around for a solution and found one on this forum site but cant seem to locate it again. Basically the guy who helped everyone had the following steps:
Step 1 - Log into Drupal Admin
Step 2 - Click "Site Configuration"
Step 3 - Click "Input Formats"
Step 4 - Click "Add Input Format" at the top of the page
Step 5 - Name: "Adsense"
Roles: Up to you ... leave both unchecked by default
Filters: IMPORTANT ... make sure to UNCHECK them all!
Save Configuration!
------------------
Step 6 - Under "Administer" click on "Site Building"
Step 7 - Click "Blocks"
Step 8 - Click "Add Block"
Step 9 - Block Description: Adsense
Block Title: (Whatever you want your visitors to see ...) I personally kept mine blank
Block Body: PASTE Adsense code
Input Format: IMPORTANT ... Select Adsense that you just created!
Everything else is personal preference but just so you know I set mine up as follows:
Step 10 - Custom visibility settings:
Users cannot control whether or not they see this block.
Step 11 - (IMPORTANT ... Selecting this means I do not have to see ads in admin mode) Show block for specific roles:
anonymous user
Step 12 - Show block on specific pages:
Show on every page except the listed pages.
(Select pages you do NOT want ads on ... maybe your homepage??)
Step 13 - From the "disabled" list of block select your "adsense" block and select where you want it to go! (In my example I picked the RIGHT TOOLBAR)
I hope that helps! I would love to give credit to the poster that helped me with this and if I track it down I will be sure to do so ...
Cheers,
Kawika