afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-11-28 10:53 am

[dw-free] change alt text for userhead icons

[commit: http://hg.dwscoalition.org/dw-free/rev/58e857d6ec74]

http://bugs.dwscoalition.org/show_bug.cgi?id=2037

More natural flow for user head alt text: "personal profile", "community
profile", "staff profile", "site community profile", "livejournal.com
profile", etc.

Patch and screenshots by juliet.

Files modified:
  • cgi-bin/DW/External/User.pm
  • cgi-bin/LJ/User.pm
--------------------------------------------------------------------------------
diff -r d859441db241 -r 58e857d6ec74 cgi-bin/DW/External/User.pm
--- a/cgi-bin/DW/External/User.pm	Sat Nov 28 10:19:16 2009 +0000
+++ b/cgi-bin/DW/External/User.pm	Sat Nov 28 10:53:02 2009 +0000
@@ -72,7 +72,7 @@ sub ljuser_display {
     my $domain = $self->site->{domain} ? $self->site->{domain} : $self->site->{hostname};
 
     return "<span $display_class style='white-space: nowrap;'><a href='$profile_url'>" .
-           "<img src='$badge_image_url' alt='[info - $domain] ' style='vertical-align: bottom; border: 0; padding-right: 1px;' />" .
+           "<img src='$badge_image_url' alt='[$domain profile] ' style='vertical-align: bottom; border: 0; padding-right: 1px;' />" .
            "</a><a href='$journal_url'><b>$user</b></a></span>";
 }
 
diff -r d859441db241 -r 58e857d6ec74 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Sat Nov 28 10:19:16 2009 +0000
+++ b/cgi-bin/LJ/User.pm	Sat Nov 28 10:53:02 2009 +0000
@@ -2723,7 +2723,7 @@ sub ljuser_display {
             "$LJ::SITEROOT/userinfo?userid=" . $u->userid . "&amp;t=I$andfull";
   
         return "<span $display_class lj:user='$name' style='white-space: nowrap;$strike'><a href='$profile'>" .
-            "<img src='$imgurl' alt='[info - $type] ' width='$width' height='$height'" .
+            "<img src='$imgurl' alt='[$type profile] ' width='$width' height='$height'" .
             " style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a>" .
             "<a href='$url' rel='nofollow'><b>$name</b></a></span>";
 
@@ -6758,7 +6758,7 @@ sub ljuser
         my $bold = (exists $opts->{'bold'} and $opts->{'bold'} == 0) ? 0 : 1;
         my $ljusername = $bold ? "<b>$user</b>" : "$user";
 
-        my $alttext = $type ? " - $type" : "";
+        my $alttext = $type ? "$type profile" : "profile";
 
         my $link_color = "";
         # Make sure it's really a color
@@ -6770,7 +6770,7 @@ sub ljuser
         $url = $journal_url ne '' ? $journal_url : $url;
 
         return "<span $display_class lj:user='$user' style='white-space: nowrap;$strike'>" .
-            "<a href='$profile'><img src='$img/$fil' alt='[info$alttext] ' width='$x' height='$y'" .
+            "<a href='$profile'><img src='$img/$fil' alt='[$alttext] ' width='$x' height='$y'" .
             " style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a>" .
             "<a href='$url'$link_color>$ljusername</a></span>";
     };
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org