Просмотр исходного кода

Links for users in "These didnt make it to the top"

Christoph Berg 21 лет назад
Родитель
Сommit
b9ca5c075a
2 измененных файлов с 12 добавлено и 3 удалено
  1. 4 2
      docs/Changelog
  2. 8 1
      modules/Pisg/HTMLGenerator.pm

+ 4 - 2
docs/Changelog

@@ -2,13 +2,15 @@ pisg (0.63) - ??
    Morten:
    * A new option, ShowLines, for disabling the column with the number of
      lines in "Most Active Nicks" has been added.
+   * Choose locally-installed pisg versions ahead of system-installed pisg
+     versions. (thanks, Bruce W. Murphy)
    Christoph:
    * Updated the Swedish foul1 template (thanks, Torbjörn Svensson).
    * Updated some German strings (thanks, Igge).
    * Inhibit warning in _mostreferencednicks when a nick is referenced
      before being used first.
-   * Choose locally-installed pisg versions ahead of system-installed pisg
-   versions. (thanks, Bruce W. Murphy)
+   * Links for users in "These didn't make it to the top" (thanks, Edward
+     Pinski).
 
 pisg (0.62) - Sat Dec, 11th 2004
    Changes by Christoph Berg:

+ 8 - 1
modules/Pisg/HTMLGenerator.pm

@@ -631,8 +631,15 @@ sub _activenicks
         if ($self->{cfg}->{activenicks} <  $remain) {
             _html("<br /><b><i>" . $self->_template_text('nottop') . "</i></b><table><tr>");
             for (my $i = $self->{cfg}->{activenicks}; $i < $remain; $i++) {
+                my $visiblenick;
+                my $nick = $active[$i];
                 unless ($i % 5) { if ($i != $self->{cfg}->{activenicks}) { _html("</tr><tr>"); } }
                 my $items;
+                if ($self->{users}->{userlinks}{$nick}) {
+                    $visiblenick = $self->_format_word($self->{users}->{userlinks}{$nick}, $nick);
+                } else {
+                    $visiblenick = $self->_format_word($nick);
+                }
                 if ($self->{cfg}->{sortbywords}) {
                     $items = $self->{stats}->{words}{$active[$i]};
                 } else {
@@ -642,7 +649,7 @@ sub _activenicks
                 _html("<td class=\"rankc10\">"
                 . ($sex ? ($sex eq 'm' ? "<span class=\"male\">"
                 : ($sex eq 'f' ? "<span class=\"female\">" : "<span class=\"bot\">")) : "")
-                ."$active[$i] ($items)"
+                ."$visiblenick ($items)"
                 . ($sex ? "</span>" : "")
                 ."</td>");
             }