Photo from Chile

Using the Mura FW/1 Connector Plugin

Several months ago Pat Santora of Blue River and I developed a Mura plugin that would allow a developer to take an existing FW/1 application and deploy it within a Mura page. I was interested in this as I saw a need for a lightweight framework that I could use for my plugins, and by coincidence Pat happened to be working on something similar. So we joined forces and the FW/1 Connector Plugin was born.

The plugin was finally released yesterday so I thought it prudent to author a post about how to use the plugin.

Overview

The FW/1 Connector plugin can be used to incorporate an FW/1 application into Mura. Each plugin can be assigned to an individual FW/1 application. As long as each FW/1 application has a unique applicationKey, you can have as many FW/1 applications running inside Mura as you please.

[More]

Extending Mura CMS with Plugins - Part V - Handling Plugin Errors

Here's a quick Mura Plugin tip: You can handle errors in your plugin via an onError() event in your event handler. Here's what mine looks like:

view plain print about
1<cffunction name="onError" output="true" returntype="any">
2<cfargument name="event">
3
4<cfif arguments.event.getConfigBean().getDebuggingEnabled()>
5    <cfdump var="#arguments.event.getValue('error')#" />
6<cfelse>
7    <cfset arguments.event.getServiceFactory().getBean("MuraService").SendErrorEmail(arguments.event.getValue("error")) />
8    <cfinclude template="../displayObjects/util/dspPluginError.cfm" />
9</cfif>
10
11</cffunction>

What's going on in there?

First I'm checking to see if debugging is enabled in the global config by checking the value of event.getConfigBean().getDebuggingEnabled(). If debugging is enabled I want to display the information about the error on the page, so I'm dumping the contents of the error key from the event. If debugging is not enabled, then I want to send an email to the site administrator, which is done by invoking a method on my MuraService object, which is defined in my Coldspring config. After that I want to display a friendly error message to the user, so I simply include a template from the displayObjects/util/ folder of my plugin. This allows the plugin itself to control what sort of message is displayed to a user when an error occurs.

Pretty simple, eh?

Extending Mura CMS with Plugins - Part IV - Using Extended Attributes

In the previous post in this series about Extending Mura CMS (an open source ColdFusion CMS) with Plugins, we looked at using plugin settings to make our plugin configurable by a Mura administrator. In that simple example, our plugin settings were used directly in our ouput. Although plugin settings can be useful in a number of scenarios, using them in that manner has a limitation, which is that you'll get the exact same output on each and every page that uses the plugin, because the value of the setting is set via the Mura Admin and hence the plugin always uses that single value.

In this post we'll look at a different technique for making a plugin configurable, and this time we'll be able to configure the plugin on a page-by-page basis, instead of having one global configuration setting. We'll do this by assigning a value to an extended attribute of a page, and then direct our plugin to use that value. The first step, therefore, is to enable an extended attribute for a page, so we'll look at that first.

[More]

Extending Mura CMS with Plugins - Part III - Configurable Settings

I'm continuing my series on Extending Mura CMS (an open source ColdFusion CMS) with Plugins, after a long hiatus, by looking at adding configurable settings to a plugin. In the previous post we looked at creating a simple Hello World plugin and also looked at how we could place the output of that plugin on a page in our Mura site.

As you may recall, all that plugin did was output the text "Hello World!" inside an h1 tag. That's not particularly useful, so let's make it a bit more interesting. How about we allow the person managing the Mura site to decide whom we should greet and what that greeting should be? We're going to do that by adding a couple of settings to our plugin. In order to add those settings we're going to have to make a few changes to our plugin's configuration, which we do by editing the /plugin/config.xml file. Let's take a look at out new version:

[More]

Extending Mura CMS with Plugins - The Story Continues

Just a quick note to say that my languishing series on Extending Mura CMS (an open source ColdFusion CMS) with Plugins will in fact continue in the very near future. I took some downtime over the holidays to draft a couple of posts, and I just have to get them ready for publication. In an interesting coincidence I discovered, after writing the posts, that the crew at Blue River have been hosting a webcast, The Mura Show, about Mura, and have been talking about developing plugins as well. And then I saw a tweet that mentioned my earlier posts, which pointed me to the ColdFusion Throwdown, which is hosting a competition for developing Mura plugins. So there seems to be a lot of interest in Mura plugins right now.

I watched the first episode of The Mura Show, and it pretty much covered all that I had written, and then some, so I considered not publishing the posts after all. But I figure that having them as a permanent, readable resource would be of value to some, so I'm going to finish them up and get them out there. I hope to then write another post discussing all of the new stuff that I learned from The Mura Show.

So stay tuned for some more Mura goodness!

Testing Application and Session Integration with FW/1

Sean Corfield recently released a very lightweight ColdFusion MVC application framework called Framework One (FW/1 for short). I've been doing quite a bit of development of plugins for Mura CMS lately and I've been looking for a lightweight front-controller, so it sounded like a potentially good match.

I've been working with Pat Santora of Blue River on a Mura CMS plugin that will enable a developer to plug a FW/1 application into Mura. One of the things we needed to do was to ensure that FW/1's events were properly tied in to Mura's events. To that end I created a little test application that makes use of FW/1's setupApplication() and setupSession() methods.

I thought that this sample app might be useful to someone else who is attempting a different form of integration, so I'm attaching it to this post.

Extending Mura CMS with Plug-Ins - Part II - Hello World

In my previous post about Extending Mura CMS (an open source ColdFusion CMS) with plugins, we looked at what plugins are and how one creates and installs a plugin. In this post we'll look at a very simple plugin, and then add new features to the plugin in future posts.

There are already a couple of sample plug-ins that can be found on the Mura site. This example is loosely based on the Hello World example found there. This simple plugin won't do anything useful (yet), it will simply display the message "Hello World" on a page. So let's get started.

[More]

More Entries