==== Wikka Mod 025 ==== Type: Feature Addition ---- ===Credit:=== **[[http://web.archive.org/web/20040820215257/http://www.wakkawiki.com/ChrisTessmer | ChrisTessmer]]** [[http://web.archive.org/web/20040823065613/http://www.wakkawiki.com/OwnedPages | OwnedPages @ WakkaWiki]] ---- OwnedPages is an action that lets your users check how many pages they own. It's a fun little tool that users enjoy, even though the data is absolutely meaningless if you think about it (who cares how many pages you own; on a wiki, it's how much and how well you contribute that counts). A comparative ranking version of this idea is found in the HighScores action. You can see this [[http://web.archive.org/web/20040811013910/http://www.wakkawiki.com/WakkaActions | WakkaAction]] [[http://web.archive.org/web/20040823123754/http://christessmer.com/ahd/wiki/wakka.php?wakka=OwnedPages | http://christessmer.com/ahd/wiki/wakka.php?wakka=OwnedPages]] //(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 == Here's how to install it: == Create ''actions/ownedpages.php'': %%(php) config["table_prefix"].'pages WHERE `owner` '; $str .= "= '" . $this->UserName() . "' AND `latest` = 'Y' AND `comment_on` = '' "; $countQuery = $this->Query( $str ); # get the total # of pages $str = 'SELECT COUNT(*) FROM '.$this->config["table_prefix"].'pages WHERE `latest` = \'Y\' AND `comment_on` = \'\' '; $totalQuery = $this->Query( $str ); $count = mysql_result($countQuery, 0); $total = mysql_result($totalQuery, 0); $percent = round( ($count/$total )*100, 2 ) ; print( "You own $count pages out of the $total pages on this Wiki."); print( "
That means you own $percent% of the total." ); ?> %% To use it, just type ##""{{OwnedPages}}""## wherever you want the information to show up. --[[http://web.archive.org/web/20040820215257/http://www.wakkawiki.com/ChrisTessmer | ChrisTessmer]]