Moose Candy Troubles
-
Hey all – I’ve searched here and everywhere, but cannot figure this moose out.
First of all, the moose candy plugin download needs serious updating. It seems to have been missing the opening php tag (<?php) among other things that rendered it unusable. So, I did my best by looking at solif plugins and this is what I constructed:
<?php
/*
Plugin Name: Moose Candy
Version: 0.3
Plugin URI: https://
Description: This plugin puts stuff between posts.
Author: Jason Goldsmith
Author URI: https://jason.goldsmith.us
*/$candy[2] = ‘<script type=”text/javascript”><!–
google_ad_client = “pub-removed”;
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = “468x60_as”;
google_ad_channel =”18742957876″;
google_ad_type = “text”;
google_color_border = “FFFFFF”;
google_color_bg = “FFFFFF”;
google_color_link = “663300”;
google_color_url = “663300”;
google_color_text = “000000”;
//–></script>
<script type=”text/javascript”
src=”https://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>’;$dropping = 1; function moosecandy($text) { global $dropping, $candy; if (isset($candy[$dropping])) { $the_date = “
“; $the_date .= $candy[$dropping]; $the_date .= ‘
‘; $dropping++; $text = $the_date . “\n” . $text; } else { $dropping++;} return $text; } add_filter(‘the_date’, ‘moosecandy’); ?>Now, I’m trying to put adsense ads between my first and second posts but it isn’t working right for some reason. The ads are showing but in strange places (like halfway behind my post’s posted by, category, time, date, and edit info. links.
How or what do I have to do to get the ads between the first and second posts?
I’m running WP 1.2 with Azevedo’s Gollum template. Here’s my loop:
<div id=”maincontent”>
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?><div>
<p class=”storytitle” id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?><div class=”post”>
<?php the_content(); ?>
</div><div class=”postoptions”><img src=”themes/gollum/arrow-left-comments.gif” width=”21″ height=”16″ alt=””/><img src=”themes/gollum/time.gif” alt=”Time”/> Posted By: “>
<?php the_author(); ?> @ <?php the_date();?> <?php the_category(‘,’) ?> <?php comments_popup_link(__(‘<img src=”themes/gollum/comment.gif” alt=””/> Comment’), __(‘<img src=”themes/gollum/comment.gif” alt=””/> Comment’), __(‘<img src=”themes/gollum/comment.gif” alt=””/> Comment (%)’)); ?> <?php edit_post_link(); ?>/wp-print.php?p=<?=the_ID()?>”>Print</div><?php wp_link_pages(); ?>
<!–
<?php trackback_rdf(); ?>
–><?php include(ABSPATH . ‘wp-comments.php’); ?>
</div><?php endforeach; else: ?>
<?php author(true, 5); ?>
<?php endif; ?><?php if ($single) { ?>
-
<b>Related Articles:</b> <?php related_posts(); ?>
<?php } ?>
</div>
- The topic ‘Moose Candy Troubles’ is closed to new replies.