alf (red_alf) wrote in changelog,
alf
red_alf
changelog

[ljcom] r10373: LJSUP-8474: Userhead as Favicon

Committer: afedorov
LJSUP-8474: Userhead as Favicon

U   trunk/cgi-bin/LJ/Hooks/S2Styles.pm
U   trunk/cgi-bin/bml/scheme/lanzelot.look
Modified: trunk/cgi-bin/LJ/Hooks/S2Styles.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/S2Styles.pm	2011-04-12 04:52:47 UTC (rev 10372)
+++ trunk/cgi-bin/LJ/Hooks/S2Styles.pm	2011-04-12 05:07:37 UTC (rev 10373)
@@ -6,6 +6,13 @@
 LJ::register_hook('s2_head_content_extra', sub {
     my ($str_ref, $u, $r) = @_;
     $$str_ref .= expresslane_html_comment($u);
+    my $journal = LJ::get_active_journal();
+    if ($journal && $journal->is_person) {
+        my ($userhead) = $journal->userhead;
+        $userhead = $LJ::IMGPREFIX . "/" . $userhead 
+            unless $userhead =~ m|^http://|;
+        $$str_ref .= qq{<link rel="icon" type="image/gif" href="$userhead">\n};
+    }
 });
 
 LJ::register_hook('s2_can_use_layer', sub {

Modified: trunk/cgi-bin/bml/scheme/lanzelot.look
===================================================================
--- trunk/cgi-bin/bml/scheme/lanzelot.look	2011-04-12 04:52:47 UTC (rev 10372)
+++ trunk/cgi-bin/bml/scheme/lanzelot.look	2011-04-12 05:07:37 UTC (rev 10373)
@@ -44,10 +44,10 @@
 	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9" />
     <meta http-equiv="content-type" content="text/html; charset=utf-8">
     <title><?_code { my $elhash = $_[1]; return $elhash->{'WINDOWTITLE'} || $elhash->{'TITLE'}; } _code?></title>
-    <link rel="SHORTCUT ICON" href="<?siteroot?>/favicon.ico">
     <link rel="home" title="Home" href="<?siteroot?>/" />
     <link rel="contents" title="Site Map" href="<?siteroot?>/site/" />
     <link rel="help" title="Technical Support" href="<?siteroot?>/support/" />
+    <?favicon?>
     %%meta%%
 
 <?_code

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