Ad sharing plugin

I've just installed the Ad sharing mu plugin from wpmudev and as I can see it show ads in the posts page (index.php) as well as in the single post page

Now I have two questions regarding ads displayed:

1. Is there any way I can make the plugin show the ads only in single posts page and don't display ads within posts in the posts page (index.php)?

2. Is there a way where I can tell the plugin to show ads also in the sidebar.php of the theme?

Thanks in advance for your time

  • Mason

    Hiya bpilot,

    Not exactly sure as the content is added within each post. Might be possible to add a filter to the plugin so that it won't display on home.php or index.php

    As for the sidebar area, this plugin really isn't designed to do that. There are others out there that will allow advertising in widget form for the sidebars.

    I'll see if one of the devs can chime in on the ads displaying on single.php only or something similar.

    Thanks!

  • bpilot

    I'll see if one of the devs can chime in on the ads displaying on single.php only or something similar.

    Thanks a lot masonjames for your help, truly appreciated. I will be eagerly looking forward for your devs reply

    Regarding the sidebar.php, I wasn't actually looking for a widget, I was only looking to display ads without a widget

    My idea was that instead of putting the ads in home.php or index.php putting it in the sidebar.php footer will look much better

    Yes there might be some plugins that ads in sidebar, but I am concerned with ad sharing, so it is only your plugin so far whom can do this :slight_smile:

  • bpilot

    Hi Aaron, Thanks a lot for your help, kindly find my replies below

    To limit to single pages, I think you can put a check in there for if ( is_single() ) .

    May I ask where shall I put this if condition? I mean where exactly in code?

    The only way to add things to the sidebar is via a widget or hardcoding in each theme.

    What I was hoping to do is to get the sidebar ad controlled by the Ad Sharing plugin for two important reasons:
    1. We don't want users (bloggers) to be able to remove it from their blog side bar
    2. We want the ad appearing in the sidebar to be part of the ad sharing mechanism, so that our users can automatically get their share for displaying ads on their blogs

    If there is anyway I can do this like for example by adding code to the Ad Sharing plugin so that a single 250*250 Ad can appear in sidebar but without making the ad appear as a widget that will truly outstanding

    I hope there will be a way to do so

  • bpilot

    Hi Guys,

    On October 28, 2010 (Aaron) replied to my questions regarding the Ad sharing plugin and mentioned that I should put a check for is_single() but didn't mentioned where shall I put this check in almost a 400 lines of code plugin...

    Now it has been more than 3 days and I didn't get a reply from you guys, so did you decide to abandon my question?! I understand that I shall expect an answer within 16 hours or more in weekends and less in weekdays, but now it has been more than 3 days with no reply at all...

    I will appreciate it so much if anyone can please take a moment to reply to my questions...

    Thanks in advance for your time

  • Aaron

    Hey bpilot, sorry for the delay. At WPMU DEV we support our plugins and themes and THEIR CURRENT FEATURES. We are not and cannot be a custom coding service without raising our prices substantially. Both of your requests are for custom code or modifications to suit your specific needs.

    That being said we are generally very helpful if something is not too time consuming giving a code snippet (as I did) or at least pointing you in the right direction so you (if you have the skills) or your hired dev can know where to start modifying.

    For the sidebar, you are talking about a complete rewrite of the plugin. For your first request JUST THIS ONCE i'll take time to give you specifics, try this:
    Change
    function ad_sharing_output($content) {
    global $wpdb, $ad_sharing_page_ads;

    to
    function ad_sharing_output($content) {
    global $wpdb, $ad_sharing_page_ads;
    if (!is_single())
    return $content;

    Note that is completely untested.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.