Committer: narefieva
LJSUP-11298: Mitsubishi branding at LJ.com homepageU trunk/cgi-bin/LJ/Hooks/Homepage.pm
Modified: trunk/cgi-bin/LJ/Hooks/Homepage.pm =================================================================== --- trunk/cgi-bin/LJ/Hooks/Homepage.pm 2012-02-21 07:41:35 UTC (rev 11497) +++ trunk/cgi-bin/LJ/Hooks/Homepage.pm 2012-02-21 08:03:33 UTC (rev 11498) @@ -45,20 +45,6 @@ return 1; } -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 '/'; - - ## from 2012-01-18 05:00:00 PDT till 2012-01-18 16:59:59 PDT - my $time = time(); - return if ($time < 1326888000 || $time > 1326931200); ## uncomment this line before commit! - - return 1; -} - sub LJ::_is_branding_active { ## Only homepage must be branded return unless LJ::Request->hostname eq "www.$LJ::DOMAIN"; @@ -73,9 +59,9 @@ ## only Cyr users return unless LJ::SUP->is_remote_sup; - ## from 2011-12-16 00:00:00 MSK till 2011-12-22 23:59:59 MSK + ## from 2012-02-23 00:00:00 MSK till 2012-03-03 23:59:59 MSK my $time = time(); - return if ($time < 1323979200 || $time > 1324583999); ## uncomment this line before commit! + return if ($time < 1330804799 || $time > 1329940800); ## uncomment this line before commit! return 1; } @@ -86,34 +72,24 @@ if (LJ::_is_branding_active()) { my $rnd = int(rand(1_000_000)); return - '<a href="http://sup.adfox.ru/7386/goLink?p1=bdzfe&p2=v&p5=ziyd&pr='. + '<a href="http://ad.adriver.ru/cgi-bin/click.cgi?sid=1&bt=21&ad=323910&pid=768244&bid=1585755&bn=1585755&'. $rnd . - '&puid1=&puid2=&puid3=&puid4=&puid5=" target="_blank" class="brandingomg-link"> </a>' . - '<img src="http://sup.adfox.ru/7386/getCode?p1=bdzfe&p2=v&pe=b&pfc=jpmv&pfb=ziyd&puid1=&puid2=&puid3=&puid4=&puid5=&pr='. + '1791032605" target="_blank" class="branding-mitsubishi-link"> </a>' . + '<img src="http://ad.adriver.ru/cgi-bin/rle.cgi?sid=1&bt=21&ad=323910&pid=768244&bid=1585755&bn=1585755&'. $rnd . - '" width="1" height="1" border="0" class="brandingomg-pixel" />'; + '1791032605" width="1" height="1" border="0" class="branding-mitsubishi-pixel" />'; } - if (LJ::_is_sopa_branding_active()) { - my $rnd = int(rand(1_000_000)); - my $ml_var = LJ::Lang::ml('homepage.branding.sopa.notice'); - return - qq{<div class="l-sopa"><div class="b-sopa"><div class="b-sopa-in">$ml_var</div></div></div>}; - } }); LJ::register_hook("service_page_reskining", sub { my $params = shift || {}; if (LJ::_is_branding_active()) { - LJ::need_res("stc/reskining/2011/december/omg/homepage.css"); + LJ::need_res("stc/reskining/2012/february/mitsubishi/homepage.css"); return ''; } - if (LJ::_is_sopa_branding_active()) { - LJ::need_res("stc/reskining/2012/january/sopa/homepage.css"); - } - ## ## experimental ServicePageReskinning part ##