Inline Google Ads & Inset Block

netceo - September 30, 2005 - 07:10

hi ppl, i need to know how do i add inline ads after the node and before the comments thing. I tried inserting ad code in node.tbl.php but then the ads also show up on the listing pages, as well as on frontpage, where i do not want the ads to appear. I only want the ad to appear when the node content is read in full, not in teaser.

Also i would like to learn, how to insert an inset block. What i want to do is insert "Similar Entries" block on the right side of the content, but it should not show up in the teaser. Can anybody here helpme doing this??

Thanks in advance.

By inset block i mean

netceo - September 30, 2005 - 08:40

BY saying "Similar Entries" block on the right side i mean within the content area and not the right side bar.. i want a small box on right top/bottom side of the content where i want to give reader related stories links.

I have come across a script to call block contents anywhere on the page, so am planning to use that to achieve this. What i want to know is how should i go about the placement.

flexiblock

NaX - September 30, 2005 - 09:29

Maybe flexiblock is what you need. http://drupal.org/project/flexiblock

Did you implement this on

caadmin - November 2, 2005 - 03:32

Did you implement this on your site yet?

http://www.center-aisle.com

Got some Ideas you can try

NaX - November 2, 2005 - 10:21

When it comes to Similar Entries try looking at the Similar Entries module http://drupal.org/node/25974 and the Whatsrelated module http://drupal.org/node/24307.

When it comes to inserting a block into the node content page. I am not sure but I have an Idea you can try. Instead of editing the node.tpl.php file edit your page.tpl.php. As I understand things, the node.tpl.php is used in the front page for repeating of the node teasers and links, I might be wrong still trying to get my head around how drupal builds pages. Insert your code in the page.tpl.php just above the print($content) line, but with php if statements around it. Something like this.

<?php
 
if (!$is_front && $_GET[‘q’] != ‘node’):
?>

Your Code

<?php
 
endif; 
?>

 
 

Drupal is a registered trademark of Dries Buytaert.