alf (red_alf) wrote in changelog,
alf
red_alf
changelog

[ljcom] r12400: LJSUP-13151: Sony branding of main page

Committer: afedorov
LJSUP-13151: Sony branding of main page

U   trunk/cgi-bin/LJ/Hooks/Homepage.pm
Modified: trunk/cgi-bin/LJ/Hooks/Homepage.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Homepage.pm	2012-08-02 09:08:05 UTC (rev 12399)
+++ trunk/cgi-bin/LJ/Hooks/Homepage.pm	2012-08-02 09:45:18 UTC (rev 12400)
@@ -2,49 +2,6 @@
 use strict;
 use LJ::ServicePageReskinning;
 
-sub _is_xbox_reskining_active {
-    my $params = shift;
-
-    ## special hack: to allow members of lj_core view
-    ## reskined pages
-    if (LJ::Request->is_inited) {
-        my %args = LJ::Request->args;
-        if ($args{xbox_reskining}) {
-            if ($LJ::IS_DEV_SERVER) {
-                return 1;
-            } else {
-                my $remote = LJ::get_remote();
-                my $lj_core = LJ::load_user('lj_core');
-                return $remote && $lj_core && $lj_core->has_friend($remote);
-            }
-        }
-    }
-
-    ## Only homepage must be reskined
-    my $uri = BML::get_uri();
-    return unless $uri eq '/index.bml' or $uri eq '/';
-   
-    ## Only 'horizon' and (derived from it 'vertigo') schemes must be affected
-    return unless $params->{scheme} eq 'horizon';
-    
-    ## Only US-users are affected
-    my ($ip_class, $country) = LJ::GeoLocation->ip_class();
-    return unless $country eq 'US';
-  
-    ## Only logged-out or non-paid users are affected
-    my $remote = LJ::get_remote();
-    return if $remote && $remote->get_cap('paid');
-   
-    ## Time-specific conditions
-    my $time = time();
-    return unless 
-        (1252468800 < $time && $time < 1252566000) ||   ## between Sep 08, 21:00 and Sep 10, 00:00 PDT
-        (1253073600 < $time && $time < 1253170800);     ## between Sep 15, 21:00 and Sep 17, 00:00 PDT
-    
-    ## Ok, all conditions are met
-    return 1;
-}
-
 sub LJ::_is_sopa_branding_active {
     ## LJSUP-12875: from now till 10.07.2012 23:59 Moscow time 
     my $time = time();
@@ -82,10 +39,6 @@
     ## only Cyr users 
     return unless LJ::SUP->is_remote_sup; 
 
-    ## from 2012-06-11 00:00:00 MSK till 2012-06-17 23:59:00 MSK 
-    #my $time = time(); 
-    #return if ($time < 1339358400 || $time > 1339963140); ## uncomment this line before commit! 
-
     return 1; 
 }
 
@@ -101,50 +54,18 @@
         return '<div class="l-sopa"><div class="b-sopa"><div class="b-sopa-in">'.$text.'</div></div></div>';
     }
 
-    # google
-    # 5 july 00:00 - 8 july 23:59
-    if (LJ::_is_branding_active() && ($time > 1341432000 && $time < 1341777540)) { 
-         my $rnd = int(rand(1_000_000)); 
-         return 
-              '<a href="http://ad.adriver.ru/cgi-bin/click.cgi?sid=1&bt=21&ad=347389&pid=872898&bid=1865800&bn=1865800&'. 
-              $rnd . 
-              '=357906993" target="_blank" class="google-link">&nbsp;</a>' . 
-              '<img src="http://ad.adriver.ru/cgi-bin/rle.cgi?sid=1&bt=21&ad=347389&pid=872898&bid=1865800&bn=1865800&' .
-              $rnd .
-              '=357906993" width="1" height="1" border="0" class="google-pixel" />';
-     }
-
-     # beeline
-     # 00.00 11 of July till 23.59 29 of July
-     if (LJ::_is_branding_active() && ($time > 1341950400 && $time < 1343591940)) { 
-         return 
-             '<a href="http://ad.adriver.ru/cgi-bin/click.cgi?sid=1&bt=21&ad=342511&pid=864734&bid=1845012&bn=1845012&rnd=911750838" class="beeline-link" target="_blank">&nbsp;</a> <img src="http://ad.adriver.ru/cgi-bin/rle.cgi?sid=1&bt=21&ad=342511&pid=864734&bid=1845012&bn=1845012&rnd=911750838" width="1" height="1" border="0" class="brandingdragon-pixel" />';
-     }
-
 });
 
 LJ::register_hook("service_page_reskining", sub {
     my $params = shift || {};
     my $time = time(); 
 
-    # google
-    # 5 july 00:00 - 8 july 23:59
-    if (LJ::_is_branding_active() && ($time > 1341432000 && $time < 1341777540)) { 
-        LJ::need_res("stc/reskining/2012/july/google/google.css"); 
+    # Sony pictures "Totall Recall"
+    # 6 august 00:00 - 12 august 23:59
+    if (LJ::_is_branding_active() && ($time >= 1344196800 && $time < 1344801600)) { 
+        LJ::need_res("stc/reskining/august/sony/sony.css"); 
     }
 
-    # beeline
-    # 00.00 11 of July till 23.59 22 0f July
-    if (LJ::_is_branding_active() && ($time > 1341950400 && $time < 1342987140)) {  
-        LJ::need_res("stc/reskining/2012/july/beeline/beeline.css"); 
-    }
-
-    # beeline stage 3
-    # 00.00 23 of July till 23.59 29 of July
-    if (LJ::_is_branding_active() && ($time > 1342987200 && $time < 1343591940)) {  
-        LJ::need_res("stc/reskining/2012/july/beeline_stage_3/beeline.css"); 
-    }
-
     ##
     ## experimental ServicePageReskinning part 
     ##
@@ -172,19 +93,6 @@
     ## end of /experimental ServicePageReskinning part
     ##
 
-    my $is_sup = LJ::SUP->is_remote_sup();
-    my $time = time(); 
-
-    ##
-    ## The commented code below is left as an example
-    ##
-
-    ## LJSUP-9245: August 2011 header for non cyr users
-    ## LJ::need_res("stc/reskining/2011/august/noncyr/header.css");
-    ## my $text = LJ::Lang::ml('reskining.august2011.noncyr');
-    ## LJ::CleanHTML::clean(\$text, { allow => [ 'a' ] }); ## to expand <lj-user> tags and to add <a> tags
-    ##return qq[<dl class="b-reskining-about"><dt></dt><dd>$text</dd></dl>]; 
-
     return '';
 });
 

Tags: afedorov, ljcom, pm, red_alf
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