Committer: bradfitzhook for alternate head icons
U trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm 2006-10-02 19:35:02 UTC (rev 9089)
+++ trunk/cgi-bin/LJ/User.pm 2006-10-02 19:37:50 UTC (rev 9090)
@@ -1107,10 +1107,10 @@
sub age {
my $u = shift;
croak "Invalid user object" unless LJ::isu($u);
-
+
my $bdate = $u->{bdate};
return unless length $bdate;
-
+
my ($year, $mon, $day) = $bdate =~ m/^(\d\d\d\d)-(\d\d)-(\d\d)/;
my $age = LJ::calc_age($year, $mon, $day);
return $age if $age > 0;
@@ -1537,7 +1537,7 @@
# FIXME: both of these solutions suck
# - ensure that LJ::S2 is loaded via Class::Autouse by calling a method on it
LJ::S2->can("dostuff");
-
+
# - also require LJ::customize
require "customizelib.pl";
@@ -1899,7 +1899,7 @@
body_text => $msgtext,
);
- # if user specified a class_key for send, set it on
+ # if user specified a class_key for send, set it on
# the msg object
if ($opts{class_key}) {
$msg->class_key($opts{class_key});
@@ -3506,6 +3506,10 @@
my $url = $u->journal_base . "/";
+ if (my ($icon, $size) = LJ::run_hook("head_icon", $u)) {
+ return $make_tag->($icon, $url, $size || 16) if $icon;
+ }
+
if ($type eq 'C') {
return $make_tag->('community.gif', $url, 16);
} elsif ($type eq 'Y') {