How to Write Plugins for WordPress MU

itdamager wrote a short post on the basics of WPMU plugin development.

plugins for WordPress and WordPress MU are very similar but there are a few specific MU commands and plugin placement differences you should consider when creating a plugin for WPMU.

This post should get you going if you want to get your hands dirty with some WPMU plugin development.

AdSense revenue sharing widget for WordPress-MU

There is an updated version of this plugin here.

The AdSense revenue sharing widget for WordPress-MU will allow you, the owner of a WPMU site, to share Adsense revenue with your users. You can set the percentage of your share (default is 20%) and enter your AdSense publisher code via the ‘Site Admin‘ backend panel (no files to edit).

adsense-share-1.PNG

Download: adsense-share-mu.zip

Current version: 1.1 (see change log below)

Installation: extract the adsense-share-mu.php file and upload it to the mu-plugins directory.

How to use? Goto ‘Site Admin‘ -> ‘Adsense share‘ and set your Adsense share and your Adsense publisher code – that is it!

All your users will have to do is drag the ‘Google Adsense‘ widget to the sidebar, click the configuration icon and enter their google_ad_client ID.

Todo for version 1.2:

  • add a function that could be called from the themes to place ads on pages.
  • add an option for the user to enter his Adsense code when not using a widget.

Change log:

Ver 1.1

  • If the user did not enter his Adsense code the site admin’s code will be used.
  • A small “Sign up for Adsense” link is placed on the widget in the backend. Site admin’s code is used.

WordPress Automatic Upgrade plugin – review

I will start with the fact that the WordPress Automatic Upgrade plugin (WPAU) is great tool and a “must have” for people who are running a few WordPress installation. Since the good folks over at WordPress are shipping a new version every few months you must be tired from all the upgrades you have done. If so, this is the plugin for you. WPAU is a plugin that automatically upgrades your wordpress version to the latest files provided by wordpress.org.

The plugin

Here is what WPAU does:

  1. Backs up the files and makes available a link to download it.
  2. Backs up the database and makes available a link to download it.
  3. Downloads the latest files from http://wordpress.org/latest.zip and unzips it.
  4. Puts the site in maintenance mode.
  5. De-activates all active plugins and remembers it.
  6. Upgrades wordpress files.
  7. Gives you a link that will open in a new window to upgrade installation.
  8. Re-activates the plugins.

wpau1.PNG

The plugin runs in two modes. The first is manual were you go through the steps above one-by-one. The second is automatic were you click one link and sit back until the upgrade is done.

Personal experience

I have personally checked the plugin on 6 wp installs, upgrading from versions 2.0.3 and 2.2. The manual upgrade worked without any problem at all (one minor issue that was theme related with no relation to the plugin). The automatic upgrade went fine when upgrading from version 2.2 to the current while upgrading automatically from 2.0.3 had a small problem. After the upgrade I had to click the database upgrade link and thats it.

Update: I have just ran the WPAu plugin on my Water Simulation Packages blog which was still running on WordPress 1.5.2 and the upgrade worked great!!!

Is it for you?

You should not try to use this plugin if you made any changes to the core files of WordPress!!!

How to use the TLA-MU widget?

Text-Link-Ads widget for WordPress-MU (TLA-MU) is a plugin that will allow WPMU users to use the Text-Link-Ads (TLA) basic service and earn money by having text links ads on their blogs.

Each user that will want to use the TLA-MU plugin will have to open an account with Text-Link-Ads. After you register you will need to add your blog to the account.

Step 1: it is important to select “No” for the question “Does your site use WordPress 2.0+“.

tla-site1.PNG

Step 2: the answer to the “Ads to be displayed on” option depends on the specific theme you are using. Please remember that a widget is shown on the theme’s sidebar so the widget will show on every page the sidebar is shown.

tla-site2.PNG

Step 3: select the number of links you want to sell on your blog and click the “Submit” button.

tla-site3.PNG

Once your site is submitted and approved go to the “Install Ads Code” section (here). You should see your submitted site. Make sure that the status of the site is “Approved“. Select and copy the string labeled “XML KEY“.

tla-site4.PNG

Now its time to return to the backend of your blog to the “Presentation -> Widgets” tab. Drag and drop the “Text-Link-Ads MU” widget to the sidebar and click its small icon on the right. Paste the “XML KEY” in the widget, close it and save the changes. Your Done πŸ™‚

tla-site5.PNG

The end!

It will take about 12 hours for the TLA system to check the link on your blog. Until then it will show a temporary link pointing at your site. Afetr the link is verified, no links will be shown until you have sold your first link ad.

Text-Link-Ads widget for WordPress-MU

Text-Link-Ads (TLA) is a a service that allows blog owners to sell text link ads one their blogs. Text Link Ads are unique because they are static html links that can drive targeted traffic and help link popularity which is a top factor in organic search engine rankings. Every blog owner can join TLA and monetize his site. TLA uses a unique WordPress plugin for each blog and in some cases the blog’s theme needs to be edited. If you are a WordPress-MU (WPMU) operator you know that this is not an option for your users.

Text-Link-Ads widget for WordPress-MU (TLA-MU) is a plugin that will allow WPMU users to use the TLA basic service and earn money. On the other hand, WPMU operators can earn money by joining the TLA affiliate program and refer their users to the service.

download-tla-mu.png

Current version: 1.0 (run only with PHP5).

Installation: extract the tla_mu.php file and upload it to the mu-plugins directory.

How to use? for instructions on how wpmu users can use the TLA-MU widget click here (I have posted the instructions on a different post so you can point your users to it).

License: Until the first text ad is sold the widget will not show anything on the user’s blog. Once an ad is sold and shown on the blog a “By rob” link will also show (just a little link-love). You can use the plugin for free if the rob link is not removed.

Can Akismet work with WPMU?

Akismet is a WordPress plugin that will take care (eliminate) most of your comment spam. Akismet requires an API key that can be obtained in two ways.

a) for personal use create an account with wordpress.com and get the API key from there.
b) for commercial use you should buy an API key from Automattic.

akismet.JPG

With WPMU you have two options to install the Akismet plugin. The first is to put it the plugins directory and then each user will have to activate it and insert an API key that he will have to get, on his own, from wordpress.com [see (a) above].

The second option is to put the plugin in the mu-plugins directory. If this is the case only one API key should be used and hard coded into the plugin. If you are not running a non-profit service then you will have to pay for the key.

However, some people think that they can take the API key they got for free from wordpress.com and hard code it into the plugin. That probably would work for a while but it will get you banned. Matt from Automattic said it best:

that would be a great way to be banned. πŸ™‚

The Akismet plugin works out of the box with MU, you can let users enter their API key and you have no problems.

If you hard-code an API key for all your blogs the system will flag you and unless you already had permission from me you’ll be permanently blocked.

daria.be is closing

drmike has been running daria.be for a long time now. daria.be is one of the wpmu sites with a few hundred blogs. For some unknown reason (to me) he is closing the site. This is a message that is shown on the site’s backend:

daria.be will be shutting down on July 31st, 2007.

I am no longer interested in supporting WordPress or WordPress MultiUser. Please export your posts and move to a new site. You can find a list of WordPress Multiuser sites located here. Please be sure that your new site is keeping up to date on their upgrades.

Please note that support is no longer offered for this site.

Please note that abuse in anyway, shape or form directed to me will not be taken.

Thank you for your understanding,
-drmike

Too bad πŸ™

Keep your plugins updated with WP Plugins Tracker

The folks over at WP Plugin DB released a new plugin called WP Plugins Tracker. The plugin keep track of new versions of the plugins you have installed on your WordPress installation.

wp-plugin-tracker-screenshot.JPGThis Plugin compares the version of the plugins in your blog with corresponding plugins version at wp-plugins-db.org Database. This is done by a new page added to wordpress backend.

I hope these guys will keep the database updated πŸ™‚