Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By mcantelon on
Hi folks,
I hacked up a module that will wait until January 18th and blackout your Drupal site for the day:
https://github.com/mcantelon/drupal-sopa-blackout
It was developed for, and tested on, a Drupal 6 site although it may work on Drupal 7 as well.
Cheers,
Mike
Comments
Drupal 7...
Not working my friend on Drupal 7...
i change file sopa.module to
i change file sopa.module to drupal 7.x i dont know if will work
Drupal 7 Works Now
Worked with Mike to fix the couple of little issues with Drupal 7 as well as use of cleanurls. Should work fine now. Very cool spotlight code Mike!
This should generate a 503 error code to preserve Google Rank
If you don't want Google to reindex your site and find only a SOPA page and lose all your other content in their records, you should be generating a 503 HTTP (Site temporarily unavailable) response header code when you render this page.
See this article: http://www.webmonkey.com/2012/01/protest-sopa-blackout-your-website-the-...
The article provides this sample code for PHP:
I like the look of the blackout page! And thanks for putting all this together on such short notice!
thanks!
I added in the above lines to the module (after line 10) and tested it and it seems to work perfectly.
Github update
@artbrock: good call.
Made an issue on mcantelon's project:
https://github.com/mcantelon/drupal-sopa-blackout/issues/2
Because time is of the essence, I forked to add this (also added 6.x & 7.x branches/tags for people to use as-is without having to edit). Feel free to download from here in the meantime:
https://github.com/basekamp/drupal-sopa-blackout
Scott Rigby
http://basekamp.com
http://PlausibleArtworlds.org
http://UtopiaSchool.org
thx
@mcantelon: btw, nice work in short order =)
Scott Rigby
http://basekamp.com
http://PlausibleArtworlds.org
http://UtopiaSchool.org
re: thx
My pleasure... thanks again for your fixes! :D
The module didn't work for me
The module didn't work for me on several D6 sites. It just produced a 503 site offline error in every case. So I just used the brute force approach, putting up the template file as index.php. Now I just gotta remember to switch back!
Just wanted to thank you for
Just wanted to thank you for how quickly this module was put together. I had issues at first with one of my sites not loading the blackout page, but once I grabbed the newest code from your GitHub (https://github.com/mcantelon/drupal-sopa-blackout/zipball/master), both my personal and community sites (D6) are Blacked out and look great!
Very nice job. Thank you.
Very nice job. Thank you.
It's working But only from the computer i uploaded on
Strange i uploaded the module and from the computer i used to upload it's working fine other ppl trying to access my site external seeing the site normal.
Joining the protest..perfect!!
Great module and just in time for stop SOPA and PIPA protest!! Works perfectly!!
Regards,
Saurabh
good job
props!
Fill a much needed hole you did :-)
Thanks y'all. This worked
Thanks y'all. This worked brilliantly.
Y U NO on Drupal.org?
Darn. I went here http://drupal.org/project/sopa to try and get this on my site on Jan 18 and there wasn't anything. :\