At the Forge - Bricolage Alerts
Last month, we started to look into the powerful open-source Bricolage content management system (CMS) written by David Wheeler and based on mod_perl, HTML::Mason and PostgreSQL. Content management software is a relatively new type of Web application, designed to make it possible to manage large Web sites. Bricolage has been widely hailed as a new open-source success story, demonstrating that proprietary software is not necessarily more flexible or more powerful than its free software counterparts.
It's important to remember that although a CMS is a Web-based application that depends on dynamically generated server-side programs, the output from a CMS typically is a static site. So even though Bricolage is a large Web/database program and customizing Bricolage requires server-side programming skills, it actually is an application meant to be used on a day-to-day basis by nonprogrammers. Indeed, organizations from Salon.com to MacWorld on-line currently use Bricolage. And thousands of other Web sites, from CNet to LinuxJournal.com, use content management solutions ranging from Vignette (complex, proprietary and expensive) to PHPNuke (simple, open source and free of charge).
This month, we look at one of my favorite Bricolage features, alerts, which allow users to keep track of different activities on a Bricolage system. Not only do alerts keep us informed of what is happening, they also provide a good way to see how the system works—by looking at the list of objects, by the actions that can be taken on each of those objects and by knowing when the alerts actually are triggered.
Bricolage, like most CMS software, moves articles through stations in a pipeline. In Bricolage, these stations are known as desks, reflecting the software's origins in the world of journalism. Stories thus begin at the edit desk, move to the copy desk, then to the legal desk and finally to the publish desk, from which they actually can be published on the Web.
On a small Web site being managed by only a handful of people, it is easy to keep track of which articles are kept where. But once you get beyond a small number of people or a small number of articles, it becomes difficult to keep track of what is happening with each article.
One way to handle this work flow is to look at the various desks, one at a time, to see what stories are on each one and then take appropriate action. But this looking can get tedious, and you might want to track stories in the news category or those by a particular author, rather than all of them. Moreover, it would be nice to receive notification of work-flow events via e-mail.
This functionality exists in Bricolage, and in true open-source fashion, it is customizable to an amazing degree. To create or modify alerts, click on the alert types menu item under the system menu in the lower right-hand side of the screen. This is one of the admin menus, meaning it's accessible only to users with administrative privileges. The resulting screen, like most other administrative screens in Bricolage, allows you to search for an alert by name or view all alerts that begin with a particular letter.
You can create a new alert type by clicking on the create new alert type link. This brings up a short HTML form that asks you to identify the Bricolage object on which you want to put an alert. So if you want to be alerted when something happens to stories, ask for alerts on stories. And if you want to be alerted when a new user is added to the system, ask for alerts on users. In short, almost any object in Bricolage can be placed under an alert.
As an example, let's create an alert to tell us when any story with “Linux” in the headline is moved from one desk to another. Once again, Bricolage makes it easy for us to monitor any object. This, however, is undoubtedly one of the more common types of alert that take place.
We now choose create new alert type from the admin menu, then create a new alert on Story objects. We then are presented with a list of actions that Bricolage can watch for us, ranging from category added to story to story published to element deleted from story. For this example, we choose Story moved to desk and name it Linux story moved.
Each alert type must have an owner; in this particular case, the owner is me, because I'm logged in as myself. The only user initially created by Bricolage, whose login is admin, is known as Bricolage Administrator. This admin user should be treated the same as the UNIX root user. It certainly can own alerts, but you are better off creating additional users (with the admin/user menu in the bottom left-hand corner), giving yourself administrative permissions and then logging in as yourself rather than as the administrator.
In any event, clicking on the next button at the bottom of this page brings you to the main alert type editing screen, which is used to create new alert types and modify existing ones. Each alert has four parts:
Properties: the name and owner of the alert type, which we entered on the previous page.
Rules: a description of when the alert should fire. Each rule consists of a variable (selected from a pull-down menu, thus avoiding the potential for misspellings), a comparison test and a text field into which you can enter the comparison value.
Content: the e-mail message sent to alert recipients. This can include a number of different variables, from the story's headline to its publication date.
Recipients: the users and groups who should receive the alert, if and when it fires. You can send an alert to all editors, to all authors or to George and Frank but not Deborah and Mary.
Webinar: 8 Signs You’re Beyond Cron
11am CDT, April 29th
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.Join us!
- March 2015 Issue of Linux Journal: High-Performance Computing
- Not So Dynamic Updates
- Users, Permissions and Multitenant Sites
- April 2015 Video Preview
- New Products
- Security in Three Ds: Detect, Decide and Deny
- Flexible Access Control with Squid Proxy
- DevOps: Everything You Need to Know
- Tighten Up SSH
- Non-Linux FOSS: MenuMeters