(Update: YPN has informed me that modifying the code violates the ToS. Please don’t use the code below or risk getting your YPN account suspended. I will supplying some alternate code shortly that doesn’t violate the ToS.)
Yahoo Publisher Network (which supplies the ads for The (not so) Daily Me) recently rolled out RSS ads. They only provided the code for Word Press and Moveable Type blogs. I converted the code (through much laborious source code reading) to work with b2evolution. I thought it a shame that my work should go to waste, so I decided to publish it. Here it is:
<!-- begin(Yahoo ad) -->
<a href="http://ypn-rss.overture.com/rss/30173/<?php $Item->ID() ?>/click/">
<img src="http://ypn-rss.overture.com/rss/30173/<?php $Item->ID() ?>/img/?url=<?php echo urlencode($Item->permalink( 'single' )) ?>&pid=1459558527" alt="Ads by Yahoo!" border="0"/>
</a>
<!-- end(Yahoo ad) -->
You, of course, have to replace the “30173″ and the “1459558527″ with the numbers supplied to you by YPN. The easiest thing to do is to go and generate code in the YPN control panel for your specific RSS feed. Select Word Press. Then change the generated code. This is the best way to make sure that you got it right. Replace
<?php the_ID() ?>
(two occurrences) with
<?php $Item->ID() ?>
and replace
<?php echo urlencode(get_permalink()) ?>
with
<?php echo urlencode($Item->permalink( 'single' )) ?>




7 Responses
November 16th, 2005 at 10:19 pm
I understand nine words in this post. You’re too computer savvy for your own good, I’d say.
November 17th, 2005 at 12:37 pm
BTW, your RSS feeds are constantly showing the last half-dozen posts as having changed. Rather annoying…
November 17th, 2005 at 1:08 pm
Hmm.. What feed reader?
They shouldn’t be doing it anymore.
November 17th, 2005 at 3:05 pm
Bloglines
November 17th, 2005 at 3:08 pm
It shouldn’t be doing it anymore. It should have only been happening when I was monkeying with (and changing) the RSS generating code. Let me know if it’s still doing it.
November 17th, 2005 at 3:28 pm
It does seem clean now.
November 18th, 2005 at 8:41 am
Aaghh! I had a dream last night that I opened up Thunderbird and the RSS feed for The (not so) Daily Me has 23000 some unread items!
Leave a Comment