Categories
Development

Add Fields to User in Drupal 7

Drupal User Manage FieldsI remember hearing that you could add, edit and arrange fields for storing user data in Drupal 7, but initially couldn’t figure out just where to do this. This pretty much does what the Profile module had done in previous versions.

Just go to:

Configuration > People > Account Settings

Then click on the Manage Fields tab, and then just manage the fields just like you would for a Content Type.

It’s so simple. If you feel that you need more features than what’s provided in core, the Profile 2 module seems like something worth checking out.

Categories
Books

Foundation Drupal 7

Foundation Drupal 7I’ve been reading up on any and all documentation since I’m in the process of moving a very large site over to Drupal 7. I picked up a copy of Foundation Drupal 7 in hopes of getting a better understanding of what is new in 7 and pick up a few tricks along the way.

I find The Friends of Ed books tend to be geared more towards the designer than the developer, and in this case I am initially approaching the Drupal 7 in terms of our site content owners and less a deep technical understanding. In that regard the book was pretty solid.

The author does a fine job of explaining content types and fields and when to use them. He also goes over what the core modules do and how to configure them as well as briefly mentioning some very useful contributed modules.

While I can’t say I learned much that wasn’t already available in the online Drupal documentation, reading and following along with the examples in the book did help me understand some of the new features in 7.

There were times I wish the author would go into more detail regarding configuring a certain module or working with a content type, I do understand that this book was aimed more towards a beginner and not so much a web developer.

Categories
Development

Drupal 7 hide taxonomy

Drupal 7 Manage DisplayI’ve just begun upgrading a Drupal 6 custom theme to Drupal 7. And after a couple of attempts at cleaning up my theme (ok, numerous attempts), things started to render correctly.

However, I did notice that the taxonomy terms that I had removed from node.tpl.php in my Drupal 6 theme were now appearing in 7. After some investigation, I did notice that while logged in as admin, under Structure > Content Types > then manage display for the respective content type you could make certain Fields hidden.

While it took me a little bit of adjustment to find at first, this is great. I just set the Label and Format to field I didn’t want to display on my Page to <hidden> and all is well again.

Categories
Development

Make CKEditor match your site’s CSS in Drupal 6

I’ve been converting a pretty big site over to Drupal 6 recently and have been trying to get the CKEditor to very closely appear like the sites CSS styles. By default it was doing an ok job, but not good enough for how the site’s content managers would be working with it.

Through a bit of research I did find an excellent tutorial on the subject. This was a tremendous help and exactly what I was looking to do.

Just a few simple adjustments in the ckeditor.config.js was all it took.

First I just changed the value of:

config.bodyId = '';

Now the majority of my site’s styles were cascading onto the CKEditor. There were still some minor tweaking that needed to be done.

Adding a few lines using:

config.extraCss += "";

and I was all set. Now the CKEditor editor is displaying content almost identically than how it will actually appear on the site.

Categories
Books

Pro Drupal Development Second Edition

Pro Drupal DevelopmentI’ve been in the process of deciding whether or not to move atlantic.edu over to Drupal. While the online documentation and the various online sources of info are pretty solid, I really was looking for a concise resource that is aimed more towards the intermediate or advanced PHP developer.

Pro Dupal Development Second Edition has really been a great read for what I was looking for. It does an excellent job of breaking down the various modules, hooks, themes, nodes, blocks, etc. of Drupal. Drupal is very powerful, but at times I find it’s learning curve can be a bit on the steep side. This book really does an excellent job of explaining things from a developers perspective.

The Second Edition covers Drupal 6, which is what I will most likely initially be running. There is a Third Edition due out around this time that will cover Drupal 7 if that’s of more interest (and something I’ll probably end up getting eventually too).