Husky Ninja Blogs

A Rose by Any Other Real Name

Drupal is, as installed, a hot mess with the UX of an angry gorilla. URLs don't really make any semantic sense, even with path settings configured, and there is a lack of relationship between the content and the intended structure of the site. Displaying usernames as opposed to real or natural names is kind of a design buzz kill. The taxonomy tools are very powerful in core, but quite limited in practice. And we don't even want to talk about the default bredcrumb (well, yes we do but not in this post). Even with all these issues, there is always a module for that.

Earlier I mentioned jQuery Update, which I just noticed is still throwing the odd "please enable" error even though it is working just fine, and Bootstrap is humming along without issue. Now it is time to fix as many of the UX issues as possible. First up is user names and displays.

It really bothered me that when publishing something to the site resulted in displaying a mangled user name and not a natural name. Not only would I consider this ugly as heck, but it is also a minor security risk. The solution was RealName. Installation was a snap (as always), but direct documentation is non-existent. After a bit of researching (here), this is what I did:

Enable Tokens. If you don't have Tokens installed, do so. (I did. Lucky me.)

Go to Administration >> Configuration >> People >> Account Settings >> Manage Fields. From here create two new fields; First Name and Last Name. Ensure that they have unique Machine Names and set the Field Type to Text. I would recommend that you make these Required Fields, but if you are the only one posting then no big deal.

The Manage Fields for accounts with the two new fields added.

Go to an account you wish to use a Real Name display (Administration >> People), and fill out the First Name and Last Name.

Go to Administration >> Configuration >> People >> Real Name and select "Browse available tokens". From here you select the Tokens listed as First Name and Last Name. Don't forget the space in between each token.

The Realname pattern with the new tokens added.

Once the configuration is saved, all fields that once displayed the username should now be displaying the natural name.

Now that the username issue was fixed, it was time to move on to dealing with connecting to social networks and displaying Open Graph information using Metatag and Service Links.