alf (red_alf) wrote in changelog,
alf
red_alf
changelog

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

Committer: afedorov
LJSUP-8474: Userhead as Favicon

U   trunk/cgi-bin/LJ/S2.pm
U   trunk/cgi-bin/ljviews.pl
Modified: trunk/cgi-bin/LJ/S2.pm
===================================================================
--- trunk/cgi-bin/LJ/S2.pm	2011-04-11 08:39:01 UTC (rev 18837)
+++ trunk/cgi-bin/LJ/S2.pm	2011-04-11 08:49:08 UTC (rev 18838)
@@ -2066,6 +2066,11 @@
         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/ljviews.pl
===================================================================
--- trunk/cgi-bin/ljviews.pl	2011-04-11 08:39:01 UTC (rev 18837)
+++ trunk/cgi-bin/ljviews.pl	2011-04-11 08:49:08 UTC (rev 18838)
@@ -1133,6 +1133,11 @@
     $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, 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