drupal

Spam comments with Mollom

I have used the free Mollom plan to protect the forms on this site with CAPTCHA or text analysis. For the past few months, it has been working very poorly to be honest. Comment posts that were very obviously spam were getting though consistently and I have been removing 20-30 spam posts en masse about once a week.

I submitted a ticket when I first noticed this happening with Mollom support and got a quick reply, but after my initial replies the request was waiting a follow-up from them for quite some time (and twice, at that).

Today I got news that it was a service-wide issue and it has been resolved. Hopefully you will notice a significant reduction in spam posts! Honestly I am not very happy with Mollom at the moment and may look to other alternatives if this doesn't pan out, but then again it's a free service and it worked wonderfully in the past so I can't complain. You get what you pay for.

The issue was more that I was looking at taking 5-10 clients to their basic paid plan, but after my experience with their customer service I am hesitant to do so. As always, I guess time will tell.

Rating: 

Bootstrap responsive theme

I have been reading a lot of buzz around Twitter's Bootstrap responsive theme and although I am a huge fan of the Omega theme, I think bootstrap has a lot of potential and wanted to experiment with it.

My blog is long overdue for a facelift, so I now present to you my Bootstrap-ized blog! At the moment it is simply using the base theme, but I will be implementing a customized sub-theme shortly. I am interested to hear what you think (and if it does or doesn't work on mobile devices) in the comments!

Update 2013-02-08: I have performed minimal customization to the theme and after working with it for a bit I can start to see Bootstrap's strengths and weaknesses. Although Omega is very flexible and has a bunch of responsive options, I feel like they could use a little more polish; Bootstrap's responsive design implementation feels so quick and smooth and it also scales well at all viewport sizes. I also like Bootstrap's barebone styles (font, text layout, etc) much better than Omega's defaults which I believe use serif fonts (*ugh*). That said, such a thing is very easy to change in CSS and so it's not a huge disadvantage for Omega.

Where Omega also beats Bootstrap (and by a large margin) is when it comes to theme customizability. The Bootstrap theme settings page offers few options and in several instances I found that several common Drupal-specific CSS rules (such .indent) were missing entirely. Omega has been around for quite some time and as a result has excellent integration and provides a plethora options to modify the zone, region and block grid right the theme's settings page.

If I had to do it over I would stick to Omega, but Bootstrap will be giving it a run for its money once it picks up on some of the grid customization tricks Omega has.

Rating: 

GEMS at Apps for Energy

** Vote for us here! **

At my work we have been developing a new website called the Green Energy Management System (GEMS) that targets small businesses and helps them perform quick and cost-effective self-energy audits. With the results, they are able to determine their estimated cost savings as well as view recommended energy conservation measures (ECMs) to help lessen their environmental impact.

We have submitted the project in the Apps for Energy contest and could receive additional funding for development if we place! If you have a minute please vote for us, it would be very much appreciated!

Rating: 

Twitter Integration

After giving it some thought, I think I am going to try and integrate my Tweets (@stewartadam) with the blog posts here since my blog posts tend to be lengthy or technical posts one in a while with nothing in between. I tweet about once a day or so, so even if it's not much at least there will be some new content consistently when you check back to the homepage! Thoughts? Module suggestions? I know that this is easily possible with Drupal, but I haven't begun looking into competing modules yet. If you've done something similar I'd love to hear about the module you used and what you think about it overall.

Rating: 

New module: uc_cano forked as uc_conditional_attributes

I have been using uc_cano on a few Ubercart sites and found that it is a great module for restricting attributes combinations when one attribute only makes sense if a certain option is selected on another attribute. Unfortunately, the module is very minimally maintained and there are many bugs present in the most recent release. Several community patches have shown up to fix some of the issues, but they need to be mixed and matched to get a working module. Furthermore, out of the box uc_cano is not compatible with the uc_node_checkout nor uc_aac modules.

In order to future centralize development efforts, facilitate releases and maintain a more up-to-date code base, I have collected the various community contributions plus written several fixes of my own and forked uc_cano as uc_conditional_attributes, now available on Drupal.org at http://drupal.org/project/uc_conditional_attributes. I hope you enjoy the new module! A dev release is available and I am hoping to add the first stable release soon after two known bugs are taken care of.

Some the changes I have made to cano include:

  • Rewrite of the JavaScript code and the addition of hooks
  • Addition of a new hooks & preliminary API for other modules to use
  • Compatibility with uc_aac (patch also required to uc_aac until it gets accepted upstream)
  • Compatibility with uc_node_checkout
Rating: 

Drupal module & patch work

I have been working closely with a company in the United States called Grindflow Management LLC (grindflow.com) on several Web projects including a few Drupal sites. I'm excited to say that over the holidays I had a chance to finally put together some of the patches and modules we worked on! More details on each below.

Patches

  • Add support for simultaneous display of multiple product nodes on one page. (#1377310)
    This patch for uc_option_images resolves the problem where uc_option_image would cease to function if multiple nodes were displayed on one page (for example, if promoted to the front page or if displayed in a View). The issue here was that drupal_add_js() in Drupal 6.x has an annoying bug (feature?) where array_merge_recursive() is used when the same JavaScript settings data is added multiple times. The code that generates the settings in uc_option_image (validly) has no idea if you're going to be displaying one node or ten, so each time the settings data for a node is generated is must be merged and the merging caused all sorts of weird duplicate data with invalid offsets. The workaround to the drupal_add-js() problem was to use a static array to ensure that the global settings only get added once, and to use string key indexes for the node settings data so that array_merge_recursive() would not attempt to merge them as numerical indexes.
  • UC Option Image doesn't work with required attributes (#1377310)
    This bug, also in uc_option_images, was due to the fact that the uc_option_image attempts to analyst the first attribute and preload the set option image for its default value if applicable. The problem with required attributes is that they don't have a default value, so an attempt to generate the default image would always fail. This failure meant that there was no HTML img element generated, so future calls to switch the option image also failed since there was no img element to operate on in the first place. Fixed by defaulting to the 'no image' if analyzing the first attribute fails.
  • Compatibility with Ubercart Ajax Attribute Calculations module (#1377310)
    Yet another one for uc_option_image, this patch adds uc_aac compatibility by changing uc_option_image's JavaScript code to work with Drupal Behaviours. Previously, the code would only run once upon page load so when uc_aac changed the DOM, uc_option_image would break. Using Drupal Behaviours also means paying attention to the 'context' variable, which also played a role in making multiple products on a single page work.
  • Some hooks and form handlers have not been updated for Drupal 6 (#1377310)
    The uc_invite_discount was originally written for 5.x and many portions were not updated for Drupal 6.x, leaving it rather broken. This patch fixed these issues and made it confirm to 6.x code style standards.
  • Preserve attributes from product form when redirecting anonymous users to node checkout form after logging in (#1376864)
    This bug in uc_node_checkout makes it so that anonymous users logging in get redirected back to the product configuration form with the attribute data preserved. Prior to this patch, users would get redirected to the node successfully but their selection of attributes was erased and they would have to start over.

Modules

  • Ubercart Attribute Per Role: http://drupal.org/project/uc_attribute_per_role
    This project allows site administrators to choose attributes that they would like hidden from display based on the user's active roles. For example, a 'gift wrap' attribute could be shown to retail (anonymous/authenticated) users but a definition could be added to hide this attribute for members of the 'wholesaler' role.

  • Clean Module List: http://drupal.org/project/clean_module_list
    This module is a very simple module that with the help from a bit of JavaScript, hides the dependency information (Depends on/Requires/Required by) in the module list and provides a controls to dynamically show/hide the information without a page reload. It can be used in conjunction with module_filter to provide an even cleaner and more searchable module list.
  • Ubercart Chained Attributes and Options (CANO): http://drupal.org/sandbox/firewing1/1374824
    This sandbox is the temporary home for the uc_cano project until I promote it to a full project. It is the continued development of the original module posted by Vizteck Solutions here. The code base is rather stagnant at the moment and I have a few bug fixes and feature improvements planned, so I am in touch with the original sponsor and developers of the module to ensure that all parties agree to move the new code to Drupal.org.
  • Ubercart Pay After Checkout: http://drupal.org/sandbox/firewing1/1229572
    I have written about this one before, uc_payafter allows users to pay for a product after checkout. It supports a configurable set of checkout panes just like the original checkout process does, so you can choose which panes appear during the initial checkout and during the payment (payafter) checkout processes. I am hoping to get the chance to refactor some of the code soon to reduce code duplication. Once that's done, I will promote it to a full project.
Rating: 

Exams are done!

Hurray, another semester of school finished. Sorry for being such a hermit lately... Second half of the semester didn't leave me with much spare time between assignments and work.

That said, please do check back in a few days for a new post! I have a bit of a queue to work through for the holiday break, but I have a several new Drupal modules written and several more patches that I will be uploading to drupal.org and writing about here.

Rating: 

Ubercart modules: Manual shipping quote & payment after checkout

I have been working with a client to setup an Ubercart store customized to their needs and one of the things we came across as we launched the store is that because of the nature of the items being sold, it was very difficult to give a accurate shipping estimate. Thus, I set off to find a way to enable customer payments after checkout and to enter the shipping quotes manually.

These two modules, uc_manual_shipping and uc_payafter, are the fruit of these efforts. I hope you find them useful!

Note that this is my first release of these modules and the code should be considered a beta and work in progress. They are untested so far and not recommended for use on a production site just yet. All information about installation, configuration and further development is available in the README.txt file, DEVELOPERS.txt file and/or source code comments. If you have made some changes or improvements, please let me know in the comments! I would love to hear about your changes and I would be more than happy to apply any patches or bugfixes.

uc_manual_shipping enables the store administrators to manually enter shipping quotes on orders after a user has passed through checkout. It can be used in combination with uc_payafter to have users create go through regular checkout without paying, and then pay later once a shipping quote has been submitted by a store administrator.
Download uc_manual_shipping-6.x-1.0.tar.gz

uc_payafter duplicates the checkout process and allows users to perform payments on their orders after checkout at the URL cart/checkout/pay/$ORDER_ID. Store administrators can email users different invoice templates after payment.
Download uc_payafter-6.x-1.1.tar.gz

Update 2011-06-08: A user in the comments, Moises, has pointed out that in the 6.x-1.0 release of uc_payafter there was a typo that would prevent users from being able to select the request shipping invoices in the conditional actions configuration. I have updated uc_payafter below to fix this bug.

Update 2011-11-08: uc_payafter has a new home! I have created a Drupal Sandbox project for the code here. Once I have the chance to work on the code a bit more, I will promote it to full project status and update the download links in this post.

Rating: 

Drupal 7 playground, coming soon to a blog near you!

I'm going to be upgrading this blog to D7 soon so I can experiment a bit with a live install... Sorry if there's some (brief) unexpected downtime!

Edit 2011-02-26: It's up and running! Not the most pleasant upgrade experience, but then again I can't complain too much for a point-zero release. Most of the issues were caused by third-party modules (namely Fivestart Comment and CKEditor). Also, as a reminder to those who are using custom color styles on a Drupal theme: changes in the theme's CSS will only take effect *after* you save the theme settings to re-generate the theme CSS! I spent about 50 minutes trying to figure out why any CSS changes were not being applied until it hit me and /facepalm ensued...

Edit 2011-03-01: Just realized that the howto indexes (which use Views) were completely broken until now. Sorry about that! It's been fixed now, although the formatting (mostly page breaks) are rather broken on the howto pages themselves, I'll have to clean that up next week.

Rating: 
Tags: 

Heads up!

I'm going to be testing a module that emails commenters when there has been a reply.

Rating: