how to... ad is supporter condition

Hi !

The supporter condition for admin ads have been discussed here, and seems that the simple condition could be added in admin ads.

But really sorry no idea on how to perform that is_supporter condition.

What syntax and where to add this "add filter" condition in the admin ads file ?

Thanks :slight_smile:

  • drmike
    • DEV MAN’s Mascot

    I wouldn't;t do it as a filer.

    Look for this function admin_ads_output in admin-ads.php

    Look for this line:

    if ( !empty($admin_ads_data) && $admin_ads_data != 'empty' ){

    Change it to:

    if ( !is_supporter() && !empty($admin_ads_data) && $admin_ads_data != 'empty' ){

    Should work although I haven't tried it. Should display the material if the blog in question is not a supporter.

    Hope this helps,
    -drmike

  • drmike
    • DEV MAN’s Mascot

    Not a problem.

    Gotta admit though I;m against having outside adverts on the admin side. We have these on our installs but they're normally used to announcements or encouragements for upgrading. Something like adsense is just going to kill your percentages.

  • drmike
    • DEV MAN’s Mascot

    Not a problem.

    I just remember this lengthy (and very heated) thread back over on the old mu forums where someone was rather upset that GoogleAdsense threw out garbage and Public Service adverts on the backend. We tried to explain many times over that 1) the bot couldn;t see the wp-admin side, 2) if it did, it would screw things up with the blog by following the links and deleting content and 3) very few folks do it on the backend anyway.

    You could probably get away with adverts for your own stuff like promoting Supporter which is probably what you;re doing or maybe something from cj.com.

    Hope thi shelps,
    -drmike

  • Aphrodite
    • The Reaper

    i DONT use adsense.... I have other adservers and affiliation plateforms that does NOT read the content as BIG BROTHER does.....

    Only the ads and campain I choose appear :slight_smile:

    But adsense can manage that with the authentification option since we can give him a subscriber access in adsense settings. I made that long time ago on my privite services when I used big brother services....

  • Aphrodite
    • The Reaper

    oups sorry to up this one but since last update the syntaxe has changed. Tried several combinations but well :s without knowing what i do :
    the new lines are :
    if ( $admin_ads_data == 'empty' ) {
    $admin_ads_data = '';
    }

    where must I add the "!is_supporter" ? Oo tried all (!, no !, ||, && without sucess)

    thanks in advance

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.