This is my first try; of course, it does
not work (Don't even try!) But I hope I can find the errors and fix it:
if (pnModAvailable
('EZComments')) { // Top 10 commented stories from EZComments $column = &
$pntable['stories_column'];
$column1 = &
$pntable['ezcomments_column'];
$total =
0;
$myquery =
"SELECT $column[sid], $column[title], count($column1[objectid]) AS $total
FROM $pntable[stories] ".
$queryalang.
"
LEFT JOIN $pntable[ezcomments] ON $column[sid] = $column1[objectid]
GROUP BY $column1[objectid]
ORDER BY $total DESC";
$result =&
$dbconn->
SelectLimit($myquery,
$top);
if (!
$result->
EOF) { echo '<h2>'.
$top.
' '._COMMENTEDSTORIES.
'</h2>'.
"\n";
$lugar=
1;
while(list($sid,
$title,
$total) =
$result->
fields) { if($total>
0) { if (empty($title)) { $title =
'- '._NOTITLE.
' -';
} echo " $lugar: <a href=\"index.php?name=News&file=article&sid=$sid\">" . pnVarPrepForDisplay
(pnVarCensor
($title)) .
"</a> - (".pnVarPrepForDisplay
($total).
" "._COMMENTS.
")<br />\n";
$lugar++;
} $result->
MoveNext();
} echo '<br />'.
"\n";
} $result->
Close();
}
If anybody has suggestions, they will be greatly appreciated, since my knowledge of PostNuke is really low :(