Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[ljcom] r11025: LJSUP-9843: Need branding for livejourna...

Committer: gariev
LJSUP-9843: Need branding for livejournal.com
U   trunk/cgi-bin/LJ/Hooks/Homepage.pm
U   trunk/htdocs/index.bml.sup
Modified: trunk/cgi-bin/LJ/Hooks/Homepage.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Homepage.pm	2011-09-21 03:09:13 UTC (rev 11024)
+++ trunk/cgi-bin/LJ/Hooks/Homepage.pm	2011-09-21 07:13:26 UTC (rev 11025)
@@ -46,7 +46,6 @@
 }
 
 sub LJ::_is_branding_active {
-
     ## Only homepage must be branded
     my $uri = BML::get_uri();
     return unless $uri eq '/index.bml' or $uri eq '/';
@@ -60,11 +59,20 @@
 
     ## from 2011-09-22 00:00 MSK till 2011-09-29 23:59 MSK   
     my $time = time();
-    ## return if ($time < 1316635200 || $time > 1317326340); ## uncomment this line before commit!
+    return if ($time < 1316635200 || $time > 1317326340); ## uncomment this line before commit!
 
     return 1;    
 }
 
+LJ::register_hook("service_page_branding", sub {
+    my $opts = shift || {};
+
+    if (LJ::_is_branding_active()) {
+        my $rnd = int(rand(1_000_000));
+        return '<a href="http://sup.adfox.ru/7386/goLink?p1=bdptx&p2=v&p5=xyai&pr=' . $rnd . '&puid1=&puid2=&puid3=&puid4=&puid5=" target="_blank" class="brandinglove-link">&nbsp;</a><img src="http://sup.adfox.ru/7386/getCode?p1=bdptx&p2=v&pe=b&pfc=jere&pfb=xyai&puid1=&puid2=&puid3=&puid4=&puid5=&pr=' . $rnd . '" width="1" height="1" border="0" class="brandinglove-pixel" />'
+    }
+});
+
 LJ::register_hook("service_page_reskining", sub {
     my $params = shift || {};
 

Modified: trunk/htdocs/index.bml.sup
===================================================================
--- trunk/htdocs/index.bml.sup	2011-09-21 03:09:13 UTC (rev 11024)
+++ trunk/htdocs/index.bml.sup	2011-09-21 07:13:26 UTC (rev 11025)
@@ -16,11 +16,6 @@
         case_sensitive    => 1,
     ) or die "Can't open template: $!";
 
-    if (LJ::_is_branding_active()) {
-        my $rnd = int(rand(1_000_000));
-        $result{'branding'} = '<a href="http://sup.adfox.ru/7386/goLink?p1=bdptx&p2=v&p5=xyai&pr=' . $rnd . '&puid1=&puid2=&puid3=&puid4=&puid5=" target="_blank" class="brandinglove-link">&nbsp;</a><img src="http://sup.adfox.ru/7386/getCode?p1=bdptx&p2=v&pe=b&pfc=jere&pfb=xyai&puid1=&puid2=&puid3=&puid4=&puid5=&pr=' . $rnd . '" width="1" height="1" border="0" class="brandinglove-pixel" />';
-    }
-
     $template->param( %result );
     
     return $template->output;

Tags: gariev, ljcom, pm, sup
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