差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
dokuwiki:pageviewranking [2006/11/15] – admin | dokuwiki:pageviewranking [不明な日付] (現在) – 外部編集 (不明な日付) 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== 記事アクセスランキング ====== | ||
+ | monobookプラグインで、PageViewCountでカウントしたデータに基づいて、アクセスランキングを表示。 | ||
+ | * ファイルが存在しないものはランキングから外します。 | ||
+ | * アクセス権がないものもランキングから外します。 | ||
+ | - lib/ | ||
+ | <div class=" | ||
+ | <table class=" | ||
+ | < | ||
+ | <?php | ||
+ | if ($numOfPosts == 0) {$numOfPosts = 100;} | ||
+ | global $ID; | ||
+ | $pvc_server=$conf[' | ||
+ | $pvc_user=$conf[' | ||
+ | $pvc_password=$conf[' | ||
+ | $pvc_database=$conf[' | ||
+ | $pvc_table=" | ||
+ | $pvc_ip = $_SERVER[' | ||
+ | |||
+ | $con = @mysql_connect ($pvc_server, | ||
+ | if ($con) { | ||
+ | $res=mysql_select_db($pvc_database, | ||
+ | if ($res) { | ||
+ | $query = " | ||
+ | $res = @mysql_query($query, | ||
+ | $num = 1; | ||
+ | while($row = mysql_fetch_object($res)) { | ||
+ | $itemid = $row-> | ||
+ | if (!$itemid) {continue;} | ||
+ | if (isHiddenPage($itemid) || auth_quickaclcheck($itemid) < AUTH_READ) {continue;} | ||
+ | if (!file_exists(wikiFN($itemid))) {@mysql_query(" | ||
+ | $views = $row-> | ||
+ | $permanent = DOKU_URL.$itemid; | ||
+ | print '< | ||
+ | tpl_pagetitle($itemid, | ||
+ | print '</ | ||
+ | $num++; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | - lib/ | ||
+ | else if ($_REQUEST[' | ||
+ | @include(dirname(__FILE__).'/ | ||
+ | </ | ||
+ | else if ($_REQUEST[' | ||
+ | @include(dirname(__FILE__).'/ | ||
+ | </ | ||
+ | - lib/ | ||
+ | $monobook[' | ||
+ | $monobook[' | ||
+ | $monobook[' | ||
+ | </ |