Re: DiSplaying most popular pages in last 7 days
Q&D solution is to modify in lib/tikilib.php around line 2878:
Copy to clipboard
function get_top_pages($limit) { $query = "select `pageName` , `hits` from `tiki_pages` order by `hits` desc";
to
Copy to clipboard
function get_top_pages($limit,$Days) { if (isset($Days)) { $query = "select `pageName` , `hits` from `tiki_pages` where `lastModif` > (unix_timestamp(now()) -(86400 * $Days)) order by `lastModif` desc"; } else { $query = "select `pageName` , `hits` from `tiki_pages` order by `hits` desc"; }
and change line 9 in modules/mod-top_pages.php
Copy to clipboard
$ranking = $tikilib->get_top_pages($module_rows, $module_params["maxdays"]);
Then you can call the module with
Copy to clipboard
{MODULE(module=>top_pages,maxdays=>7,max=>20)}{MODULE}