Explorar o código

Added new options, pic_width and pic_height

Morten Brix Pedersen %!s(int64=25) %!d(string=hai) anos
pai
achega
a2df274d65
Modificáronse 2 ficheiros con 9 adicións e 3 borrados
  1. 5 1
      docs/CONFIG-README
  2. 4 2
      modules/Pisg/HTMLGenerator.pm

+ 5 - 1
docs/CONFIG-README

@@ -182,8 +182,12 @@ hlink               Color of hovered links
 headline            Border color of headlines
 headline            Border color of headlines
 rankc               Colors of 'ranks' (1,2,3,4)
 rankc               Colors of 'ranks' (1,2,3,4)
 
 
+pic_height          Hardcode user picture sizes on stats page. This is when
+                    user has a pic, and you want to make it smaller.
+pic_width
+
 pic_v_0             Below settings are the filenames of the images to be
 pic_v_0             Below settings are the filenames of the images to be
-pic_v_6             shown on thepage on timebars, the names should be 
+pic_v_6             shown on the page on timebars, the names should be 
 pic_v_12            self-explainable.
 pic_v_12            self-explainable.
 pic_v_18
 pic_v_18
 pic_h_0
 pic_h_0

+ 4 - 2
modules/Pisg/HTMLGenerator.pm

@@ -429,10 +429,12 @@ sub _activenicks
         . ($self->{cfg}->{show_randquote} ?
         . ($self->{cfg}->{show_randquote} ?
         "<td bgcolor=\"#$col_r$col_g$col_b\">\"$randomline\"</td>"
         "<td bgcolor=\"#$col_r$col_g$col_b\">\"$randomline\"</td>"
         : "")
         : "")
-    );
+        );
 
 
+        my $height = $self->{cfg}->{pic_height};
+        my $width = $self->{cfg}->{pic_width};
         if ($self->{users}->{userpics}{$nick}) {
         if ($self->{users}->{userpics}{$nick}) {
-            _html("<td bgcolor=\"#$col_r$col_g$col_b\" align=\"center\"><img valign=\"middle\" src=\"$self->{cfg}->{imagepath}$self->{users}->{userpics}{$nick}\"></td>");
+            _html("<td bgcolor=\"#$col_r$col_g$col_b\" align=\"center\"><img valign=\"middle\" src=\"$self->{cfg}->{imagepath}$self->{users}->{userpics}{$nick}\" width=\"$width\" height=\"$height\"></td>");
         }
         }
 
 
         _html("</tr>");
         _html("</tr>");