The MU forums have moved to WordPress.org

Adsense for WPMU - In Need of Plugin (8 posts)

  1. kenazar
    Member
    Posted 14 years ago #

    Sorry for the newbie WPMU question... I've been using wordpress for a number of years and will be implementing wpmu for myself and a company in my area. I'm able to collect 100% ad revenue for myself and the company and cannot seem to locate an adsense plugin for wpmu that allows myself "the admin" to deploy adsense to all blogs - above and below posts while disabling the end user on all the subdomain blogs.

    Thanks in advance,
    Ken

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Use one for regular WP, toss it in mu plugins. It's auto on, doesn't show up on the plugins list & can't be turned off.

    Also, it's pretty simple to code one up that does what you want, with no options page for it.

  3. kenazar
    Member
    Posted 14 years ago #

    Thanks for the fast response.... I just tried to add easy adsenser by UnReal to the mu plugins folder and its coming up empty on my admin screen.

    It also came up "The plugin easy-adsenser/easy-adsenser.php has been deactivated due to an error: Plugin file does not exist."

    I love this plugin for wp because all I have to do is plug in the ad code and select where I want it go.

    I also tried the whydowork adsense plugin which is a single php file. I installed this into the mu plugin directory and it showed on my primary blog. I then went to the subdomain that I'm using to test everything and its showing under the setting section as it did on the primary domain, but the adcode is missing. I'm looking to implement adsense on the primary domain and have it automatically load so the people that create the new subdomain blogs cannot remove ad code and it wont show on there admin panel in wp.

    Thanks so much for your help,
    Ken

  4. andrea_r
    Moderator
    Posted 14 years ago #

    "It also came up "The plugin easy-adsenser/easy-adsenser.php has been deactivated due to an error: Plugin file does not exist.""

    Don't put files in a subfolder under mu-plugins, they won't be read.

    "I then went to the subdomain that I'm using to test everything and its showing under the setting section as it did on the primary domain, but the adcode is missing."

    Because the setting in an options page on one blog don;t transfer to the other.

    I said up above to hardcode it in the plugin itself. In the simplest terms & pseudo-code, you just need a plugin like this:

    function my_ad_code
    echo my actual ad code here

    add action above_content_hook, below_content_hook

    (I can't remember the names of the actual actions there).

    And that's pretty much it.

  5. kenazar
    Member
    Posted 14 years ago #

    Hi Andrea-

    I apologize for all these questions... I just not grasping how to modify the code.

    I did infact put the php files in the mu-plugins dir and not a sub dir.

    When you say hard code do you mean to place the adsense code in each theme?

    Many thanks,
    Ken

  6. kenazar
    Member
    Posted 14 years ago #

    Hello Again-

    I was trying to walk through this to find an easier and still use the plugin that I like.

    If I wanted use easyadsenser or adsense injection plugin for a new user... I'm assuming I can have that as a standard plugin for new users which I'll see sign up. I could then go in and add my adsense code since I'll have new user registrations trickle in and won't be receiving 100 a day from the company I'm working with. After that Can I deploy a plugin like adminimize to restrict the individual from accessing that specific plugin so the adsense code remains intact?

    All that being said, will a wpmu plugin like plugin commander or wpmu plugin manager override an adsense plugin with the code on a subdomain site? If I select the acitvate all or auto deploy will that somehow remove the code on a subdomain site?

    Thanks,
    Ken

  7. andrea_r
    Moderator
    Posted 14 years ago #

    no, the plugin management plugins just turn them on & off.

    "When you say hard code do you mean to place the adsense code in each theme?"

    No, I meant paste your adsense code right in the plugin itself. Not the options page of the plugin, but in the php of the plugin file.

  8. kenazar
    Member
    Posted 14 years ago #

    What about my second option... Will that work too?

    In regard to the 1st option - If I modify the php file can I activate the plugin under the standard plugin dir - put my code in and set it up how I'd like it in wp then move the php file to the mu-plugins dir?

    Also, easyadsenser has multiple php file and language directory. I would open all the files and put them in mu plugins... How do i keep those organized since there are 12 or so files that just pertain to easyadsenser under the mu-plugins dir. Example- I want to remove easyadsenser, how do I know what files to remove?

    Thank you so much Andrea your a real life saver :)

    Ken

About this Topic