[livejournal] r7756: Add an imgtag method to Userpic which ju...

Jun 21, 2006 21:29


Committer: mischaAdd an imgtag method to Userpic which just returns the HTML
img tag for this image.

Question: I'm using the keywords as the alt tag, is this what we want to do?

U trunk/cgi-bin/LJ/Userpic.pm

Modified: trunk/cgi-bin/LJ/Userpic.pm
===================================================================
--- trunk/cgi-bin/LJ/Userpic.pm 2006-06-21 21:25:33 UTC (rev 7755)
+++ trunk/cgi-bin/LJ/Userpic.pm 2006-06-21 21:29:01 UTC (rev 7756)
@@ -187,6 +187,13 @@
return $self->{url};
}

+# returns an image tag of this image
+sub imgtag {
+ my $self = shift;
+ return '
';
+}
+
# in scalar context returns comma-seperated list of keywords or "pic#12345" if no keywords defined
# in list context returns list of keywords ( (pic#12345) if none defined )
# opts: 'raw' = return '' instead of 'pic#12345'
@@ -481,7 +488,7 @@
LJ::Userpic->delete_cache($u);

my $upic = LJ::Userpic->new($u, $picid) or die "Error insantiating userpic";
- LJ::Event::NewUserpic->new($u, $upic)->fire unless $LJ::DISABLED{esn};
+ LJ::Event::NewUserpic->new($upic)->fire unless $LJ::DISABLED{esn};

return $upic;
}

Previous post Next post
Up