Drupal related posts by Gábor Hojtsy.

Michael Peacock's "Selling online with Drupal e-Commerce" by Packt Publishing

Drupal e-Commerce book coverPackt Publishing is continually coming out with Drupal books for different verticals. They have a "Drupal for Education and E-Learning" title coming up, they sell the "Drupal Multimedia" title, and they are spot on with "Selling online with Drupal e-Commerce". Their target is the beginner who might have chosen another e-commerce software, and would only choose Drupal if directed from start to end to build user registrations, static pages and the e-commerce functionality itself.

Interestingly the original announcement of the book on Drupal.org spurred a lot of "why a book about a dead module, write about Ubercart instead". But this book is a testament that Drupal is really open, and the two competing (huge) module sets for e-commerce: Ubercart and e-Commerce are both moving along and worth evaluating.

Coincidentally I got this book for review just I was about to build the registration cart/wizard/payment interface for Drupalcon Szeged. We were in talks with Ryan Szrama from Ubercart who was about to sign up to help out with our payment system, I've been reading the book on the competing module suite, and at the end decided to assemble a custom built Signup, Signup Status and Simple Paypal modules based solution. I would not suggest you to go on a custom module set route unless you see your requirements really clearly, and feel adventurous enough to build an exceptionally tailored system for your own needs. (In our case, it turned out that our model was not as fitting to practice as we thought so, and an Ubercart / e-Commerce based system might have been a better fit). Generally, I'd suggest you to just grab a cookbook like this one and play along.

Because this book starts from the beginning and builds up a shop from the ground up, it will be useful to you even if you are not going to use e-commerce, but instead would take Ubercart. Some concepts will be a bit different, but you'll get an understanding of the issues involved with building a shop, including permissions, roles, branding, tax rules, payment and shipping details, securing sites and marketing the business. There is a lot of value in this book for beginner Drupal site builders beyond dealing with the e-commerce module itself. Basic concepts such as Drupal content and user management are explained, so that you can just take this book without buying a few hundred more pages on generic Drupal site building. On the other hand, appropriate contributed modules like Taxonomy Access Control, Image, Image Attach, CAPTCHA, Legal, Login Security, etc. are used and explained briefly where necessary. Of course this also means that if you need specific information on things such as Drupal theming, you'll need to refer to other resources, but that's not a pre-requisite to building a shop, right?

All-in-all, I'd suggest you to read this book, if you are a Drupal beginner looking to set up shop on the internet, or a somewhat experienced Drupal user, who never built a complex e-commerce site yet.

I am invited to speak at "Do It With Drupal"

A little bit before Drupalcon Szeged 2008, I was invited to take part in Lullabot's event, called Do It With Drupal. Being a co-lead for Drupalcon Szeged, I was completely overwhelmed with organization stuff there, but now that it was well done, I can move over to planning for future events.

Do it With Drupal website header

Do It With Drupal is going to be held in New Orleans, mid-December this year, and is basically a three day training event. Or as the FAQ puts it, it "is an expansion on the Lullabot workshops. Attendees can get much more in-depth and topic-specific information [compared to] the workshops. [...] Do It With Drupal is a very learning-focused event." I was invited to speak about multilanguage solutions, and I am going to again join the company of speakers such as Earl Miles, Karen Stevenson, Ryan Szrama, Moshe Weitzman, John VanDyk, just to name a few.

This event is quite a bit different to a Drupalcon, Do It With Drupal works with invited speakers whose hotel rooms and some of the travel costs are covered, and this is offset by having quite a bit higher entrance fees for attendees (starting at $795) on the other end. While Drupalcon's are characterized by anyone being able to be involved via BoFs and adhoc meetings, this event is about cherry-picking mainstream topics and closing in on them, so you get a different and very tight focus. This is the first event of this kind, and I am excited to see how this model works out. I am looking forward to be there and be involved.

Drupal Conference Hungary is on: November 15th in Budapest

As it turns out István Palócz, a lead in the Hungarian Drupal community was just energized again by Drupalcon Szeged 2008, and would not let the Hungarian community to skip this year's Hungarian Drupal Conference (you might call it a Drupalcamp). He already announced the date to be November 15th, and the location to be the usual Central European University Conference Venue in Budapest, which was the host of our previous local Drupal conferences the past years.

Do not let WYSIWYG editors rule our textareas!

Dries said (again) in his State of Drupal keynote this past week that a whole lot of people want WYSIWYG editors in Drupal. He also highlighted FCKeditor as the most popular one used for this job in the Drupal community (based on call-home data from Update Status module). So you'd say this is just too easy, move FCKeditor to core and we are done. Well, going the simple and quick way would just alienate those from RTEs (another nice acronym for these editors), because these editors are just too aggressive when it comes to pushing themselves to your face.

FCKeditor profile configuration screen annotatedThe assumption in these editors is to treat all textareas as fields with HTML input by default, so you'll obviously need the HTML editor on them. But this is not the case. In previous times, if you installed an RTE, and went to a block's configuration page, the textarea where you can provide a list of paths on where the block will show/hide was taken over by the RTE. Through time, the RTE authors realized this is a problem and built in tools to limit their reach. If you look FCKeditor's profile editing interface (image on the right), you'll find settings to exclude certain form item IDs from FCKeditor's work. But who knows the form IDs? Well, FCKeditor authors built a tool which tells you about the form IDs on forms, eg. on the block configuration page, it says: The ID for excluding or including this element is: edit-pages - the path is: admin/build/block/configure/user/1. Then if you need to modify your configuration on this field, you need to remember these values, go over to the linked "excluding or including" page and alter the list of items there.

There are a couple of flaws with this approach:

  • End users need to deal with (internal) form item IDs to configure their site for forms which are not covered by the default settings.
  • What guarantees that "edit-pages" will not be used as a form ID for HTML input in another form? Nothing. If we block it out, we block it out in all forms.
  • Blacklisting keeps textareas open to FCKeditor by default, so if a contrib module comes requiring text input in a field, there is no way to tell RTEs not to process that field, the user will face the pushy RTE and submit a bug against the contrib module such as http://drupal.org/node/293502 (and will get users hack as hell).
  • If this all was not enough, FCKeditor also has a simplified toolbar view, which is used for text input using the filtered XSS admin processor (when input format is not selected, but some HTML is still allowed). Again end users set up which textareas are using this method (beyond some defaults included). How they get to know that? Well, trial and error, or they need to look into the code.

All these ugly hassles for the end user, while we programmers know exactly that input from a textarea will be plain text (eg. email text, a list of paths), passed through filter XSS admin or filtered via one of the input filters set up. Not only that, but we know if a textarea is passed through input filters and the particular input filter used escapes HTML, it is pointless to display an RTE for HTML. So it is not only the page the textarea was displayed on, it is not only the ID of the textarea, it is also the properties of the selected input format for that textarea (when applicable) which defines whether FCKeditor should be there or not.

These are all things programmers can tell Drupal about without any user interaction, completely removing these settings and making WYSIWYG editing really seamless for the user. How do we tell Drupal what type of input is on the textarea? Well, we tell it to use a specific format. There are two competing proposals on how this should work, both in the issue: Textarea with input format attached. If you care about WYSIWYG editors in Drupal core (for Drupal 7), please help do quality reviews and provide feedback on the approaches proposed. This is a prerequisite to making RTEs integrate seamlessly to Drupal.

I will teach you port templates to Drupal 6 themes

If being a co-lead organizer for Drupalcon Szeged 2008, getting married in three weeks, moving flats and of course building products and services with Acquia would not be enough, I thought I'd top my Drupalcon participation with a nice surprise session submission.

If my session makes it (vote!), and you come to Drupalcon Szeged (you should), I'll teach you how can you convert an existing HTML/CSS template to a Drupal 6 theme in a matter of 45 minutes, with the full live demo from the ground up included with instructions. I've managed to do this before, so I am confident it should be lots of fun. We will break our Drupal site numerous times, and learn to live with it while the tough time constraints are looming on us, and should of course get to a gorgeous end result. We will convert the Modern World template by Solucija and will get to a Drupal 6 theme with blocks, menus a theme screenshot and all.

I'll also tell you how can you contribute the theme to drupal.org or through other means if the template license does not allow you to upload to drupal.org. This is of course not a requirement, since you might as well only work for your own client. You decide!

Just make sure to vote on my session, to help me get into the program and come to Drupalcon not only for this great session, but all the other fun programs which are on offer. You definitely should not miss it!