Tweaking a Calendar for WPMU.

NOTE: Kieran has made a newer version of his plugin which works with WordPress MU and integrates by using an embedded Calendar tag to display the calendar.

So basically I’m abandoning this plug in and suggest you get Kieran’s new version instead. That is what I’ve put on this site.

This is basically Kieran O’Shea’s WP Calendar plugin for WordPress tweaked to work with WPMU with a couple of additional features.

1) Calendar table created for each user
2) The Calendar is wrapped to work in multiple templates without needing a file in each template. See the section below for more on this
3) Input and Display date formats on the Admin screen can be changed by the administrator.

Installation.

1) Drop the files from the archive into the matching folders in your WPMU installation
2) Edit the edit-calendar file and change the $eddateformat and $eddatesep variables to match your date format (by default it they are set to d/m/Y and / as I’m in the UK).
3) Enable the Plugin
4) Edit your .htaccess file and add the lines in the add.htaccess file towards the top
5) If you want to use my template wrapping then you need to use the wp-calendar.php file that I have provided along with the two tag files (edited to support your templates). If you dont want to use it then you need to install the calendar file manually into each template (but you dont need the tag files)

Template Wrapping.

I use Template Wrapping a lot – it allows me to easily drop cross blog functionality into the blogs without having to create a new page template in each blog. For example the calendar page only exists at the top level – there are NO files in any of the templates for the calendar, the structure of the page round the calendar is created using the two tag files and a couple of calls in the file containing the call to the calendar code

To enable template wrapping you need to do the following:

1) Drop the wp_opentags.php and wp_closetags.php files into the top level of your WPMU installation
2) Create a new file from the empty_page.php file
3) The new page can now be accessed from each blog.

You will find that you need to edit the wp_opentags and wp_closetags files to work with your templates. This can take a while due to the way different people build their templates and no hard and fast rules on opening and closing DIVs in the header,page and footer.

A Zip file of the various files including my wrapper files is available for download

If you have any comments, suggestions etc then please post them as comments.

You can see the calendar in action here

This entry was posted in Computing and tagged , , , . Bookmark the permalink.

3 Responses to Tweaking a Calendar for WPMU.

  1. Geoffrey Hall says:

    Steve,

    Noticed a comment in a WP MU forum about running WP MU in sub-directory mode. I’ve installed WPMU 2.7.1 but was not given the option to install using “sub-dir mode.” Can’t make the subdomains work on my web host. Any advice??

  2. Steve says:

    I can’t remember the exact point but its pretty early on in the installation routine when it gives you the choice of installing in subdirectory or subdomain mode.

  3. Geoffrey says:

    Thanks. Got it. Somehow I missed it on the first install page.

Comments are closed.