alf (red_alf) wrote in changelog,
alf
red_alf
changelog

[livejournal] r18847: LJSUP-8474: Userhead as Favicon

Committer: afedorov
LJSUP-8474: Userhead as Favicon

U   trunk/cgi-bin/LJ/S2.pm
U   trunk/cgi-bin/bml/scheme/global.look
U   trunk/cgi-bin/bml/scheme/lynx.look
U   trunk/cgi-bin/ljviews.pl
Modified: trunk/cgi-bin/LJ/S2.pm
===================================================================
--- trunk/cgi-bin/LJ/S2.pm	2011-04-12 04:44:51 UTC (rev 18846)
+++ trunk/cgi-bin/LJ/S2.pm	2011-04-12 05:06:32 UTC (rev 18847)
@@ -2066,11 +2066,6 @@
         LJ::run_hooks('s2_head_content_extra', \$p->{head_content}, $remote, $opts->{r});
     }
 
-    my ($userhead) = $u->userhead;
-    $userhead = $LJ::IMGPREFIX . "/" . $userhead 
-        unless $userhead =~ m|^http://|;
-    $p->{'head_content'} .= qq{<link rel="icon" type="image/gif" href="$userhead">\n};
-    
     # Automatic Discovery of RSS/Atom
     if ($opts && $opts->{'addfeeds'}) {
         $p->{'head_content'} .= qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$p->{'base_url'}/data/rss" />\n};

Modified: trunk/cgi-bin/bml/scheme/global.look
===================================================================
--- trunk/cgi-bin/bml/scheme/global.look	2011-04-12 04:44:51 UTC (rev 18846)
+++ trunk/cgi-bin/bml/scheme/global.look	2011-04-12 05:06:32 UTC (rev 18847)
@@ -24,6 +24,17 @@
 
 REQUIREPOST=><?_ml bml.requirepost _ml?>
 
+FAVICON<=
+<?_code
+    my $u = LJ::get_active_journal();
+    return '' unless $u && $u->is_person;
+    my ($userhead) = $u->userhead;
+    $userhead = $LJ::IMGPREFIX . "/" . $userhead 
+        unless $userhead =~ m|^http://|;
+    return '<link rel="icon" type="image/gif" href="'.$userhead.'">';
+_code?>
+<=FAVICON
+
 LOAD_PAGE_INFO<=
 <?_code
 #line 3

Modified: trunk/cgi-bin/bml/scheme/lynx.look
===================================================================
--- trunk/cgi-bin/bml/scheme/lynx.look	2011-04-12 04:44:51 UTC (rev 18846)
+++ trunk/cgi-bin/bml/scheme/lynx.look	2011-04-12 05:06:32 UTC (rev 18847)
@@ -29,6 +29,7 @@
     }
     return $crumb_up;
 _code?>
+<?favicon?>
 <style>
     #Comments q { padding-left: 2.5em; font-style: italic; }
 </style>

Modified: trunk/cgi-bin/ljviews.pl
===================================================================
--- trunk/cgi-bin/ljviews.pl	2011-04-12 04:44:51 UTC (rev 18846)
+++ trunk/cgi-bin/ljviews.pl	2011-04-12 05:06:32 UTC (rev 18847)
@@ -1133,11 +1133,6 @@
     $lastn_page{'head'} .= qq{<link rel="service.post" type="application/atom+xml" title="Create a new post" href="$LJ::SITEROOT/interface/atom/post" />\n};
 
     $lastn_page{'head'} .= $u->openid_tags;
-    
-    my ($userhead) = $u->userhead;
-    $userhead = $LJ::IMGPREFIX . "/" . $userhead 
-        unless $userhead =~ m|^http://|;
-    $lastn_page{'head'} .= qq{<link rel="icon" type="image/gif" href="$userhead">\n};
 
     # Link to the friends page as a "group", for use with OpenID "Group Membership Protocol"
     {

Tags: livejournal, look, pl, 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