madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r19402: LJSUP-9193: Now head_content is used as ...

Committer: sbelyaev
LJSUP-9193: Now head_content is used as object.
U   trunk/cgi-bin/LJ/S2/HeadContent.pm
U   trunk/htdocs/preview/entry.bml
Modified: trunk/cgi-bin/LJ/S2/HeadContent.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/HeadContent.pm	2011-06-30 06:37:41 UTC (rev 19401)
+++ trunk/cgi-bin/LJ/S2/HeadContent.pm	2011-06-30 08:46:41 UTC (rev 19402)
@@ -136,9 +136,27 @@
         $head_content .= LJ::robot_meta_tags();
     }
 
+    if ( $opts->{dont_show_nav_strip} ) {
+        $head_content .= _get_html_dont_show_navstrip();
+    }
     return $head_content;
 }
 
+sub _get_html_dont_show_navstrip {
+
+    return qq{<style type="text/css">
+                html body {
+                    padding-top: 0 !important;
+                }
+                #lj_controlstrip,
+                .w-cs,
+                .b-message-mobile,
+                .appwidget-sitemessages {
+                    display: none !important;
+                }
+            </style>};
+}
+
 sub _entry_page_head {
     my ($self) = @_;
 

Modified: trunk/htdocs/preview/entry.bml
===================================================================
--- trunk/htdocs/preview/entry.bml	2011-06-30 06:37:41 UTC (rev 19401)
+++ trunk/htdocs/preview/entry.bml	2011-06-30 08:46:41 UTC (rev 19402)
@@ -230,6 +230,10 @@
         $p->{'comments'} = [];
         $p->{'comment_pages'} = undef;
 
+        $p->{head_content}->set_object_type( $p->{_type} );
+        # Don't show the navigation strip
+        $p->{head_content}->set_options( { dont_show_nav_strip => 'UNUSED' } );
+
         my $userlite_journal = LJ::S2::UserLite($u);
         my $userlite_poster  = LJ::S2::UserLite($up);
 
@@ -279,32 +283,8 @@
 
         $p->{'multiform_on'} = 0;
 
-        if ($u->should_block_robots) {
-            $p->{'head_content'} .= LJ::robot_meta_tags();
-        }
-        if ($LJ::UNICODE) {
-            $p->{'head_content'} .= '<meta http-equiv="Content-Type" content="text/html; charset='.$opts->{'saycharset'}."\" />\n";
-        }
-
-        # Don't show the navigation strip
-        $p->{'head_content'} .= qq{
-            <style type="text/css">
-            html body {
-                padding-top: 0 !important;
-            }
-            #lj_controlstrip,
-            .w-cs,
-            .b-message-mobile,
-            .appwidget-sitemessages {
-                display: none !important;
-            }
-            </style>
-        };# . "<link rel='stylesheet' href='" . LJ::stat_src_to_url('/lj_base.css') . "' type='text/css' />";
-
         $p->{'entry'} = $s2entry;
 
-        my $userlite_journal = LJ::S2::UserLite($u);
-
         $p->{'comments'} = [];
 
         $p->{'viewing_thread'} = 0;

Tags: bml, livejournal, madeon, pm
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