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.

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.

Drupal wish list

A couple of quickwish list items for Drupal.

  1. 5.x upgrade for the SPAM module. I've poked at it a little but so far haven't had time to really dig into it.
  2. Some awesome new themes. Garland is great but a few more will only help.
  3. An Atom module upgraded for 5.x
  4. A nice build script for automating the install. This is a bit trickier to do well and securely. I've got some code I'm playing with but I don't know that I'll release it becuase it presents the chance for abuse if people don't know what they're doing. If they do know what they're doing the shell scripts I've cobbled together may not be much help.

Recent Reads block for Drupal

Linkblog picture or linkblogs give bloggers a way to share links with readers without feeling like a full post is necessary. Earlier this week there was a post over at Scripting News about the to allow posts without titles. This flexibility is good as it allows for several different styles of blogging. I have shied away from one-sentence posts or shorter posts but still desire a way to let readers know about some interesting things that have crossed my path.

About a month ago I added the Recent Reads block on the left of this blog that is now called Points of Interest. The first version of the block was pretty straight forward. Using it is simple to point it towards the feature of With that system in place once I came across an interesting post in my daily RSS reading I simply hit "Shift-S" and the next time the site updates the newest items are added to the recent reads block. This works great for things that come across in RSS but sometimes I would find things from emails or other sources that I wanted to include in the feed.

A couple of easy changes later now feeds the Points of Interest block in addition to Google Reader. I simply setup a tag in Del.icio.us for each blog that I want a recent reads page on. This can be done in Google Reader as well. Instead of using the general "shared" feed it would be possible to hit the "t" key to tag a post and tag posts with the blog or blogs that I want the post to show up on. Maybe I'll do this later. To get the Drupal aggregrator to work as desired there are a couple of settings changes necessary. Now that the aggregrator is subscribed to both the Google Reader feed and Del.icio.us feed it is necessary to create a category, in this case called Recent Reads, which will be automatically assigned to every post in the feed.

Another great benefit is that because of Drupal's built in RSS capabilities the block is not only a point of interest on the blog page but readers can subscribe to it independently or in conjunction with the blog.

Drupal 5 released

[DRUPAL]In the wee hours, after I packed it in last night, the final Drupal 5 release was unveiled. Congratulations on a great release. Now it is time for the themers to go to work and come up with some additional themes. It is more daunting this time because of the absolutely beautiful theme Garland, which ships with Drupal and is customizable to an extent never before possible with a default Drupal install.

Drupal Scheduler Module

Blogs that are consistently updated get more readers than those that go in the fits and starts that so many do. Recently a couple of suggestions have been posted around to do two things. One suggestion, the good one, is to use a feature of your blogging software to schedule posts in advance. This is just the purpose of the Drupal Scheduler module. By enabling the module and then going to Administer >> Content Types you can choose which types of content can be scheduled.

When I was installing it did not go well because of an older (much older) version of the module still hanging around. Actually the module was gone but the tables were still in the database. Deleting the tables and then re-activating the module solved the problem quickly.

As for the bad idea it involved a WordPress plug in to automatically run old posts on the front of your site. There are many reasons this isn't a good idea. Having even time insensitive posts reappear on your site is worse than reruns on TV. At least the TV guide tells you they are re-runs and the TIVO knows not to bother. Running old content as new is one sure-fire way to cut down on the number of readers to any blog. 

Upgrade to Drupal 5.0

This afternoon brought with it the opportunity to run the upgrade on this site to the latest version of Drupal. Along with the latest version comes a new theme and some new modules. For example it will take a while for me to get used to the WYSIWYG editor that I now have. Old habits die hard. Something with the upgrade caused the Color Picker in the Garland theme to refuse to work for a while. Finally I disabled all the modules and then brought them back one by one. That seems to have made things happier.

Unfortunately it is too late to stop by the bread store on the way home. I may have to settle for Frys. The problem with Frys is that I'll go and look for the sixth time for a keyboard. I won't find a good one there and will resolve to order one from Amazon, or maybe order two and test them out. Either way I'll go home later and not any happier. 

Placeblogger takes off with Drupal

Placeblogger kicks off the new year with a site to aggregate blogs by location. The site runs a version of Drupal that has been put together by Boris Mann and the Bryght team. It is a great site and looks to be gaining traction.

Perhaps this will be the impetus to convince Las Vegas publishers that they need to jump on the RSS bandwagon.

Google Data API for Drupal

One of the projects for Google's 2006 summer of code was the GData Module in Drupal.

My thoughts on the applications of this range from a community event calendar and either a supplement or replacement for the event module that would interface to Google Calendar. Also the ability to have a Google Calendar tied into a Drupal work flow would be excellent.


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