Drupal adsense in content
This tip will show you how to insert your ads in the middle of your content with Drupal 6 . Drupal 6 has many modules with lots of functions to do things, but if you can get to do things without installing a new module is much better! So, if you want to insert adsense or any other javascript based ads in the middle of you content, in between your paragraphs, you can do it with a little bit of php. 1. Open your active theme folder, usually in /sites/all/themes/my_active_theme 2. Open the file page.tlp.php please do a backup of this file first 3. Search the line: <?php print $content ?> and insert this code right before <?php // Show ads when user is not logged in if(!user_is_logged_in()) { // Show ads in the middle of content $adsBlock='<script type="text/javascript">PLACE YOUR JAVASCRIPT CODE HERE</script>'; $arr = explode ("</p>", $content); // center content ads insert ads after first paragraph $arr[1] = $ads...