A blog by the Brick Factory The Brick Factory

Splashify Update

At the end of January we launched Splashify, a module for Drupal 7 that allows developers to display a splash page on their website. Since the initial release I’ve had a lot of back and forth with the Drupal community, who identified some important improvements to the module that needed to be made. I’m proud to announce that a few days ago we released a new version of Splashify that addresses the major issues identified by the Drupal community.

Here is a breakdown of what is new with Splashify:

1. Page Caching

In the early stages of the project I was handling the page redirect and display through JavaScript. However, as our Brick Factory team used the module we quickly determined things broke when turning on the “Cache pages for anonymous users” option in Drupal 7.

This was annoying because enabling anonymous page caching greatly increases the performance of pages that anonymous users would go to (such as the homepage). It was also frustrating because Drupal 7 would not run hook_init() when anonymous page caching was turned on, which broke the functionality of the module.

The solution I came up with was to re-work the module by putting the programming logic that was in the PHP code into the JavaScript instead. This allowed the module to know when and where to display the splash page even when anonymous caching was turned on.

2.Page Redirect

One option for displaying a splash page is to have the visitor redirected to the splash page before viewing the page they originally intended to visit (usually the homepage). Since we do this through JavaScript, one downside in using this option was for a brief second or two visitors would see the homepage show up before you were redirected to the splash page. This was annoying, and I knew this was unacceptable.

The problem was that there were things the JavaScript needed to process before it could do the page redirect. The solution that was implemented was to hide the whole page before the redirect happens, which prevents the homepage from being displayed before redirecting to the splash page.

I realize this is not a perfect solution, and it is not as smooth as redirecting the page through PHP. However, compared to how it looked before, this is a huge improvement and I think it is a good compromise in having all the benefits that come with this approach (search engine optimization, page caching, etc…), and still allowing for the page redirect option.

On top of allowing the splash page to show up by redirecting the visitor, Splashify also includes the option of displaying the splash page in a lightbox.

There were people who attempted to use the module in the early stages and were frustrated by these two major issues. Since making these improvements I’ve seen an increase in people using the module, with less problems.

At this point the module has about 350 drupal sites that report to using the module and about 875 downloads. This confirms there are people out there who need a module like this, and we expect with these major issues resolved the growth rate will increase rapidly.

There have been a few other smaller features added since the initial launch of the project, but the above list covers the main things that allowed us to put out this first release candidate. Our goal is release a stable version within the next few months.

It feels great to provide a module to the community that people find useful. If you have used this module, let us know what you think about it!

Get Splashify