Drupal social publishing software

Drupal is a powerful content management system and framework that makes building powerful websites possible for mere mortals. Some of the posts here will be syndicated to Drupal planet.

Vendor lock-in

Dave Winer has been blogging about vendor lock-in for quite a while now. It occurred to me earlier as I was reading about a really cool project and realizing that this project would never be possible with commercial applications. Would it be possible to put Microsoft Content Management on a flash drive even if the license permitted it? How else could one have a flash-drive based cross-platform web-enabled application?

When companies and organizations take the stand that open-source is not for them it is often a short-sighted view. Certainly there are organizations that can't deal with open source themselves but there is no upside from skipping the numerous vendors working with open-source and there is almost certainly long term risk. What does a business do when their system is no longer supported and their data is locked-in to a particular vendor's system? Just ask some organizations that are just now trying to migrate from mainframe systems to database systems and the years of work and millions of dollars it takes to make the move.

Sure I know Dreamweaver, Front Page and more

As a hiring manager I'm always skeptical when I get a resume filled with "technical" classes from one of the myriad of technical schools around the country. When I've worked with graduates of these programs it seems they have a marginal, but usually satisfactory, understanding of how technology is supposed to work. The problem is I rarely need people who can work with technology that is working. If technology is working and things are simple there is little that end-users need. Even relatively simple tasks like deploying computers depends upon a specific understanding of the complex situation that is most business networks. Few organizations do a "out of the box" installation of a Microsoft Active Directory and run 100% machines that work in that environment. These complexities mean a technical manager is quickly looking for skills that don't come from these technical schools. Ironically because they do tend to come in people who are self-motivated to learn the technology any way they can often the requisite skills are stronger in those who haven't been through this sort of program.

Important order considerations with multiple databases in Drupal

I have been working recently with a Drupal application where it is necessary to bring in some data from a non-Drupal database. Eventually these features might roll into a module and the data may move into Drupal but for the moment it sits alone in another database.

An hour or so today disappeared into trying to figure out why various theme_ functions did not work properly. Calling theme('item_list', $list); for example returned broken pages and error messages in the log. After searching for what I was doing wrong in calling theme_ it finally hit me that the error log messages were complaining about not finding the system table and not having parts of the theme. From there it was quick to find the information (which I posted as a comment as well).

The upshot is you have to return to the 'default' database before doing theme work. Read the full version for a code examples.

Organizational web-mastering

Every once in a while something happens that just floors me. Often I think I've seen just about every cheap-trick in the book and know all the ways people are a bit odd. A recent exchange showed that I've still got more to learn. The story starts some months back when an organization asked me to work on their website. For a multitude of reasons the group was not happy with the site they had and couldn't get satisfaction from the process they were using.

"In the news" or recent reads on Drupal sites

Some months back I started the "Points of Interest" item at the left. It is basically a linkblog and provides a way to make pointers for things that might be interesting to readers for which I'm not going to take the time for a full post. The setup is quite simple.

Google Reader

Google ReaderIn my case it started with Google Reader. I had begun using it as my primary RSS reader and found the "Share" feature to be handy. Even handier is that the items that have been shared are put into their own RSS feed. Click on "Shared Items" in Google Reader and you've got the URL handy. To begin with I created a feed in the Drupal Aggregator to create a subscription to Google Reader's Shared Items that I called "Recent Reads".

Close Signups with maximum registrants

Working on a project this week I needed a module to allow users to sign up for orientation sessions and automatically close signups when the sessions are full. The signup module for Drupal does this but didn't have the ability to close signups after reaching the maximum number of participants. After a few false starts and simplifying the code I rolled a patch that adds eight lines of code and adds the functionality. The patch uses an unused column in the database so a database change isn't needed (I originally had added a new column but realized that the close_signup_limit column isn't used).

Drupal login/cookie issue

I've been battling a pesky problem with Drupal where when a user logs in they get no error message but get a login page again. The short version is that the user's session from their "anonymous" browsing isn't cleared so they continue to get the login form again. The solution, or at least the workaround for a quick fix, seems to be adding this line to the settings.php file for the site: 

ini_set('session.cookie_domain', '.example.com');

This may well be related to a previous issue.

Show some text only to users who don't have a particular role

Over the past few weeks I've been working away on the Nevada Boys' State website. It is a pretty cool site if I do say so myself. The delegates log in and complete things like the pre-program survey and submit legislation. Of course it is a Drupal site. Using Taxonomy Access Control pages are created for parents, staff or delegates. However parents and staff can look at the delegate pages. This is fine but there is some customization done on the page that shows the current user's email and reports that it's the "Delegate's email account".

It is a simple problem to solve and a quick trip to the Drupal site gave me the pieces to put together the following code that shows a note for anyone who logs in and views a Delegate page but doesn't have the role of Delegate. (Delegate has been changed in this code to MyRole).

Groups of groups

My latest wishlist for a module for Drupal is for an easy way to have users choose, or be assigned, membership in one of a group of groups that would exclude being a member of another group in the same category.

One way to think of this is I'd like to have a set of groups for political party and a set of groups for state. Democrats in Nevada can join the group Democrats and Nevada but can't be in the Republicans group. Ideally a user could change their membership and in so doing would relinquish their membership in the the other group in the same category.

Pages

Subscribe to Joshua Brauer: All Drupal items Subscribe to Joshua Brauer: Drupal Planet only