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-10-20 01:41 pm

[dw-free] Different icon for official communities

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

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

Use Dreamwidth's favicon as the icon for official communities.

Patch by [staff profile] denise.

Files modified:
  • cgi-bin/LJ/User.pm
  • htdocs/img/comm_staff.png
--------------------------------------------------------------------------------
diff -r 2da14b15f804 -r c7b98352981e cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Tue Oct 20 13:00:33 2009 +0000
+++ b/cgi-bin/LJ/User.pm	Tue Oct 20 13:40:55 2009 +0000
@@ -6328,13 +6328,18 @@ sub ljuser
     }
 
     if ( $type eq 'C' ) {
-        return $make_tag->( 'silk/identity/community.png', $url, 16, '', $type_readable );
+        if ( $u->get_cap( 'staff_headicon' ) ) {
+            return $make_tag->( 'comm_staff.png', $url, 16, '', 'site community' );
+        } else {
+            return $make_tag->( "comm_${head_size}.gif", $url, $head_size, '', $type_readable ) if $head_size;
+            return $make_tag->( 'silk/identity/community.png', $url, 16, '', $type_readable );
+        }
     } elsif ( $type eq 'Y' ) {
         return $make_tag->( 'silk/identity/feed.png', $url, 16, '', $type_readable );
     } elsif ( $type eq 'I' ) {
         return $u->ljuser_display($opts);
     } else {
-        if ( $u->get_cap( 'staff_headicon' ) == 1 ) {
+        if ( $u->get_cap( 'staff_headicon' ) ) {
             return $make_tag->( 'silk/identity/user_staff.png', $url, 17, '', 'staff' );
         }
         else {
diff -r 2da14b15f804 -r c7b98352981e htdocs/img/comm_staff.png
Binary file htdocs/img/comm_staff.png has changed
--------------------------------------------------------------------------------

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