Revision history for Mod024fHighScores
Revision [23259]
Last edited on 2016-05-20 07:38:47 by JavaWoman [Replaces old-style internal links with new pipe-split links.]Additions:
**[[http://www.wakkawiki.com/ChrisTessmer | ChrisTessmer]]**
[[http://www.wakkawiki.com/HighScores | HighScores @ WakkaWiki]]
You can see this [[http://www.wakkawiki.com/WakkaActions | WakkaAction]] in action at [[http://christessmer.com/ahd/wiki/wakka.php?wakka=HighScores | http://christessmer.com/ahd/wiki/wakka.php?wakka=HighScores]] //(archived)//
-- [[http://www.wakkawiki.com/ChrisTessmer | ChrisTessmer]]
[[http://www.wakkawiki.com/HighScores | HighScores @ WakkaWiki]]
You can see this [[http://www.wakkawiki.com/WakkaActions | WakkaAction]] in action at [[http://christessmer.com/ahd/wiki/wakka.php?wakka=HighScores | http://christessmer.com/ahd/wiki/wakka.php?wakka=HighScores]] //(archived)//
-- [[http://www.wakkawiki.com/ChrisTessmer | ChrisTessmer]]
Deletions:
[[http://www.wakkawiki.com/HighScores HighScores @ WakkaWiki]]
You can see this [[http://www.wakkawiki.com/WakkaActions WakkaAction]] in action at [[http://christessmer.com/ahd/wiki/wakka.php?wakka=HighScores http://christessmer.com/ahd/wiki/wakka.php?wakka=HighScores]] //(archived)//
-- [[http://www.wakkawiki.com/ChrisTessmer ChrisTessmer]]
Revision [19279]
Edited on 2008-01-28 00:14:45 by JavaWoman [Modified links pointing to docs server]No Differences
Additions:
**[[http://www.wakkawiki.com/ChrisTessmer ChrisTessmer]]**
[[http://www.wakkawiki.com/HighScores HighScores @ WakkaWiki]]
[[http://www.wakkawiki.com/HighScores HighScores @ WakkaWiki]]
Deletions:
[[http://www.wakkawiki.com/HighScores Wakka Wiki HighScores]]
Additions:
You can see this [[http://www.wakkawiki.com/WakkaActions WakkaAction]] in action at [[http://christessmer.com/ahd/wiki/wakka.php?wakka=HighScores http://christessmer.com/ahd/wiki/wakka.php?wakka=HighScores]] //(archived)//
~&This wiki is no longer publicly accessible; the only access I could get was at the root: http://christessmer.com/; link changed to archived version --JavaWoman
~&This wiki is no longer publicly accessible; the only access I could get was at the root: http://christessmer.com/; link changed to archived version --JavaWoman
Deletions:
~&This wiki is no longer publicly accessible; the only access I could get was at the root: http://christessmer.com/ --JavaWoman
Additions:
[[http://www.wakkawiki.com/ChrisTessmer ChrisTessmer]]
[[http://www.wakkawiki.com/HighScores Wakka Wiki HighScores]]
[[http://www.wakkawiki.com/HighScores Wakka Wiki HighScores]]
Deletions:
[[http://www.wakkawiki.com/HighScores Wakka Wiki HighScores]]
Additions:
[[http://www.wakkawiki.com/HighScores Wakka Wiki HighScores]]
-- [[http://www.wakkawiki.com/ChrisTessmer ChrisTessmer]]
-- [[http://www.wakkawiki.com/ChrisTessmer ChrisTessmer]]
Deletions:
-- ChrisTessmer
Additions:
~&This wiki is no longer publicly accessible; the only access I could get was at the root: http://christessmer.com/ --JavaWoman
Additions:
2) The table formatting I used is pretty wretched //( 's .. yuck!)//; I just wanted results, //fast//. If anyone wants to make it cleaner or prettier (like using the CSS of the site to generate attractive alternating colored rows or something), by all means... GoForIt.
== Here's how to install it: ==
Create ''actions/highscores.php'':
%%(php)
<?php
# highscores.php {{HighScores}}
# by Chris Tessmer
# 19 Dec 2002
# license: GPL
$str = 'SELECT Count(*) AS cnt, `name` FROM ';
$str .= $this->config["table_prefix"] . 'users, ' ;
$str .= $this->config["table_prefix"].'pages ';
$str .= "WHERE `name` = `owner` AND `latest` = 'Y' AND `comment_on` = '' GROUP BY name ORDER BY cnt DESC;";
$rankQuery = $this->Query( $str );
$str = 'SELECT COUNT(*) FROM '.$this->config["table_prefix"].'pages WHERE `latest` = \'Y\' AND `comment_on` = \'\' ';
$totalQuery = $this->Query( $str );
$total = mysql_result($totalQuery, 0);
print( "<blockquote><table>" );
$i = 0;
while( $row = mysql_fetch_array($rankQuery) )
{
$i++;
$str = '<tr>';
$str .= "<td>$i. </td>";
$str .= '<td>'. $this->Format( $row["name"] ) .'</td>';
$str .= '<td> </td>';
$str .= '<td> </td>';
$str .= '<td>'.$row["cnt"].'</td>';
$str .= '<td> </td>';
$str .= '<td>'. round( ($row["cnt"]/$total)*100, 2).'% </td>';
$str .= '</tr>';
print( $str );
}
print( "</table></blockquote>" );
?>
%%
To use it, insert the text ##""{{HighScores}}""## into any page that you want the list to show up in.
-- ChrisTessmer
Ranking by bytes: change count(*) by sum(length(body)) in SQL queries..
-- VictorManuelVarela (2003-03-13 23:47:36)
== Here's how to install it: ==
Create ''actions/highscores.php'':
%%(php)
<?php
# highscores.php {{HighScores}}
# by Chris Tessmer
# 19 Dec 2002
# license: GPL
$str = 'SELECT Count(*) AS cnt, `name` FROM ';
$str .= $this->config["table_prefix"] . 'users, ' ;
$str .= $this->config["table_prefix"].'pages ';
$str .= "WHERE `name` = `owner` AND `latest` = 'Y' AND `comment_on` = '' GROUP BY name ORDER BY cnt DESC;";
$rankQuery = $this->Query( $str );
$str = 'SELECT COUNT(*) FROM '.$this->config["table_prefix"].'pages WHERE `latest` = \'Y\' AND `comment_on` = \'\' ';
$totalQuery = $this->Query( $str );
$total = mysql_result($totalQuery, 0);
print( "<blockquote><table>" );
$i = 0;
while( $row = mysql_fetch_array($rankQuery) )
{
$i++;
$str = '<tr>';
$str .= "<td>$i. </td>";
$str .= '<td>'. $this->Format( $row["name"] ) .'</td>';
$str .= '<td> </td>';
$str .= '<td> </td>';
$str .= '<td>'.$row["cnt"].'</td>';
$str .= '<td> </td>';
$str .= '<td>'. round( ($row["cnt"]/$total)*100, 2).'% </td>';
$str .= '</tr>';
print( $str );
}
print( "</table></blockquote>" );
?>
%%
To use it, insert the text ##""{{HighScores}}""## into any page that you want the list to show up in.
-- ChrisTessmer
Ranking by bytes: change count(*) by sum(length(body)) in SQL queries..
-- VictorManuelVarela (2003-03-13 23:47:36)
Deletions:
Additions:
2) The table formatting I used is pretty wretched //(
Deletions:
== Here's how to install it: ==
Create ''actions/highscores.php'':
%%(php)
<?php
# highscores.php {{HighScores}}
# by Chris Tessmer
# 19 Dec 2002
# license: GPL
$str = 'SELECT Count(*) AS cnt, `name` FROM ';
$str .= $this->config["table_prefix"] . 'users, ' ;
$str .= $this->config["table_prefix"].'pages ';
$str .= "WHERE `name` = `owner` AND `latest` = 'Y' AND `comment_on` = '' GROUP BY name ORDER BY cnt DESC;";
$rankQuery = $this->Query( $str );
$str = 'SELECT COUNT(*) FROM '.$this->config["table_prefix"].'pages WHERE `latest` = \'Y\' AND `comment_on` = \'\' ';
$totalQuery = $this->Query( $str );
$total = mysql_result($totalQuery, 0);
print( "<blockquote><table>" );
$i = 0;
while( $row = mysql_fetch_array($rankQuery) )
{
$i++;
$str = '<tr>';
$str .= "<td>$i. </td>";
$str .= '<td>'. $this->Format( $row["name"] ) .'</td>';
$str .= '<td> </td>';
$str .= '<td> </td>';
$str .= '<td>'.$row["cnt"].'</td>';
$str .= '<td> </td>';
$str .= '<td>'. round( ($row["cnt"]/$total)*100, 2).'% </td>';
$str .= '</tr>';
print( $str );
}
print( "</table></blockquote>" );
?>
%%
To use it, insert the text ##""{{HighScores}}""## into any page that you want the list to show up in.
-- ChrisTessmer
Ranking by bytes: change count(*) by sum(length(body)) in SQL queries..
-- VictorManuelVarela (2003-03-13 23:47:36)