• 16Nov

    (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' )) ?>

    Similar Posts:

7 Responses

WP_Floristica

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.