vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[ljcom] r9978: LJSUP-7812: Create header for st.v. day ...

Committer: vsukhanov
LJSUP-7812: Create header for st.v. day [tags: narefieva]
U   trunk/cgi-bin/LJ/Hooks/Homepage.pm
Modified: trunk/cgi-bin/LJ/Hooks/Homepage.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/Homepage.pm	2011-02-01 09:44:03 UTC (rev 9977)
+++ trunk/cgi-bin/LJ/Hooks/Homepage.pm	2011-02-01 10:32:40 UTC (rev 9978)
@@ -44,17 +44,33 @@
     return 1;
 }
 
-LJ::register_hook("service_page_reskining", sub {
-    my $params = shift || {};
-    
+
+sub _st_v_2011_header { ## St. Valentine day 2011
+    my $params = shift;
     my $time = time;
     return unless (1297630800 < $time and $time < 1297717200); ## between 14-02-2011 00:00:00 MSK and 15-02-2011 00:00:00 MSK
     return unless LJ::SUP->is_remote_sup();
     LJ::need_res("stc/reskining/2011/stvd/header.css");
+    return 1;
+
+}
+
+LJ::register_hook("service_page_reskining", sub {
+    my $params = shift || {};
+
+    ## Only for 14 Feb 2011
+    return if _st_v_2011_header($params);
+    
+    LJ::need_res("stc/reskining/2011/january/header.css");
+    my $text = LJ::Lang::ml('reskining.january2011');
+    LJ::CleanHTML::clean(\$text); ## to expand <lj-user> tags 
+    return qq[<dl class="b-reskining-about"><dt></dt><dd>$text</dd></dl>];
+
 });
 
 
 
+
 LJ::register_hook("homepage_sidebar", sub {
     my $u = shift;
     my %opts = @_;

Tags: ljcom, narefieva, pm, vadvs
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