By techboy52 on
Hello, can somebody please tell me how to insert ads into article (i mean node) like these way shown in screenshot,where the text of articles in wrap around the ad
Hello, can somebody please tell me how to insert ads into article (i mean node) like these way shown in screenshot,where the text of articles in wrap around the ad
Comments
wheres the screenshot ???
wheres the screenshot ???
Cheers
no option to upload screenshot,
here the screenshot, at some other site, i want to place ad like these but on the right side of article
http://img152.imageshack.us/img152/6369/untitledkf7.gif
First, you have to override
First, you have to override the template for the node.
You can have a div there with float: left.
In this div, you can have a call to the ad.
If you are using this module: http://drupal.org/project/adsense
It provides a function to call for ads.
Ionut
hmm,
You can have a div there with float: left.
how can i have a div there with a float?
Place a region "inside" node text?
I'm interested in this question myself – specifically, how to insert a block into (for example) the main body of a node text, in the way many sites place ads within main text (per the original question).
When you speak of placing a div within the node template, are you speaking of a way to position an actual block region "inside" a node's main content area? It'd be great if a region could be positioned within, say, the area for a node's body text, perhaps appearing (for example) about one-third the way down, and off to one side... Not above or below the node content, but "inside" it, with the node's body text wrapping around. That'd be great for inserting an ad, or a small poll, or many other interesting blocks, into text.
Is such a layout easily possible using regions? It seems many sites out there are using a final effect like that, yet I don't recall ever seeing a Drupal theme that offered a region in such a place.
I hope my comment is understandable; theme work is not my strength. : (
You cannot do that with
You cannot do that with Drupal default.
Your block should be placed in the node.tpl.php. Here are no regions. They are in page.tpl.php.
You can have a region in page.tpl.php, but then you have to use .css to position that region over the body.
And you have also to inject a
This div will have "float: left; widht: 100px; height:400px".
Having this, your text will wrap the div.
Then you have to position your region over that div. And it will look like the ad will be there.
My approach would be:
I will not use that trick with the .css
I will override the template node-page.tpl.php (for example).
I can have a code like:
where .body-ad will be in .css as:
.body-ad {
width: 100px;
height: 250px;
float: left;
}
Ionut
Ad inside node
Thanks, Ionut. I had actually been considering the first method you mention: placing a blank white graphic or something inside a node to create a "space", then using .css positioning to force some normal block to appear over that space. Seems like it'd work, though I imagine getting the sizes and positioning all exactly right might be a challenge.
Re the second region you mention, that definitely looks worth trying out. I'll do so as soon as I have a chance.
Thank you!
Take care when you using the
Take care when you using the first method.
You have to test/fix it also in IE :P
IE6 it is a pain.
IE 6
Thanks for the warning!
Though depending on the site and its intended audience, I'm sometimes happy to use another method for dealing with IE 6. It's this: Display a very visible message saying "IE can't handle this site. Get a real browser."
My favorite method, whenever I have the freedom to use it!
nice that
nice that
so, i will have to
so, i will have to modify
both page.tpl.php and also .css file. The .css file you mentioned is style.css .right?
please help., Where to insert
please help., Where to insert both these codes. I inserted the first one in page.tpl.php and the other in style.css , but didnot work. please can u explain in a little bit detail.
same problem
im having the same problem if anyone can help would be great.
Pamper Gift | Pampering Gifts | SEO Chester
.:
http://community.contractwebdevelopment.com/drupal-insert-adsense-ads-in...
This page helped me create a region, which can be used to insert ads.
------------
Volvo, Video, Velcro. (I came, I saw, I stuck around.)
Does this work with the
Does this work with the Adsense module...?
.:
it would create a region...just place a block with adsense code in this region, and it would work.
------------
Volvo, Video, Velcro. (I came, I saw, I stuck around.)
good.
good.
but this technique does not
but this technique does not work with Acquia Marina theme because, template.tpl.php is not present. so what to do?
.:
if its not present, you can create a file with your text editor and name it template.tpl.php
------------
Volvo, Video, Velcro. (I came, I saw, I stuck around.)
what all things should be its
what all things should be its content?
Thanks for Help
Thanks for Help , i did it by modifying the node tpl file
Latest News,Games,Video,Guides,Reviews,Downloads
Inject any ad code in content and teasers!
This module allows you to inject any ad code in content and teasers!
http://drupal.org/project/adsense_injector
but, the ads inserted using
but, the ads inserted using adsense injector are of the old layout type?