Blackoutspeakout, June 4

adixon's picture

Many Canadian non-profit organizations are protesting the latest federal budget, here:

If you know of any organizations that use Drupal and would like to participate, you're welcome to use and/or recycle this simple D6 sandbox module (based on a similar module created for the US sopa campaign earlier this year).

or just use this command to grab it:

git clone --recursive --branch master blackoutspeakout

It's pretty plug and play, you just have to enable it and it'll "black out" the site with an appropriate replacement page for the day on June 4.



daven's picture

I just installed it on two sites.

I wish I could install it

abe's picture

Is there a D7 version available? Thanks.

could be ...

adixon's picture

shouldn't be hard, look at this thread

and this example.

A D7 Version is Pretty Simple

mgifford's picture

Think you just need to add this to the core = "7.x" to get it to work.

I also added a cookie so that you could actually get to the site, but you'd be reminded about the campaign every hour:

function blackoutspeakout_init() {
  $on_admin_page = strpos($_SERVER['REQUEST_URI'], 'admin') === 1;
  $on_user_page = strpos($_SERVER['REQUEST_URI'], 'user') === 1;
  if (isset($_COOKIE['blackoutspeakout'])) {
    $first_visit = TRUE;
  else {
    // Set cookie for 1hrs
    setcookie('blackoutspeakout', 1, time()+3600);

  if (isset($_GET['blackoutspeakout_test']) || !($on_admin_page || $on_user_page || $first_visit)) {
    if (isset($_GET['blackoutspeakout_test']) || date('Y-m-d') == '2012-06-04') {
      // Preserve SE ranking. @see
      header('HTTP/1.1 503 Service Temporarily Unavailable');
      header('Retry-After: Tue, 05 Jun 2012 04:00:00 GMT');
      $module_path = drupal_get_path('module', 'blackoutspeakout');
      $vars = array('module_path' => '/'.$module_path,
                    'message' => t('The %title website is still <a href="/" style="color:#fff">available</a>. ', array('%title' => variable_get('site_name',''))),
      print theme_render_template($module_path .'/template/index.php',$vars);

Anyways, thanks for posting this Alan. Splashify seemed like overkill for what was needed (and it didn't seem to work for me) -

Anyways I've got it running here now


Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week