Снорк (nely_snork) wrote in changelog,
Снорк
nely_snork
changelog

[ljcom] r11321: LJSUP-10987: Need add block to home page...

Committer: narefieva
LJSUP-10987: Need add block to home page (we are against SOPA and PIPA)
U   trunk/bin/upgrading/en_LJ.dat
U   trunk/cgi-bin/LJ/Hooks/Homepage.pm
A   trunk/htdocs/img/reskining/2012/
A   trunk/htdocs/img/reskining/2012/january/
A   trunk/htdocs/img/reskining/2012/january/sopa/
A   trunk/htdocs/img/reskining/2012/january/sopa/sopa.png
A   trunk/htdocs/stc/reskining/2012/
A   trunk/htdocs/stc/reskining/2012/january/
A   trunk/htdocs/stc/reskining/2012/january/sopa/
A   trunk/htdocs/stc/reskining/2012/january/sopa/homepage.css
Modified: trunk/bin/upgrading/en_LJ.dat
===================================================================
--- trunk/bin/upgrading/en_LJ.dat	2012-01-17 14:28:53 UTC (rev 11320)
+++ trunk/bin/upgrading/en_LJ.dat	2012-01-18 09:06:18 UTC (rev 11321)
@@ -2689,6 +2689,11 @@
 
 home_promo_sponsored3=Give <a href=http://www.livejournal.com/shop/view.bml?item=paidaccount&gift=1>a Paid Account </a> to another LiveJournal user or community so they can enjoy all of our premium <a href=http://www.livejournal.com/paidaccounts/>features</a>.
 
+homepage.branding.sopa.notice<<
+LiveJournal is joining other websites today to protest the U.S. Stop Online Piracy Act (SOPA) and Protect IP Act (PIPA). We believe that both Acts  would have the effect of undermining our collective guarantee of freedom of speech. We are joining the fight to ensure these two bills never come to pass.<br>
+<a href="http://theljstaff.livejournal.com/4004.html">Click here to learn more and what you can do to help</a>.
+.
+
 horizon.barenav.create=Create an Account
 
 horizon.barenav.explore|staleness=1

Modified: trunk/cgi-bin/LJ/Hooks/Homepage.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Homepage.pm	2012-01-17 14:28:53 UTC (rev 11320)
+++ trunk/cgi-bin/LJ/Hooks/Homepage.pm	2012-01-18 09:06:18 UTC (rev 11321)
@@ -45,23 +45,16 @@
     return 1;
 }
 
-sub LJ::_is_ny_branding_active {
+sub LJ::_is_sopa_branding_active {
     ## Only homepage must be branded
     return unless LJ::Request->hostname eq "www.$LJ::DOMAIN";
 
     my $uri = LJ::Request->uri;
     return unless $uri eq '/index.bml' or $uri eq '/';
 
-    ## Don't show to logged-in paid and basic accounts
-    my $remote = LJ::get_remote();
-    return if $remote && ($remote->get_cap('paid') || !$remote->in_class('plus'));
-
-    ## only Cyr users
-    return unless LJ::SUP->is_remote_sup;
-
-    ## from 2012-01-02 00:00:00 MSK till 2012-01-08 23:59:59 MSK
+    ## from 2012-01-18 05:00:00 PDT till 2012-01-18 16:59:59 PDT
     my $time = time();
-    return if ($time < 1325448000 || $time > 1326052799); ## uncomment this line before commit!
+    return if ($time < 1326888000 || $time > 1326931200); ## uncomment this line before commit!
 
     return 1;    
 }
@@ -101,15 +94,11 @@
              '" width="1" height="1" border="0" class="brandingomg-pixel" />'; 
      }
 
-     if (LJ::_is_ny_branding_active()) {
+     if (LJ::_is_sopa_branding_active()) {
          my $rnd = int(rand(1_000_000));
+         my $ml_var = LJ::Lang::ml('homepage.branding.sopa.notice');
          return 
-             '<a href="http://sup.adfox.ru/7386/goLink?p1=bebcg&p2=v&p5=zumf&pr=' . 
-             $rnd . 
-             '&puid1=&puid2=&puid3=&puid4=&puid5=" target="_blank" class="brandingdragon-link">&nbsp;</a>' .
-             '<img src="http://sup.adfox.ru/7386/getCode?p1=bebcg&p2=v&pe=b&pfc=jsto&pfb=zumf&puid1=&puid2=&puid3=&puid4=&puid5=&pr=' . 
-             $rnd . 
-             '" width="1" height="1" border="0" class="brandingdragon-pixel" />';
+             qq{<div class="l-sopa"><div class="b-sopa"><div class="b-sopa-in">$ml_var</div></div></div>};
      }
 });
 
@@ -121,8 +110,8 @@
         return ''; 
     }
 
-    if (LJ::_is_ny_branding_active()) {
-        LJ::need_res("stc/reskining/2011/december/dragon/homepage.css");
+    if (LJ::_is_sopa_branding_active()) {
+        LJ::need_res("stc/reskining/2012/january/sopa/homepage.css");
     }
 
     ##

Added: trunk/htdocs/img/reskining/2012/january/sopa/sopa.png
===================================================================
(Binary files differ)


Property changes on: trunk/htdocs/img/reskining/2012/january/sopa/sopa.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/htdocs/stc/reskining/2012/january/sopa/homepage.css
===================================================================
--- trunk/htdocs/stc/reskining/2012/january/sopa/homepage.css	                        (rev 0)
+++ trunk/htdocs/stc/reskining/2012/january/sopa/homepage.css	2012-01-18 09:06:18 UTC (rev 11321)
@@ -0,0 +1,50 @@
+/* We are against SOPA & PIPA  */
+.branding-wrapper {
+	overflow: hidden;
+	position: relative;
+	width: 100%;
+	margin: 0;
+	padding: 0;
+	}
+	
+.l-sopa {
+    width: 100%;
+    height: 190px;
+    background: #000;
+    }
+    .b-sopa {
+        width: 950px;
+        margin: 0 auto;
+        background: url(/img/reskining/2012/january/sopa/sopa.png?v=1) no-repeat 0 0;
+        } 
+        .b-sopa-in {
+            height: 140px;
+            padding: 50px 160px 0;
+            background: url(/img/reskining/2012/january/sopa/sopa.png?v=1) no-repeat 100% 100%;
+            line-height: 1.4;
+            color: #FFF;
+            }
+            .b-sopa A:link,
+            .b-sopa A:visited,
+            .b-sopa A:hover,
+            .b-sopa A:active {
+                border: 0;
+                text-decoration: none;
+                color: #71afe1 !important;
+                }
+                .b-sopa A:hover {
+                    text-decoration: underline;
+                    }
+
+/* Horizont only */	
+.s-horizon .l-sopa {
+    position: absolute;
+    top: 100px;
+    } 
+.s-horizon.index-page #content {
+    top: 300px;
+    margin: 0 auto 310px;
+    }
+
+
+    
\ No newline at end of file

Tags: css, dat, ljcom, narefieva, nely_snork, pm, png
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments