1<?PHP
2/**
3 * Access Counter and Popularity Plugin - Helper Section
4 *
5 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author     HokkaidoPerson <dosankomali@yahoo.co.jp>
7 */
8
9if(!defined('DOKU_INC')) die();
10
11
12class helper_plugin_accscounter extends DokuWiki_Plugin {
13
14/**
15 * returns the full path to the file of counter's data specified by ID and extension
16 * A fork of the function metaFN, originally written by Steven Danz <steven-danz@kc.rr.com>
17 *
18 * @author HokkaidoPerson <dosankomali@yahoo.co.jp>
19 *
20 * @param string $id   page id
21 * @param string $ext  file extension
22 * @return string full path
23 */
24    function counterFN($id,$ext){
25        global $conf;
26        $id = cleanID($id);
27        $id = str_replace(':','/',$id);
28        $fn = $conf['metadir'].'/_accscounter/'.utf8_encodeFN($id).$ext;
29        return $fn;
30    }
31
32}
33