lindner (lindner) wrote in lj_dev,

More XFN support in profiles

Hi -- here's a patch that adds proper rel="me" for the yahoo and last.fm portions of the profile.  I'd like to also add the same to the twitter/facebook/other links from
        my $instant_message_xtra = LJ::run_hook('userinfo_instant_message_extra', user => $u, remote => $remote, mangleaddress => $mangleaddress );
If anyone can point me at the source for that I can also patch that.
Thanks!
Paul
===================================================================
--- htdocs/userinfo.bml (revision 22866)
+++ htdocs/userinfo.bml (working copy)
@@ -1080,7 +1080,7 @@
             my $yim = LJ::ehtml($u->{'yahoo'});
             my $yim_alt = $ML{'.im.yim'};
             my $yimstatus_alt = $ML{'.im.yim.status'};
-            $instant_message .= "<tr class='im_yahoo'><td class='im_icon'><img src='$LJ::IMGPREFIX/profile_icons/yahoo.gif?v=14273' alt=\"$yim_alt\" title=\"$yim_alt\" /></td><td><a href='http://profiles.yahoo.com/$yim'>$yim</a></td><td class='im_status'><img alt=\"$yimstatus_alt\" title=\"$yimstatus_alt\" src='http://opi.yahoo.com/online?u=$yim&amp;m=g&amp;t=0' width='12' height='12' /></td></tr>\n";
+            $instant_message .= "<tr class='im_yahoo'><td class='im_icon'><img src='$LJ::IMGPREFIX/profile_icons/yahoo.gif?v=14273' alt=\"$yim_alt\" title=\"$yim_alt\" /></td><td><a rel-'me' href='http://profiles.yahoo.com/$yim'>$yim</a></td><td class='im_status'><img alt=\"$yimstatus_alt\" title=\"$yimstatus_alt\" src='http://opi.yahoo.com/online?u=$yim&amp;m=g&amp;t=0' width='12' height='12' /></td></tr>\n";
         }
         if ($u->{'msn'}) {
             my $msnname = $mangleaddress->(LJ::ehtml($u->{'msn'}));
@@ -1120,7 +1120,7 @@
             my $url_escaped_last_fm_user = LJ::eurl($u->{'last_fm_user'});
             $lastfm_url =~ s/%username%/$url_escaped_last_fm_user/g;
-            my $lastfm = "<a href='$lastfm_url'>" . LJ::ehtml($u->{'last_fm_user'}) . "</a>";
+            my $lastfm = "<a rel='me' href='$lastfm_url'>" . LJ::ehtml($u->{'last_fm_user'}) . "</a>";
             my $lastfm_alt = $ML{'.im.lastfm'};
             $instant_message .= "<tr class='im_lastfm'><td class='im_icon'><img src='$LJ::IMGPREFIX/profile_icons/lastfm.gif?v=14402' alt=\"$lastfm_alt\" title=\"$lastfm_alt\" /></td><td colspan='2'>$lastfm</td></tr>\n";
         }
  • 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