Adding SOPA blackout to a Drupal Gardens

If you want to blackout your site in protest of SOPA/PIPA, here's what you gotta do:

(hat tip to http://www.zachstronaut.com for the blackout page).

Important: Keep the url mysite.drupalgardens.com/admin/content handy. 

Once you follow these instructions, your site will go dark (if it is January 18th 2012).  If you want to get it back, you will need to delete the block later.

  1. Navigate to Structure -> Blocks
  2. Click on "Add Block"
  3. In the "Body" use the dropdown to change from "Safe HTML" to "Full HTML" (the buttons will go away)
  4. Make the block show by setting a region.
  5. Copy the following and paste it into the body:

 



<

div>

<script type="text/javascript">
    var a = new Date;
    if (18 == a.getDate() && 0 == a.getMonth() && 2012 == a.getFullYear()) {
        window.onload = function () {
            var cover = document.createElement('div');
            cover.style.position = 'fixed';
            cover.style.zIndex = 9999999;
            cover.style.width = window.innerWidth + 'px';
            cover.style.height = window.innerHeight + 'px';
            cover.style.top = 0;
            cover.style.backgroundColor = '#000';
            cover.innerHTML = '<iframe src="http://www.zachstronaut.com/lab/text-shadow-box/stop-sopa.html" width="100%" height="100%" frameBorder="0"></iframe>';
            document.body.appendChild(cover);
            window.onresize = function () {
                cover.style.width = window.innerWidth + 'px';
                cover.style.height = window.innerHeight + 'px';
            }
        }
    }
</script>

Tags: 

Comments

This has to be one of my

MDBob's picture

This has to be one of my favorite posts! And on top of thats its also very helpful topic for newbies. Thanks a lot for informative information! adult toys

Easy?

Morris's picture

It always sounds so easy when Jacob explains something, doesn't it? <a href="http://www.super-discount.ch">tumbler</a>

Blackout

Kelly Bell's picture

It's not just about the tip bit (though i was following the directions and hit save before I snapped that I should have exempted the admin pages, so now I can't turn off the block and restore my site). 

I was hoping for CONSISTENCY of application - plain black is fine, but I was thinking if we all showed the "censored" label like what the FBI put on the Pirate Bay, or something, but adapted for Drupal Gardens, it would be really cool. Plus if you made it super easy for people to do it, they'd be more likely to participate in the blackout,which is good for everyone. 

In my case, I just flat out didn't have time to code something by the time I heard everyone was still doing the blackout (after Obama's speech I thought it might not happen), and since I'm on Gardens, and cant install any modules, I really just wanted them to install the Blackout module so we could use it if we wanted to. 

Of course ow I have to figure out how to turn this block off without access to any admin pages or to drush...

Kelly Bell
---------------
Gotham City Drupal
@gothamdrupal   |   @Kelly

Blackout

Kelly, doing it like Jacob showed was really a snap! I really hope that bill will never pass congress!

I can't believe I was that

Kelly Bell's picture

I can't believe I was that stupid.
I literally hit the button and thought of it in the same moment.
D'oh!

I like to spend my free time

John Grahmn's picture

I like to spend my free time by reading various internet recourses. Today I came across your blog and I found it is as one of the best free resources available! Well done! Keep on this quality!
gran canaria

Is your theme custom made or

Harry's picture

Is your theme custom made or did you download it from somewhere? A design like yours with a few simple tweeks would really make my blog jump out. Please let me know where you got your theme. Appreciate it mayweather vs cotto live

really beautiful

I just wanted to mention that I really thought the image and the animation and all for this was REALLY well-done, and that I am very thankful that Jacon was so cool to make this happen for all the denizens of DG - thank you so much, Jacob.

Also, thanks for tweeting me the fix (worked!) to my own stupidity :)

The protest in Manhattan today went very well, and the whole protest was a great success, IMHO. Thank you for helping us do our little part.

Warmest regards,
Kelly

yes

Howard's picture

I agree! Bed Sore Solution

Nice platform

jimmy lansio's picture

It is a great satisfaction studying your post.The brimming with info I am trying to find we love to post a opinion of which "The content material of your respective post is definitely awesome" Good work. cell phone listening  :)

I was wanting to know if you

Lewis's picture

I was wanting to know if you knew of any discussion boards that cover the same topics discussed here? I'd really like to be a part of a group where I can get advice from other experienced individuals that share the same interest. If you have any suggestions, please let me know. Many thanks! // WNO

SOPA

Lewis's picture

SOPA is just horrible and I hope they never try to pass it again! leo burgues

This is a great stuff and

real's picture

This is a great stuff and really worth reading. Very nicely written and well elaborated. I appreciate it very much. real exams70-640

I think I will become a great

TimFrancis's picture

I think I will become a great follower.Just want to say your article is striking. The clarity in your post is simply striking and i can take for granted you are an expert on this subject.
birthday

Great write-up - here is a Gist...

Hi Jacob,

This is a great write-up - useful instructions for a generic custom block. Also, the code is applicable to many CMSs, not just Drupal. I've created a Gist, with some modifications:

  • Option for the <iframe> to cover the top H pixels;
  • Added configuration variables;
  • Added optional Google Analytics campaign parameters;
  • MSIE 8 fixes.

Kudos to Zachstronaut.

Stop SOPA + PIPA!

Nick

sfda

I am very thankful that Jacon was so cool to make this happen for all the denizens of DG - thank you so much, Jacob.  Office shoes

The reason why we need the

The reason why we need the obd2 auto diagnostic tools is the need for curbing "mobile emissions". In tune with the need for global preservation, the EPA has been empowered to place firm emission standards. This has compelled the car manufacturers to bring in better non-polluting cars into the market. In turn, such strict measures for controlling emission levels have also helped to increase the functional life of the vehicle as well.

Good article

thomas's picture

I wonder how you got so good. This is really a fascinating blog, lots of stuff that I can Get into. One thing I just want to say is that your Blog is so perfect! Desenhos Para Colorir

Thanks a lot for the tips.

Steven's picture

Thanks a lot for the tips. Even though SOPA is now dead in the water (atleast for now), ACTA has shown us that is can come back in different forms. We'll keep this code on hand for our swtor credits site incase they try to censor the Net again!

  Somatesthesia pro

jgurma's picture

  
Somatesthesia pro propertied for me, Unoriginality apportioning that you are one of the sportsmanlike bloggers I e'er saw.Thanks for sending this consultive handiwork

mice traps

 

  Unshrinking is nicely act

jgurma's picture

  
Unshrinking is nicely act and it contains numerous enforcement things for me. I am settlings to aid your unnerving way of lancinating the performing. Now it transposed unsubdivided for me to mercantilism and obligate the hypothecate. Thanks for coitus the job.

Snow Blower Review

 

Well, that is great, Jacob. I

Matt's picture

Well, that is great, Jacob. I just try on my website about memory foam mattress, and all work with this. Adding SOPA backout is a great solution for Drupal Gardens. Love it much.

There are few posts that i

jgurma's picture

There are few posts that i actually somebody to inform on. I act this fundament an imspirational and act. I requisite to became a noesis to o, so ply wit me updated. Locomote you so oftentimes

Mouse Traps

 

Hi Jacob, Thanks for your

Matt's picture

Hi Jacob, Thanks for your sharing about SOPA blackout to a Drupal Gardens. I just gave a try on free sounds web. It works well. Thanks.

great tip to help the people

SOPA is just ridiculous. Good

Lewis's picture

SOPA is just ridiculous. Good thing it didn't pass or else this country would not be in good health

Admiring the time and energy

Dave's picture

Admiring the time and energy you put into your site and detailed information you provide. It's great to come across a blog every once in a while that isn't the same old rehashed information. Great read! I've saved your site and I'm adding your RSS feeds to my Google account. wedding dj

SOPA Day

Well, SOPA day is over and I just wanted to let you know that your instructions were PERFECT. Everything worked like a charm!

Do you mind if I quote a few

Dave's picture

Do you mind if I quote a few of your posts as long as I provide credit and sources back to your webpage? My blog site is in the exact same area of interest as yours and my users would genuinely benefit from a lot of the information you present here. Please let me know if this alright with you. Thanks a lot! Game Server

A lot of times it's very

Dave's picture

A lot of times it's very difficult to get that "perfect balance" between superb usability and visual appeal. I must say you have done a awesome job with this. In addition, the blog loads very quick for me on Opera. Exceptional Blog! aeropostale | deal

My developer is trying to

Dave's picture

My developer is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the expenses. But he's tryiong none the less. I've been using WordPress on various websites for about a year and am concerned about switching to another platform. I have heard good things about blogengine.net. Is there a way I can import all my wordpress content into it? Any kind of help would be really appreciated! // download premium wordpress themes

guest authoring

Dave's picture

Have you ever thought about writing an e-book or guest authoring on other sites? I have a blog based on the same topics you discuss and would love to have you share some stories/information. I know my viewers would enjoy your work. If you are even remotely interested, feel free to send me an e mail. // Scottish Hampers

Good Work!

i Agree in the exact same area of interest as yours and my users would genuinely benefit from a lot of the information you present here.Good Work ! Thank you !

I enjoyed the article a great

asd's picture

I enjoyed the article a great deal while reading. Thanks for sharing such a superb post.I desire to say really thank you for this terrific informations. now i realize about it. prowordpress

Font

Hi Jacob, what font do you use on this website? It looks very smooth and artistic? Like it a lot!

Writing

Dave's picture

My spouse and I absolutely love your blog and find almost all of your post's to be just what I'm looking for. Do you offer guest writers to write content for you personally? I wouldn't mind composing a post or elaborating on some of the subjects you write with regards to here. Again, awesome weblog! // Artikelverzeichnisse

 

Pages