Read

Drops that you read.

Moving Beyond Nodes

If you're like most people who build using Drupal you want to build your site around nodes, that have titles, descriptions, tags, comments, etc. It's no surprise since those types of content oriented sites are the ones that make the world of the web go round. But what about another type of site that focuses not on nodes but on data contained in the Drupal database? Can you do it? Yes. Should you do it? Only if that sort of thing excites you or perhaps if a client requests it.

I'll give you a little background on where I'm coming from and what made me decide to play around with Drupal as a way to expose data sets. About a decade ago I was part of a group of people who built a first of its kind application to send and receive data from wholesale power markets in North America. The application was built on three tiers: a client, an application server, and a database server. The client and application server were written in Java and the database relied on Oracle technology. It was about as far away from open source as you could get. The product was successful though and we did hundreds of installs all across North America. What the product basically did for its owners was suck in data from a central server then expose that data to the user via tables and charts visible from the user interface. At some point last year I started wondering if I could do something similar with Drupal. So I started investigating, tried out different modules and realized that I could do even more with a Drupal install than we did with that product.

There are four tasks that need to be accomplished if you want to use Drupal as an effective data platform.

  1. Capture data to the Drupal database tables
  2. Setting the data types (text, numeric, etc.)
  3. Expose the data to the user using tables and charts
  4. Offer simplified download format options

 Capturing Data

I have been capturing data using the Table Wizard module. Table Wizard allows you to create a database table by uploading a delimited (like tab or comma separated) file. This works pretty well. I recently uploaded a file with over 300,000 records and it was in the database within a few minutes. After you upload your file you click on the table name to "analyze" the table. Table Wizard will let you know what columns you have in the table, the data types and identify the primary key. When you first upload your data you will want to go switch over to your database to change data types of the appropriate ones and identify a primary key. Once you have done that you can come back and re-analyze the table. 

Setting the Data Types

This is probably the step that will be the least welcome to those who are not familiar with databases. If you want to do extensive work with data in Drupal then you will want to become familiar enough with phpMyAdmin and MySQL data types to be able to navigate to your database and apply the appropriate settings for each type of data. You should also indicate which field contains the primary key for the table. The primary key is a unique value that identifies each record in a table. If you have a dataset that does not have a column with unique values then consider adding a column unique numeric code in each row. You can name the column something like record_id and then add values like 100001, 100002, 100003 and so on.

Expose the Data Using Tables and Charts

If you have been a good boy or girl and added a single field primary key then the Table Wizard module will let you check a box that is labeled, "Provide default view." This option automatically creates a view that you can expand upon as you see fit. Auto created table wizard views will have the tag "tw" added to them. You can also create a view by navigating to /build/views/add and looking for the radio button in the 'View Type' section that starts with Database table. At this point you need to a thing or two about the Views module to go further. There's not enough space to cover that here so I'm going to skip over the details and point you to the key modules and settings.

The standard views module will let you create a table from your data. You just have to choose a Page display and choose the Table style. You can then choose your fields which will appear as columns within the table. Give the page a Path and perhaps add an Exposed Filter or two to allow users to narrow down the data they are looking at. If you want to get a little fancy you can choose use Views Calc to create tables that include calculations like min, max or average on a set of numeric data.

Charts are a little more tricky but it can be done with the assistance of Charts and Graphs and Views Charts. Charts and Graphs allows you to integrate a number of different free charting solutions (including Google Charts) into your site. View Charts makes those features available as a Style (called "Charts") within the Views interface. The chart gets exposed on a page based on the Path that you define. You can also create a chart within the Block display type. There are other charting modules that exist for Drupal. All of them have some drawbacks but so far the Charts and Graphs/Views Charts combo has worked the best for me.

Offering A Download Option

The ability to download data probably won't be a must have feature for every site. After all someone could probably just copy the table and paste it into their favorite spreadsheet program. It's a nice feature to offer though and you can do it pretty easily with the help of the Views Bonus Pack module. With Views Bonus Pack installed you get the option to add a Feed display within the Views interface. With the Feed display selected you then get the option of setting a Style that includes the option for CSV and other popular formats like TXT, DOC, XLS and XML. You can then attach that display to the Table display and there will be an image that appears at the bottom of the table page that will generate a file download when clicked. Be sure to add the same filters to the CSV display that you have added to the Table display so the downloaded file reflects what the user is seeing with any filters selected. 

The usual caveats apply to the ideas and tips that I've offered here. At any time a better module could come along or an existing module could change and alter the process a bit. So tread lightly and do some exploration before you commit to building a data driven site using Drupal. In fact, even though there was a very recent release of Table Wizard the development is being deprecated in favor of the Data module. I'll continue to upload using Table Wizard for now since I think it works well but also plan on giving the Data module a shot in the near future. 

As always I'd love to hear your thoughts and tips on modules and workflows in the comments. If you have built or know of a good data access website built using Drupal feel free to share those links as well.

Bookmark and Share Bookmark or Share Post

Take Big Action With Views Bulk Operations

Recently I had to plan the unenviable task of adding terms from a new taxonomy category to dozens of nodes that had previously been created on a site. As I pondered my options (including a temporary Caribbean vacation) I remembered module I had seen pop up on Drupal.org called Views Bulk Operations or VBO for short. 

What VBO allows you to do create a view that will apply an action to many nodes at one time. So you must have the Views module installed and it helps to know your way around views a little bit because after installing and enabling VBO you'll need to create a Node view that will allow you to create a list of the nodes that you want to apply actions to.

The view that I created to make the taxonomy updates to the nodes in question had a pair of fields that allowed me to identify the nodes to update. Those fields for Title and Type, as in node type. This was just enough info to know for sure whether or not I wanted to make a change to the node. I added to the view a couple of exposed filters that would allow me to narrow down the list of the nodes by selecting the node type and a string of text from the title. The image below shows you what the finished product looks like.

So with this layout using exposed filters I can then make a couple of choices to filter the list down to the nodes I want to change. Then in the actions to take section I can indicate what I want to do by selecting the appropriate radio button. Then I can select one or more of the vocabularies in order to make that change. In my case I had added a whole new vocabulary with new terms so I chose Add the selected terms and then selected the vocabulary term that I wanted to apply (in this case from the Node Type vocabulary) before selecting the nodes (either one by one or by clicking the box next to Title to select all) then clicking the button (not shown in the image) at the bottom of the page to apply the update. At the end of the process you should see a confirmation that the nodes were updated. At that point you should double check a few of the nodes to make sure the updates were applied as you intended them.

Here's a little more about how I got to the end described above. The image below shows where you would select the style of Bulk Operations which is required for your view to offer you the correct options. Take note that the type of display you're looking for is one of Page. One more important thing to notice is the Access setting. Since this is the kind of function you would only want available to special users make sure you have Access set in a way that limits the ability to get to the page. In my case the user must have the permission to administer content types.

 

The image below shows the many options for the Bulk Operations style choice. Notice that I chose Modify node taxonomy terms as the only option. I don't know enough about the module yet to choose multiple options at once so I just stuck with the one.

The image below is what the preview looked like before I saved and attempted to use the view for the first time. Take note once again of the three elements. 

  1. Exposed filters which allowed me to narrow down the list of nodes
  2. The actions to take which should be consistent with my Bulk Operations settings choices
  3. The fields, Title and Type, which allow me to identify whether or not these are the correct nodes to take action on

Okay, so now you're ready to do some damage (in a good way of course) and make big changes to your nodes in a very short period of time. A final word of caution though. I did all of this on a pre-production site so if I did make a mistake it wouldn't affect site users. If you are trying VBO out for the first time I recommend doing so on a test site so that you can get the hang of what you need to do without having to back out major changes. Of course, if you make the wrong changes using VBO you can always back those changes out....using VBO.

Bookmark and Share Bookmark or Share Post

Managing A Drupal Site On The iPad

For the past couple of months I've had my hands on an Apple iPad and one of the first things I was interested in trying out was how effectively I could manage my Drupal sites with the device. Since I didn't want to jump to hasty conclusions about how good or bad the experience is I've waited all this time to write about it. In general I'll say that it's not a bad experience. The larger screen makes managing your site much more realistic than on the iPhone which I think is nearly an impossible task because of the small screen size. With that said you won't want to sound much time engaging in hard core site building on the iPad either.

Here's what you can do. You can access any menu item even with the Administration Menu module that places a bar at the top of the screen. The drop down menus work fine so you can navigate around very quickly. You can enter text anywhere there is a plain text box. HTML formatting must be accomplished by hand. I haven't tried it yet but one of the modules that adds the correct code for you at the press of a button might make things easier. It's on my to do list to try that. You can move around the administration section and change settings pretty easily. Comment moderation and responding is also very doable especially if you don't rely on a rich text editor. You can create basic blocks and nodes (I'm creating this post on my iPad) as well but the limitations I'll mention in a moment make it a frustrating task for anything beyond basic text entry.

Here's what you can't do. You can't use a WYSIWYG editor in a text area. You can work around that by making sure the "switch to plain text editor" link is available. That allows you to enter plain text but also wipes out the line breaks once you preview the node. So your nodes or blocks will have limited formatting. You also can't access your local file system which means that you can't upload attachments or images. So the expectation should be that you can do basic editing and content creation but nothing fancy. I use the Popups API to make things easier when managing blocks and comments. I've found that the resulting popups don't scroll so that module is not very helpful if you're on the iPad. You also can't scroll within or resize the text input area which makes creating long nodes very difficult. In fact nothing that usually involves clicking and dragging, or hovering the mouse works as far as I can see. In general the experience of managing Drupal via the iPad is a mixed bag. You can get to your site settings, manage comments and create basic nodes and blocks. Since I do my most serious managing of the site at home this level of access works fine for me. I'd like to upgrade the experience though. I suppose it's on Apple to offer access to the file system and perhaps upgrade mobile Safari to work with WYSIWYG editors. Even Google Docs doesn't work yet so we're not alone there.

The bottom line is that there are limitations that prevent anyone from doing serious development on a Drupal site via the iPad. So if you have your heart set on building and creating content on a light weight device then a netbook is a much better choice. So that's my take. If you have suggestions for work arounds, modules or helpful apps I'd love to hear about them in the comments.

Here are some screenshots that I added to this post after creating it on the iPad. From left to right they show what it looks like when editing a block, activating a popup dialog and editing a comment entry, all in landscape mode. I like the landscape mode better for management because it allows me to see the appropriate areas of the screen close up and the keyboard size is much more usable.

Drupal Block Editing on the iPad Drupal pop up dialog on the iPad. Drupal comment editing on the iPad.
Bookmark and Share Bookmark or Share Post

Bringing Your Site Back Online (...And user roles)

 I recently received an email asking me how to bring a Drupal site back online after taking it offline for site maintenance. For those of you who haven't done this yet you can take your site offline (and put it back online) by going to /admin/settings/site-maintenance. If you take your site offline for maintenance, then log out of the site you will get the "Site off-line message" indicated in your settings. To get back into your site all you need to do is go to /user/login. There you will be presented with the login form that you can complete in order to gain entry to your site.

It's important to understand that unless you specifically set the permission for "administer site configuration" under the system module then only user #1 can manage the maintenance status of the site. If you do want to grant this access to another user then you will also probably want to grant access to "access administration pages" as well. A screenshot of the appropriate section of the user permissions page (/admin/user/permissions) is included below.

System Module Permissions

I received another question recently that relates to roles and permissions as well. A reader asked how they could eliminate all of the extra fields below the node body when editing a node. An example of these "extra fields" is shown below.

Vertical Tabs

This is what the node submission form looks like with the vertical tabs module installed. Vertical tabs is highly recommended for Drupal 6 sites. In Drupal 7 this is a core module so you'll have it out of the box. What about the fields though? Users should not see those "extra fields" as long as they don't have the "administer nodes" permission.

If you're concerned about what your users who can contribute content to your site are seeing I recommend that you do two things. First, check your permissions in the Node Module section of the User Permissions page to see what the appropriate role can and cannot do. Second, create a user for yourself with a role equal to that of your contributors. This way you can login with the contributor role and see what they see. The Masquerade module looks like something that would assist with switching on the fly so you don't have to log out and log back in. You can also use separate browsers or use something featured in the Google Chrome web browser called an incognito window.

At this point I think it's worth noting just how important roles are on your Drupal site. They are definitely worth thinking about. Out of the box there are two user roles which are anonymous and authenticated. Those roles are in addition to the everything (or "god") role that is granted to user #1 on the site. If you're going to have a site where people cannot sign up for accounts (configure that at /admin/user/settings) then you won't have to spend too much time on it. Your user setting options are pictured below.

User Settings

If you are going to allow people to sign up for accounts then think hard about the access they will have. If you're in a situation where there will be other administrators or site editors then it is likely that you will want to set up additional roles (do this at /admin/user/roles) to give those users special permissions. For example, if you have people who are editing content or perhaps moderating comments then you would create a separate role, assign the appropriate permissions to the role then assign the role to that user. Roles can be assigned manually in the account page of a user as shown in the picture below.

If you want roles to be assigned automatically I suggest that you investigate the Auto Assign Role module. I haven't used it yet but I have it on my list of modules to try for another site that I am working on.

If you have any ideas, tips or tricks related to user roles I'd love to hear about them in the comments.

Bookmark and Share Bookmark or Share Post

Albany Drupal Meetup Notes

The first quarterly (hopefully ) Drupal meetup for the Albany, NY group took place last Saturday. Seven people from the upstate New York area attended and there was a lot of really good discussion about Drupal. Here's a summary of some of the things that we discussed.

Drupal for Educators

One member of the group was interested in using Drupal in an education setting. There was a discussion of whether or not Joomla or Drupal would best meet this person's needs. It's not surprising that we all felt Drupal was a great choice. That said I think it's important to be able to clearly and concisely make the value proposition for Drupal vs. other platforms such as Joomla and WordPress. Like anything else if we want Drupal to grow in a competitive environment then we need to know how to sell Drupal.

I recommended joining the Drupal in Education group for active discussion with people who are using Drupal for education on a daily basis. I also recommended checking out Moodle Integration which can add learning management features to a Drupal site. After the meeting I also discovered another Drupal 4 Educators site. There are also plenty of sites to be found via a Google search on "Drupal, Education."

Authentication and Identity

This was a topic that I initiated and lead the discussion on and it was inspired by my recent post about my Adventures in Authentication. This is a topic that everyone is interested in but for different reasons. From an educational point of view it seems that Facebook authentication is most important. There's also the issue of schools only wanting verified students and teachers to be able to sign up. Both security and process are very important. My needs are more general. I want to widen access to site features, build community and also cut down on spam and trolls. 

One very good point was made about consistency of the various APIs made available by the social services. It's hard to have consistent authentication and sharing functionality across services (Twitter, Facebook, Google, LinkedIn, etc.) because of differing API functionality. So while you may need different code in order to connect with each service you will also have different feature sets made available. 

Multi Site Support

I have received a number of queries on this site about how to run multiple domains off of a single Drupal install. This is something you might do if you have yoursite.com and want to also add community.yoursite.com, and allow visitors to have the same account across both sites. The Domain Access module was mentioned as a very good module to use for this purpose. A recent Lullabot blog post shows you how to do it without using a contributed module.

Code Management

Code management is very important for those who are managing very complex sites and maintaining multiple environments. For example, a site administrator might have environments for development, test and production. It's a challenge to keep track of code in those situations. The challenges become even greater when you have multiple sites to manage with multiple environments for each site. Drush was mentioned as a tool to help streamline the module update process. I'm drawing a blank on some of the other tools discussed (Note to self: Take notes next time!) but I found a discussion on Drupal groups called Code Deployment and Build Management that includes a few links to useful contributed modules.

Other Topics

The subject of hosting was discussed and most agreed that shared hosting is for the birds. People differed on their preference for hosting providers. Nothing new there. Virtual Private (or Virtual Dedicated) Servers are coming down in cost (Media Temple, $50/mo. | Dreamhost, $25/mo.) and the performance improvements are worth it. When talking hosting I mentioned Acquia's Drupal Gardens which is now in private beta as an option for those who want to get started quickly with minimum technical knowledge. I also introduced the group to the newly released Fusion themes for Drupal. I am using Fusion/Skinr/Acquia Prosper on Learn By The Drop and the combination has really been awesome in helping me organize and redesign the site.

Final Thoughts

Communicating with the world online is great but these offline (aka face-to-face) interactions are so crucial for networking, community building, and knowledge sharing. So I want to thank Julie Johnson from the Kinderhook Memorial Library for organizing the gathering. It's really worth the time that people put into planning and attending these types of Drupal events so consider organizing or attending one in your local area if you have the time.

Bookmark and Share Bookmark or Share Post

Write About Drupal - And Get Paid For It

I have a lot of ideas about what people want (or need) to learn when it comes to Drupal. My ideas are a function of what I want to do with Drupal and this strongly influences the things that I research, learn, then teach others. My research reveals that there are a lot more things that people want to learn about Drupal. Certainly more than I can offer personally on this site. There are many good Drupal sites and blogs out there but I also know that many people who are working with Drupal and have ideas about the platform are not blogging about Drupal for a variety of reasons. It would be nice to hear from people in that situation because I think they could bring a lot of good knowledge to the table. There are also situations where people are writing about Drupal but their site might not have the reach they would like since they spend most of their time doing other things. Either way, I'd like to be able to help these folks get their knowledge to the wider community.

What I would like to do is create a platform for people who want to write about Drupal so they can reach the wider community and do so without either having to set up their own separate website or spend an inordinate amount of time promoting their own site. At the present time (according to Google Analytics) this site receives about 75,000 page views per month from 23,000 unique visitors. We also have over 900 subscribers to the main FeedBurner Feed and syndication via Drupal Planet. So what gets written here tends to get seen by a decent audience. I'd like to give you the opportunity to get your Drupal ideas, opinions, tutorials, etc. in front of that audience. If you write something good and I decide to publish it here I will pay you for it.

Bookmark and Share Bookmark or Share Post

Adventures In Authentication

A Capital Region Drupal meetup (the first of its kind I believe) is scheduled for March 6th and I hope to be able to talk about authentication and identity. Just a couple of years ago the issue of authentication and identity on Drupal sites was limited to the functions of the Drupal login system. I remember that the first module I ever utilized to improve the login process was LoginToboggan. LoginToboggan adds such nifty features as logging in with name or email address, placing a login form on pages not accessible to anonymous users and much more. It's a great module and I still use it today. Since then we've also seen a few social networks like Twitter and Facebook increase greatly in popularity. So while millions of people create accounts on those services they may not necessarily want to create an account (and have to remember another password) on your Drupal powered site.

Lucky for us Drupal site builders that the big social networking players realized that in order to get even bigger they would need to reach out to other sites. They have done so via APIs such as Facebook Connect, the Twitter API and Google Friend Connect. All three of these services allow someone to login to a website with their credentials from each of these services. So this allows people to log in to your Drupal site with their identity from Facebook, Google, or Twitter. Pretty cool, eh? All you need are the modules that make the connection between your site and these services.

Modules do exist for each of the three services mentioned above. Facebook Connect, Twitter, and Google Friend Connect all allow you to authenticate users to your site. They require varying degrees of technical expertise to set up and the exact functionality varies too. The good part is that they all seem to excel at verifying the identity of an anonymous visitor to your site, at least temporarily. The bad part is that they really don't fit in with the normal Drupal account creation process. If you're just looking for someone to be able to authenticate temporarily to add a comment they work great. If you want someone to be able to quickly create a full account, with access to all of the features of your site, with Google, Facebook or Twitter credentials then the modules fall short. What seems to work best is a hybrid approach where a user first creates an account on your site and then later connects to their account on the social network. After that they can log in with one of these services (provided you add the right links) and get all the benefits of a member of your site.

Bookmark and Share Bookmark or Share Post

Making Drupal Easier

In my capacity running this site I get a steady stream of inquiries and requests for assistance with everything from initial installs to theme issues to the configuration of modules and more. I have to admit that while I do the best I can to offer advice on these issues many of them are outside the scope of my knowledge. In fact, sometimes when I get inquiries I'm struck by two thoughts that underscore the nature of Drupal. The first thought is that I have a lot to learn. The second thought is that Drupal is one complex system. These thoughts lead me to some blanket advice that I believe can help a lot of people who are just getting into Drupal and scratching their heads about how to tackle what may seem like a monster task.

As I said I have a lot to learn about Drupal. This is after almost four years of building sites with the platform. So the first pieces of advice that with help the hike up Mount Drupal easier are to expect to keep on hiking and focus on the ground in front of you. To put it in clearer language, Drupal requires continuous learning and it's best to focus on learning what you need to know now instead of being in awe of all that you've yet to learn. This situation is not unique to Drupal. The necessity for constant learning is required with any system that is being constantly improved. This is worth pointing out because every day more people are getting introduced to Drupal who came from a world of closed source systems or html-based, non-dynamic websites. What was once relatively static is now a moving target...forever!

A Commitment To Learning

So a commitment to open source web systems is a commitment to learning. I think that Drupal is a complex system. It's also a powerful system and because of that you can do great things with it. I think what draws people to Drupal tends to be the shortcomings of other systems (I once heard someone say that WordPress was like a gateway drug for future Drupal developers) as well as the well known possibilities of Drupal. Those possibilities come with an overhead though. That's why some other advice I would give to people who are new to Drupal is to spend three hours learning for every hour that you try to do something with Drupal. There's no science in that ratio but I've come to believe that initially that this works better than if you flip it around and spend three hours of doing for every hour of learning. 

As far as I'm concerned toying around on a development site is akin to learning. I'm surprised at how many emails I get that start out with something like, "I'm new to Drupal and working on a site for a client..." For the clients sake I say this. Build that learning time into the development estimate. Because it's better to take longer and get it right than to rush it and force inferior process or functionality on the client. Drupal is just not a start today, launch next week (or even next month) system if you're not very familiar with it. The extra time for learning is worth it. It's worth waiting a few months to launch a site that you can be confident does what you want it to do while at the same time you're confident that you can manage it. What's the down side of this approach? The only possible downside is that you spend all this time and Drupal ends up going away or falling apart somehow. That's not happening. So what you're doing is making a valuable investment in the future of how systems are developed on the web.

Focus On The Task At Hand

Then there's the second part about putting your head down and focusing on the ground in front of you. The world of Drupal code is vast. Just look at all the modules on Drupal.org. There are more every day. And older ones are being improved upon to add new functionality. What that means is that if you are new to Drupal and you are keen on packing your first site launch with every feature found in Facebook or MySpace then you're going to run into trouble. Start a list of things that you would like people to be able to accomplish on your site. Prioritize that list and then focus on the top three things. Research the possibilities for making those three things work very well. If you can't make one of those things work well then skip it and pick up number four on the list. Keep in mind that you're implementing these things in addition to getting used to the core Drupal functions like administering the site. You are much better off launching a site with three things that work rock solid than ten things that work half way. You'll be swamped. You'll feel overwhelmed. And you might blame Drupal. Blaming Drupal for being overwhelmed is like blaming a mountain for how high it is. Drupal mountain is big. Take it one step at a time and you'll enjoy the hike.

Get To Know The Admin Functions

I have some other advice to offer. When you first get started with Drupal take a stroll through the admin section. Click on every link you can find in the core admin section. Study each page so that you can see what's available. Perhaps make notes about things you don't understand about the interface or the available options. There's a lot going on in the back end. All of it is important to the site that you will create and maintain for many years perhaps. I know that there is an urge to start doing something more right away. I've been there so I can't point fingers. But when you're done doing whatever it is come back and make a point of clicking all of those links. I've gotten so many notes from people who had probably slapped their foreheads after I pointed some simple out. My responses are usually delayed so I always hope that they were able to find out via Drupal.org or some other Drupal forum. That investment of time in the admin area can hopefully prevent some undue frustration.

My hope is that the advice in this post can help to make the transition to Drupal easier for some people. There's another more universal benefit of all this effort as well. In many ways the situation with Drupal mirrors other parts of our lives. Drupal is constantly changing. So are our lives. New functionality is constantly appearing just as new opportunities and tools are popping up in our lives. Change and complexity is all around us. So learning to slow down, be patient and embrace learning, especially in the early phases of introduction, is a very good thing. The benefits of such an approach extend to other areas. At least I think so. Oh, and one more thing. Have fun with it. Drupal should be fun. If it isn't then perhaps it's time to slow down and focus on the fundamentals.

I'll conclude by letting you know that I consider myself to be about as average as any person who builds Drupal sites can be. I've done some programming in my time but never PHP. I used to work with Dreamweaver, like so many have, but even then I wasn't a web developer by trade. These are the philosophies that have helped me, as a non-developer, get to the point where I can make some things happen with the Drupal platform. There's lots of other sage advice to be had especially at in-person Drupal meetups and on Drupal.org. This is just one more drop into the sea of Drupal advice because the goal of this site is to help you learn one drop at a time.

Bookmark and Share Bookmark or Share Post

Options For Managing Comments

Comments are the lifeblood of most websites that aim to be social. Drupal based sites are no exception. In fact the feedback I'm seeing is that many people who are new to Drupal get involved with it because building a robust social network using Drupal is easier than something like WordPress which is heavily focused on blogging. That doesn't mean that you won't have to put some thought into how to set up your commenting if you're building a Drupal site.
 

I like Drupal's built in comment system. It has nice features like threaded comments,  a comment approval section, search indexing of comments and the ability to turn comments on and off for each individual node. Out of the box the comments are very usable for low traffic websites. But if you expect a lot of activity on your site then your comment needs will require putting more thought into how you set things up. Your first big choice will be to decide whether you should build on the existing comment system using contributed modules or if you should use a 3rd party commenting system like Disqus, JS-Kit Echo or IntenseDebate.

If Drupal's built in comments are so good then why even think about shutting them off? As good as the comments are they don't necessarily meet all the needs you might have. For example, if you expect a lot of commenting but don't want to have to do a lot of maintenance and configuration on your Drupal site then a 3rd party system might be good for you. Let's say you want site visitors to be able to authenticate themselves using Google Friend Connect, Facebook or Twitter which are the most popular social networking services in the U.S. right now. You could utilize at least two contributed modules to make your site do that. But you would also spend quite a bit more time doing that than you would just configuring the Disqus module which gives you all of those features which are available via the free (for now) Disqus service. You can see a sample of how Disqus integrates on the module developer's site here. Another attractive feature typically included in these systems involves notifications. Moderators and comments can either subscribe to comments via an RSS feed or by email. Notification features can help to create a community on your site and keep people coming back for repeat visits.

The mileage you get out of 3rd party commenting systems will vary. When you opt for an outsourced approach for such a large portion of your site you also lose some control. Most services will keep a backup of your comments in case you decide to switch back to your native comment system. That doesn't mean that re-importing the comments back into Drupal will be easy. Your site may also be affected by the performance of the servers of the 3rd party service. If their servers have a problem then your site will likely load slowly or comments might not show up at all. So be aware of the trade offs.

If you want people to create accounts on your site in order to comment then you'll want to stick with the core comment system. The 3rd party offerings may authenticate users but they don't create a user profile on your site. If that's the way you're going then there are some contributed modules that you'll want to know about that can enhance the core Drupal commenting experience.

Identity

These modules help to establish the identity of commenters on your site.

Spam

These modules help to limit the effects of spam on your site.

  • Mollom - Offers spam filtering via text analysis and captcha presentation.
  • AntiSpam - Offers access to the Akismet, Defensio and TypePad spam filtering services.
  • Captcha - Allows you to present a CAPTCHA (which is a challenge image) to commenters.
  • Comment Lockdown - Applies a set of rules that make it harder for comment spam to get through.

Notification and Moderation

These modules provide notifications of new comments and assist with moderation.

  • Comment Notify - Allows registered and anonymous users to get comment notifications via email.
  • Watcher - Similar to Comment Notify.
  • Comment Moderation - Adds features that improve the comment moderation workflow.

So you've been presented with a lot of options here. The modules listed above certainly don't represent a complete list. You're welcome to link to your favorite ones in the comments. The approach you take will depend on the goals you have for your site, the number of comments you receive and your level of technical knowledge with respect to Drupal and the 3rd party services (such as Disqus) and APIs (such as Facebook Connect) that I've mentioned. 

Bookmark and Share Bookmark or Share Post

WYSIWYG Editors: Issues And Options

The WYSIWYG (stands for What You See Is What You Get) editor is one of the most important features of any content management system. It's the glue that allows html neophytes (present company included) to format their posts just right without having to delve into the html code itself. The screen captures below show what the beginning of this post looks like with and without the editor.
 
Without the Editor
 
With the Editor

The difference in the ouput of the two editors this particular post is subtle because I haven't added any extras (such as bold, italics, or alignment) to that first paragraph. But I think many people (especially folks new to web development) will agree that the wysiwyg editor view is more familiar and more inviting when it comes to creating content. There are certainly many more possibilities for those who don't have html skills.

Which Editor?
As of Drupal 6 there isn't a wysiwyg editor that is part of the core release. So that means if you want to have pretty post editing then you'll need to select a module of choice, install, configure and hope like heck that it works for you. But what editor to choose? Some of the more popular ones are FCKeditor (seen in the screenshot above), TinyMCE and BUEditor. Because this is open source the landscape with respect to wysiwyg changes over time. FCKeditor still works with Drupal but there's a new version called CKeditor that represents the next generation. Another interesting but less popular option is Whizzywig.

Once you've made your choice of editor then you need to get it installed and configured which is not necessarily the simplest task. In the case of FCKeditor and TinyMCE you download the actual editor separately from the module then upload the files to somewhere in the directory of the module. This is a step that often causes a bit of confusion. Thankfullly there's now a module called Wysiwyg that eases the integration process for these editors. If you use Wysiwyg then you can just upload the editor's files to the sites/all/libraries folder which you would create and then use the Wysiwyg module to configure the editor. Wysiwyg makes it simple to try out different editors and it supports the most popular editors.

Having tried installing different wysiwyg editors as both standalone modules and via the Wysiwyg module I've come to the conclusion that the Wysiwyg module is the way to go. The one issue that I have had with the Wysiwyg module is the fact that you may not have access to all of the various configuration settings that you would if you installed the standalone editor module. The upside is that you have a much simpler install and configuration process.

Let's Talk Images
The inclusion of images is a very important topic that comes up when discussing wysiwyg. Content creators want a simple way to include images in their posts. Most editors make it easy to link to an image but uploading and inserting images into posts typically causes problems. IMCE (installed on over 60,000 Drupal sites) is a very popular option that works well for me. There are some headaches that occur when using IMCE with a standalone editor module. This is where the Wysiwyg module offers additional benefits. The IMCE Wysiwyg Bridge allows you to easily use IMCE along with your editors that are enabled via the Wysiwyg module. For the moment this only applies to TinyMCE and FCKeditor but it could change in the future.

It's worth noting that I think that IMCE works best when using it for inserting images into posts and not when you're looking to create a standalone image gallery. Because while IMCE does do thumbnails it doesn't create galleries or cover more advanced actions like cropping and watermarking.

Beware Input Formats
Input formats are something that you want to consider when using wysiwyg editors. Drupal comes standard with 3 input formats, Filtered HTML, Full HTML and PHP code. For the most part if you're editing posts with a wysiwyg editor and insterting images then you want to use Full HTML. Notice that I said you want to use Full HTML. What about your users? If people are signing up to write blog posts then you probably want them to use Full HTML too. But if you allow anonymous comments you probably want to have a more restrictive format like Filtered HTML that only allows certain tags.

Input formats can be a very complex topic. Make things easier for yourself and have a look at the Better Formats module. Better formats offers you more flexibility with your input formats for content types. My favorite feature is that it allows you to specifically assign an input format per role. The simplest example of this is giving authenticated (signed in) users access to Full HTML and giving anonymous (not signed in) users access to Filtered HTML. It also gives you separate options for nodes and comments. This is very helpful and allows you to fine tune your content editing much more than allowed by the core features.

Drupal 7 And Beyond
It appears at this time that Drupal 7 does not include a wysiwyg editor by default. A recent post I saw indicates that there will be, "Improved support for integration of WYSIWYG editors." That being the case installing and configuring wysiwyg editors will continue to be an important skill for some time in the future for Drupal site developers. Whether or not that's a good thing or a bad thing will depend on who you ask. Hard core, old school developers would probably rather choose and configure the editor they like best rather than being stuck with what the Drupal community decides is the best option. People newer to Drupal development would probably prefer a default editor that also handles post images as well. I think that a good compromise would be to have a default editor that admistrators can choose to disable in favor of a different editor.

If this is a subject that you're passionate or curious about then see the Wysiwyg group over on Drupal.org. Lots of good information and discussion over there.

Additional Learning

Bookmark and Share Bookmark or Share Post
Syndicate content