Updated StopSOPA Plugin
Tim
Vanilla Staff
I've done some tweaks to the plugin to make it more friendly to your site:
- Add a Status: 503 'Service Temporarily Unavailable' header
- Add a Retry-After: Wed 18 Jan header to make the search bots ignore for a day
I also changed the wording and some of the links slightly.
Tagged:
0
Comments
Just underneath
// Admins not affected if (Gdn::Session()->IsValid() && Gdn::Session()->CheckPermission('Garden.Settings.Manage')) return;I added this
// Automatically enables for 18th $Date = getdate(); if($Date['mday'] != 18) return;Thanks clethrill, this is really useful
Thanks, to be noted however is that will then make it work all day (I think the strike was planned 0800 - 2000 EST.
Also if you leave the plugin enabled till next month you will be striking again.
XD ok, I can turn it off after... Is there any way to modify it to work between certain times?
I think this will expire a bit more properly than @clethrill's excellent solution.
$Expires = strtotime('2012-01-18 20:00 EST'); if (time() > $Expires) return;Would that still work if expanded to
$Starts = strtotime('2012-01-18 08:00 EST'); $Expires = strtotime('2012-01-18 20:00 EST'); if (time() > $Expires) or (time() < $Starts) return;EDIT -
Nope, that didn't work. But this seems to
$Starttime = strtotime('2012-01-18 08:00 EST'); if (time() < $Starttime) return;