WordCamp Israel 2008

Following the great success of WordCamp Israel 2007 work has begun to organize the 2008 event.

wordcamp-israel-2007-logo.png

No date had been set yet but I will post about it once a date and location will be determined. Also, a message will be post on the WordCamp site.

WPMU new blog settings plugin – updated

I have updated the WPMU new blog settings plugin to work with the new version of WordPress-Mu, 2.6 (for previous versions see here). The hook used was changed to a new one: populate_options and the update_option function call was replaced with the add_option function call. The main code of the plugin looks like so:

<?php
function new_blogs_setting( $blog_id )  {
//set your options here:
add_option('gmt_offset', 2);
// stop editing here
return;
}
add_action('populate_options', 'new_blogs_setting');
?>

Download here.

WordPress MU 2.6 is out

Donncha posted that the new version of WordPress MU, 2.6, is out:

Some of the new features in this release of MU:

  1. Version number is 2.6 rather than 1.6 because it just makes sense to synchronise the major version numbers.
  2. Signup page now has a nonce which should help in the fight against spammers, for a short while anyway.
  3. Redirecting to the signup page for 404s and for unknown blogs is not enabled by default. Check out wp-config-sample.php for instructions.
  4. “allowed_themes” filter, much like the plugins filtered added previously.
  5. New functions: get_id_from_blogname(), is_main_blog().
  6. get_blog_details() can now take a blogname as well as a blog_id.
  7. Custom first posts didn’t always work. Now they do.
  8. Blognames in the “Add blog” form in wpmu-blogs.php are now sanitized.
  9. Added “pre_site_option_*” and “site_option_*” filters like the similar option filters.
  10. Meta fields will be passed on signup again.
  11. Added an “admin_header_navigation” filter so the top right navigation in the backend can be customised.
  12. The signup page uses “blogname” instead of “blog_id” to avoid confusion with the global variable of the same name. Plugins will break if not updated!

Grab it here.

WordPress MU 2.6 beta 1 is out

Donncha released yesterday the first beta version of WordPress-MU 2.6. This version includes the new features of WordPress 2.6.  WordPress MU specific changes include

  • The version number is being bumped to 2.6 rather than 1.6 because of version confusion.
  • Signup page now has a nonce to help defeat spammers.
  • Plugins in wp-content/plugins/ are version checked like in WordPress. mu-plugins isn’t covered just yet.
  • Major object cache changes.
  • And many more bug fixes. Check the timeline for a list of changes.

Download wordpress-mu-2.6-beta1.zip

WP-TagAds monetizing plugin

WP TagAdsis another plugin by Jorge for you to use as a monetizing tool:

WP TagAds is a new way to display ads on your WordPress blog. WP TagAds is an advertising solution tailored for WordPress bloggers, ads are displayed based on the post tags you assign to a post in your WordPress blog. This is different then say Google Adsense where the page is crawled then ads are displayed based on the findings.

With WP TagAds you are served eBay products based the keywords you assign to a post. Don’t like the ads your are seeing, just change the keywords around a little to get the ads you are looking for.

Ads are displayed via a sidebar widget that is included in the plugin and you can place the widget where you like inside your template. You will need a eBay Campaign ID to start making money. A eBay Campaign ID is issued to you free by the eBay Partner Network.

 

See it action here (top right)

WPMU Cleanup – script to delete unused blogs

WPMU Cleanup is a script that checks the WordPress-MU database for blogs that have not been updated for some time. Then, it sends to these blogs authors an email telling them that their blog will be deleted in a few days if they don’t update it. If the blog is not updated in time it it removed from the system.

Here are the instructions:

This script checks the WPMU database for blogs that have not been updated for X days, then sends a notice to the blogowner that the blog will be deleted after Y days.

It also automatically deletes blogs that have not been updated for Y days, then sends an email to the blog owner.

On both occasions, the script will send a report with details on warned and deleted blogs to the administrator.

This script has *NOT* been programmed as a plugin since it is intended to be executed by a cronjob. As it is now it should be run once every 7 days, but you can configure it to do otherwise.

This script is *NOT* a final version and should be used with caution and only if you know what you are doing. I recommend testing it on a testsite rather than a livesite.

A number of projects for WordPress-MU people

There are a few projects for WordPress-MU folks over at jobs.wordpress.net:

  1. asap WPMU installation for beta testers
  2. WP MU & WP MU Plug-in Experience Needed
  3. Seeking to drive Multiple WordPress sites through One Installation

How to Write Plugins for WordPress MU – updated

Last year I gave a ink to a short post on the basics of WPMU plugin development by itdamager. It turns out that that post is no longer available online. So is a cached copy of it:

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.

  • WordPress MU plugins can either be globally enabled or individually enabled/disabled by each user, depending on their purpose.
  • WordPress MU will allow you to check if the user is a site admin or not.
  • WordPress MU will allow your plugin to use ‘per blog’ settings, or ‘per site’ (sitewide) settings, depending on your needs.
  • WordPress MU has variables that are useful to plugin development

Global Plugins
Wordpress MU has a special plugins directory called mu-plugins. Any plugin placed within this directory will automatically be enabled globally. Users cannot disable or view the plugins located here. To ‘disable’ a global plugin, delete the plugin file from your server.

User Enabled Plugins
Plugins that users are allowed to enable/disable for themselves are placed in the standard plugins directory. This would include many of the standard plugin’s that are already available for WordPress. If your plugin will reside here, you can probably follow the standard WordPress plugin development instructions on the codex.

Site Admins
Certain users, (admin by default) can be given the ability to administrate a WPMU installation.

If you want your plugin’s config screen(s) to be available only to WPMU admins, or certain functions only available to admin users, then you can use the following MU functions to test if a user is a site admin or not:

get_currentuserinfo() – get_currentuserinfo requires no arguments and preloads, if not done already, information about, you guessed it, the current user.

is_site_admin() – is_site_admin, as the name implies, will return true if the user is a site admin, and false if they are not.

By using those two functions you can write code or config screens that are admin specific and unavailable to regular users.

Sitewide Settings
WPMU has commands that allow retrieval/storage of global options.

add_site_option($name, $value) – Adds a new sitewide option to the database.

update_site_option($name, $value) – Updates a sitewide option, adds it if it don’t exist.

get_site_option($name) – Retrieves a sitewide option from the database.

WPMU Variables
Many useful variables are available in WordPress MU. Here are a few.

$blog_id
$user_id
$current_site
$current_blog
$wpmuBaseTablePrefix
$table_prefix

Contants
VHOST – yes if installed using sub-domains, no if installed using sub-directories.

More MU Specific Commands
For a full list of all commands specific to WPMU, refer to wpmu-functions.php where you will find they are all defined with self explanatory names, in most cases.