By bsherwood on
Is there a way to add Adsense into the main content area (not just above or below articles). Having adsense (or other affilitate programs) show up inline with posts. An example:
########### Post starts and wraps around Ad
###########
###########
###########
ADVERTISMENT#
###########
###########
###########
Post continues
Comments
Adsense module
Take a look at the excellent AdSense module:
http://drupal.org/project/adsense
call the function
one solution would be to edit each and every post, set input method as php and call the adsense function adsense_display. But, this is not a general solution so that you could apply it on each and every node with one line of code.
Another solution could be to modify node.module. I would recommend to follow it when no other solution works for you. When node.module is picking the post/page/etc data from the db, you just embed your respective affiliate/ad code in the middle. This is a direct modification in the codebase, not some customization through GUI, so its risky. But ive done it by myself and it works.
The perfect solution would be some block that could be placed within the node body at the selected position. But i didnt find any.
I would expect some better solutions than above in the upcoming posts from others
Adnan Shareef
This might help
These posts might be of some use to you http://urlgreyhot.com/personal/weblog/drupal_tip_2_sprinkling_ads_throug... & http://drupal.org/node/57094.
www.justapickle.com
blogging community for the socially conscious
www.slickfish.com.au
professional, affordable web site design, production and maintenance for small business
thanks for the help everyone
thanks for the help everyone
The adsense module has this
The adsense module has this feature built in. Enable the adsense filter for your input level and you should be able to do it. I believe it is in the adsense module docs some where.
www.thelinuxuser.com
And, here is a list of
And, here is a list of useful resources if you are using Kbahey's adsense module for drupal:
http://baheyeldin.com/technology/drupal/resources-for-using-google-adsen...
div and css
I am the author of the adsense module, so what I am going to say applies to those using the module.
Each ad is wrapped in a div that has and id of "adsense". You can use that, or enter you own divs around a tag, and use css to align the ad correctly (e.g. float: left).
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba
If you really want to make
If you really want to make it easy, do a search for the 'Contemplate Module' - this will allow you to create custom templates for any content types.
Now, install the Adsense module, and create a template with
in the first line of your template. This will place the adsense in the top left corner of the content, kind of like I did here: http://www.free-journal-articles.com/bvuyk/review-of-the-zero-by-jess-wa...
Good Luck!
--
Drupal Pages I've Designed:
http://www.free-journal-articles.com
http://www.outfrontps.com
http://www.infohatter.com
My Blog: http://www.infohatter.com/blog
--
Ok, I've inserted float:left into
<div style="border: 1px solid ; width: 468px; height: 15px;">AdSense</div>in the FireBug, so now I have<div style="border: 1px solid ; float: left; width: 468px; height: 15px;">AdSense</div>, and it works perfectly, but where do I save the changes to? Which file?I think I need to insert some sort of option into
to be able to put either
float: left,float: right, orfloat: centerinto[adsense:468x15:1:1]. Am I correct?--
Billy | Major: Accounting | CityTech@CUNY | Student Block.
I only get blank space or a
I only get blank space or a digit when I use the adsense php code, and the tag, unprocessed, if I use it in the Contemplate.