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.

May
14
2008

Using named anchors with #redirect in forms

Working on a site using the jstabs module this evening I came across a bit of a challenge passing named anchors to the #redirect element of a form. The desired url for redirection in this case was /user/myuser#profile-tab-7.

Asking in #drupal led to the following tidbit from chx. (This is one of the many reasons Drupal is wonderful since Google searching didn't produce results and my experiments and requests of friends didn't produce the answer.) Anyway the challenge is that #redirect causes the form to call drupal_form_redirect() which in turn calls drupal_goto(). The drupal_goto() function takes the path, query and fragment as it's first three arguments.

drupal_goto($path = '', $query = NULL, $fragment = NULL, $http_response_code = 302)

How then to pass these from #redirect. Putting the values in a string doesn't cut it as the special characters end up getting encoded in the URL and it doesn't work. The answer chx pointed out is to use array() to pass the values. The resulting code ends up looking like this:

      $form['#redirect'] = array('user/' .$user->uid, NULL, 'tabs-profile-7 ');

May
10
2008

Drupal Camp PDX


Off to a great start at Drupal Camp PDX. Ben Kaplan and Andrew Morton are kicking off the day with what Drupal is and is not. Some great analogs are being used to illustrate what Drupal is and is not. Of course having a Drupal Camp in the beautiful Portland area makes it all the better.

May
5
2008

A fun jquery trick

Working on the Forum Thread module I came across a bit of a challenge. On one user's site the call to add an inline javascript file (drupal_add_js()) was being called from nodeapi twice. Since it is calling inline javascript drupal_add_js happily puts the script on the page twice.

In this case the script in question calls a "toggle" function to hide and show the comments on a given forum node. Since the script was there twice it obediently displayed and then immediately hid the comment body. Evidently users aren't keen on this method of speed-reading.

The solution then is simple. Use an external .js file. However, in this case to make the module easy to configure I wanted to allow users the choice of which css element identifies a "comment title". (An aside that the way this works is to hide and show the siblings of the title which does impose some requirements about how the comment is formatted.) So this makes it more complex because I want to include the proper selector in the script and still include it in a file.

To accomplish this I ended up splitting the jQuery function into a couple of separate calls. The first, an inline script, does an addClass to the user-identified comment title class. Then a file-based javascript acts on the newly added class to hide and show the comments as a website user chooses on each page.

It is possible to see the results in action.

May
2
2008

Boise Drupal user's group meeting

Being the first Thursday of the month the Boise Drupal User Group meeting at the Eagle Public Library. We took a look at several cool projects members of the group are working on. Included among them are these great Drupal modules:

  • Mark it up
  • SuperNav
  • Many cool projects that folks are working on but not ready to have the traffic yet

Having a thriving local Drupal User group is great. Now off to start on getting the pancakes ready for Saturday's pancake breakfast.

Apr
22
2008

University of Colorado on Drupal

In a little Drupal surfing while waiting for the latest Lullabot podcast this morning I came across the recent University of Colorado website. It's great to see another university using Drupal and they are doing it in a big way.

Apr
18
2008

Previous experience in web design is also required

Had this ad been posted on April 1st it would have been a really funny joke. Posted late in the month it is more funny sad than funny ha ha. Sadly this is not made up but a real ad posted by a real law school. This could turn into the right opportunity for someone with a solid Drupal developer. Unfortunately for the law school in question it does not bode well.

As is the case in many shops this will be a one-person web shop. By itself this is not a bad deal. The challenge will be getting a good person. Unfortunately the advertisement suggests the organization understands very little about what to expect from this position. What is best about this advertisement is the line "[K]nowledge of a web programming language is required
(ColdFusion or Dreamweaver)."
Sigh. If the school is really lucky they'll get a good Drupaler to apply and come explain in easy to understand terms what the school needs.

Senior Web Developer - Law School

This position will design, test, and implement websites, including
designing databases, web-interfaces, and reports for the Law School. While the
Director will be kept abreast of all activities (for purpose of approval,
particularly informational and/or content issues) related to Web resources,
most of the technological and operational aspects of the sites will be the full
responsibility of this position.

Requirements: Bachelor's degree in Information Technology,
Information Systems, Computer Science, Computer Engineering or a closely

Apr
18
2008

Dries Buytaert named a Business Week best young entrepreneur of technology

Drupal founder and Acquia co-founder Dries Buytaert was named a most promising entrepreneur by Business Week magazine in their special report. Congratulations Dries on an honor well deserved.

Apr
17
2008

The Drupal shop

aten Design Group has a great article on why they chose Drupal. I would be hard pressed to tell you the number of high quality shops who have made the same choice. Many of us have set about building a better content management system. One better suited to our particular needs or our view of how to do content management. As someone who has used content management systems dating back to Clay Basket and NetObjects Fusion as well as rolling my own, Drupal simply makes it possible to focus on doing the things we want with a content management system (and yes it's more than just a CMS) instead of spending weeks and years building one.

Mar
31
2008

Mollom brings enhanced content protection

MollomMollom moved from a private beta to public beta today. I've been fortunate enough to participate in the private beta and can say this stuff rocks. There are plenty of methods of protecting sites from spam and bad content, but this is by far the best so far. The problem with many systems is they treat legitimate users as the enemy. At least with traditional CAPTCHA systems is that they challenge the user for an answer before the user has provided any information to suggest they should be challenged. Users pay the penalty for the bad behavior of the spam bots. There are systems that work around this and some like Akismet have done pretty well on this site. The problem, however, with many of these services is that they can still be gamed to a greater extent. And, since the spambots don't recognize that their attempts to add content have been unsuccessful they merrily pound away on the server. The other methods also generally call for administrators to monitor things pretty closely. With all the great spam tools there would still be a couple of spam posts a week that would slip through on this site. During the transition to Mollom a bot was actually attempt to post. In the few seconds the site was unprotected a couple of posts slipped through. In the weeks since nary a errant post has been made (aside from one on an article which should not have been configured to accept comments but that wasn't spam).

Mar
24
2008

Back on the horse

So I'm slowly getting back up to speed following the post-Drupalcon bug that so many seemed to be catching. Easter weekend brought about releases in a couple of new projects. The Forum Thread module got a beta release. A few bugs have already come to light as have a few feature requests that will get on the list. Many thanks to http://fixingtheplanet.com/ for supporting development of this module.

Another project that I didn't start but have recently started to lend a hand with is a great theme project that started as a part of Summer of Code 2007. The Light Fantastic theme is a great theme that we use on the business website. The initial release has some bugs that need to be worked out and I'll be rolling up the changes I made to get it into shape for a release soon. This is a theme that lucksy created as a part of summer of code. (Hint! Hint! Summer of Code rocks... Be sure to read more about Google Summer of Code.)

It sucks to have the bug but it's great to be getting back on the fast track. Lots of yummy Drupal in the future.

Syndicate content Syndicate content