wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17569: ACME-72. Top 5 commenters.

Committer: wisest-owl
ACME-72. Top 5 commenters.

U   trunk/cgi-bin/LJ/Widget/TopUsers.pm
Modified: trunk/cgi-bin/LJ/Widget/TopUsers.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/TopUsers.pm	2010-10-15 03:13:06 UTC (rev 17568)
+++ trunk/cgi-bin/LJ/Widget/TopUsers.pm	2010-10-15 03:48:45 UTC (rev 17569)
@@ -9,7 +9,7 @@
 # Keys to get data from ext_block
 my %keys = (
     'ontd_authors'      => { title => "widget.topusers.top5commenters.title",   order => 2 },
-    'ontd_commenters'   => { title => "widget.topusers.top5posters.title",      order => 2 },
+    #'ontd_commenters'   => { title => "widget.topusers.top5posters.title",      order => 2 },
 );
 
 # 0 - get data from LJ::ExtBlock
@@ -81,43 +81,25 @@
     my @keys = sort { $keys{$a}->{'order'} <=> $keys{$b}->{'order'} } keys %keys;
 
     # Head of whole widget
-    $ret .= "<table><tr>";
+    $ret .= "<div class='w-topusers w-ontd'><div class='w-head'><h2><span class='w-head-in'>". $class->ml('widget.topusers.spotlight.title') ."</span></h2>
+    <i class='w-head-corner'></i></div><div class='w-content'>";
 
     foreach my $key (@keys) {
+	
+		# Header of widget column
+        $ret .= "<h3>".$keys{$key}->{'title'}."</h3>";
 
-        # Start a column
-        $ret .= "<td>";
-
-        # Header of widget column
-        $ret .= "<ul class=\"top-users-widget\"><dt>".$keys{$key}->{'title'}."</dt><dd>";
-
-        # Header of table columns
-        $ret .= '<li>' .
-                    BML::ml('widget.topusers.head.nr') .
-                    ' | ' .
-                    BML::ml('widget.topusers.head.users') .
-                '</li>';
-
         my $index = 1;
+		$ret .= "<ol>";
 
         foreach my $data (@{$keys{$key}->{'data'}}) {
 
             # Element begin
             $ret .= "<li>";
 
-            # 1. Nr
-            $ret .= "$index | ";
-
-            # 2. Userpic or paceholder
-            if ($data->{'userpic'}) {
-                $ret .= "<img src='" . $data->{'userpic'} . "' />";
-            } else {
-                $ret .= "--- No user pic ---";
-            }
-
-            # 3. User info
-            $ret .= " | ";
+            # User info
             $ret .= $data->{'display'};
+			$ret .= "<span class='num'>" . $data->{'count'} . "</span>";
 
             # Element end
             $ret .= "</li>";
@@ -126,12 +108,11 @@
         }
 
         # Footer of coumn
-        $ret .= "</dd></ul>";
-        $ret .= "</td>";
+        $ret .= "</li></ol>";
     }
 
     # Footer of whole widget
-    $ret .= "</tr></table>";
+    $ret .= "</div></div>";
 
     return $ret;
 }

Tags: livejournal, pm, wisest-owl
Subscribe

  • 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